NPCcontrol: type: world events: on npctrl command: - define arg1 - define arg2 - define hasAdminPerm - if { - run "FinishCommand" } else if { - if ! { - narrate targets:p@ "You have to be an Admin to do that." - run "FinishCommand" } - if { - ^narrate "Lists has been cleared." - flag global defaultSleepNpcList:! - flag global CountryWorker:! - run "FinishCommand" } else if { - run "NpcCtrlList" - run "FinishCommand" } } else { - run "FinishCommand" } "NpcCtrlList": type: task script: - ^narrate "" - ^narrate "<&b>========== <&a>Listing NPC's in lists <&b>==========" - ^narrate "" - ^narrate "<&b>---------- <&a>default Sleepcycle<&b>----------" - ^define countera 0 - foreach { - define counter - narrate "<&b><&co> <&a>%value%" } - ^narrate "" - ^narrate "<&b>---------- <&a>Countryman Workcycle<&b>----------" - ^define counterb 0 - foreach { - define counter - narrate "<&b><&co> <&a>%value%" } - ^narrate "" "FinishCommand": type: task script: - determine fulfilled - queue clear