////////////////////////////////////////////////////////////////// // Flockbot V1.2.1 by GreyLight Internet, // www.greylight.com // // Creates a flock of ten birds that function both as orniments and // helpers for the world they are in. // // Based very loosly on botfourworlds by HamFon // v1.2.1 Altitude Bug Correction by XelaG ////////////////////////////////////////////////////////////////// Label=ResetAllOfIt // 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 Set L=0 Set Q=0 Set V$=v1.2 ////////////////////////////////////////////////////////////////// // Don't change anything below this line ////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////// // Setup and login the bots ////////////////////////////////////////////////////////////////// Set L=0 Set Q=0 Set V$=v1.2.1 Label=CreateBotsLoop Set A=b // next bot // save the four bot indices as B, C, D, and E IfEqual A,0,FirstBot IfEqual A,1,SecondBot IfEqual A,2,ThirdBot IfEqual A,3,ForthBot IfEqual A,4,FifthBot IfEqual A,5,SixthBot IfEqual A,6,SeventhBot IfEqual A,7,EighthBot IfEqual A,8,NinthBot // else 10th StartBot=A/Bird9//%W$/$P/%S$ Set K=A Goto ContinueCreate Label=NinthBot StartBot=A/Bird8//%W$/$P/%S$ Set J=A Goto ContinueCreate Label=EighthBot StartBot=A/Bird7//%W$/$P/%S$ Set I=A Goto ContinueCreate Label=SeventhBot StartBot=A/Bird6//%W$/$P/%S$ Set H=A Goto ContinueCreate Label=SixthBot StartBot=A/Bird5//%W$/$P/%S$ Set G=A Goto ContinueCreate Label=FifthBot StartBot=A/Bird4//%W$/$P/%S$ Set F=A Goto ContinueCreate Label=ForthBot StartBot=A/Bird3//%W$/$P/%S$ Set E=A Goto ContinueCreate Label=ThirdBot StartBot=A/Bird2//%W$/$P/%S$ Set D=A Goto ContinueCreate Label=SecondBot StartBot=A/Bird1//%W$/$P/%S$ Set C=A Goto ContinueCreate Label=FirstBot StartBot=A/Polly//%W$/$P/%S$ Set B=A Goto ContinueCreate Label=ContinueCreate WaitFor A SelectBot A ////////////////////////////////////////////////////////////////// // Teach them the basics ////////////////////////////////////////////////////////////////// ShowChatMsgs=0 ShowAvatarMsgs=0 ShowBuildMsgs=0 Movement=1 RandomSeconds=4 RandomRadius=40000 RandomNS=125 RandomWE=125 FollowDistance=150 FollowAngle=45 SecondsToOwnBot=60 IfEqual L,1,Bot2Setup IfEqual L,2,Bot3Setup IfEqual L,3,Bot4Setup IfEqual L,4,Bot5Setup IfEqual L,5,Bot6Setup IfEqual L,6,Bot7Setup IfEqual L,7,Bot8Setup IfEqual L,8,Bot9Setup IfEqual L,9,Bot10Setup // Bot1 Altitude=1500 NS=1000 WE=1000 Avatar=21 Acquired=Chirp? Released=Chirp! // Hello=Cheep! // Goodbye=Cheep Goto EndGreetings Label Bot2Setup Altitude=1575 NS=1000 WE=-1000 Avatar=21 Acquired=Chirp? Released=Chirp! // Hello=Cheep! // Goodbye=Cheep Goto EndGreetings Label Bot3Setup Altitude=1550 NS=-1000 WE=1000 Avatar=21 Acquired=Chirp? Released=Chirp! // Hello=Cheep! // Goodbye=Cheep Goto EndGreetings Label Bot4Setup Altitude=1525 NS=-1000 WE=-1000 Avatar=21 Acquired=Chirp? Released=Chirp! // Hello=Cheep! // Goodbye=Cheep Goto EndGreetings Label Bot5Setup Altitude=1525 NS=-1000 WE=-1000 Avatar=21 Acquired=Chirp? Released=Chirp! // Hello=Cheep! // Goodbye=Cheep Goto EndGreetings Label Bot6Setup Altitude=1525 NS=-1000 WE=-1000 Avatar=21 Acquired=Chirp? Released=Chirp! // Hello=Cheep! // Goodbye=Cheep Goto EndGreetings Label Bot7Setup Altitude=1525 NS=-1000 WE=-1000 Avatar=21 Acquired=Chirp? Released=Chirp! // Hello=Cheep! // Goodbye=Cheep Goto EndGreetings Label Bot8Setup Altitude=1525 NS=-1000 WE=-1000 Avatar=21 Acquired=Chirp? Released=Chirp! // Hello=Cheep! // Goodbye=Cheep Goto EndGreetings Label Bot9Setup Altitude=1525 NS=-1000 WE=-1000 Avatar=21 Acquired=Chirp? Released=Chirp! // Hello=Cheep! // Goodbye=Cheep Goto EndGreetings Label Bot10Setup Altitude=1525 NS=-1000 WE=-1000 Avatar=21 Acquired=Chirp? Released=Chirp! // Hello=Cheep! // Goodbye=Cheep Goto EndGreetings Label EndGreetings Set L=L+1 IfLess L,9,CreateBotsLoop Speak=1 OnGotoNotFound=GotoNotFound // PSOwnerOnly=1 SelectBot K OnTextEntered=Bot10Spoke AllowCommandLine=1 SelectBot J OnTextEntered=Bot9Spoke AllowCommandLine=1 SelectBot I OnTextEntered=Bot8Spoke AllowCommandLine=1 SelectBot H OnTextEntered=Bot7Spoke AllowCommandLine=1 SelectBot G OnTextEntered=Bot6Spoke AllowCommandLine=1 SelectBot F OnTextEntered=Bot5Spoke AllowCommandLine=1 SelectBot E OnTextEntered=Bot4Spoke AllowCommandLine=1 SelectBot D OnTextEntered=Bot3Spoke AllowCommandLine=1 SelectBot C OnTextEntered=Bot2Spoke AllowCommandLine=1 SelectBot B // The MCP Bot OnPSTextEntered=Bot1Spoke AllowCommandLine=1 Label=MainLoop Pause=180 IfOwned=MainLoop // Say -chirp- Goto MainLoop Label=Bot1Spoke SelectBot B Goto MCPLoop Label=Bot2Spoke SelectBot C Goto BotProcessSpeak Label=Bot3Spoke SelectBot D Goto BotProcessSpeak Label=Bot4Spoke SelectBot E Goto BotProcessSpeak Label=Bot5Spoke SelectBot F Goto BotProcessSpeak Label=Bot6Spoke SelectBot G Goto BotProcessSpeak Label=Bot7Spoke SelectBot H Goto BotProcessSpeak Label=Bot8Spoke SelectBot I Goto BotProcessSpeak Label=Bot9Spoke SelectBot J Goto BotProcessSpeak Label=Bot10Spoke SelectBot K Goto BotProcessSpeak Label Bot1SpokePS SelectBot B Goto Bot1Spoke ////////////////////////////////////////////////////////////////// // Set the commands ////////////////////////////////////////////////////////////////// Label=GoodDay IfLess h 12 Morning IfLess h 18 Afternoon Say Good Evening %o Goto EndGoodDay Label=Morning Say Good Morning %o Goto EndGoodDay Label=Afternoon Say Good Afternoon %o Label=EndGoodDay Label=MCPLoop IfTextContains=MoveTo moveto IfTextContains=SetRadius setradius IfTextContains=SetSkyColor setskycolor IfTextContains=SetSky setsky IfTextContains=ResetFlock resetflock Label BotProcessSpeak IfTextContains=WhatSky whatsky IfTextContains=ShowHelp Help IfTextContains=ShowVersion Version IfTextContains=ShowTime Time IfTextContains=Release Leave IfTextContains=ShowWhere Where IfTextContains=GiveBotTo Give IfTextContains=CitizenName CitName IfTextContains=CitizenNumber CitNum IfTextContains=ShowNeighbors Neighbor IfTextContains=LikeNoLike Like IfTextContains=GoodDay Hello SaveChatLine A$ Goto MainLoop Label=ShowHelp IfTextContains=HelpGiveTo GiveTo IfTextContains=HelpCitName CitName IfTextContains=HelpCitNum CitNum IfTextContains=HelpMoveTo MoveTo IfTextContains=HelpSetSkyColor SetSkyColor IfTextContains=HelpSetSky SetSky Say Type a sentence including one of these words: Help, Version, Time, Like, Leave, Hello, Neighbors, SetRadius, WhatSky, or Where. Say Or use any of these commands (you can get more help on them using HELP CitNum (for example)) Say GiveTo, CitName, CitNum, MoveTo, SetSkyColor, SetSky Say The MCP commands are MoveTo, SetSkyColor, SetSky, SetRadius, ResetFlock. These commands will not work for anyone who is not a PS. Goto MainLoop Label HelpGiveTo Say Type GIVETO, followed by a space, then another avatar name (use quotes around tourist names). Goto MainLoop Label HelpSetSkyColor Say Type SetSkyColor followed by the R B and B values. (setskycolor 100 15 250) Goto MainLoop Label HelpSetSky Say Type SetSky followed by the backdrop name. (setsky simplyaw) Goto MainLoop Label HelpCitName Say Type CITNAME, followed by a space, then a citizen number. Goto MainLoop Label HelpCitNum Say Type CITNUM, followed by a space, then a citizen name. Goto MainLoop Label HelpMoveTo Say The MoveTo MCP command relocates the entire flock of birds. Its format is 'MoveTo NSCoord WECoord Altitude Quadrent(NW,NE,SE,SW)' Goto MainLoop Label=ShowTime Say Today is %a, %m %d, %y, at %h:%n:%s VRT Goto MainLoop Label=ShowVersion Say I am a %V$ of FlockBot, running version %v of HamBot. Contact GreyLight Internet ( www.greylight.com ) for script enhancements. Goto MainLoop Label=Release ReleaseOwnership=1 Goto MainLoop Label=ShowWhere Say I'm currently at %t NS, %u WE, Alt is %l, Rotation is %i Goto MainLoop Label=CitizenName SaveChatLine A$ ParseFirstNumber Z A$ GetCitizenName Z A$ Say Citizen name for %Z is %A$ Goto MainLoop Label=CitizenNumber SaveChatLine A$ ChopFirstWord A$ GetCitizenNumber Z %A$ Say Citizen number for %A$ is %Z Goto MainLoop Label ShowNeighbors LoadNeighborsList B$ Set A$=Neighbors are %B$ Say %A$ Goto MainLoop Label GotoNotFound Say Goto label was not found = resetting Set Q=0 Goto MainLoop Label GiveBotTo SaveChatLine A$ ChopFirstWord A$ GiveBotTo A$ Goto MainLoop Label LikeNoLike Set V=r%3 IfEqual=V,0,ULNL IfEqual=V,1,LLNL IfEqual=V,2,DLNL Goto MainLoop Label=ULNL Say Chirp Goto MainLoop Label=LLNL Say Chirp! Chirp! Goto MainLoop Label=DLNL Say -splat- Goto MainLoop // MCP Commands Label=MoveTo SaveChatLine M$ ExtractWord N$ 1 M$ ExtractWord W$ 2 M$ ExtractWord A$ 3 M$ Evaluate N=N$ Evaluate W=W$ Evaluate A=A$ IfTextContains=NWQuad NW IfTextContains=NEQuad NE IfTextContains=SWQuad SW IfTextContains=SEQuad SE Say Error Moving. Goto MainLoop Label=NWQuad Say Moving Flock to %N$ North, %W$ West, and %A$ Altitude SelectBot B Altitude=A*100 NS=N*1000 WE=W*1000 SelectBot C Altitude=A*100 NS=N*1000 WE=W*1000 SelectBot D Altitude=A*100 NS=N*1000 WE=W*1000 SelectBot E Altitude=A*100 NS=N*1000 WE=W*1000 SelectBot F Altitude=A*100 NS=N*1000 WE=W*1000 SelectBot G Altitude=A*100 NS=N*1000 WE=W*1000 SelectBot H Altitude=A*100 NS=N*1000 WE=W*1000 SelectBot I Altitude=A*100 NS=N*1000 WE=W*1000 SelectBot J Altitude=A*100 NS=N*1000 WE=W*1000 SelectBot K Altitude=A*100 NS=N*1000 WE=W*1000 Goto MainLoop Label=NEQuad Say Moving Flock to %N$ North, %W$ East, and %A$ Altitude SelectBot B Altitude=A*100 NS=N*1000 WE=-W*1000 SelectBot C Altitude=A*100 NS=N*1000 WE=-W*1000 SelectBot D Altitude=A*100 NS=N*1000 WE=-W*1000 SelectBot E Altitude=A*100 NS=N*1000 WE=-W*1000 SelectBot F Altitude=A*100 NS=N*1000 WE=-W*1000 SelectBot G Altitude=A*100 NS=N*1000 WE=-W*1000 SelectBot H Altitude=A*100 NS=N*1000 WE=-W*1000 SelectBot I Altitude=A*100 NS=N*1000 WE=-W*1000 SelectBot J Altitude=A*100 NS=N*1000 WE=-W*1000 SelectBot K Altitude=A*100 NS=N*1000 WE=-W*1000 Goto MainLoop Label=SWQuad Say Moving Flock to %N$ South, %W$ West, and %A$ Altitude SelectBot B Altitude=A*100 NS=-N*1000 WE=W*1000 SelectBot C Altitude=A*100 NS=-N*1000 WE=W*1000 SelectBot D Altitude=A*100 NS=-N*1000 WE=W*1000 SelectBot E Altitude=A*100 NS=-N*1000 WE=W*1000 SelectBot F Altitude=A*100 NS=-N*1000 WE=W*1000 SelectBot G Altitude=A*100 NS=-N*1000 WE=W*1000 SelectBot H Altitude=A*100 NS=-N*1000 WE=W*1000 SelectBot I Altitude=A*100 NS=-N*1000 WE=W*1000 SelectBot J Altitude=A*100 NS=-N*1000 WE=W*1000 SelectBot K Altitude=A*100 NS=-N*1000 WE=W*1000 Goto MainLoop Label=SEQuad Say Moving Flock to %N$ South, %W$ East, and %A$ Altitude SelectBot B Altitude=A*100 NS=-N*1000 WE=-W*1000 SelectBot C Altitude=A*100 NS=-N*1000 WE=-W*1000 SelectBot D Altitude=A*100 NS=-N*1000 WE=-W*1000 SelectBot E Altitude=A*100 NS=-N*1000 WE=-W*1000 SelectBot F Altitude=A*100 NS=-N*1000 WE=-W*1000 SelectBot G Altitude=A*100 NS=-N*1000 WE=-W*1000 SelectBot H Altitude=A*100 NS=-N*1000 WE=-W*1000 SelectBot I Altitude=A*100 NS=-N*1000 WE=-W*1000 SelectBot J Altitude=A*100 NS=-N*1000 WE=-W*1000 SelectBot K Altitude=A*100 NS=-N*1000 WE=-W*1000 Goto MainLoop Label=SetRadius SaveChatLine M$ ParseFirstNumber M M$ RandomRadius=M say Setting random movement radius to %M Goto MainLoop Label=ResetFlock Say Attempting to reset flock KillBOT=B KillBOT=C KillBOT=D KillBOT=E KillBOT=F KillBOT=G KillBOT=H KillBOT=I KillBOT=J KillBOT=K Goto ResetAllOfIt Label=SetSky SaveChatLine M$ ExtractWord S$ 1 M$ WorldBackdrop=%S$ WorldChange=1 Say Backdrop changed to %S$ Goto MainLoop Label=SetSkyColor SaveChatLine M$ ExtractWord R$ 1 M$ ExtractWord G$ 2 M$ ExtractWord B$ 3 M$ Evaluate R=R$ Evaluate G=G$ Evaluate B=B$ WorldRed=R WorldGreen=G WorldBlue=B WorldChange=1 Say Sky color has been changed to R% G% B% Goto MainLoop Label=WhatSky Say The current backdrop is %j Say The current RGB values are %c %g %f Goto MainLoop