Jump to content

xP3NG3Rx

Honorable Member
  • Posts

    839
  • Joined

  • Days Won

    393
  • Feedback

    100%

Posts posted by xP3NG3Rx

  1. I know.^_^

    ch is not declared, but no need pointer to finish the action. You may use "this->" or nothing (or... LPCHARACTER pc = this;). I just wanted to know why exists that pc-> tag.

  2. For prior game file versions; use like this:

     

    quest books begin
    	state start begin
    		when 50000001.use begin
    		--when kill with npc.is_pc() == false and npc.race >= 8000 and npc.race < 8500 begin --for stones
    			if pc.get_empty_inventory_count() < 1 then
    				syschat("You cannot open this box while you doesn't free up some spaces in your inventory.")
    				return
    			end
    			local sb = {
    				{{1,2,3,4,5,6},{16,17,18,19,20,21},},--Warrior
    				{{31,32,33,34,35,36},{46,47,48,49,50,51},},--Assassin
    				{{61,62,63,64,65,66},{76,77,78,79,80,81},},--Sura
    				{{91,92,93,94,95,96},{106,107,108,109,110,111},},--Shaman
    				--{{170,171,172,173,174,175}},--Wolfman
    			}
    			local class = number(1,table.getn(sb))
    			local group = number(1,2)
    			--if class == WOLFMAN then group=1 end
    			local skill_vnum = number(1, table.getn(sb[class][group]))
    			local itemid = pc.give_item2(50300,1)
    			if itemid ~= 0 then 
    				item.select(itemid)
    				item.set_socket(0, skill_vnum)
    			else
    				syschat(string.format("ERROR: code(0x%d|0x%d|0x%d)", class, group, skill_vnum))
    			end
    		end
    	end
    end
    
    
     
  3. I think this will work:

     

    quest login_cal begin
    	state start begin
    		when login begin
    			local t = {
    				[1] = {71124, 71125, 71126, 71127, 71128},
    				[21] = {71124, 71125, 71126, 71127, 71128},
    				[41] = {71124, 71125, 71126, 71127, 71128},
    			}
    			table.foreach(t, function(mapindex, items)
    				for j=1, table.getn(items) do
    					if pc.unequip_from_index(mapindex, items[j]) then
    						syschat(string.format('Item-ul %d a fost dezechipat.', items[j]))
    					end
    				end
    			end)
    		end
    	end
    end
    
     
  4. I will not do it for you, but you could do right here in GameLib/ItemData.cpp:

     

    const char * CItemData::GetName() const
    {
    	switch (GetType())
    	{
    		case ITEM_TYPE_POLYMORPH:
    			return "formatted item name for polymarble";
    			break;
    		case ITEM_TYPE_SKILLBOOK:
    		case ITEM_TYPE_SKILLFORGET:
    			return "formatted item name for skill items";
    			break;
    		default:
    			return m_ItemTable.szLocaleName;
    			break;
    	}
    
    	//return m_ItemTable.szLocaleName;
    }
    

     

    PS.: If you choose this way, you have to edit the uiToolTip.py file also then. (__SetPolymorphItemTitle <&> __SetSkillBookToolTip)

  5. You can find in char_item.cpp under this line:

     

    if (IsRefineThroughGuild() || bMoneyOnly)
    
     

    And in char.cpp:

     

    int CHARACTER::ComputeRefineFee(int iCost, int iMultiply) const
    {
    	CGuild* pGuild = GetRefineGuild();
    	if (pGuild)
    	{
    		if (pGuild == GetGuild())
    			return iCost * iMultiply * 9 / 10;
    
    		// ´Ů¸Ą Á¦±ą »ç¶÷ŔĚ ˝ĂµµÇĎ´Â °ćżě Ăß°ˇ·Î 3ąč ´ő
    		LPCHARACTER chRefineNPC = CHARACTER_MANAGER::instance().Find(m_dwRefineNPCVID);
    		if (chRefineNPC && chRefineNPC->GetEmpire() != GetEmpire())
    			return iCost * iMultiply * 3;
    
    		return iCost * iMultiply;
    	}
    	else
    		return iCost;
    }
    

     

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