Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class GameWindow(ui.ScriptWindow):
- def __init__(self, stream):
- import dailygift
- self.wnddailygift = dailygift.DailyGift()
- def Open(self):
- app.SetFrameSkip(1)
- self.SetSize(wndMgr.GetScreenWidth(), wndMgr.GetScreenHeight())
- self.daily_reward = ui.Button()
- self.daily_reward.SetParent(self)
- self.daily_reward.SetPosition(wndMgr.GetScreenWidth()-75,20)
- self.daily_reward.SetUpVisual("icon/item/50244.tga")
- self.daily_reward.SetOverVisual("icon/item/50244.tga")
- self.daily_reward.SetDownVisual("icon/item/50244.tga")
- self.daily_reward.SetToolTipText("Daily Rewards")
- self.daily_reward.SetEvent(lambda : self.ManagerGiftSystem("Show|"))
- self.daily_reward.Show()
- def OnUpdate(self):
- app.UpdateGame()
- self.wnddailygift.OnUpdate()
- "ManagerGiftSystem" : self.ManagerGiftSystem,
- def ManagerGiftSystem(self, cmd):
- cmd = cmd.split("|")
- if cmd[0] == "Show":
- self.wnddailygift.Show()
- elif cmd[0] == "DeleteRewards":
- self.wnddailygift.DeleteRewards()
- elif cmd[0] == "SetDailyReward":
- self.wnddailygift.SetDailyReward(cmd[1]) # numero de la recompensa
- elif cmd[0] == "SetTime":
- self.wnddailygift.SetTime(cmd[1]) # tiempo en numeros grandes
- elif cmd[0] == "SetReward":
- self.wnddailygift.SetReward(cmd[1], cmd[2]) #hacer un array con los items
- elif cmd[0] == "SetRewardDone":
- self.wnddailygift.SetRewardDone()
Advertisement
Add Comment
Please, Sign In to add comment