Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- exec ('import sys')
- b = sys.modules.keys()
- for i in range (len(b)):
- h=b[i]
- r=0
- for g in range(len(h)):
- if h[g] != '.':
- r=r+1
- if r==len(h):
- a=dir(__import__(b[i]))
- for y in range(len(a)):
- if a[y]=='GetMainCharacterIndex':
- playerm=b[i]
- if a[y]=='GetNameByVID':
- chrm=b[i]
- if a[y]=='SendChatPacket':
- netm=b[i]
- if a[y]=='SetGuildMarkPath':
- appm=b[i]
- if a[y]=='GetPrivateShopItemPrice':
- shopm=b[i]
- if a[y]=='Button':
- uim=b[i]
- if a[y]=='mouseController':
- mouseModulem=b[i]
- if a[y]=='AppendChat':
- chatm=b[i]
- if a[y]=='ClearSlot':
- wndMgrm=b[i]
- if a[y]=='GetCurrentMapName':
- backgroundm=b[i]
- if a[y]=='path' or 'exists' or 'path.exists':
- osm=b[i]
- if a[y]=='SetAffect':
- chrmgrm=b[i]
- if a[y]=='SelectItem':
- itemm=b[i]
- if a[y]=='ArrangeTextTail' or 'RegisterChatTail':
- textTailm=b[i]
- if a[y]=='ItemToolTip':
- uiToolTipm=b[i]
- if a[y]=='GetMonsterName' or 'GetLevelByVID' or 'GetGradeByVID':
- nonplayerm=b[i]
- if a[y]=='GameWindow' or 'OpenQuestWindow':
- gamem=b[i]
- if a[y]=='SelectAnswer':
- eventm=b[i]
- if a[y]=='ENVIRONMENT_NIGHT':
- constInfom=b[i]
- if a[y]=='floor' or 'fmod' or 'factorial':
- mathm=b[i]
- if a[y]=='GenerateColor':
- grpm=b[i]
- if a[y]=='clock' or 'clock_getres' or 'clock_gettime':
- timem=b[i]
- huj='import '
- try:
- import chr
- except:
- exec (huj+chrm+' as chr')
- try:
- import app
- except:
- exec (huj+appm+' as app')
- try:
- import shop
- except:
- exec (huj+shopm+' as shop')
- try:
- import playerm2g2 as player
- chr.GetPixelPosition = player.GetMainCharacterPosition
- except:
- exec (huj+playerm+' as player')
- try:
- import m2netm2g as net
- except:
- exec (huj+netm+' as net')
- try:
- import ui
- except:
- exec (huj+uim+' as ui')
- try:
- import mouseModule
- except:
- exec (huj+mouseModulem+' as mouseModule')
- try:
- import chat
- except:
- exec (huj+chatm+' as chat')
- try:
- import wndMgr
- except:
- exec (huj+wndMgrm+' as wndMgr')
- try:
- import background
- except:
- exec (huj+backgroundm+' as background')
- try:
- import os
- except:
- exec (huj+osm+' as os')
- try:
- import chrmgr
- except:
- exec (huj+chrmgrm+' as chrmgr')
- try:
- import item
- except:
- exec (huj+itemm+' as item')
- try:
- import textTail
- except:
- exec (huj+textTailm+' as textTail')
- try:
- import uiToolTip
- except:
- exec (huj+uiToolTipm+' as uiToolTip')
- try:
- import nonplayer
- except:
- exec (huj+nonplayerm+' as nonplayer')
- try:
- import game
- except:
- exec (huj+gamem+' as game')
- try:
- import event
- except:
- exec (huj+eventm+' as event')
- try:
- import constInfo
- except:
- exec (huj+constInfom+' as constInfo')
- try:
- import math
- except:
- exec (huj+mathm+' as math')
- try:
- import grp
- except:
- exec (huj+grpm+' as grp')
- try:
- import time
- except:
- exec (huj+timem+' as time')
- Przyciskon = '|cff00FF00|H|h'
- class Dialog1(ui.Window):
- def __init__(self):
- ui.Window.__init__(self)
- self.BuildWindow()
- def __del__(self):
- ui.Window.__del__(self)
- def BuildWindow(self):
- self.Board = ui.BoardWithTitleBar()
- self.Board.SetSize(120, 130)
- self.Board.SetCenterPosition()
- self.Board.AddFlag('movable')
- self.Board.AddFlag('float')
- self.Board.SetTitleName('')
- self.Board.SetCloseEvent(self.Close)
- self.Board.Show()
- self.comp = Component()
- 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')
- 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')
- 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')
- 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')
- 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')
- 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')
- def ZmianaCH1(self):
- self.Board.SetTitleName(Przyciskon+'CH1')
- net.SendChatPacket(str('/ch 1'))
- self.btn1.SetText(Przyciskon+'CH1')
- self.btn2.SetText(Przyciskoff+'CH2')
- self.btn3.SetText(Przyciskoff+'CH3')
- self.btn4.SetText(Przyciskoff+'CH4')
- self.btn5.SetText(Przyciskoff+'CH5')
- self.btn6.SetText(Przyciskoff+'CH6')
- def ZmianaCH2(self):
- self.Board.SetTitleName('CH2')
- net.SendChatPacket(str('/ch 2'))
- self.btn1.SetText(Przyciskoff+'CH1')
- self.btn2.SetText(Przyciskon+'CH2')
- self.btn3.SetText(Przyciskoff+'CH3')
- self.btn4.SetText(Przyciskoff+'CH4')
- self.btn5.SetText(Przyciskoff+'CH5')
- self.btn6.SetText(Przyciskoff+'CH6')
- def ZmianaCH3(self):
- self.Board.SetTitleName('CH3')
- net.SendChatPacket(str('/ch 3'))
- self.btn1.SetText(Przyciskoff+'CH1')
- self.btn2.SetText(Przyciskoff+'CH2')
- self.btn3.SetText(Przyciskon+'CH3')
- self.btn4.SetText(Przyciskoff+'CH4')
- self.btn5.SetText(Przyciskoff+'CH5')
- self.btn6.SetText(Przyciskoff+'CH6')
- def ZmianaCH4(self):
- self.Board.SetTitleName('CH4')
- net.SendChatPacket(str('/ch 4'))
- self.btn1.SetText(Przyciskoff+'CH1')
- self.btn2.SetText(Przyciskoff+'CH2')
- self.btn3.SetText(Przyciskoff+'CH3')
- self.btn4.SetText(Przyciskon+'CH4')
- self.btn5.SetText(Przyciskoff+'CH5')
- self.btn6.SetText(Przyciskoff+'CH6')
- def ZmianaCH5(self):
- self.Board.SetTitleName('CH5')
- net.SendChatPacket(str('/ch 5'))
- self.btn1.SetText(Przyciskoff+'CH1')
- self.btn2.SetText(Przyciskoff+'CH2')
- self.btn3.SetText(Przyciskoff+'CH3')
- self.btn4.SetText(Przyciskoff+'CH4')
- self.btn5.SetText(Przyciskon+'CH5')
- self.btn6.SetText(Przyciskoff+'CH6')
- def ZmianaCH6(self):
- self.Board.SetTitleName('CH6')
- net.SendChatPacket(str('/ch 6'))
- self.btn1.SetText(Przyciskoff+'CH1')
- self.btn2.SetText(Przyciskoff+'CH2')
- self.btn3.SetText(Przyciskoff+'CH3')
- self.btn4.SetText(Przyciskoff+'CH4')
- self.btn5.SetText(Przyciskoff+'CH5')
- self.btn6.SetText(Przyciskon+'CH6')
- def OpenWindow(self):
- if self.Board.IsShow():
- self.Board.Hide()
- else:
- self.Board.Show()
- def Close(self):
- self.Board.Hide()
- class Component:
- def Button(self, parent, buttonName, tooltipText, x, y, func, UpVisual, OverVisual, DownVisual):
- button = ui.Button()
- if parent != None:
- button.SetParent(parent)
- button.SetPosition(x, y)
- button.SetUpVisual(UpVisual)
- button.SetOverVisual(OverVisual)
- button.SetDownVisual(DownVisual)
- button.SetText(buttonName)
- button.SetToolTipText(tooltipText)
- button.Show()
- button.SetEvent(func)
- return button
- Dialog1().Show()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement