Ejemplo n.º 1
0
 def __OnEmotionAllow(self):
     net.SendChatPacket("/emotion_allow %d" % (self.vid))
Ejemplo n.º 2
0
	def __OnClickBlockPartyButton(self):
		self.RefreshBlock()
		global blockMode
		net.SendChatPacket("/setblockmode " + str(blockMode ^ player.BLOCK_PARTY))
Ejemplo n.º 3
0
	def __OnClickBlockFriendButton(self):
		self.RefreshBlock()
		global blockMode
		net.SendChatPacket("/setblockmode " + str(blockMode ^ player.BLOCK_FRIEND))
Ejemplo n.º 4
0
 def __choose_sura_m(self):
     net.SendChatPacket("/change_race 2")
     ui.ScriptWindow.Hide(self)
Ejemplo n.º 5
0
 def OnDeleteMobile(self):
     net.SendChatPacket("/mobile")
     self.OnCloseQuestionDialog()
     return True
Ejemplo n.º 6
0
 def IgnoreTarget(self):
     net.SendChatPacket("/ignore " + self.targetName)
Ejemplo n.º 7
0
 def __choose_war_f(self):
     net.SendChatPacket("/change_race 4")
     ui.ScriptWindow.Hide(self)
Ejemplo n.º 8
0
 def OnGetYang(self, id):
     self.__OnClosePopupDialog()
     net.SendChatPacket("/shop_yang %d" % (int(id)))
	def OnGet(self,id):
		net.SendChatPacket("/gift_get "+str(id))	
		self.__OnClosePopupDialog()
		if len(constInfo.gift_items.keys())-1<=0:
			self.Close()
Ejemplo n.º 10
0
    def __OnSelectMaterialSlot(self, trash, resultIndex, materialIndex):
        resultIndex = resultIndex + self.firstSlotIndex
        if resultIndex not in self.cubeMaterialInfos:
            return

        materialInfo = self.cubeMaterialInfos[resultIndex]
        materialCount = len(materialInfo[materialIndex])

        if 0 == materialCount:
            return

        for itemVnum, itemCount in materialInfo[materialIndex]:
            bAddedNow = FALSE  # 이번에 클릭함으로써 아이템이 추가되었나?
            item.SelectItem(itemVnum)
            itemSizeX, itemSizeY = item.GetItemSize()

            # 제조에 필요한 만큼의 재료를 가지고 있는가?
            if player.GetItemCountByVnum(itemVnum) >= itemCount:
                for i in xrange(player.INVENTORY_SLOT_COUNT):
                    vnum = player.GetItemIndex(i)
                    count = player.GetItemCount(i)

                    if vnum == itemVnum and count >= itemCount:
                        # 이미 같은 아이템이 등록되어 있는지 검사하고, 없다면 추가함
                        bAlreadyExists = FALSE
                        for slotPos, invenPos in self.cubeItemInfo.items():
                            if invenPos == i:
                                bAlreadyExists = TRUE

                        if TRUE == bAlreadyExists:
                            continue  #continue inventory iterating

                        #print "Cube Status : ", self.cubeItemInfo

                        # 여기 진입하면 큐브에 등록되지 않은 아이템이므로, 빈 큐브 슬롯에 해당 아이템 추가
                        bCanAddSlot = FALSE
                        for slotPos in xrange(self.cubeSlot.GetSlotCount()):
                            # 이 큐브 슬롯이 비어있는가?
                            if not slotPos in self.cubeItemInfo:
                                upperColumnItemSizeY = -1
                                currentSlotLine = int(slotPos /
                                                      self.CUBE_SLOT_COUNTX)
                                cubeColumn = int(slotPos %
                                                 self.CUBE_SLOT_COUNTX)

                                # 만약 큐브에 3칸짜리 아이템이 등록되어 있다면, 이 열(column)은 더 이상 볼 것도 없이 넘어간다
                                if cubeColumn in self.cubeItemInfo:
                                    columnVNUM = player.GetItemIndex(
                                        self.cubeItemInfo[cubeColumn])
                                    item.SelectItem(columnVNUM)
                                    columnItemSizeX, columnItemSizeY = item.GetItemSize(
                                    )

                                    if 3 == columnItemSizeY:
                                        continue  #continue cube slot iterating

                                if 0 < currentSlotLine and slotPos - self.CUBE_SLOT_COUNTX in self.cubeItemInfo:
                                    upperColumnVNUM = player.GetItemIndex(
                                        self.cubeItemInfo[
                                            slotPos - self.CUBE_SLOT_COUNTX])
                                    item.SelectItem(upperColumnVNUM)
                                    columnItemSizeX, upperColumnItemSizeY = item.GetItemSize(
                                    )

                                # 1칸짜리 아이템은 바로 윗줄에 한칸짜리 아이템이 있어야 함
                                if 1 == itemSizeY:
                                    if 0 == currentSlotLine:
                                        bCanAddSlot = TRUE
                                    elif 1 == currentSlotLine and 1 == upperColumnItemSizeY:
                                        bCanAddSlot = TRUE
                                    elif 2 == currentSlotLine:
                                        bCanAddSlot = TRUE
                                # 2칸짜리 아이템은 위아래가 비어있어야 함
                                elif 2 == itemSizeY:
                                    if 0 == currentSlotLine and not cubeColumn + self.CUBE_SLOT_COUNTX in self.cubeItemInfo:
                                        bCanAddSlot = TRUE
                                    elif 1 == currentSlotLine and 1 == upperColumnItemSizeY and not cubeColumn + (
                                            self.CUBE_SLOT_COUNTX *
                                            2) in self.cubeItemInfo:
                                        bCanAddSlot = TRUE
                                # 3칸짜리 아이템은 해당 Column 자체가 모두 비어있어야 함
                                else:
                                    if not cubeColumn in self.cubeItemInfo and not cubeColumn + self.CUBE_SLOT_COUNTX in self.cubeItemInfo and not cubeColumn + (
                                            self.CUBE_SLOT_COUNTX *
                                            2) in self.cubeItemInfo:
                                        bCanAddSlot = TRUE

                                if TRUE == bCanAddSlot:
                                    self.cubeItemInfo[slotPos] = i
                                    self.cubeSlot.SetItemSlot(
                                        slotPos, vnum, count)
                                    net.SendChatPacket("/cube add %d %d" %
                                                       (slotPos, i))

                                    bAddedNow = TRUE

                            if TRUE == bAddedNow:
                                break  #break cube slot iterating

                        if TRUE == bAddedNow:
                            break  #break inventory iterating

                if TRUE == bAddedNow:
                    break  #break material iterating
