Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from evennia import DefaultObject, Command, CmdSet, default_cmds, search_object, utils
- from evennia.utils.evmenu import EvMenu
- def menu_start_node(caller):
- text = "Are you a god?"
- options = ({"desc": "Yes",
- "goto": "life"},
- {"desc": "Ummm, no",
- "exec": **HOW DO I BREAK OUT FROM HERE AND GET TO move_player?**,
- "goto": "BADEND"},
- {"desc": "Leave Conversation",
- "goto": "END"})
- return text, options
- def life(caller):
- text = "Oh, alrigtht then, rock on man."
- options = ({"desc": "Leave Conversation",
- "goto": "END"})
- return text, options
- def END(caller):
- text = "We're done talking."
- options ()
- return text, options
- def BADEND(caller):
- text = "If someone asks if you're a god... you say YES!!!"
- options ()
- return text, options
- def move_player(self):
- def func(self):
- self.caller.msg("You have angered the Scorpion God, he banishes you.")
- send_to = self.obj.send_volcano
- results = search_object(send_to)
- self.caller.move_to(results[0], quiet=True)
- class CmdTalk(default_cmds.MuxCommand):
- key = "talk scorpion god"
- alias = ["Talk Scorpion God", "talk Scorpion God", "Talk scorpion god"]
- locks = "cmd:all()"
- def func(self):
- EvMenu(self.caller, "typeclasses.talking_scorpion_god",
- startnode="menu_start_node")
- class ScorpionGodCmdSet(CmdSet):
- key = "scorpiongodcmdset"
- def at_cmdset_creation(self):
- self.add(CmdTalk())
- class scorpiongodNPC(DefaultObject):
- def at_object_creation(self):
- self.db.desc = "This guy is a real chatterbox."
- self.cmdset.add_default(ScorpionGodCmdSet, permanent=True)
- self.locks.add("get:false()")
- self.locks.add("view:not tag(defeat, scorpiongod)")
- self.db.send_volcano = "#661"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement