Advertisement
Guest User

Untitled

a guest
Oct 20th, 2019
155
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.65 KB | None | 0 0
  1. BATCHCODE WORKS:
  2.  
  3. a = {}
  4. caller.msg(str(a))
  5. exec("a = 'Test'")
  6. caller.msg(str(a))
  7.  
  8. RESULT:
  9. @batchcode test
  10. Running Batch-code processor - Automatic mode for test ...
  11. 01/01: a = {}\nca[...]
  12. {}
  13. Test
  14. End of batch file.
  15.   Batchfile 'test' applied.
  16.  
  17. CLASS HOOK DOESN'T:
  18.  
  19. class CmdTalk(COMMAND_DEFAULT_CLASS):
  20.    key = "talk"
  21.    locks = "cmd:all()"
  22.  
  23.    def func(self):
  24.        target = caller.search(self.args)
  25.        target.at_talk(caller)
  26.  
  27. class NPC(Character):
  28.  
  29.    def at_talk(self, caller):
  30.        a = {}
  31.        caller.msg(str(a))
  32.        exec("a = 'Test'")
  33.        caller.msg(str(a))
  34.  
  35. RESULT:
  36. *NPC Created*
  37. talk npc
  38. {}
  39. {}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement