Guest User

Untitled

a guest
Sep 29th, 2017
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.77 KB | None | 0 0
  1. #CODE BY JOIN(ADI)
  2. import ui
  3. import player
  4. import constInfo
  5. import chat
  6. import event
  7. import uiZapis
  8.  
  9. class TeleportDialog(ui.ScriptWindow):
  10.  
  11. def __init__(self):
  12. ui.ScriptWindow.__init__(self)
  13.  
  14. self.__LoadDialog()
  15. self.UpdateMaps()
  16.  
  17. self.wndZapis = uiZapis.ZapisDialog()
  18.  
  19. def __del__(self):
  20. ui.ScriptWindow.__del__(self)
  21.  
  22. def __LoadDialog(self):
  23.  
  24. try:
  25.  
  26. pyScrLoader = ui.PythonScriptLoader()
  27. pyScrLoader.LoadScriptFile(self, "uiscript/tpwindow.py")
  28.  
  29. self.GetChild("TitleBar").SetCloseEvent(ui.__mem_func__(self.Close))
  30. self.Jinno = self.GetChild("jinno")
  31. self.Shinsoo = self.GetChild("shinsoo")
  32. self.Jinnom2 = self.GetChild("jinnom2")
  33. self.Shinsoom2 = self.GetChild("shinsoom2")
  34. self.Exp1 = self.GetChild("exp1")
  35. self.Exp2 = self.GetChild("exp2")
  36. self.Exp3 = self.GetChild("exp3")
  37. self.Exp4 = self.GetChild("exp4")
  38. self.Exp5 = self.GetChild("exp5")
  39. self.Exp6 = self.GetChild("exp6")
  40. self.Exp7 = self.GetChild("exp7")
  41. self.Exp8 = self.GetChild("exp8")
  42. self.Zapis1 = self.GetChild("zapis1")
  43. self.Zapis2 = self.GetChild("zapis2")
  44. self.Zapis3 = self.GetChild("zapis3")
  45. self.Zapis4 = self.GetChild("zapis4")
  46. self.Zapis5 = self.GetChild("zapis5")
  47. self.Zapis6 = self.GetChild("zapis6")
  48. self.Zapis7 = self.GetChild("zapis7")
  49. self.Zapis8 = self.GetChild("zapis8")
  50.  
  51. self.Jinno.SetEvent(ui.__mem_func__(self.ClickJinno))
  52. self.Shinsoo.SetEvent(ui.__mem_func__(self.ClickShinsoo))
  53. self.Jinnom2.SetEvent(ui.__mem_func__(self.ClickJinnom2))
  54. self.Shinsoom2.SetEvent(ui.__mem_func__(self.ClickShinsoom2))
  55. self.Exp1.SetEvent(ui.__mem_func__(self.ClickExp1))
  56. self.Exp2.SetEvent(ui.__mem_func__(self.ClickExp2))
  57. self.Exp3.SetEvent(ui.__mem_func__(self.ClickExp3))
  58. self.Exp4.SetEvent(ui.__mem_func__(self.ClickExp4))
  59. self.Exp5.SetEvent(ui.__mem_func__(self.ClickExp5))
  60. self.Exp6.SetEvent(ui.__mem_func__(self.ClickExp6))
  61. self.Exp7.SetEvent(ui.__mem_func__(self.ClickExp7))
  62. self.Exp8.SetEvent(ui.__mem_func__(self.ClickExp8))
  63. self.Zapis1.SetEvent(ui.__mem_func__(self.ClickZapis1))
  64. self.Zapis2.SetEvent(ui.__mem_func__(self.ClickZapis2))
  65. self.Zapis3.SetEvent(ui.__mem_func__(self.ClickZapis3))
  66. self.Zapis4.SetEvent(ui.__mem_func__(self.ClickZapis4))
  67. self.Zapis5.SetEvent(ui.__mem_func__(self.ClickZapis5))
  68. self.Zapis6.SetEvent(ui.__mem_func__(self.ClickZapis6))
  69. self.Zapis7.SetEvent(ui.__mem_func__(self.ClickZapis7))
  70. self.Zapis8.SetEvent(ui.__mem_func__(self.ClickZapis8))
  71.  
  72. except:
  73. import exception
  74. exception.Abort("TeleportDialog.LoadDialog.BindObject")
  75.  
  76. def ClickJinno(self):
  77. constInfo.INPUT_DATA = 1
  78. event.QuestButtonClick(constInfo.TP_QUEST)
  79.  
  80. def ClickShinsoo(self):
  81. constInfo.INPUT_DATA = 2
  82. event.QuestButtonClick(constInfo.TP_QUEST)
  83.  
  84. def ClickJinnom2(self):
  85. constInfo.INPUT_DATA = 3
  86. event.QuestButtonClick(constInfo.TP_QUEST)
  87.  
  88. def ClickShinsoom2(self):
  89. constInfo.INPUT_DATA = 4
  90. event.QuestButtonClick(constInfo.TP_QUEST)
  91.  
  92. def ClickExp1(self):
  93. constInfo.INPUT_DATA = 5
  94. event.QuestButtonClick(constInfo.TP_QUEST)
  95.  
  96. def ClickExp2(self):
  97. constInfo.INPUT_DATA = 6
  98. event.QuestButtonClick(constInfo.TP_QUEST)
  99.  
  100. def ClickExp3(self):
  101. constInfo.INPUT_DATA = 7
  102. event.QuestButtonClick(constInfo.TP_QUEST)
  103.  
  104. def ClickExp4(self):
  105. constInfo.INPUT_DATA = 8
  106. event.QuestButtonClick(constInfo.TP_QUEST)
  107.  
  108. def ClickExp5(self):
  109. constInfo.INPUT_DATA = 9
  110. event.QuestButtonClick(constInfo.TP_QUEST)
  111.  
  112. def ClickExp6(self):
  113. constInfo.INPUT_DATA = 10
  114. event.QuestButtonClick(constInfo.TP_QUEST)
  115.  
  116. def ClickExp7(self):
  117. constInfo.INPUT_DATA = 11
  118. event.QuestButtonClick(constInfo.TP_QUEST)
  119.  
  120. def ClickExp8(self):
  121. constInfo.INPUT_DATA = 12
  122. event.QuestButtonClick(constInfo.TP_QUEST)
  123.  
  124. def ClickZapis1(self):
  125. # if self.wndZapis.IsShow():
  126. # self.wndZapis.Hide()
  127. # else:
  128. self.wndZapis.Show()
  129. constInfo.ZAPIS_DATA = 13
  130.  
  131. def ClickZapis2(self):
  132. # if self.wndZapis.IsShow():
  133. # self.wndZapis.Hide()
  134. # else:
  135. self.wndZapis.Show()
  136. constInfo.ZAPIS_DATA = 14
  137.  
  138. def ClickZapis3(self):
  139. # if self.wndZapis.IsShow():
  140. # self.wndZapis.Hide()
  141. # else:
  142. self.wndZapis.Show()
  143. constInfo.ZAPIS_DATA = 15
  144.  
  145. def ClickZapis4(self):
  146. # if self.wndZapis.IsShow():
  147. # self.wndZapis.Hide()
  148. # else:
  149. self.wndZapis.Show()
  150. constInfo.ZAPIS_DATA = 16
  151.  
  152. def ClickZapis5(self):
  153. # if self.wndZapis.IsShow():
  154. # self.wndZapis.Hide()
  155. # else:
  156. self.wndZapis.Show()
  157. constInfo.ZAPIS_DATA = 17
  158.  
  159. def ClickZapis6(self):
  160. # if self.wndZapis.IsShow():
  161. # self.wndZapis.Hide()
  162. # else:
  163. self.wndZapis.Show()
  164. constInfo.ZAPIS_DATA = 18
  165.  
  166. def ClickZapis7(self):
  167. # if self.wndZapis.IsShow():
  168. # self.wndZapis.Hide()
  169. # else:
  170. self.wndZapis.Show()
  171. constInfo.ZAPIS_DATA = 19
  172.  
  173. def ClickZapis8(self):
  174. # if self.wndZapis.IsShow():
  175. # self.wndZapis.Hide()
  176. # else:
  177. self.wndZapis.Show()
  178. constInfo.ZAPIS_DATA = 20
  179.  
  180. def UpdateMaps(self):
  181. self.Zapis1.SetText(constInfo.MAP_NAME.split("|")[0].replace("_", " "))
  182. self.Zapis2.SetText(constInfo.MAP_NAME.split("|")[1].replace("_", " "))
  183. self.Zapis3.SetText(constInfo.MAP_NAME.split("|")[2].replace("_", " "))
  184. self.Zapis4.SetText(constInfo.MAP_NAME.split("|")[3].replace("_", " "))
  185. self.Zapis5.SetText(constInfo.MAP_NAME.split("|")[4].replace("_", " "))
  186. self.Zapis6.SetText(constInfo.MAP_NAME.split("|")[5].replace("_", " "))
  187. self.Zapis7.SetText(constInfo.MAP_NAME.split("|")[6].replace("_", " "))
  188. self.Zapis8.SetText(constInfo.MAP_NAME.split("|")[7].replace("_", " "))
  189.  
  190. def Close(self):
  191. self.Hide()
  192. if self.wndZapis.IsShow():
  193. self.wndZapis.Close()
  194.  
  195. def OnPressEscapeKey(self):
  196. self.Close()
  197. if self.wndZapis.IsShow():
  198. self.wndZapis.Close()
  199. return TRUE
Add Comment
Please, Sign In to add comment