Jump to content

TRBizeps

Banned
  • Posts

    175
  • Joined

  • Last visited

  • Days Won

    1
  • Feedback

    0%

Posts posted by TRBizeps

  1. Am 19.2.2018 um 23:06 schrieb Crypto2Team:

    Guten Abend liebe Community,

    wie ist es möglich, folgende Benachrichtung im Chatfenster zu entfernen?

    "Du hast die Verbesserung geandert." -> Nach dem man einen Gegenstand geswitcht hat. Der Vorteil darin besteht, dass man switchen kann & dennoch den Chat mitverfolgen kann.

     

    Lg

    Should be in char_item.cpp just Search for stype

  2. Gerade eben schrieb Abel(Tiger):

    If you don't know the essential things why are you even trying to copy something ? Pay someone who understand what i said above .

     

    Thanks for your useful post, i really appreciate it, but i won't pay for something which is done in minutes.

    If you don't want to help, then don't help..I can not do anything with your incomplete contributions, that should not sound mean

  3. vor 15 Minuten schrieb Abel(Tiger):

    Just replace that function with POINT corespondent.

    item.GetApplyPoint( item.APPLY_ATTBONUS_HUMAN ) == POINT_ATTBONUS_HUMAN = 43

    Or copy aApplyInfo[MAX_APPLY_NUM] from constants.cpp (server) and make a simple function to get point corespondent for apply.

     

    Thanks for your reply, but as i've said im not a developer i don't understand what i should do (I kinda know, but i can't do what you've said)

     

  4. vor 4 Stunden schrieb M.Sorin:
    
    PyObject * itemGetApplyPoint(PyObject * poSelf, PyObject * poArgs)
    {
    	int iValueIndex;
    	if (!PyTuple_GetInteger(poArgs, 0, &iValueIndex))
    		return Py_BadArgument();
    
    	CItemData * pItemData = CItemManager::Instance().GetSelectedItemDataPointer();
    	if (!pItemData)
    		return Py_BuildException("Not yet select item data");
    
    	CItemData::TItemApply ItemApply;
    	if (!pItemData->GetApply(iValueIndex, &ItemApply))
    		return Py_BuildException();
    
    	return Py_BuildValue("ii", ItemApply.bType, ItemApply.lValue);
    }

    Didn`t test it , but it should work.

     

    Thanks very much for your reply :)

    After i implemented that function, i received a new error called: "Type Error. an integer is required" Line 222

     

    	def RefreshLabel(self):
    		self.ScollPos = int(self.ScrollBar.GetPos() * self.Diff)
    		
    		for i in xrange(self.UI_MAX_COUNT) :
    			idx = i + self.ScollPos
    			
    			text = self.InfoList[idx][self.INFO_TEXT]
    			type = self.InfoList[idx][self.INFO_VALUE]
    			
    			if type == self.CATEGORY_STARTLINE:
    				self.__LabelTitleLine(i, text)
    			elif type == self.CATEGORY_ENDLINE:
    				self.__EmptyLine(i)
    			else:
    				value = playerm2g2.GetStatus(type)
    				
    				self.__LabelLine(i, text, value)

     

    The Line 222 is "def RefreshLabel(self):"

     

    I do think it's because of GetPos() but im not a developer so i dont know anything

     

    €dit: i think the above posted function doesn't work.

  5. Hey community,

    does anyone have a function that returns the apply point in the clip

    self.InfoList.append( [ localeInfo.DETAILS_36, localeInfo.DETAILS_TOOLTIP_36, item.GetApplyPoint( item.APPLY_ATTBONUS_WARRIOR ) ] )

     

    This System is from the official metin2 root, it's the bonus board of metin2.  (item.GetApplyPoint is missing in binary)

     

    Thanks for Abel, if anyone provide me this function, i could rerelease this system with how2to in abel's thread.

    • Love 1
  6. vor 9 Stunden schrieb Tasho:

    I don't really understand what exactly you do there, but you should check if pointer isn't NULL.

    
    CItem* pCostumeMount = ch->GetWear(WEAR_COSTUME_MOUNT);
    if (!pCostumeMount)
    	return;

     

    Let me explain you my Situation a bit more detailed.

    I've defined the Mounts as Horse, and just because i dont want the new costume_mount slot being useless i kept the mount in there Slots. Since they're Horses, if you run the Command "do_user_horse_back" it doesn't unequip the weared mount (which is defined as horse) because you Dont usually wear the Horsebooks.

     

    May you Please Show me the Solution? I' m Not able to implement the null Pointer Check also i dont think my Code is fine :D

  7. ACMD(do_user_horse_back)
    {
    	CItem* pCostumeMount = ch->GetWear(WEAR_COSTUME_MOUNT);
    	if (pCostumeMount->IsEquipped())
    	{
    	if (ch->GetHorse() != NULL)
    		ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("HAS_UNEQUIPPED_MOUNT_ITEM"));
    		ch->UnequipItem(pCostumeMount);
    		ch->HorseSummon(false);
    		return;
    	}
    
    	if (!pCostumeMount->IsEquipped() && ch->GetHorse() != NULL)
    	{
    		ch->HorseSummon(false);
    		ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("¸»À» µ¹·Áº¸³Â½À´Ï´Ù."));
    	}
    
    	else if (ch->IsHorseRiding() == true)
    	{
    		ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("¸»¿¡¼­ ¸ÕÀú ³»·Á¾ß ÇÕ´Ï´Ù.")); //Du musst absteigen.
    	}
    	else
    	{
    		ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("¸»À» ¸ÕÀú ¼ÒȯÇØÁÖ¼¼¿ä.")); // Bitte ruf zuerst Dein Pferd.
    	}
    }

     

    Hello Community,

     

    To explain you my situation i'll describe my problem shortly.

    I've implemented the horse appearance via database table & i need to unequip the "Costume Mount" Item if i use strg + B <-

    the problem is, i do not know anything about c++ my method is working == Player wears costume_mount uses strg +b and the Mount (Which is defined as a horse) unsummons.

     

     

    But if i summon my horse (not the mounts, which are defined as horse i mean the horse you get by horselevel) && use this command core crashes.

     

    In this spoiler i've posted my function without my changes. :D

     
    
    ACMD(do_user_horse_back)
    {
    	if (ch->GetHorse() != NULL)
    	{
    		ch->HorseSummon(false);
    		ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("¸»À» µ¹·Áº¸³Â½À´Ï´Ù."));
    	}
    	else if (ch->IsHorseRiding() == true)
    	{
    		ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("¸»¿¡¼­ ¸ÕÀú ³»·Á¾ß ÇÕ´Ï´Ù."));
    	}
    	else
    	{
    		ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("¸»À» ¸ÕÀú ¼ÒȯÇØÁÖ¼¼¿ä."));
    	}
    }
  8. Am 16.1.2018 um 20:55 schrieb Galet:

    Hello,

    I don't exactly know how these skills are working as I am not playing on the official server at the moment. Otherwise I think that the new Feather Walk is just a mere splash skill, but I might be wrong. 

    If it's a splash skill, you can just copy any of the existing one (Sura fire skill, warrior skill...)

     

    I've released in elitepvpers the current official skill_proto, there are skills for example (how are they called in english??) i think dragon roar, which now is an distance attack and the stride skill from ranged ninja is also a sourceside change.

    you can't just copy.

  9. vor 15 Stunden schrieb Abel(Tiger):

    "equip" and "unequip" EVENTS not FUNCTIONS ...

    
    when 19.equip begin
    	syschat("You equiped a weapon.")
    end
    
    when 19.unequip begin
    	syschat("You unequiped a weapon.")
    end
      Unsichtbaren Inhalt anzeigen
    
    
    // Hint number 1 :)
    CHARACTER::UnequipItem
    // Hint number 2 :)
    quest::CQuestManager::instance().UnequipItem(GetPlayerID(), item);
    
    
    
    // Or use one event already existing 
    quest::CQuestManager::instance().UseItem(GetPlayerID(), item, false);

     

     

     

    (my type is: ITEM_PETS)

     

    do i need to edit questmanager? I really dont know how i should write the event.

     

    	bool CQuestManager::UseItem(unsigned int pc, LPITEM item, bool bReceiveAll)
    	{
    		if (test_server)
    			sys_log( 0, "questmanager::UseItem Start : itemVnum : %d PC : %d", item->GetOriginalVnum(), pc);
    		PC* pPC;
    		if ((pPC = GetPC(pc)))
    		{
    			if (!CheckQuestLoaded(pPC))
    			{
    				LPCHARACTER ch = CHARACTER_MANAGER::instance().FindByPID(pc);
    				if (ch)
    				{
    					ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("Äù½ºÆ®¸¦ ·ÎµåÇÏ´Â ÁßÀÔ´Ï´Ù. Àá½Ã¸¸ ±â´Ù·Á ÁֽʽÿÀ."));
    				}
    				return false;
    			}
    			// call script
    			SetCurrentItem(item);
    			/*
    			if (test_server)
    			{
    				sys_log( 0, "Quest UseItem Start : itemVnum : %d PC : %d", item->GetOriginalVnum(), pc);
    				itertype(m_mapNPC) it = m_mapNPC.begin();
    				itertype(m_mapNPC) end = m_mapNPC.end();
    				for( ; it != end ; ++it)
    				{
    					sys_log( 0, "Quest UseItem : vnum : %d item Vnum : %d", it->first, item->GetOriginalVnum());
    				}
    			}
    			if(test_server)
    			sys_log( 0, "questmanager:useItem: mapNPCVnum : %d\n", m_mapNPC[item->GetVnum()].GetVnum());
    			*/
    
    			return m_mapNPC[item->GetVnum()].OnUseItem(*pPC, bReceiveAll);
    		}
    		else
    		{
    			//cout << "no such pc id : " << pc;
    			sys_err("QUEST USE_ITEM_EVENT no such pc id : %d", pc);
    			return false;
    		}
    	}

    Andere Medien einfügen

     

    this event e.g. is for *.use how can i modify it for *.unequip?

  10. vor 21 Minuten schrieb Tasho:
    
    //@../game/questlua_pc.cpp
    //1.)Search for:
    	int pc_warp_exit(lua_State * L)
    	{
    		CQuestManager::instance().GetCurrentCharacterPtr()->ExitToSavedLocation();
    		return 0;
    	}
    //1.)Add after:
    	int pc_equip(lua_State* L)
    	{
    		LPCHARACTER ch = CQuestManager::instance().GetCurrentCharacterPtr();
    		LPITEM item = ch->GetInventoryItem(lua_tonumber(L, 1));
    		if (item)
    			ch->EquipItem(item);
    		return 0;
    	}
    
    	int pc_unequip(lua_State* L)
    	{
    		LPCHARACTER ch = CQuestManager::instance().GetCurrentCharacterPtr();
    		LPITEM item = ch->GetWear(lua_tonumber(L, 1));
    		if (item)
    			ch->UnequipItem(item);
    		return 0;
    	}
    
    //2.)Search for:
    			{ "get_race",   pc_get_race         },
    //2.)Add after:
    			{ "equip",      pc_equip            },
    			{ "unequip",    pc_unequip          },
    			
    //quest_function:
    	pc.equip
    	pc.unequip
    
    //quest:
    	pc.equip(item.get_cell())
    	pc.unequip(WEAR_PET)

     

    i've implemented those functions, but i can't imagine how they could be useful for my problem.

     

    here is my pet_system.quest

     

    quest pet_system begin
        state start begin
            function get_pet_info(itemVnum)
                pet_info_map = {
                --  [ITEM VNUM] MOB_VNUM, DEFAULT NAME
                    [53001]     = { 34001, gameforge.pet_system._010_say ,1},
                    [53002]     = { 34002, gameforge.pet_system._020_say ,1},
    				[53003]     = { 34003, gameforge.pet_system._040_say ,1},
    				[53004]     = { 34009, gameforge.pet_system._050_say ,1},
    				[53005]     = { 34004, gameforge.pet_system._050_say, 1},
    				[53006]     = { 34006, gameforge.pet_system._090_say, 1},
                    [53007]     = { 34008, gameforge.pet_system._060_say, 1},
                    [53008]     = { 34007, gameforge.pet_system._070_say, 1},
    				[53009]     = { 34005, gameforge.pet_system._080_say, 1},
                    [53010]     = { 34010, gameforge.pet_system._100_say, 1},
                    [53011]     = { 34011, gameforge.pet_system._110_say, 1},
                    [53012]     = { 34012, gameforge.pet_system._120_say, 1},
                    [53013]     = { 34032, gameforge.pet_system._210_say, 1},
    
    
                }
    
                itemVnum = tonumber(itemVnum)
    
                return pet_info_map[itemVnum]
            end
    		function get_spawn_effect_file(idx)
    			effect_table = {
    				[0] = nil,
    				[1] = "d:\\\\ymir work\\\\effect\\\\etc\\\\appear_die\\\\npc2_appear.mse",
    			}
    			return effect_table [idx]
    		end
    		
    		when login begin
    			local vnum = pet.is_equipped()
    			if false != vnum then
    				local pet_info = pet_system.get_pet_info(vnum)
    
    				if null != pet_info then
    
    					local mobVnum = pet_info[1]
    					local petName = pet_info[2]
    					local spawn_effect_file_name = pet_system.get_spawn_effect_file(pet_info[3])
    
    					if pet.count_summoned() < 1 then
    						pet.summon(mobVnum, petName, false)
    					else
    						syschat(gameforge.pet_system._030_chat)
    					end
    					if spawn_effect_file_name != nil then
    						pet.spawn_effect (mobVnum, spawn_effect_file_name)
    					end
    				end 
    			end
    		end
    		
            when 53001.use or 53002.use or 53003.use or 53004.use or 53005.use or 53006.use or 53007.use or 53008.use or 53009.use or 53010.use or 53011.use or 53012.use or 53013.use or begin
                local pet_info = pet_system.get_pet_info(item.vnum)
    
                if null != pet_info then
    
                    local mobVnum = pet_info[1]
                    local petName = pet_info[2]
    				local spawn_effect_file_name = pet_system.get_spawn_effect_file(pet_info[3])
    
    			if not pet.is_equipped() then
    			 	if true == pet.is_summon(34001) then
    					pet.unsummon(34001)
    				end
    			end
    			
    				if not pet.is_equipped() and pet.is_summon(mobVnum) then
    					if spawn_effect_file_name != nil then
    						pet.spawn_effect (mobVnum, spawn_effect_file_name)
    					end
                        pet.unsummon(mobVnum)
                    else
                        if pet.count_summoned() < 1 then
                            pet.summon(mobVnum, petName, false)
                        else
                            syschat(gameforge.pet_system._030_chat)
                        end
    					if spawn_effect_file_name != nil then
    						pet.spawn_effect (mobVnum, spawn_effect_file_name)
    					end
    				end
                    --end -- if pet.is_summon
                end  -- if null != pet_info
            end -- when
        end -- state
    end -- quest

     

  11. vor 20 Minuten schrieb Tasho:
    
    //@questlib.lua
    function pet.is_equipped()
    	--[[
    		pc.get_wear(bCell);
      	Returns: 
    		[1] lua_pushnumber: The equipped item vnum of the specific [cell].
    		[1] lua_pushnil: nil
    	--]]
    
    	local WEAR_PET = 27 -- ../common/length.h / enum EWearPositions [0 ~ WEAR_MAX - 1] 
    	return pc.get_wear(WEAR_PET) ~= nil; -- Returns: True or False
    end
    
    //@Quest:
    if not pet.is_equipped() then
        say('Pet isn't equipped.')
        return
    end

     

     

    thanks very much!

     

    That's definitly a progress, now if i use the Item it summons the Pet - but if i unequip it, the pet does not unsummon until i use it again.

     

    So i use it -> == Pet.is_summon

    Unequip & use again == pet.unsummon <-

×
×
  • 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.