Jump to content

Syreldar

Premium
  • Posts

    1298
  • Joined

  • Last visited

  • Days Won

    38
  • Feedback

    100%

Posts posted by Syreldar

  1. Good job, glad to see someone post in this section every now and then.

     

    Let me help you with something:

     

    	-- Customizable
    	function count(level)
    		local ranges = {
    			{["min"] = 110, ["count"] = 20},
    			{["min"] = 100, ["count"] = 18},
    			{["min"] = 90, ["count"] = 16},
    			{["min"] = 80, ["count"] = 14},
    			{["min"] = 70, ["count"] = 12},
    			{["min"] = 60, ["count"] = 10},
    			{["min"] = 50, ["count"] = 8},
    			{["min"] = 40, ["count"] = 6},
    			{["min"] = 30, ["count"] = 4},
    		};
    		
    		for _, range in ipairs(ranges) do
    			if (level >= range["min"]) then
    				return range["count"];
    			end -- if
    		end -- for
    		
    		return 0;
    	end -- function
    	
    	-- Dynamic
    	function count(level)
    		local ranges = {30, 40, 50, 60, 70, 80, 90, 100, 110, INSERT_MAX_LEVEL_HERE};
    		local multiplier = pc.ispremium() and 1.5 or 1;
    		
    		for index = 1, table.getn(ranges) do
    			if (level >= range[index] and level < range[index+1]) then
    				return (2 + 2 * index) * multiplier;
    			end -- if
    		end -- for
    		
    		return 0;
    	end -- function

    One more thing I can tell you is that if the argument you're going to pass to the function is always the player's level, there is no point in making it an argument in the first place, you can just call pc.get_level() instead, save it in a var if you prefer.

    • Love 1
  2. 35 minutes ago, masodikbela said:

    For me it looks like its just how the animation works... so basically the combo_01 and combo_03 works, but the combo_02 doesnt work because of the collosion data:
    060333YqcHt2F.png -> this is for the 01 and 03 which I think does damage, if you imagine the horse under her you can see that its correct, usually collide on the side and on the front with the monsters
    0605407mMWdiZ.png this is the same from another perspective
    060333JITRune.png this is the combo_02 which I think sometimes doesnt do damage on the front because its too high and doesnt collide with the height of the metins

    So I think its nothing to do with speed, simply its just "visual", cus when the attackspeed is slow you may not notice that the second animation doesn't do damage, and when it becomes faster its more obvious that something is not right.

    It's not visual. This is a known bug, it fails to do damage on high attackspeed, but if you keep it low it deals damage normally.

  3. 5 minutes ago, 59sos said:

    i like your quick answer , thx you

     

    1) I don`t know which quest is ...  from core error i belive  that`s problem from a npc/quest .

    2)

      Hide contents

     

    3)Sounds good , so your fix are the completion of full fix. Nice!  i try it now.

    1. Well, find it or I can't help you.

    2. Change this snippet:

                if (pAttacker->GetPoint(POINT_HIT_HP_RECOVERY) && number(0, 4) > 0) // 80% 확률
                {
                    int i = MIN(dam, iCurHP) * pAttacker->GetPoint(POINT_HIT_HP_RECOVERY) / 100;
    
                    if (i)
                    {
                        CreateFly(FLY_HP_SMALL, pAttacker);
                        pAttacker->PointChange(POINT_HP, i);
                    }
                }
    
                // 칠 때마다 SP회복
                if (pAttacker->GetPoint(POINT_HIT_SP_RECOVERY) && number(0, 4) > 0) // 80% 확률
                {
                    int i = MIN(dam, iCurHP) * pAttacker->GetPoint(POINT_HIT_SP_RECOVERY) / 100;
    
                    if (i)
                    {
                        CreateFly(FLY_SP_SMALL, pAttacker);
                        pAttacker->PointChange(POINT_SP, i);
                    }
                }

    Into this:

    			
                if (pAttacker->GetPoint(POINT_HIT_HP_RECOVERY) && number(0, 4) > 0) // 80% E¢ç¡¤u
                {
                    int i = (iCurHP >= 0 ? MIN(dam, iCurHP) : dam) * pAttacker->GetPoint(POINT_HIT_HP_RECOVERY) / 100;
                    if (i)
                    {
                        CreateFly(FLY_HP_SMALL, pAttacker);
                        pAttacker->PointChange(POINT_HP, i);
                    }
                }
                if (pAttacker->GetPoint(POINT_HIT_SP_RECOVERY) && number(0, 4) > 0) // 80% E¢ç¡¤u
                {
                    int i = (iCurHP >= 0 ? MIN(dam, iCurHP) : dam) * pAttacker->GetPoint(POINT_HIT_SP_RECOVERY) / 100;
                    if (i)
                    {
                        CreateFly(FLY_SP_SMALL, pAttacker);
                        pAttacker->PointChange(POINT_SP, i);
                    }
                }

    3. My fix is the only and complete fix for the issue.

  4. 10 minutes ago, Metin2Place said:

     


    I don't think it does.

     

    
    int pc_mount_bonus(lua_State* L)
    	{
    		BYTE applyOn = static_cast<BYTE>(lua_tonumber(L, 1));
    		long value = static_cast<long>(lua_tonumber(L, 2));
    		long duration = static_cast<long>(lua_tonumber(L, 3));
    
    		LPCHARACTER ch = CQuestManager::instance().GetCurrentCharacterPtr();
    
    		if( NULL != ch )
    		{
    			ch->RemoveAffect(AFFECT_MOUNT_BONUS);
    			ch->AddAffect(AFFECT_MOUNT_BONUS, aApplyInfo[applyOn].bPointType, value, AFF_NONE, duration, 0, false);
    		}
    
    		return 0;
    	}

     

     

    Then it's not possible to do it via quest without any source changes, unless you hardcode it with affect.add_collect and affect.remove_collect on dismount, but considering that there is no trigger for that, it would simply not work properly; you're not the only one that can make you dismount: there are many cases.

     

    - Death (also not checkable via quest unless you have the die trigger like on martysama's sources).

    - New login or Teleport on new map (the mount isn't immediately re-equipped, so it would require a timer)

    - etc.

     

    But even if you somehow hardcoded all the cases, the affect_add_collect works with keys and values.

    This means that if you somehow got another bonus of the same type and value which has been given to you via affect.add_collect, the other bonus will be gone forever.

     

    Have you ever thought about why does the Lv30 Biologist mission give you 10% Movement speed and the Lv70 one gives you 11%? Well, that's the reason.

  5. 15 minutes ago, Metin2Place said:

    That's not the problem I have.

    ?

     

    Well it depends wether or not the pc.mount_bonus function allows the player to have multiple AFFECT_MOUNT_BONUS, which if I remember correctly is not allowed.

    But, assuming it does allow it and i'm just not remembering correctly, turn the bonus arg from a simple int into a table, then iterate through the same table depending on what mount you're using and call the pc.mount_bonus function for each bonus you put inside the table, enjoy.

  6. 5 hours ago, Itachi said:

    Do not use that.
    It is badly done.

     

    It doesn't matter, unless the code is flawed in some way (memory leaks/no checks on pointers/etc) your point is invalid.

    He is trying to change the way a system of a 2004 game works. Rewriting the 10 lines of code that system is made of like a pro won't make up for the hundreds of thousands of lines written by monkeys 16 years ago.

     

    If it does the job well, then it's fine.

  7. 1 hour ago, Chookez said:

     Hello all.

    Someone can give me some help in this code?

    
    	if (!bFound)
    	{
    		TPacketGCEmpire pe;
    		pe.bHeader = HEADER_GC_EMPIRE;
    		pe.bEmpire = number(1, 3);
    		d->Packet(&pe, sizeof(pe));
    	}

    I deleted the yellow empire from the client.

    So here's another statement that a user who doesn't have a character just enters the Red and Blue empires.

     

    pe.bEmpire = number(1, 3);

    1 = Shinsoo

    2 = Chunjo

    3 = Jinno

     

    But i only want the first and third, not the second.

    Sorry for my very bad english.

    Well..

     

    You can pull out the Turkish Dev from within you and write:

    pe.bEmpire = number(1, 2) == 1 ? 1 : 3;

     

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