////////////////////////////////////////////////////////////////// // SlaveScript v0.6 (f) by GreyLight Internet, // www.greylight.com // // Creates a female companion bot, able to do simple chat and a few // usefull things. Entertainment only. // // Based very loosly on botchat by HamFon ////////////////////////////////////////////////////////////////// // The universe it logs into. (auth.activeworlds.com for active worlds) Set S$=www.vmenta.com // The port settings. Usually don't need to change this. Set P=5670 // The world it logs into Set W$=menta // The Bot's Name Set N$=Wren Set L=0 Set Q=0 Set V$=v0.6 (f) Set A=b StartBot=A/%N$//%W$/P$/%S$ WaitFor A SelectBot A // The north south coords NS=0 // The east west coords WE=0 // Starting altitude Altitude=0 // Starting avatar index (Zero based, folks) Avatar=22 ShowChatMsgs=0 ShowAvatarMsgs=0 ShowBuildMsgs=0 Movement=1 RandomSeconds=4 RandomRadius=5000 RandomNS=100 RandomWE=100 // ========================= // End of startup // ========================= // ========================= // Basic interactions // ========================= Acquired=Yes master %o? Released=Thank you master %o. Call me if you need anything further. *smile* // Hello=Welcome to %w master %o. It is %a, %m %d, %y at %h:%n:%s VRT, and I am your slavebot this evening. *smile* // Goodbye=Good journy to you %o. FollowDistance=150 FollowAngle=45 SecondsToOwnBot=60 AllowCommandLine=1 // ========================= // End basic interactions // ========================= // ========================= // Dictionary // ========================= AddDefine=afk='afk' --> Away From Keyboard AddDefine=bbl='bbl' --> Be Back Later AddDefine=brb='brb' --> Be Right Back AddDefine=brh='brh' --> Be Right Here AddDefine=bot=A bot is an automated avatar which moves, builds, chats, etc., without programmer intervention. AddDefine=btw='btw' --> By The Way AddDefine=d/l='d/l' --> Down Load AddDefine=fotc='fotc' --> Falling Off The Chair AddDefine=fubar='fubar' --> Fucked Up Beyond All Recognition AddDefine=imho='imho' --> In My Humble Opinion AddDefine=lmao='lmao' --> Laughing My Ass Off AddDefine=lol='lol' --> Laughing Out Loud AddDefine=rotf='rotf' --> Rolling On The Floor AddDefine=rofl='rofl' --> Rolling On Floor Laughing AddDefine=rtfm='rtfm' --> Read The Fucking Manual AddDefine=snafu='snafu' --> Situation Normal - All Fouled Up AddDefine=wb='wb' --> Welcome Back AddDefine=VR='VR' --> A virtual realm the mimics Reality. This is a virtual world. AddDefine=newbie='newbie' --> A beginner, sometimes annoying, and never in full posession of the facts. AddDefine=cha='cha object' --> A programing term, especially Internet programming, meaning Click Here Asshole. AddDefine=optimist='Optimist' --> Someone who is about to discover more facts. // ========================= // End Dictionary // ========================= OnTextEntered=SlaveSpoke OnGotoNotFound=GotoNotFound Set V$=v0.60 Label=MainLoop Speak=10 Pause=180 IfOwned=MainLoop // Say Say my name (%z) to own me *smile* Goto MainLoop // ========================= // Text Control (SlaveSpoke) // ========================= Label=SlaveSpoke Speak=1 IfTextContains=ShowHelp Help IfTextContains=ShowTime Time IfTextContains=Release Leave IfTextContains=ShowWhere Where IfTextContains=ShowGesture Action IfTextContains=ShowGesture Gesture IfTextContains=Dance dance IfTextContains=Girl girl IfTextContains=ShowAvatar Avatar IfTextContains=DoTest Test IfTextContains=DoDefine Defin IfTextContains=DoDefine Mean IfTextContains=GiveBotTo Give IfTextContains=Dictionary Dict IfTextContains=Pester pester IfTextContains=Cigar cigar IfTextContains=CitizenName CitName IfTextContains=CitizenNumber CitNum IfTextContains=GoodDay Hello IfTextContains=ThankYou Thank IfTextContains=Master master IfTextContains=Beer Beer IfTextContains=Wine wine IfTextContains=Music music IfTextContains=Snack chips IfTextContains=Like like IfTextContains=Behave behave IfTextContains=Coin coin IfTextContains=Stand stand IfTextContains=Move move IfTextContains=ShutDown Sleep IfTextContains=ShowVersion Version IfTextContains=TryBuild Build Goto MainLoop // ========================= // End Text Control // ========================= // ========================= // No Smoking! (cigar) // ========================= Label=Cigar Say No smoking master! Goto MainLoop // ========================= // Stand still // ======================== Label=Stand Say Yes Master. I'll stay here. Movement=0 Goto MainLoop // ========================= // May move // ======================== Label=Move Say Thank you Master. *smile* Movement=1 Goto MainLoop // ========================= // Dance // ========================= Label=Dance Say Yes master. *smile* Gesture=6 Goto MainLoop // ========================= // Hour Greeting // ========================= Label=GoodDay IfLess h 12 Morning IfLess h 18 Afternoon Say Good Evening master, and welcome to %w world Goto EndGoodDay Label=Morning Say Good Morning master, and welcome to %w world Goto EndGoodDay Label=Afternoon Say Good Afternoon master, and welcome to %w world Label=EndGoodDay Goto MainLoop // ========================= // Like/Dislike (Note: Random routine is pathetic.) // ========================= Label=Like IfTextContains=It it IfTextContains=Him him IfTextContains=Her her Label=It Set v=r%3 IfEqual=V,0,Uit IfEqual=V,1,Lit IfEqual=V,2,Dit Say Sorry master, Var is out of range is secondary loop. Goto MainLoop Label=Uit Say I can't decide... Goto MainLoop Label=Lit Say Yeah! I love it! Goto MainLoop Label=Dit Say No master, I don't like it. Goto MainLoop Say Sorry master. Var is out of range. Goto MainLoop Label=Him Set V=r%3 IfEqual=V,0,Uhim IfEqual=V,1,Lhim IfEqual=V,2,Dhim Say Sorry master, Var is out of range is secondary loop. Goto MainLoop Label=Uhim Say I don't know about him... Goto MainLoop Label=Lhim Say Yes master, I like him. *smile* Goto MainLoop Label=Dhim Say I don't like him. Goto MainLoop Say Sorry master. Var is out of range. Goto MainLoop Label=Her Set V=r%3 IfEqual=V,0,Uher IfEqual=V,1,Lher IfEqual=V,2,Dher Say Sorry master, Var is out of range is secondary loop. Goto MainLoop Label=Uher Say I don't have an opinion about her... Goto MainLoop Label=Lher Say Yes master. You can keep her. *smile* Goto MainLoop Label=Dher Say I don't like her. Goto MainLoop Say Sorry master. Var is out of range. Goto MainLoop Say I'm sorry, I don't understand master. Goto MainLoop // ========================= // End Like/Dislike // ========================= // ========================= // Behave // ========================= Label=Behave Say Yes master. I'll be good. *smile* Goto MainLoop // ========================= // Help // ========================= Label=ShowHelp Say I know about Help, Time, Leave, Where, Action, Gesture, Dance, Avatar, Test, Defin, Mean, Give, Dict, CitName, CitNum, Hello, Thank, Master, Beer, Wine, Music, Chips, Behave, Coin, Sleep, Version and Build. Goto MainLoop // ========================= // Show the Time // ========================= Label=ShowTime Say Today is %a, %m %d, %y, at %h:%n:%s. Goto MainLoop // ========================= // Show Version // ========================= Label=ShowVersion Say I am a version %v of HamBot, running MasteGrey's SlaveScript %V$ Goto MainLoop // ========================= // Thank You // ========================= Label=ThankYou Say You are welcome master. *smile* Goto MainLoop // ========================= // Who's the Boss? // ========================= Label=Master Say MasterGrey is my true Master, but %o is my master for now... *smile* Gesture=2 Goto MainLoop // ========================= // Release // ========================= Label=Release ReleaseOwnership=1 Goto MainLoop // ========================= // Beer // ========================= Label=Beer Say Serves %o a cold frosty one Goto MainLoop // ========================= // Wine // ========================= Label=Wine Say Serves %o a glass a fine wine Goto MainLoop // ========================= // Music // ========================= Label=Music Say Spins up the CD player and puts on Enya Goto MainLoop // ========================= // Snack // ========================= Label=Snack Say Serves a bowl of chips and dip Goto MainLoop // ========================= // Where are you? // ========================= Label=ShowWhere Say I'm currently at %t NS, %u WE, Alt is %l, Rotation is %i Goto MainLoop // ========================= // Change Avatars // ========================= Label=ShowAvatar IfTextContains=AvRandom Random IfTextContains=AvAlicia Alicia IfTextContains=AvBecca Becca IfTextContains=AvJenna Jenna IfTextContains=AvKim Kim IfTextContains=AvRachel Rachel IfTextContains=AvSarah Sarah IfTextContains=AvVanessa Vanessa IfTextContains=AvRandom change SaveChatLine=1 ParseFirstNumber Z IfGreater Z -1 AvNumeric Say Sorry master, I can't do that. I know the Alicia, Becca, Jenna, Kim, Rachel, Sarah, Vanessa, Change, and Random Avatars. Goto MainLoop Label=AvNumeric Say Changing to avatar number %Z Avatar Z Goto MainLoop Label=AvAlicia Say Changing to the Alicia avatar Avatar 3 Goto MainLoop Label=AvBecca Say Changing to the Becca avatar Avatar 5 Goto MainLoop Label=AvJenna Say Changing to the Jenna avatar Avatar 7 Goto MainLoop Label=AvKim Say Changing to the Kim avatar Avatar 9 Goto MainLoop Label=AvRachel Say Changing to the Rachel avatar Avatar 11 Goto MainLoop Label=AvSarah Say Changing to the Sarah avatar Avatar 13 Goto MainLoop Label=AvVanessa Say Changing to the Vanessa avatar Avatar 15 Goto MainLoop Label=AvRandom // random number - 33 avs in beta (0 - 32), but don't select tourist Set Z=r%16+2 Say Changing to a random avatar %Z Avatar Z Goto MainLoop // ========================= // End Change Avatars // ======================== // ========================= // Actions // ======================== Label=ShowGesture IfTextContains=DoHappy Happy IfTextContains=DoAngry Angry IfTextContains=DoWave Wave IfTextContains=DoJump Jump IfTextContains=DoFight Fight IfTextContains=DoDance Dance SaveChatLine=1 ParseFirstNumber Z IfGreater Z -1 DoNumeric Say Sorry master, I don't know that action. *frown* Goto MainLoop Label=DoNumeric Gesture=Z Goto MainLoop Label=DoHappy Gesture=1 Goto MainLoop Label=DoAngry Gesture=2 Goto MainLoop Label=DoWave Gesture=3 Goto MainLoop Label=DoJump Gesture=4 Goto MainLoop Label=DoFight Gesture=5 Goto MainLoop Label=DoDance Gesture=6 Goto MainLoop // ========================= // End Actions // ======================== // ========================= // Build // ======================== Label TryBuild Set P=0 // build index IfLess t 40000 BuildMove IfLess u 40000 BuildMove BuildIndex=P BuildObject=walk002h.rwx BuildAction=Action BuildDescription=Description Say Building chat object SaveChatLine=1 ChopFirstWord=1 DoBuildChat=1 ReleaseObject P BuildNS=40600 BuildWE=40000 BuildAlt=0 BuildAngle=450 Say Building script object DoBuildScript=1 ReleaseObject P BuildNS=41000 BuildObject=walk003h.rwx Say Building another script object DoBuildScript=1 Pause 5 BuildObject=walk004h.rwx Say Changing script object DoBuildScript=1 ReleaseObject P Goto MainLoop Label BuildMove Say Have your owner teleport you to 40N 40W before trying to build :-) Goto MainLoop // ========================= // End Build // ======================== // ========================= // Citizen name // ======================== Label=CitizenName SaveChatLine=1 ParseFirstNumber Z GetCitizenName Z Say Citizen name for %Z is %e Goto MainLoop // ========================= // Citizen number // ======================== Label=CitizenNumber SaveChatLine=1 ChopFirstWord=1 GetCitizenNumber Z %e Say Citizen number for %e is %Z Goto MainLoop // ========================= // test // ======================== Label DoTest Set Q=Q+1 Goto Label%Qx%Q Label Label1x1 Say Label1x1 Set B=41 Label TestLoop Set A=0 GetCitizenNumber A Peacekeeper %B Say Citizen number for Peacekeeper %B is %A Set B=B+1 IfLess B,46,TestLoop Goto MainLoop Label Label2x2 Say Label2x2 Set B=283000 Label TestLoop2 GetCitizenName B Say Citizen name for %B is %e Set B=B+1 IfLess B,283005,TestLoop2 Goto MainLoop Label Label3x3 Say Label3x3 SetGlobalString=In world %w and B is %B *smile* Say Global String value is '%e' Goto MainLoop Label Label4x4 Say Label4x4 Goto MainLoop // ========================= // End test // ======================== // ========================= // Not Found // ======================== Label GotoNotFound Say Sorry Master, Goto label was not found = resetting Set Q=0 Goto MainLoop // ========================= // Define something // ========================= Label DoDefine SaveChatLine=1 DisplayDefinition=1 Goto MainLoop Label Dictionary DisplayDictionary=1 Goto MainLoop // ========================= // Pester __________ // ========================= Label Pester SaveChatLine=1 ChopFirstWord=1 ChopFirstWord=1 GiveBotTo=1 Goto MainLoop // ========================= // Give bot to ________ // ========================= Label GiveBotTo SaveChatLine=1 ChopFirstWord=1 GiveBotTo=1 Goto MainLoop // ========================= // ShutDown (sleep) // ========================= Label ShutDown Say Good night Master, sleep well. KillBOT=A // ========================= // Feedback to bot (girl) // ======================== Label=Girl IfTextContains=GoodGirl good IfTextContains=BadGirl bad SaveChatLine=1 Goto MainLoop Label=GoodGirl Say *smile* Goto MainLoop Label=BadGirl Say Sorry Master *frown* Goto MainLoop // ========================= // Flip Coin (Note: Random routine is pathetic.) // ========================= Label=Coin Set C=r%2 IfEqual=C,0,Heads IfEqual=C,1,Tails Say Sorry Master. Var is out of range. Goto MainLoop Label=Heads Say Heads master. Goto MainLoop Label=Tails Say Tails master. Goto MainLoop // ========================= // End Flip Coin // =========================