Jump to content

lux

Inactive Member
  • Posts

    30
  • Joined

  • Last visited

  • Feedback

    0%

Posts posted by lux

  1. I dont have it anymore.. try to edit these 2  def.. i dont remember

    def __gira_bonus(self):
            if self.slotitem != None:
                self.__Switch(self.slotitem,self.slotgira)

    ------------------------------------

    def OnUpdate(self):
            if self.slotitem != None:
                self.__Switch(self.slotitem,self.slotgira)

  2. Hey, hope some1 can help..

    I need a function for spawn a effect for a "unique_vid" that is a mob/boss when i decide.. I write this (im so noob), but i have error on compile.

     

    	int dungeon_unique_boss_effect(lua_State* L)
    	{
    		if (!lua_isstring(L, 1) || !lua_isstring(L, 2))
    		{
    			sys_err("invalid argument");
    			return 0;
    		}
    
    		CQuestManager& q = CQuestManager::instance();
    		LPDUNGEON pDungeon = q.GetCurrentDungeon();
    
    		if (pDungeon)
    		{
    
    			LPCHARACTER boss_ch = pDungeon->GetUniqueVid(lua_tostring(L,1));
    			if (NULL == boss_ch)
    				return 0;
    			
    			if (lua_isstring(L, 2))
    			{
    				boss_ch->SpecificEffectPacket (lua_tostring(L, 2));
    			}
    			return 0;
    		}
    	}	

    I get this error:

    compile questlua_dungeon.cpp
    questlua_dungeon.cpp: In function 'int quest::dungeon_unique_boss_effect(lua_State*)':
    questlua_dungeon.cpp:512: error: invalid conversion from 'DWORD' to 'CHARACTER*'

     

    Thanks in advance..

  3. I realized that the problem is in this:

    that still try to swap Bonus even if the item  isn't on slot 

    def OnUpdate(self):
            self.refresh(self.slotitem,self.slotgira)
     
    So I have tryed some test like this (for let it to check if the item is on slot)
    But nothing cause i dont know the right python language..
    def OnUpdate(self):
       if int(player.GetItemCount(attachedSlotPos)) > 0:
            self.refresh(self.slotitem,self.slotgira)

    Any suggest? thx

     

     

  4. Hey.. maybe some1 can help me..

    1° sorry for my english im so bad..

    Read my last message
     
    I want put this "manual switchbonus" on my client(image below).. I have 40k server but i have some error on syseer:

    0224 02:55:53431 :: Traceback (most recent call last):
    
    0224 02:55:53431 ::   File "uiswitch.py", line 159, in OnUpdate
    
    0224 02:55:53431 ::   File "uiswitch.py", line 139, in refresh
    
    0224 02:55:53432 :: TypeError
    0224 02:55:53432 :: : 
    0224 02:55:53432 :: an integer is required
    0224 02:55:53432 ::  

    This error was repeating at infinite on my syseer if i open the switchbonus.

     

    I take the switcher from a client and i try to put on mine..  until switcher is not open there are no error..

     

    Lets explain what i have done..

     

     

    I add this on root/game.py:

     

    onPressKeyDict[app.DIK_F8] = lambda : self.__Switch()

    under 

    onPressKeyDict[app.DIK_F7] = lambda : self.__BonusPage()

    and this where there are some def

    def __Switch(self):
    import uiswitch
    self.Girabonus = uiswitch.Switcher() 
    self.Girabonus.Show()

     

     

     

    Then i add uiswitch.py on root changing "import locale" to "import localeInfo"

    import ui
    import player
    import mouseModule
    import net
    import app
    import chat
    import snd
    import item
    import player
    import chat
    import grp
    import uiScriptLocale
    import uiRefine
    import uiAttachMetin
    import uiCommon
    import localeInfo
    import constInfo
    import ime
    import grpText
    import uiToolTip
    
    	
    class Switcher(ui.ScriptWindow):
    
    	POSITIVE_COLOR = grp.GenerateColor(0.5411, 0.7254, 0.5568, 1.0)
    	NEGATIVE_COLOR = grp.GenerateColor(0.9, 0.4745, 0.4627, 1.0)
    
    	def __init__(self):
    		import exception
    		ui.ScriptWindow.__init__(self)
    
    	def __del__(self):
    		ui.ScriptWindow.__del__(self)
    
    	def Show(self):
    		constInfo.SWITCH_BONUS = 1
    		self.__LoadWindow()
    		ui.ScriptWindow.Show(self)
    
    	def Close(self):
    		constInfo.SWITCH_BONUS = 0
    		self.Hide()
    		
    	def OnPressEscapeKey(self):
    		self.Close()
    		return TRUE
    
    	def __LoadWindow(self):
    		try:			
    			pyScrLoader = ui.PythonScriptLoader()
    			pyScrLoader.LoadScriptFile(self, "locale/it/ui/switcher.py")
    		except:
    			import exception
    			exception.Abort("CostumeWindow.LoadWindow.LoadObject")
    		self.TitleBar = self.GetChild("TitleBar")
    		self.switchslot = self.GetChild("switchslot")		
    		self.bonusslot = [self.GetChild2("bonus1"), self.GetChild2("bonus2"), self.GetChild2("bonus3"), self.GetChild2("bonus4"), self.GetChild2("bonus5"), ]
    		self.buttongira = self.GetChild("gira_bonus")
    		self.buttongira.SetEvent(ui.__mem_func__(self.__gira_bonus))
    		self.TitleBar.SetCloseEvent(ui.__mem_func__(self.Close))
    		self.switchslot.SetSelectEmptySlotEvent(ui.__mem_func__(self.__OnSelectEmptySlot))
    		self.switchslot.SetSelectItemSlotEvent(ui.__mem_func__(self.__OnSelectItemSlot))
    		self.toolTipCostume = uiToolTip.ToolTip(190)
    		self.toolTipCostume.SetTitle(item.GetItemName())
    		
    		self.slotitem = None
    		self.slotgira = None
    		
    	def __OnSelectItemSlot(self, selectedSlotPos):
    		isAttached = mouseModule.mouseController.isAttached()
    		if isAttached:
    			attachedSlotType = mouseModule.mouseController.GetAttachedType()
    			attachedSlotPos = mouseModule.mouseController.GetAttachedSlotNumber()
    			mouseModule.mouseController.DeattachObject()
    			itemIndex = player.GetItemIndex(attachedSlotPos)
    			itemCount = player.GetItemCount(attachedSlotPos)
    			item.SelectItem(itemIndex)
    			itemType = item.GetItemType()
    			if selectedSlotPos == 0:
    				self.slotitem = attachedSlotPos
    				if item.ITEM_TYPE_WEAPON == itemType or item.ITEM_TYPE_ARMOR == itemType:
    					self.switchslot.SetItemSlot(selectedSlotPos, itemIndex, 0)						
    					attrSlot = [player.GetItemAttribute(attachedSlotPos, i) for i in xrange(player.ATTRIBUTE_SLOT_MAX_NUM)]	
    					for i in xrange(player.ATTRIBUTE_SLOT_MAX_NUM-2):
    						type = attrSlot[i][0]
    						value = attrSlot[i][1]
    						affectString = self.__GetAffectString(type, value)
    						self.bonusslot[i].SetText(affectString)
    		else:			
    			if selectedSlotPos == 0:
    				self.switchslot.SetItemSlot(0, 0, 0)
    				self.slotitem = None
    			
    	def __OnSelectEmptySlot(self, selectedSlotPos):
    		isAttached = mouseModule.mouseController.isAttached()
    		if isAttached:
    			attachedSlotType = mouseModule.mouseController.GetAttachedType()
    			attachedSlotPos = mouseModule.mouseController.GetAttachedSlotNumber()
    			mouseModule.mouseController.DeattachObject()
    			itemIndex = player.GetItemIndex(attachedSlotPos)
    			itemCount = player.GetItemCount(attachedSlotPos)
    			item.SelectItem(itemIndex)
    			itemType = item.GetItemType()
    			if selectedSlotPos == 0:
    				self.slotitem = attachedSlotPos
    				if item.ITEM_TYPE_WEAPON == itemType or item.ITEM_TYPE_ARMOR == itemType:
    					self.switchslot.SetItemSlot(selectedSlotPos, itemIndex, 0)						
    					attrSlot = [player.GetItemAttribute(attachedSlotPos, i) for i in xrange(player.ATTRIBUTE_SLOT_MAX_NUM)]	
    					for i in xrange(player.ATTRIBUTE_SLOT_MAX_NUM-2):
    						type = attrSlot[i][0]
    						value = attrSlot[i][1]
    						affectString = self.__GetAffectString(type, value)
    						self.bonusslot[i].SetText(affectString)
    			if selectedSlotPos == 1 and itemIndex== 71084:
    					self.slotgira = attachedSlotPos
    					self.switchslot.SetItemSlot(selectedSlotPos, itemIndex, itemCount)
    			
    	def __GetAffectString(self, affectType, affectValue):
    		if 0 == affectType:
    			return None
    		if 0 == affectValue:
    			return None
    			
    		try:
    			return self.AFFECT_DICT[affectType](affectValue)
    		except TypeError:
    			return "UNKNOWN_VALUE[%s] %s" % (affectType, affectValue)
    		except KeyError:
    			return "UNKNOWN_TYPE[%s] %s" % (affectType, affectValue)
    			
    	def __gira_bonus(self):
    		self.__Switch(self.slotitem,self.slotgira)
    		
    	def __Switch(self,dstSlotPos,srcSlotPos):
    		net.SendItemUseToItemPacket(srcSlotPos,dstSlotPos)
    		#self.refresh(dstSlotPos,srcSlotPos)
    		
    	def refresh(self,dstSlotPos,srcSlotPos):
    		attrSlot = [player.GetItemAttribute(dstSlotPos, i) for i in xrange(player.ATTRIBUTE_SLOT_MAX_NUM)]	
    		for i in xrange(5):		
    			self.bonusslot[i].SetText("")
    			
    		for i in xrange(player.ATTRIBUTE_SLOT_MAX_NUM-2):
    			type = attrSlot[i][0]
    			value = attrSlot[i][1]
    			affectString = self.__GetAffectString(type, value)
    			if int(value) < 0:				
    				self.bonusslot[i].SetPackedFontColor(self.NEGATIVE_COLOR)
    			else:
    				self.bonusslot[i].SetPackedFontColor(self.POSITIVE_COLOR)
    			self.bonusslot[i].SetText(affectString)
    		
    		itemIndex = player.GetItemIndex(srcSlotPos)
    		itemCount = player.GetItemCount(srcSlotPos)
    		self.switchslot.ClearSlot(1)
    		self.switchslot.SetItemSlot(1, itemIndex, itemCount)
    			
    	def OnUpdate(self):
    		self.refresh(self.slotitem,self.slotgira)
    
    	AFFECT_DICT = {
    		item.APPLY_MAX_HP : localeInfo.TOOLTIP_MAX_HP,
    		item.APPLY_MAX_SP : localeInfo.TOOLTIP_MAX_SP,
    		item.APPLY_CON : localeInfo.TOOLTIP_CON,
    		item.APPLY_INT : localeInfo.TOOLTIP_INT,
    		item.APPLY_STR : localeInfo.TOOLTIP_STR,
    		item.APPLY_DEX : localeInfo.TOOLTIP_DEX,
    		item.APPLY_ATT_SPEED : localeInfo.TOOLTIP_ATT_SPEED,
    		item.APPLY_MOV_SPEED : localeInfo.TOOLTIP_MOV_SPEED,
    		item.APPLY_CAST_SPEED : localeInfo.TOOLTIP_CAST_SPEED,
    		item.APPLY_HP_REGEN : localeInfo.TOOLTIP_HP_REGEN,
    		item.APPLY_SP_REGEN : localeInfo.TOOLTIP_SP_REGEN,
    		item.APPLY_POISON_PCT : localeInfo.TOOLTIP_APPLY_POISON_PCT,
    		item.APPLY_STUN_PCT : localeInfo.TOOLTIP_APPLY_STUN_PCT,
    		item.APPLY_SLOW_PCT : localeInfo.TOOLTIP_APPLY_SLOW_PCT,
    		item.APPLY_CRITICAL_PCT : localeInfo.TOOLTIP_APPLY_CRITICAL_PCT,
    		item.APPLY_PENETRATE_PCT : localeInfo.TOOLTIP_APPLY_PENETRATE_PCT,
    
    		item.APPLY_ATTBONUS_WARRIOR : localeInfo.TOOLTIP_APPLY_ATTBONUS_WARRIOR,
    		item.APPLY_ATTBONUS_ASSASSIN : localeInfo.TOOLTIP_APPLY_ATTBONUS_ASSASSIN,
    		item.APPLY_ATTBONUS_SURA : localeInfo.TOOLTIP_APPLY_ATTBONUS_SURA,
    		item.APPLY_ATTBONUS_SHAMAN : localeInfo.TOOLTIP_APPLY_ATTBONUS_SHAMAN,
    		item.APPLY_ATTBONUS_MONSTER : localeInfo.TOOLTIP_APPLY_ATTBONUS_MONSTER,
    
    		item.APPLY_ATTBONUS_HUMAN : localeInfo.TOOLTIP_APPLY_ATTBONUS_HUMAN,
    		item.APPLY_ATTBONUS_ANIMAL : localeInfo.TOOLTIP_APPLY_ATTBONUS_ANIMAL,
    		item.APPLY_ATTBONUS_ORC : localeInfo.TOOLTIP_APPLY_ATTBONUS_ORC,
    		item.APPLY_ATTBONUS_MILGYO : localeInfo.TOOLTIP_APPLY_ATTBONUS_MILGYO,
    		item.APPLY_ATTBONUS_UNDEAD : localeInfo.TOOLTIP_APPLY_ATTBONUS_UNDEAD,
    		item.APPLY_ATTBONUS_DEVIL : localeInfo.TOOLTIP_APPLY_ATTBONUS_DEVIL,
    		item.APPLY_STEAL_HP : localeInfo.TOOLTIP_APPLY_STEAL_HP,
    		item.APPLY_STEAL_SP : localeInfo.TOOLTIP_APPLY_STEAL_SP,
    		item.APPLY_MANA_BURN_PCT : localeInfo.TOOLTIP_APPLY_MANA_BURN_PCT,
    		item.APPLY_DAMAGE_SP_RECOVER : localeInfo.TOOLTIP_APPLY_DAMAGE_SP_RECOVER,
    		item.APPLY_BLOCK : localeInfo.TOOLTIP_APPLY_BLOCK,
    		item.APPLY_DODGE : localeInfo.TOOLTIP_APPLY_DODGE,
    		item.APPLY_RESIST_SWORD : localeInfo.TOOLTIP_APPLY_RESIST_SWORD,
    		item.APPLY_RESIST_TWOHAND : localeInfo.TOOLTIP_APPLY_RESIST_TWOHAND,
    		item.APPLY_RESIST_DAGGER : localeInfo.TOOLTIP_APPLY_RESIST_DAGGER,
    		item.APPLY_RESIST_BELL : localeInfo.TOOLTIP_APPLY_RESIST_BELL,
    		item.APPLY_RESIST_FAN : localeInfo.TOOLTIP_APPLY_RESIST_FAN,
    		item.APPLY_RESIST_BOW : localeInfo.TOOLTIP_RESIST_BOW,
    		item.APPLY_RESIST_FIRE : localeInfo.TOOLTIP_RESIST_FIRE,
    		item.APPLY_RESIST_ELEC : localeInfo.TOOLTIP_RESIST_ELEC,
    		item.APPLY_RESIST_MAGIC : localeInfo.TOOLTIP_RESIST_MAGIC,
    		item.APPLY_RESIST_WIND : localeInfo.TOOLTIP_APPLY_RESIST_WIND,
    		item.APPLY_REFLECT_MELEE : localeInfo.TOOLTIP_APPLY_REFLECT_MELEE,
    		item.APPLY_REFLECT_CURSE : localeInfo.TOOLTIP_APPLY_REFLECT_CURSE,
    		item.APPLY_POISON_REDUCE : localeInfo.TOOLTIP_APPLY_POISON_REDUCE,
    		item.APPLY_KILL_SP_RECOVER : localeInfo.TOOLTIP_APPLY_KILL_SP_RECOVER,
    		item.APPLY_EXP_DOUBLE_BONUS : localeInfo.TOOLTIP_APPLY_EXP_DOUBLE_BONUS,
    		item.APPLY_GOLD_DOUBLE_BONUS : localeInfo.TOOLTIP_APPLY_GOLD_DOUBLE_BONUS,
    		item.APPLY_ITEM_DROP_BONUS : localeInfo.TOOLTIP_APPLY_ITEM_DROP_BONUS,
    		item.APPLY_POTION_BONUS : localeInfo.TOOLTIP_APPLY_POTION_BONUS,
    		item.APPLY_KILL_HP_RECOVER : localeInfo.TOOLTIP_APPLY_KILL_HP_RECOVER,
    		item.APPLY_IMMUNE_STUN : localeInfo.TOOLTIP_APPLY_IMMUNE_STUN,
    		item.APPLY_IMMUNE_SLOW : localeInfo.TOOLTIP_APPLY_IMMUNE_SLOW,
    		item.APPLY_IMMUNE_FALL : localeInfo.TOOLTIP_APPLY_IMMUNE_FALL,
    		item.APPLY_BOW_DISTANCE : localeInfo.TOOLTIP_BOW_DISTANCE,
    		item.APPLY_DEF_GRADE_BONUS : localeInfo.TOOLTIP_DEF_GRADE,
    		item.APPLY_ATT_GRADE_BONUS : localeInfo.TOOLTIP_ATT_GRADE,
    		item.APPLY_MAGIC_ATT_GRADE : localeInfo.TOOLTIP_MAGIC_ATT_GRADE,
    		item.APPLY_MAGIC_DEF_GRADE : localeInfo.TOOLTIP_MAGIC_DEF_GRADE,
    		item.APPLY_MAX_STAMINA : localeInfo.TOOLTIP_MAX_STAMINA,
    		item.APPLY_MALL_ATTBONUS : localeInfo.TOOLTIP_MALL_ATTBONUS,
    		item.APPLY_MALL_DEFBONUS : localeInfo.TOOLTIP_MALL_DEFBONUS,
    		item.APPLY_MALL_EXPBONUS : localeInfo.TOOLTIP_MALL_EXPBONUS,
    		item.APPLY_MALL_ITEMBONUS : localeInfo.TOOLTIP_MALL_ITEMBONUS,
    		item.APPLY_MALL_GOLDBONUS : localeInfo.TOOLTIP_MALL_GOLDBONUS,
    		item.APPLY_SKILL_DAMAGE_BONUS : localeInfo.TOOLTIP_SKILL_DAMAGE_BONUS,
    		item.APPLY_NORMAL_HIT_DAMAGE_BONUS : localeInfo.TOOLTIP_NORMAL_HIT_DAMAGE_BONUS,
    		item.APPLY_SKILL_DEFEND_BONUS : localeInfo.TOOLTIP_SKILL_DEFEND_BONUS,
    		item.APPLY_NORMAL_HIT_DEFEND_BONUS : localeInfo.TOOLTIP_NORMAL_HIT_DEFEND_BONUS,
    		item.APPLY_PC_BANG_EXP_BONUS : localeInfo.TOOLTIP_MALL_EXPBONUS_P_STATIC,
    		item.APPLY_PC_BANG_DROP_BONUS : localeInfo.TOOLTIP_MALL_ITEMBONUS_P_STATIC,
    		item.APPLY_RESIST_WARRIOR : localeInfo.TOOLTIP_APPLY_RESIST_WARRIOR,
    		item.APPLY_RESIST_ASSASSIN : localeInfo.TOOLTIP_APPLY_RESIST_ASSASSIN,
    		item.APPLY_RESIST_SURA : localeInfo.TOOLTIP_APPLY_RESIST_SURA,
    		item.APPLY_RESIST_SHAMAN : localeInfo.TOOLTIP_APPLY_RESIST_SHAMAN,
    		item.APPLY_MAX_HP_PCT : localeInfo.TOOLTIP_APPLY_MAX_HP_PCT,
    		item.APPLY_MAX_SP_PCT : localeInfo.TOOLTIP_APPLY_MAX_SP_PCT,
    		item.APPLY_ENERGY : localeInfo.TOOLTIP_ENERGY,
    		item.APPLY_COSTUME_ATTR_BONUS : localeInfo.TOOLTIP_COSTUME_ATTR_BONUS,	
    	}
    
     

     

     

     

     

     

    Then i add to my locale_it/it/ui switcher.py and the folder with image of switcher

     

     

    import uiScriptLocale
    import item
    
    LOCALE_PATH = uiScriptLocale.WINDOWS_PATH
    ROOT_PATH = "d:/ymir work/ui/public/"
    
    window = {
    	"name" : "CostumeWindow",
    
    	"x" : 300,
    	"y" : 100,
    
    	"style" : ("movable", "float",),
    
    	"width" : 256,
    	"height" : 435,
    
    	"children" :
    	(
    								
    		{
    			"name" : "board",
    			"type" : "board",
    			"style" : ("attach",),
    
    			"x" : 0,
    			"y" : 0,
    
    			"width" : 236,
    			"height" : 435,
    			
    			"children" :
    			(
    				## Title
    				{
    					"name" : "TitleBar",
    					"type" : "titlebar",
    					"style" : ("attach",),
    
    					"x" : 6,
    					"y" : 6,
    
    					"width" : 224,
    					"color" : "yellow",
    
    					"children" :
    					(
    						{ "name":"TitleName", "type":"text", "x":120, "y":3, "text":"Cambia Bonus", "text_horizontal_align":"center", },
    					),
    				},
    
    				## Equipment Slot
    				{
    					"name" : "Costume_Base",
    					"type" : "image",
    
    					"x" : 13,
    					"y" : 38,
    					
    					"image" : "locale/it/ui/switcher/switcher.tga",					
    
    					"children" :
    					(
    
    						{
    							"name" : "switchslot",
    							"type" : "slot",
    
    							"x" : 3,
    							"y" : 3,
    
    							"width" : 170,
    							"height" : 145,
    
    							"slot" : (
    										{"index":0, "x":51, "y":16, "width":32, "height":96},
    										{"index":1, "x":140, "y":72, "width":32, "height":32},
    									),
    						},
    					),
    				},
    				{ 
    					"name":"Skill_Active_Title_Bar", 
    					"type":"horizontalbar", 
    					"x":13, 
    					"y":198, 
    					"width":210,
    					"children" :
    					(
    						{ "name":"Active_Skill_Point_Value", "type":"text", "x":110, "y":1, "text":"Bonus", "r":1.0, "g":1.0, "b":1.0, "a":1.0, "text_horizontal_align":"center" },
    					),
    				},
    				## bonus1
    				{
    					"name" : "character_board",
    					"type" : "thinboard",
    
    					"x" : 13,
    					"y" : 220,
    
    					"width" : 210,
    					"height" : 30 ,
    					"children" :
    					(
    						{
    							"name" : "bonus1",
    							"type" : "text",
    
    							"x" : 0,
    							"y" : 0,
    							"r":0.6911,
    							"g":0.8754,
    							"b":0.7068,
    							"a":1.0,
    
    							"text" : "",
    
    							"all_align" : "center",
    						},
    					),
    				},
    				## bonus2
    				{
    					"name" : "character_board",
    					"type" : "thinboard",
    
    					"x" : 13,
    					"y" : 255,
    
    					"width" : 210,
    					"height" : 30 ,
    					"children" :
    					(
    						{
    							"name" : "bonus2",
    							"type" : "text",
    
    							"x" : 0 ,
    							"y" : 0,
    							"r":0.6911,
    							"g":0.8754,
    							"b":0.7068,
    							"a":1.0,
    
    							"text" : "",
    
    							"all_align" : "center",
    						},
    					),
    				},
    				## bonus3
    				{
    					"name" : "character_board",
    					"type" : "thinboard",
    
    					"x" : 13,
    					"y" : 290,
    
    					"width" : 210,
    					"height" : 30 ,
    					"children" :
    					(
    						{
    							"name" : "bonus3",
    							"type" : "text",
    
    							"x" : 0 ,
    							"y" : 0,
    							"r":0.6911,
    							"g":0.8754,
    							"b":0.7068,
    							"a":1.0,
    
    							"text" : "",
    
    							"all_align" : "center",
    						},
    					),
    				},
    				## bonus4
    				{
    					"name" : "character_board",
    					"type" : "thinboard",
    
    					"x" : 13,
    					"y" : 325,
    
    					"width" : 210,
    					"height" : 30 ,
    					"children" :
    					(
    						{
    							"name" : "bonus4",
    							"type" : "text",
    
    							"x" : 0 ,
    							"y" : 0,
    							"r":0.6911,
    							"g":0.8754,
    							"b":0.7068,
    							"a":1.0,
    
    							"text" : "",
    
    							"all_align" : "center",
    						},
    					),
    				},
    				## bonus5
    				{
    					"name" : "character_board",
    					"type" : "thinboard",
    
    					"x" : 13,
    					"y" : 360,
    
    					"width" : 210,
    					"height" : 30 ,
    					"children" :
    					(
    						{
    							"name" : "bonus5",
    							"type" : "text",
    
    							"x" : 0 ,
    							"y" : 0,
    							"r":0.6911,
    							"g":0.8754,
    							"b":0.7068,
    							"a":1.0,
    
    							"text" : "",
    
    							"all_align" : "center",
    						},
    					),
    				},
    				{
    					"name" : "gira_bonus",
    					"type" : "button",
    
    					"x" : 80,
    					"y" : 400,
    
    					"text" : "Gira Bonus",
    
    					"default_image" : ROOT_PATH + "Large_Button_01.sub",
    					"over_image" : ROOT_PATH + "Large_Button_02.sub",
    					"down_image" : ROOT_PATH + "Large_Button_03.sub",
    				},
    			),
    		},
    	),
    }
     

     

     

     

    So... Ingame the switcher is working but i take 1mb syseer in 2 min.

    Before you ask..

    Yes i have read this my same error and i have fix my locale_game.txt  but still the same error

     

    So.. i have put something wrong or dont know.. my python is so bad.

     

    If someone know how help me thank you :)

     

    This is the image of switchbonus.

     
    1zm2hdg.jpg

  5. edit it as you wish

    quest crea_item begin
    state start begin
    when 20090.click with pc.is_gm() and pc.get_gm_level () >= 5 begin
    say ("Put Value Item")
    say ("Put 0 for close!")
    local a = tonumber ( input() )
    if a == 0 then
    say_title ("Operation Fail!")
    return
    end
    if a == nil then
    say("U need to put a real number")
    say_title ("Operation Fail!")
    return
    end
    say ("value first Bonus")
    local b1 = tonumber (input())
    say ("amount first Bonus")
    local v1 = tonumber (input())
    say ("value second Bonus")
    local b2 = tonumber (input())
    say ("amount second Bonus")
    local v2 = tonumber (input())
    say ("value thirth Bonus")
    local b3 = tonumber (input())
    say ("amount thirth Bonus")
    local v3 = tonumber (input())
    say ("value fourth Bonus")
    local b4 = tonumber (input())
    say ("amount fourth Bonus")
    local v4 = tonumber (input())
    say ("value fifth Bonus")
    local b5 = tonumber (input())
    say ("amount fifth Bonus")
    local v5 = tonumber (input())
    say ("value sixth Bonus")
    local b6 = tonumber (input())
    say ("amount sixth Bonus")
    local v6 = tonumber (input())
    say ("value fifth Bonus")
    local b7 = tonumber (input())
    say ("amount fifth Bonus")
    local v7 = tonumber (input())
    say ("First Stone")
    say ("Put value Stone")
    say ("Put 0 for no stone and no slot")
    say ("And 1 for no stone but free slot")
    local p1 = tonumber (input())
    say ("Second Stone")
    say ("Put value Stone")
    say ("Put 0 for no stone and no slot")
    say ("And 1 for no stone but free slot")
    local p2 = tonumber (input())
    say ("Thirt Stone")
    say ("Put value Stone")
    say ("Put 0 for no stone and no slot")
    say ("And 1 for no stone but free slot")
    local p3 = tonumber (input())
    
    pc.give_item2_select(a)
    item.set_socket ( 0 , p1 )
    item.set_socket ( 1 , p2 )
    item.set_socket ( 2 , p3 ) 
    item.set_value(0, b1, v1)
    item.set_value(1, b2, v2)
    item.set_value(2, b3, v3)
    item.set_value(3, b4, v4)
    item.set_value(4, b5, v5)
    item.set_value(5, b6, v6)
    item.set_value(6, b7, v7)
    
    end
    end
    end
    • Love 2
  6. Just esample and only for 40k

    Ur item will take a vs war stone+3, 500 hp, 250 Sp, 10 critical, 10 piercing, 10 human..

    quest blabla begin
    	state start begin
    		when 9003.take begin
    			item.set_socket ( 0 , 28433 )  
    			item.set_socket ( 1 , 1 )
    			item.set_socket ( 2 , 1 ) 
    			item.set_value(0, 1, 500) 
    			item.set_value(1, 2, 250) 
    			item.set_value(2, 15, 10) 
    			item.set_value(3, 16, 10) 
    			item.set_value(4, 17, 10)
    		end
    	end
    end
    • Love 2
  7. quest drop begin
    	state start begin
    		when kill with not npc.is_pc() and math.random(1,100) >= 99 begin
    			local mob_lvl=npc.get_level(npc.get_race())
    			local player_level=pc.get_level()
    			if player_level - mob_lvl <= 15 and player_level - mob_lvl >= -15 then
    				game.drop_item_with_ownership(50133,1)
    			end
    		end
    	end
    end

    this work

  8. Sorry for bad english..

    I Have a problem with warp and bonuspage..

    when warp with ring teleport with inventory open the client crash on loading and report this on syseer:

    uiInventory.py(line:563) RefreshBonus
    ui.py(line:2704) GetChild
    
    InventoryWindow.RefreshBonus.BindObject - (type 'exceptions.KeyError'):'Sword_def_Value'
    
    0620 01:50:34203 :: ============================================================================================================
    0620 01:50:34203 :: Abort!!!!
    
    
    0620 01:50:34203 :: filename=exception.py, name=Abort
    0620 01:50:34203 :: filename=uiInventory.py, name=RefreshBonus
    0620 01:50:34203 :: filename=uiInventory.py, name=__LoadRefreshBonus
    0620 01:50:34203 :: filename=uiInventory.py, name=OnUpdate
    0620 01:50:34203 :: filename=prototype.py, name=RunApp
    0620 01:50:34203 :: filename=prototype.py, name=(module)
    0620 01:50:34203 :: filename=system.py, name=execfile
    0620 01:50:34203 :: filename=system.py, name=RunMainScript
    0620 01:50:34203 :: filename=system.py, name=(module)
    0620 01:50:34203 :: filename=(string), name=(module)
    
    
    Instead if i put teleport-ring on taskbar(near potion) and i warp with inventory close there are no problem.

    So i think the client crash when try to reload bonus after warp..

    This is the bonus page that i use:

    https://metin2.download/picture/r3F9504x09DVmF8K988YXgTtGTP6KMUj/.gif

    Someone know how i can "fix" or something else, like a function for "inventory close" or dont know..

    Thx

  9. I'm not sure I understand, my proto is not mutilated, just gold is set ad 0..

    And set all "yang" on txt is too long because .txt have no table like sql on navicat  :(

    This is screen:

    15e8uwl.jpg

     

    However my quest does not slow down the server ?

  10. First: Sorry for my english.
    Just for clarify i use vanilla core 2.4.1  and my mob_proto.txt have all the "gold lane" set at 0..  so all mob dont drop yang..
    Its so bored for me to set them all, so i write this quest, that is work, but my question is:
     
    If i use this, the server will go slow?
    Hope No..
     
    -- Quest drop Yang -- Senza settare DB --
    quest yang begin
    	state start begin
    		
    		when kill with not npc.is_pc() begin		
    			local Lmob = npc.get_level(npc.get_race())
    			local Lmio = pc.get_level()
    			local diff = Lmob - Lmio
    			local bon = diff/100
    			local fort = {"90","91","92","93","94","95","96","97","98","99","100","101","102","103","104","105","106","107","108","109","110"}
    			local luck = fort[number(1,table.getn(fort))]	
    			local y = Lmob * 10 + luck
    			local y1 = 1
    			local rat = game .get_event_flag("yang_drop") -- chiamiamole rate o.O
    			
    			if Lmio >= Lmob then
    				y1 = Lmob/Lmio
    			elseif Lmob > Lmio then
    				y1 = 1 + bon
    			end			
    			local yang = y * y1
    			pc.changegold (yang*rat)
    		end
    	end
    end

     

    Thx if u will answer  :wub:

×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.