Join us in Outworldz at http://www.outworldz.com:9000 or follow us:

[Table of Contents]

Want to add a script or a project? Upload it and a half million people will see it and your name here this year.

Home   Show All
Category: Description: Creator:
OpenSim NPC From http://opensimulator.org/wiki/NPC_Automator_2.0 // Original script by Paintball Magic. Rewritten, corrected and expanded by Nihlaeth Melody. // License: http://creativecommons.org/licenses/by-sa/2.5/ //You are free: // to Share — to copy, distribute and transmit the work // to Remix — to adapt the work // to make commercial use of the work // // Instruction Notecard // // For this script to work, ossl must be enabled with a threat level of VeryHigh. // NPCAutomator uses it's own kind of very simple script. All the commands are in the form of: // // Rules: // // Command|optionalvalue|optionalvalue| // Empty fields are maked by a "#" sign. // Commands are not case sensitive. // Spaces do matter! Do not use whitespace in commands or values that are not mean as text. // // Commands: // // NpcCreate|Test Npc|<1,1,1>| This creates an npc named Test NPC at 1,1,1 (relative to object position). // Wait|5|#| This makes the script sleep for 5 seconds. Build in waits at regular intervals to prevent flooding and make the npc come over more natural. // GotoLine|4|#| This makes the script continue at the specified line number. The first line is 0. You can also replace the number with a label name. // NpcFlyTo|<128,128,128>|#| This makes your npc fly to these coordinates (these are region coords). // NpcMoveTo|<128,128,22>|#| Same as NpcFlyTo, but walking. // NpcSetRot|Random|#| Sets a timer that changes npc rotation to random angles at a set interval. // NpcPlayAnimation|animationname|#| Plays an animation (has to be present in prim inventory). // NpcStopAnimation|animationname|#| Stops the animation. // NpcSay|Hey! I'm an npc :)|#| Makes the npc say stuff. // NpcSit|objectkey|#| Makes the npc sit on object. // NpcDelete|#|#| Remove the NPC. // GreetStrangerFirst|Hey, |#| Message that is said before avatar name when meeting someone new. // GreetStrangerLast|. Nice meeting you.|#| Message that is said after the avatar name when meeting someone new. // GreetAquaintanceFirst|Hey, |#| Message that is said before avatar name when running into an aquaintance. // GreetAquaintanceLast|. Good to see you again!|#| Message that is said after avatar name when running into an aquaintance. // AddTrigger|Help|15| A trigger is a word that triggers a reaction in the npc. In this case, when someone says the word help, the code jumps to line 14. Instead of a line number you can also specify a label name. // RemoveTrigger|Help|#| Removes a trigger word. // GotoTrigger|#|#| This command makes the code check if a trigger word has been said and then jumps to the right line. The code waits for this command to make sure it doesn't skip lines that are important. So don't forget to include this. // Label|Labelnaam|#| A label is a fixed point in the notecard that you can refer to so you don't have to keep counting lines. // // Example: // // The notecard HAS to be named "-NPC AI". It's case sensitive. // NpcCreate|Test NPC|<1, 1,1>|#| // GreetAquaintanceFirst|You again! What are you doing here, |#| // GreetAquaintanceLast|?|#| // AddTrigger|help|help| // GOTOLINE|loop|#| // Label|help|#| // NpcSay|Do you want me te help you?|#| // AddTrigger|yes|yes| // GOTOLINE|loop|#| // Label|yes|#| // NpcSay|Sorry, I don't think I'm the right person for the job.|#| // RemoveTrigger|yes|#| // GOTOLINE|loop|#| // Label|loop| // WAIT|1|#| // GOTOTrigger|#|#| // NpcMoveTo|<112,112,22>|#| // GOTOTrigger|#|#| // WAIT|3|#| // GOTOTrigger|#|#| // NpcMoveTo|<109,112,22>|#| // GOTOTrigger|#|#| // GOTOLINE|loop|#| // // // Planned: // // NpcStandUp // NpcLookAt // NpcAttach // SaveAppearance // Revising way notecards are accessed, dataserver event has to go. // // Commands: // // You can issue commands to the script directly too. I did however not revise this functionality and can't say if it works or not. For instructions, you'll have to read the script. // // // NPC Automator 2.0 script // // You don't need to change a thing about this script. Just put it in a prim together with the instruction notecard and maybe an appearance notecard and you're done.

Back to the Best Free Tools in Second Life and OpenSim.