Advertisement
Guest User

Untitled

a guest
Sep 19th, 2017
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.20 KB | None | 0 0
  1. exec ('import sys')
  2. b = sys.modules.keys()
  3. for i in range (len(b)):
  4. h=b[i]
  5. r=0
  6. for g in range(len(h)):
  7. if h[g] != '.':
  8. r=r+1
  9. if r==len(h):
  10. a=dir(__import__(b[i]))
  11. for y in range(len(a)):
  12. if a[y]=='GetMainCharacterIndex':
  13. playerm=b[i]
  14. if a[y]=='GetNameByVID':
  15. chrm=b[i]
  16. if a[y]=='SendChatPacket':
  17. netm=b[i]
  18. if a[y]=='SetGuildMarkPath':
  19. appm=b[i]
  20. if a[y]=='GetPrivateShopItemPrice':
  21. shopm=b[i]
  22. if a[y]=='Button':
  23. uim=b[i]
  24. if a[y]=='mouseController':
  25. mouseModulem=b[i]
  26. if a[y]=='AppendChat':
  27. chatm=b[i]
  28. if a[y]=='ClearSlot':
  29. wndMgrm=b[i]
  30. if a[y]=='GetCurrentMapName':
  31. backgroundm=b[i]
  32. if a[y]=='path' or 'exists' or 'path.exists':
  33. osm=b[i]
  34. if a[y]=='SetAffect':
  35. chrmgrm=b[i]
  36. if a[y]=='SelectItem':
  37. itemm=b[i]
  38. if a[y]=='ArrangeTextTail' or 'RegisterChatTail':
  39. textTailm=b[i]
  40. if a[y]=='ItemToolTip':
  41. uiToolTipm=b[i]
  42. if a[y]=='GetMonsterName' or 'GetLevelByVID' or 'GetGradeByVID':
  43. nonplayerm=b[i]
  44. if a[y]=='GameWindow' or 'OpenQuestWindow':
  45. gamem=b[i]
  46. if a[y]=='SelectAnswer':
  47. eventm=b[i]
  48. if a[y]=='ENVIRONMENT_NIGHT':
  49. constInfom=b[i]
  50. if a[y]=='floor' or 'fmod' or 'factorial':
  51. mathm=b[i]
  52. if a[y]=='GenerateColor':
  53. grpm=b[i]
  54. if a[y]=='clock' or 'clock_getres' or 'clock_gettime':
  55. timem=b[i]
  56. huj='import '
  57.  
  58. try:
  59. import chr
  60. except:
  61. exec (huj+chrm+' as chr')
  62.  
  63. try:
  64. import app
  65. except:
  66. exec (huj+appm+' as app')
  67.  
  68. try:
  69. import shop
  70. except:
  71. exec (huj+shopm+' as shop')
  72.  
  73. try:
  74. import playerm2g2 as player
  75. chr.GetPixelPosition = player.GetMainCharacterPosition
  76. except:
  77. exec (huj+playerm+' as player')
  78.  
  79. try:
  80. import m2netm2g as net
  81. except:
  82. exec (huj+netm+' as net')
  83.  
  84. try:
  85. import ui
  86. except:
  87. exec (huj+uim+' as ui')
  88.  
  89. try:
  90. import mouseModule
  91. except:
  92. exec (huj+mouseModulem+' as mouseModule')
  93.  
  94. try:
  95. import chat
  96. except:
  97. exec (huj+chatm+' as chat')
  98.  
  99. try:
  100. import wndMgr
  101. except:
  102. exec (huj+wndMgrm+' as wndMgr')
  103.  
  104. try:
  105. import background
  106. except:
  107. exec (huj+backgroundm+' as background')
  108.  
  109. try:
  110. import os
  111. except:
  112. exec (huj+osm+' as os')
  113.  
  114. try:
  115. import chrmgr
  116. except:
  117. exec (huj+chrmgrm+' as chrmgr')
  118.  
  119. try:
  120. import item
  121. except:
  122. exec (huj+itemm+' as item')
  123.  
  124. try:
  125. import textTail
  126. except:
  127. exec (huj+textTailm+' as textTail')
  128.  
  129. try:
  130. import uiToolTip
  131. except:
  132. exec (huj+uiToolTipm+' as uiToolTip')
  133.  
  134. try:
  135. import nonplayer
  136. except:
  137. exec (huj+nonplayerm+' as nonplayer')
  138.  
  139. try:
  140. import game
  141. except:
  142. exec (huj+gamem+' as game')
  143.  
  144. try:
  145. import event
  146. except:
  147. exec (huj+eventm+' as event')
  148.  
  149. try:
  150. import constInfo
  151. except:
  152. exec (huj+constInfom+' as constInfo')
  153.  
  154. try:
  155. import math
  156. except:
  157. exec (huj+mathm+' as math')
  158.  
  159. try:
  160. import grp
  161. except:
  162. exec (huj+grpm+' as grp')
  163.  
  164. try:
  165. import time
  166. except:
  167. exec (huj+timem+' as time')
  168.  
  169.  
  170. Przyciskon = '|cff00FF00|H|h'
  171. class Dialog1(ui.Window):
  172. def __init__(self):
  173. ui.Window.__init__(self)
  174. self.BuildWindow()
  175. def __del__(self):
  176. ui.Window.__del__(self)
  177.  
  178. def BuildWindow(self):
  179. self.Board = ui.BoardWithTitleBar()
  180. self.Board.SetSize(120, 130)
  181. self.Board.SetCenterPosition()
  182. self.Board.AddFlag('movable')
  183. self.Board.AddFlag('float')
  184. self.Board.SetTitleName('')
  185. self.Board.SetCloseEvent(self.Close)
  186. self.Board.Show()
  187. self.comp = Component()
  188. self.btn1 = self.comp.Button(self.Board, 'CH1', '', 15, 30, self.ZmianaCH1, 'd:/ymir work/ui/public/small_button_01.sub', 'd:/ymir work/ui/public/small_button_02.sub', 'd:/ymir work/ui/public/small_button_03.sub')
  189. self.btn2 = self.comp.Button(self.Board, 'CH2', '', 15, 60, self.ZmianaCH2, 'd:/ymir work/ui/public/small_button_01.sub', 'd:/ymir work/ui/public/small_button_02.sub', 'd:/ymir work/ui/public/small_button_03.sub')
  190. self.btn3 = self.comp.Button(self.Board, 'CH3', '', 15, 90, self.ZmianaCH3, 'd:/ymir work/ui/public/small_button_01.sub', 'd:/ymir work/ui/public/small_button_02.sub', 'd:/ymir work/ui/public/small_button_03.sub')
  191. self.btn4 = self.comp.Button(self.Board, 'CH4', '', 65, 30, self.ZmianaCH4, 'd:/ymir work/ui/public/small_button_01.sub', 'd:/ymir work/ui/public/small_button_02.sub', 'd:/ymir work/ui/public/small_button_03.sub')
  192. self.btn5 = self.comp.Button(self.Board, 'CH5', '', 65, 60, self.ZmianaCH5, 'd:/ymir work/ui/public/small_button_01.sub', 'd:/ymir work/ui/public/small_button_02.sub', 'd:/ymir work/ui/public/small_button_03.sub')
  193. self.btn6 = self.comp.Button(self.Board, 'CH6', '', 65, 90, self.ZmianaCH6, 'd:/ymir work/ui/public/small_button_01.sub', 'd:/ymir work/ui/public/small_button_02.sub', 'd:/ymir work/ui/public/small_button_03.sub')
  194.  
  195. def ZmianaCH1(self):
  196. self.Board.SetTitleName(Przyciskon+'CH1')
  197. net.SendChatPacket(str('/ch 1'))
  198. self.btn1.SetText(Przyciskon+'CH1')
  199. self.btn2.SetText(Przyciskoff+'CH2')
  200. self.btn3.SetText(Przyciskoff+'CH3')
  201. self.btn4.SetText(Przyciskoff+'CH4')
  202. self.btn5.SetText(Przyciskoff+'CH5')
  203. self.btn6.SetText(Przyciskoff+'CH6')
  204. def ZmianaCH2(self):
  205. self.Board.SetTitleName('CH2')
  206. net.SendChatPacket(str('/ch 2'))
  207. self.btn1.SetText(Przyciskoff+'CH1')
  208. self.btn2.SetText(Przyciskon+'CH2')
  209. self.btn3.SetText(Przyciskoff+'CH3')
  210. self.btn4.SetText(Przyciskoff+'CH4')
  211. self.btn5.SetText(Przyciskoff+'CH5')
  212. self.btn6.SetText(Przyciskoff+'CH6')
  213. def ZmianaCH3(self):
  214. self.Board.SetTitleName('CH3')
  215. net.SendChatPacket(str('/ch 3'))
  216. self.btn1.SetText(Przyciskoff+'CH1')
  217. self.btn2.SetText(Przyciskoff+'CH2')
  218. self.btn3.SetText(Przyciskon+'CH3')
  219. self.btn4.SetText(Przyciskoff+'CH4')
  220. self.btn5.SetText(Przyciskoff+'CH5')
  221. self.btn6.SetText(Przyciskoff+'CH6')
  222. def ZmianaCH4(self):
  223. self.Board.SetTitleName('CH4')
  224. net.SendChatPacket(str('/ch 4'))
  225. self.btn1.SetText(Przyciskoff+'CH1')
  226. self.btn2.SetText(Przyciskoff+'CH2')
  227. self.btn3.SetText(Przyciskoff+'CH3')
  228. self.btn4.SetText(Przyciskon+'CH4')
  229. self.btn5.SetText(Przyciskoff+'CH5')
  230. self.btn6.SetText(Przyciskoff+'CH6')
  231. def ZmianaCH5(self):
  232. self.Board.SetTitleName('CH5')
  233. net.SendChatPacket(str('/ch 5'))
  234. self.btn1.SetText(Przyciskoff+'CH1')
  235. self.btn2.SetText(Przyciskoff+'CH2')
  236. self.btn3.SetText(Przyciskoff+'CH3')
  237. self.btn4.SetText(Przyciskoff+'CH4')
  238. self.btn5.SetText(Przyciskon+'CH5')
  239. self.btn6.SetText(Przyciskoff+'CH6')
  240. def ZmianaCH6(self):
  241. self.Board.SetTitleName('CH6')
  242. net.SendChatPacket(str('/ch 6'))
  243. self.btn1.SetText(Przyciskoff+'CH1')
  244. self.btn2.SetText(Przyciskoff+'CH2')
  245. self.btn3.SetText(Przyciskoff+'CH3')
  246. self.btn4.SetText(Przyciskoff+'CH4')
  247. self.btn5.SetText(Przyciskoff+'CH5')
  248. self.btn6.SetText(Przyciskon+'CH6')
  249.  
  250. def OpenWindow(self):
  251. if self.Board.IsShow():
  252. self.Board.Hide()
  253. else:
  254. self.Board.Show()
  255.  
  256. def Close(self):
  257. self.Board.Hide()
  258.  
  259.  
  260.  
  261. class Component:
  262. def Button(self, parent, buttonName, tooltipText, x, y, func, UpVisual, OverVisual, DownVisual):
  263. button = ui.Button()
  264. if parent != None:
  265. button.SetParent(parent)
  266. button.SetPosition(x, y)
  267. button.SetUpVisual(UpVisual)
  268. button.SetOverVisual(OverVisual)
  269. button.SetDownVisual(DownVisual)
  270. button.SetText(buttonName)
  271. button.SetToolTipText(tooltipText)
  272. button.Show()
  273. button.SetEvent(func)
  274. return button
  275.  
  276.  
  277.  
  278. Dialog1().Show()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement