def OpenPickMoneyDialog(self): if mouseModule.mouseController.isAttached(): attachedSlotPos = mouseModule.mouseController.GetAttachedSlotNumber( ) if player.SLOT_TYPE_SAFEBOX == mouseModule.mouseController.GetAttachedType( ): if player.ITEM_MONEY == mouseModule.mouseController.GetAttachedItemIndex( ): net.SendSafeboxWithdrawMoneyPacket( mouseModule.mouseController.GetAttachedItemCount()) snd.PlaySound("sound/ui/money.wav") mouseModule.mouseController.DeattachObject() else: curMoney = player.GetElk() if curMoney <= 0: return self.dlgPickMoney.SetTitleName(localeInfo.PICK_MONEY_TITLE) self.dlgPickMoney.SetAcceptEvent(ui.__mem_func__(self.OnPickMoney)) self.dlgPickMoney.Open(curMoney) self.dlgPickMoney.SetMax(7) # 인벤토리 990000 제한 버그 수정
def SendBarToYang(self): text = self.EditMoney2.GetText() if not text: self.Notificaton = _ui().PopupNotification("Fill out yang section") return if int(text) < self.Bar10M: self.Notificaton = _ui().PopupNotification( "Yang amount is too low") return if int(constInfo.bar_first_amount) < 0 and int( constInfo.bar_second_amount) < 0 and int( constInfo.bar_third_amount) < 0: self.Notificaton = _ui().PopupNotification("Your doesn't have bar") return mygold = player.GetElk() limit = 2000000000 a1 = int(constInfo.bar_first_amount) * self.Bar10M b1 = int(constInfo.bar_second_amount) * self.Bar100M c1 = int(constInfo.bar_third_amount) * self.Bar1T if mygold + int(text) > limit or mygold + int( text) > limit or mygold + int(text) > limit: self.Notificaton = _ui().PopupNotification("Yang overflow!") return net.SendChatPacket("/ingame_bank 2 %s" % (text))
def OpenPickMoneyDialog(self): if exchange.GetElkFromSelf() > 0: chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.EXCHANGE_CANT_EDIT_MONEY) return self.dlgPickMoney.Open(player.GetElk())
def OnUpdate(self): (yang, coins, won, nw_coins) = bank.GetFields() self.Yang.SetText(localeInfo.NumberToBankString(player.GetElk())) self.YangBank.SetText(localeInfo.NumberToBankString(yang)) self.EpBank.SetText(localeInfo.NumberToBankString(coins)) self.Epp.SetText(localeInfo.NumberToBankString(nw_coins)) self.WonBank.SetText(localeInfo.NumberToBankString(won)) self.Wonn.SetText(localeInfo.NumberToBankString(player.GetWon())) (x, y, z) = player.GetMainCharacterPosition() if abs(x - self.xStart) > bank.LIMIT_RANGE or abs( y - self.yStart) > bank.LIMIT_RANGE: (self.xStart, self.yStart, z) = player.GetMainCharacterPosition() self.BClose()
def SendYangToBar(self): text = self.EditMoney.GetText() if not text: self.Notificaton = _ui().PopupNotification("Fill out yang section") return if int(text) > int(player.GetElk()): self.Notificaton = _ui().PopupNotification( "Doesn't have enough yang") return if int(text) < self.Bar10M: self.Notificaton = _ui().PopupNotification( "Yang amount is too low") return net.SendChatPacket("/ingame_bank 1 %s" % (text))
def RequestHatching(self): if self.petname.GetText() == "" or len(self.petname.GetText()) < 4: chat.AppendChat(chat.CHAT_TYPE_INFO, "[Pet-Incubator] Il nome del pet non e' valido.") return if player.GetElk() < 100000: #chat.AppendChat(chat.CHAT_TYPE_INFO, "[Pet-Incubator]Devi possedere "+str(localeInfo.NumberToMoneyString(100000)) +".") return chat.AppendChat(chat.CHAT_TYPE_INFO, "[Pet-Incubator]Invio pacchetto schiudi pet.") import chr chr.RequestPetName(self.petname.GetText()) self.Close()
def RefreshStatus(self): money = player.GetElk() self.wndMoney.SetText(locale.NumberToMoneyString(money))
def RefreshStatus(self): money = player.GetElk() self.wndMoney.SetText(localeInfo.AddPointToNumberString(money)) gem = player.GetGem() self.wndGem.SetText(str(gem))