Ejemplo n.º 11
0
 def OnCloseShop(self, id):
     self.__OnClosePopupDialog()
     net.SendChatPacket("/close_shop %d" % (int(id)))
     if len(self.UI["shops"].keys()) == 1:
         self.Close()
 def ResetPoint(self):
     net.SendChatPacket("/pointreset")
     self.Close()
Ejemplo n.º 13
0
 def __OnClickRefreshButton(self):
     print "autoban_refresh"
     net.SendChatPacket("/autoban_refresh")
Ejemplo n.º 14
0
 def __OnVoteBlockChat(self):
     cmd = "/vote_block_chat %s" % (self.nameString)
     net.SendChatPacket(cmd)
Ejemplo n.º 15
0
    def __OnSelectEmptySlot(self, selectedSlotPos):
        isAttached = mouseModule.mouseController.isAttached()
        if isAttached:
            attachedSlotType = mouseModule.mouseController.GetAttachedType()
            attachedSlotPos = mouseModule.mouseController.GetAttachedSlotNumber(
            )
            targetIndex = player.GetItemIndex(attachedSlotPos)
            if attachedSlotType != player.SLOT_TYPE_INVENTORY:
                return

            if selectedSlotPos == 0:
                item.SelectItem(targetIndex)
                if item.GetItemType() == item.ITEM_TYPE_TRANSFER_SCROLL:
                    if self.def_mediumSlot != 999:
                        self.mediumSlot.ClearSlot(0)
                        self.def_mediumSlot = 999

                    self.mediumSlot.SetItemSlot(
                        0, player.GetItemIndex(attachedSlotPos),
                        player.GetItemCount(attachedSlotPos))
                    net.SendChatPacket("/attrtransfer add %d %d" %
                                       (0, attachedSlotPos))
                    self.def_mediumSlot = selectedSlotPos

                    for slotPos, invenPos in self.itemInfo.items():
                        if invenPos == attachedSlotPos:
                            del self.itemInfo[slotPos]

                    self.itemInfo[selectedSlotPos] = attachedSlotPos

                mouseModule.mouseController.DeattachObject()
            else:
                mouseModule.mouseController.DeattachObject()
                if self.def_mediumSlot == 999:
                    chat.AppendChat(chat.CHAT_TYPE_INFO,
                                    localeInfo.COMB_ALERT1)
                    return

                if self.def_combSlot_1 == 999 and selectedSlotPos == 2:
                    chat.AppendChat(chat.CHAT_TYPE_INFO,
                                    localeInfo.COMB_ALERT2)
                    return

                item.SelectItem(targetIndex)
                itemType = item.GetItemType()
                itemSubType = item.GetItemSubType()
                if itemType != item.ITEM_TYPE_COSTUME:
                    chat.AppendChat(chat.CHAT_TYPE_INFO,
                                    localeInfo.COMB_ALERT3)
                    return

                if ATTR_TRANSFER_LIMIT == 1:
                    if not itemSubType in (item.COSTUME_TYPE_BODY,
                                           item.COSTUME_TYPE_HAIR,
                                           item.COSTUME_TYPE_ACCE):
                        chat.AppendChat(chat.CHAT_TYPE_INFO,
                                        localeInfo.COMB_ALERT4)
                        return
                else:
                    if itemSubType != item.COSTUME_TYPE_BODY:
                        chat.AppendChat(chat.CHAT_TYPE_INFO,
                                        localeInfo.COMB_ALERT5)
                        return

                if ATTR_TRANSFER_LIMIT == 1 and selectedSlotPos == 2:
                    item.SelectItem(player.GetItemIndex(self.def_combSlot_1))
                    Costume_1_SubType = item.GetItemSubType()
                    if Costume_1_SubType != itemSubType:
                        chat.AppendChat(chat.CHAT_TYPE_INFO,
                                        localeInfo.COMB_ALERT6)
                        return

                self.combSlot.SetItemSlot(selectedSlotPos,
                                          player.GetItemIndex(attachedSlotPos),
                                          player.GetItemCount(attachedSlotPos))
                net.SendChatPacket("/attrtransfer add %d %d" %
                                   (selectedSlotPos, attachedSlotPos))
                if selectedSlotPos == 1:
                    self.def_combSlot_1 = attachedSlotPos
                elif selectedSlotPos == 2:
                    self.def_combSlot_2 = attachedSlotPos

                for slotPos, invenPos in self.itemInfo.items():
                    if invenPos == attachedSlotPos:
                        del self.itemInfo[slotPos]

                self.itemInfo[selectedSlotPos] = attachedSlotPos
                if selectedSlotPos == 2:
                    self.combSlot.SetItemSlot(
                        3, player.GetItemIndex(self.def_combSlot_1), 1)
