Jump to content

HisaoShou

Inactive Member
  • Posts

    70
  • Joined

  • Last visited

  • Feedback

    0%

Posts posted by HisaoShou

  1. Hello there. I wanted to make my skills to get from Normal to G1 (instead of M1) when reaching 15 skill points, and I have followed the following topic: 

     

    Unfortunately it is not working. I'm currently using 40k and the skills are still mastered to M1 instead of G1, despite of following the suggestions in the topic. 

    Here's my current script:

    			case SKILL_NORMAL:
    				// ¹ø¼·Àº ½ºÅ³ ¾÷±×·¹À̵å 17~20 »çÀÌ ·£´ý ¸¶½ºÅÍ ¼ö·Ã
    				if (GetSkillLevel(pkSk->dwVnum) >= 17)
    				{
    					SetSkillLevel(pkSk->dwVnum, 40);
    				}
    				break;
    
    			case SKILL_MASTER:
    				if (GetSkillLevel(pkSk->dwVnum) >= 30)
    				{
    					if (number(1, 31 - MIN(30, GetSkillLevel(pkSk->dwVnum))) == 1)
    						SetSkillLevel(pkSk->dwVnum, 30);
    				}
    				break;
    
    			case SKILL_GRAND_MASTER:
    				if (GetSkillLevel(pkSk->dwVnum) >= 40)
    				{
    					SetSkillLevel(pkSk->dwVnum, 40);
    				}
    				break;
    		}

    And yes, I have tried both values for SetSkillLevel to 30 and 40, none of them worked. 

    Can someone help me please? I would be grateful 

  2. Hello everyone, I have searched on most of the forums to find a way to modify these bonuses but I couldn't find anything. 

    Does anyone knows how to modify the bonuses granted by Party Leadership? 

    More info about Leadership can be found here: http://wiki.metin-2.com/index.php/Leadership

    I want to know how to modify the bonuses granted by "Set As Berserker" , "Set as melee", and so on...

    Can anyone help me with this issue please?

    • Metin2 Dev 1
  3. Acum 5 ore, OtherChoice a spus:

    each quest function, including questflags and globalflags, its called by the quest itself(lua) but is handled on game server and its declaration its c++ code. What you could do is adding a new function in client binary to pythonnetworkmodule so your py files can call this function which sends a request packet (HEADER_CG) to game server which performs any check you want on said flags and sends the response back to client (HEADER_GC), then you could have a BINARY_CALLBACK (game.py function accessible by client binary) which performs your desired python function. Hope it was clear, if not just tell me which part isn't clear and i'll make some example code as i get back home.

    Thank you for your answer, it made me understand a little how this works. 

    What I want to do is only quest - client related. For example I want an UI button to be displayed only if the variable declared by quest has a certain value. Do you think this is possible only with python(client) and quest(lua) ? 

    I would really appreciate an example if you have one. Something like, if you could make a present game button (e.g.:  Inventory Button from the bottom bar) be displayed only when quest variable is 1 that would be the easiest i think. I'm sorry for asking for this, I'm not good at it.

  4. Hello everyone. 

    I'm currently facing an issue where I want to make a certain system / icon visible only if a variable (which was declared and changed via quest) has a certain value. I want the client to check the value of the variable for the quest, and the client to update automatically as the variable is set to a certain value. 

    Can this be done? I have looked into an older topic related to this issue: [HowTo|Old]Quest-Client communication(for any version) , but it didn't help really much. I'm still not sure how to check this.

    Can someone help me please? I'm pretty dumb when comes to client communication 

  5. Acum 22 minute, Dobrescu Sebastian a spus:
    
    struct FPlayerCounter
    {
    	int nCount;
    
    	void operator () (LPENTITY ent)
    	{
    		if (ent->IsType(ENTITY_CHARACTER))
    		{
    			LPCHARACTER pChar = static_cast<LPCHARACTER>(ent);
    
    			if (pChar->IsPC() == true)
    			{
    				nCount++;
    			}
    		}
    	}
    };
    
    ACMD(do_get_player_count)
    {
    	LPSECTREE_MAP pSectree = SECTREE_MANAGER::instance().GetMap(ch->GetMapIndex());
    
    	if (pSectree == NULL)
    		return;
    
    	FPlayerCounter f;
    	f.nCount = 0;
    
    	pSectree->for_each(f);
    
    	ch->ChatPacket(CHAT_TYPE_INFO, "MapIndex: %d PlayerCount %d", ch->GetMapIndex(), f.nCount);
    }

     

    Wow, thank you very much!

    But can you please tell me where to put these?

    And can it be used as a quest function? I want to check the number of players from a map with a quest

    • Love 1
  6. Acum 12 minute, Syreldar a spus:

    Apparently, you don't have the mysql_direct_query functions on your server, sigh.

    Just remove it from the quest.

    Yes, this still does not work:

    quest giveItem begin 
    	state start begin 
    		when login begin 
    			say("test")  
    			local vnum = tonumber(input());
    			if (vnum == nil or vnum == 0) then
    				return say_reward("Invalid input.[ENTER]");
    			end -- if/elseif
    			
    			pc.give_item2(vnum, 1);
    			say(string.format("The item %d (%s) has been received.", vnum, item_name(vnum)))
    			say_item_vnum(vnum);
    		end -- when
    	end -- state
    end -- quest

     

  7. Acum 1 oră, Syreldar a spus:

    ?

    
    quest giveItem begin 
    	state start begin 
    		when login begin 
    			say("test")  
    			local vnum = tonumber(input());
    			if (vnum == nil or vnum == 0) then
    				return say_reward("Invalid input.[ENTER]");
    
    			elseif (mysql_direct_query(string.format("SELECT vnum FROM player.item_proto WHERE vnum = '%d';", vnum)) == 0) then
    				return say_reward(string.format("The item %d doesn't exist in the database.[ENTER]", vnum))
    			end -- if/elseif
    			
    			pc.give_item2(vnum, 1);
    			say(string.format("The item %d (%s) has been received.", vnum, item_name(vnum)))
    			say_item_vnum(vnum);
    		end -- when
    	end -- state
    end -- quest

     

    I get this on compile:

    Calls undeclared function! :
    mysql_direct_query
    Abort (core dumped)
     

  8. Acum 2 ore, ElBrujoo a spus:

    That's EXACTLY what the affect.add_collect() is supposed to do. However to be 100% sure I tested and it worked stacking a bonus. If you still can't make it work I could help you on skype-> xelbrujoox

    Ok , then try to stack exactly the same values. 

    Try this:  affect.add_collect(apply.INT,10,60*60*24*300*59) + affect.add_collect(apply.INT,10,60*60*24*300*59) + affect.add_collect(apply.INT,10,60*60*24*300*59)

    It won't stack more than two times.

  9. Acum 6 ore, ElBrujoo a spus:

    If you want a bonus that is stacked like chaegirab you can use affect.add_collect(), i think it s the simplest way

    It doesn't stack.

    affect.add_collect() + affect.add_collect() = don't stack

    affect.add_collect() + affect.add() = stack ONCE 

    I need them to be stacking more, like affect.add_collect() + affect.add_collect() + affect.add_collect() + affect.add_collect() and so on

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