Jump to content

Jordan

Inactive Member
  • Posts

    22
  • Joined

  • Last visited

  • Feedback

    0%

Posts posted by Jordan

  1. 2 hours ago, Mali61 said:

    Find:

    
    					if (item_get)
    					{
    						bSuccess = true;
    					}

    Change:

    
    					if (item_get)
    					{
    						bSuccess = true;
    						const TItemTable* Chest = ITEM_MANAGER::instance().GetTable(dwGroupNum);
    						if (Chest) {
    							char szBuf[128];
    							snprintf(szBuf, sizeof(szBuf), "%s receive %s from %s", GetName(), item_get->GetName(), Chest->szLocaleName);
    							BroadcastNotice(szBuf);
    						}
    					}

    char_item.cpp

    Thank you!
    How can I do it only if one or two special item are received out of the box?

  2. On 3/26/2021 at 9:42 AM, TMP4 said:

    So you want something like this?

    
    when x.use begin
        local rnd = math.random(1,100)
        if rnd >= 75 then
            pc.give_item2(189, 1)
            notice_all(pc.get_name().." got a fancy sword!")
        elseif rnd >= 50 then
            pc.give_item2(149, 1)
            notice_all(pc.get_name().." got a semi-fancy sword!")
        else
            pc.give_item2(19, 1)
            notice_all(pc.get_name().." got a not so fancy sword!")
        end
        pc.remove_item("x", 1)
    end

    You have to set the chest to ITEM_QUEST in item_proto and set all the drop in the quest. 

    If you don't want to use quest for the chest drop then the notice_all is not possible using just a quest, you have to do it in the game file's source in c++.

    Thanks for your reply.
    Okay, since I don't want to do the drop via quest, I'll have to do it via source.
    Can someone help me with an example how to do it please?

  3. 7 minutes ago, Syreldar said:
    
    quest item_change_sex begin
    	state start begin
    		when 71048.use begin
    			say_title(translate().change_empire._50_sayTitle)
    			if (pc.get_level() < 50) then
    				return say_reward(translate().item_change_sex._10_sayReward);
    
    			elseif (pc.get_wear(19) ~= nil) then
    				return say_reward("You have to unequip your body costume first.");
    
    			elseif (pc.is_engaged()) then
    				return say_reward(translate().item_change_sex._30_sayReward)
    
    			elseif (pc.is_married()) then
    				return say_reward(translate().item_change_sex._30_sayReward)
    
    			elseif (pc.is_polymorphed()) then
    				return say_reward(translate().item_change_sex._60_sayReward)
    			end -- if/elseif
    		
    			say(translate().item_change_sex._130_say)
    			wait()
    			say_title(translate().item_change_sex._120_sayTitle)
    			say(translate().item_change_sex._140_say)
    
    			if (select(translate().locale.guild.yes, translate().locale.guild.no) == 1) then
    				say_title(translate().item_change_sex._120_sayTitle)
    				say(translate().item_change_sex._150_say)
    				say_reward(translate().change_empire._230_sayReward)
    				
    				pc.remove_item(71048, 1);
    				pc.change_sex();
      				pc.polymorph(20032); -- So you don't need to relog.
    			end -- if
    		end -- when
    	end -- state
    end -- quest

     

    Thank you so much! :)

  4. Hey guys,

    I'm using the following quest to change sex of characters. The problem im facing is, that when someone wear as example a male costume and change to female, the costume keep equiped.
    Does someone know how to solve this problem?

    Spoiler
    
    quest item_change_sex begin
    	state start begin
    		when 71048.use begin 
    			if pc.get_level() < 50 then 
    				say_title(translate().change_empire._50_sayTitle)
    				say(translate().item_change_sex._10_sayReward)
    				return
    			end
    			
    			if pc.is_engaged() then
    				say_title(translate().change_empire._50_sayTitle)
    				say(translate().item_change_sex._30_sayReward)
    				return
    			end
    
    			if pc.is_married() then
    				say_title(translate().change_empire._50_sayTitle)
    				say(translate().item_change_sex._30_sayReward)
    				return
    			end
    
    			if pc.is_polymorphed() then
    				say_title(translate().change_empire._50_sayTitle)
    				say(translate().item_change_sex._60_sayReward)
    				return
    			end
    
    			if get_time() < pc.getqf("next_time") then
    				say_title(translate().change_empire._50_sayTitle)
    				say(translate().item_change_sex._80_sayReward)
    				say(translate().item_change_sex._90_say)
    
    				if pc.is_gm() then
    					say(string.format(translate().item_change_sex._100_say, time_to_str(pc.getqf("next_time"))))
    					say(translate().item_change_sex._110_say)
    					local s =  select(translate().locale.guild.yes, translate().locale.guild.no)
    					if s == 1 then
    						say(translate().change_empire._80_say)
    						pc.setqf("next_time", 0)
    					end
    				end
    				return
    
    			end
    
    			say_title(translate().item_change_sex._120_sayTitle)
    			say(translate().item_change_sex._130_say)
    			wait()
    			say_title(translate().item_change_sex._120_sayTitle)
    			say(translate().item_change_sex._140_say)
    			local s= select(translate().locale.guild.yes, translate().locale.guild.no)
    
    			if 1==s then
    				say_title(translate().item_change_sex._120_sayTitle)
    				say(translate().item_change_sex._150_say)
    				say_reward(translate().change_empire._230_sayReward)
    				
    				pc.remove_item("71048",1)
    				pc.setqf("next_time", get_time() + 0 * 0)
    
    				pc.change_sex()
    
    				local m_sex = pc.get_sex()
    
    				if m_sex == 0 then
    				    char_log(0, "CHANGE_SEX", "F -> M")
    				else
    				    char_log(0, "CHANGE_SEX", "M -> F")
    				end
    
    			elseif 2==s then
    				say(translate().item_change_sex._160_say)
    			end
    		end
    	end
    end		
    
    

     



    Would appreciate some help.

    Thank you!

     

  5. Hi guys,

     

    I have a little problem.

    I set the shop_buy_price in database and client proto to ae 2500000 and added that item into the shop.

    But when I try to buy the item ingame. It is there for 0 yang and i can't even buy it.

     

    Is this a known problem? Couldn't find any topic regarding this problem.

     

  6. I added a few more metin stones into "const SStoneDropInfo aStoneDrop[STONE_INFO_MAX_NUM] ="

    and now im getting the following error when compiling source:

    constants.cpp:908:1: error: too many initializers for 'const SStoneDropInfo [10]'

    afterwards i changed the following in constants.h to 20

    const int STONE_INFO_MAX_NUM = 20;

     

    The compile error is gone now, but the most metin stones are stilling missing the stone drop.

    Can someone help me here please?

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