- D1 Meta Docs - Denizen Script -
Home Page / Pi to one million places / Contact mcmonkey / Donate / Paste Scripts / Denizen Help /
You are browsing as a guest.
Login | Register


Click here to create your own public paste ~ ~ click to duplicate and edit this paste


TitleDiff note for paste #12507
TypeDiff
Date2015/01/01 23:46:11 UTC-08:00
ByGuest
Other
Paste
 Sitting:
   Type: Assignment
   Actions:
     On Assignment:
       - Trigger Name:Chat State:true
   Interact Scripts:
   - 100 Sitting Listener
 
 Sitting Listener:
   Type: Interact
   Steps:
     1:
       Chat Trigger:
         1:
           Trigger: /sit/
           Script:
             - flag player sitter:<npc>
             - flag player chatter
             - chat "Ok. Where do you want me to sit?"
 
 ChooseBlockListener:
   Type: World
   Events:
     on server start:
     - run timedLoop
 
     On player Clicks Block:
     - if <player.has_flag[chatter]> {
       - if <c.location.material.contains[stairs]> {
         - flag <player.flag[sitter]> sitloc:<context.location.sub[-.5,.5,-.5]>
         - sit <context.location.sub[-.5,.5,-.5]> npc:<player.flag[sitter]>
         - flag <player.flag[sitter]> sitter
         - flag chatter:!
         } else narrate "<red>This is not a seat."
       }
 
     On npc command:
     - define arg_size <context.args.size>
     - if %arg_size% == 3 {
       - if <context.args.get[2]> == "--assume" {
         - flag <player.selected_npc> posed:<c.args.get[3]> 
         - narrate "You just set an NPC's pose!"
         }
-      } 
-    
+      }
+
 timedLoop:
   type: task
   script:
     - foreach <server.get_npcs_flagged[sitter]> {
       - sit <def[value].flag[sitloc]> npc:<def[value]>
       }
     - foreach <server.get_npcs_flagged[posed]> {
       - pose assume id:<def[value].flag[posed]> npc:<def[value]>
       }
     - wait 50s
     - inject s@timedLoop
 
 
 
 
 



RawRaw



Pastes made: 61946