Ejemplo n.º 16
0
	def LoadPage(self,page):
		self.pageCur=page
		net.SendChatPacket("/gift_refresh "+str(page))
Ejemplo n.º 17
0
 def ReportViolentWhisper(self):
     net.SendChatPacket("/reportviolentwhisper " + self.targetName)
Ejemplo n.º 18
0
 def __RampageGauge_Click(self):
     print "rampage_up"
     net.SendChatPacket("/in_game_mall")
     # gift icon hide when click mall icon
     self.wndGiftBox.Hide()
Ejemplo n.º 19
0
 def ClickMallButton(self):
     print "click_mall_button"
     net.SendChatPacket("/click_mall")
Ejemplo n.º 20
0
	def __OnAbrir2(self):
		if self.pos == None:
			chat.AppendChat(1, uiScriptLocale.BOX_SEARCH_NOOPEN)
			return

		net.SendChatPacket("/search_cofres open %s"%(self.pos))
Ejemplo n.º 21
0
 def __choose_ninja_f(self):
     net.SendChatPacket("/change_race 1")
     ui.ScriptWindow.Hide(self)
		def AcceptBiolog(self):
			net.SendChatPacket("/biolog")
Ejemplo n.º 23
0
 def __choose_shaman_f(self):
     net.SendChatPacket("/change_race 3")
     ui.ScriptWindow.Hide(self)
 def RestartHere(self):
     net.SendChatPacket("/restart_here")
Ejemplo n.º 25
0
	def __OnClickBlockExchangeButton(self):
		self.RefreshBlock()
		global blockMode
		net.SendChatPacket("/setblockmode " + str(blockMode ^ player.BLOCK_EXCHANGE))
 def RestartTown(self):
     net.SendChatPacket("/restart_town")
Ejemplo n.º 27
0
	def __OnClickBlockWhisperButton(self):
		self.RefreshBlock()
		global blockMode
		net.SendChatPacket("/setblockmode " + str(blockMode ^ player.BLOCK_WHISPER))
Ejemplo n.º 28
0
 def __OnAcceptButtonClick(self):
     print "Bonus Transer make!"
     net.SendChatPacket("/attrtransfer make")
Ejemplo n.º 29
0
	def OnInputMobileAuthorityCode(self):
		text = self.inputDialog.GetText()
		net.SendChatPacket("/mobile_auth " + text)
		self.OnCloseInputDialog()
		return True
Ejemplo n.º 30
0
 def __OnDestroyBuilding(self):
     net.SendChatPacket("/build d %d" % (self.vid))