Jump to content
  • 0

How To Add Buffs At Character Start?


Question

4 answers to this question

Recommended Posts

  • 0
Posted

Here i think something.

if  (activeChar.getLevel() == 1)
   {
   SkillTable.getInstance().getInfo(364, 1).getEffects(activeChar, activeChar);
   SkillTable.getInstance().getInfo(364, 1).getEffects(activeChar, activeChar);
   }

How i can put if character is mage (give XXX buffs), else if warrior (give XXX buffs)

  • 0
Posted

I think a little bit more :P

		if  (activeChar.getLevel() == 1 && activeChar.isMageClass())
			{
			SkillTable.getInstance().getInfo(364, 1).getEffects(activeChar, activeChar);
			SkillTable.getInstance().getInfo(364, 1).getEffects(activeChar, activeChar);
			}
		
		if  (activeChar.getLevel() == 1 && !activeChar.isMageClass())
		{
		SkillTable.getInstance().getInfo(364, 1).getEffects(activeChar, activeChar);
		SkillTable.getInstance().getInfo(364, 1).getEffects(activeChar, activeChar);
		}
  • 0
Posted (edited)

It's more like onEnter / EnterWorld. There is no need for 2 lvl check

if (lvl == 1)
{
   if (isMageClass())
   {
      blabla
   }
   else
   {
      blabla
   }
}

Also, I believe I saw somewhere on the forum something like that, custom buff set for new chars.

Edited by SweeTs
  • 0
Posted
		if  (activeChar.getLevel() == 1)
		{
			if (activeChar.isMageClass())
			{
			SkillTable.getInstance().getInfo(1204, 2).getEffects(activeChar, activeChar);
			SkillTable.getInstance().getInfo(1085, 3).getEffects(activeChar, activeChar);
			SkillTable.getInstance().getInfo(1035, 4).getEffects(activeChar, activeChar);
			SkillTable.getInstance().getInfo(1036, 2).getEffects(activeChar, activeChar);
			SkillTable.getInstance().getInfo(1040, 3).getEffects(activeChar, activeChar);
			SkillTable.getInstance().getInfo(1045, 6).getEffects(activeChar, activeChar);
			SkillTable.getInstance().getInfo(1389, 1).getEffects(activeChar, activeChar);
			SkillTable.getInstance().getInfo(1303, 2).getEffects(activeChar, activeChar);
			SkillTable.getInstance().getInfo(1059, 3).getEffects(activeChar, activeChar);
			SkillTable.getInstance().getInfo(1259, 4).getEffects(activeChar, activeChar);
			SkillTable.getInstance().getInfo(264, 1).getEffects(activeChar, activeChar);
			SkillTable.getInstance().getInfo(267, 1).getEffects(activeChar, activeChar);
			SkillTable.getInstance().getInfo(268, 1).getEffects(activeChar, activeChar);
			SkillTable.getInstance().getInfo(304, 1).getEffects(activeChar, activeChar);
			SkillTable.getInstance().getInfo(273, 1).getEffects(activeChar, activeChar);
			SkillTable.getInstance().getInfo(276, 1).getEffects(activeChar, activeChar);
			SkillTable.getInstance().getInfo(1062, 2).getEffects(activeChar, activeChar);
			SkillTable.getInstance().getInfo(1323, 1).getEffects(activeChar, activeChar);
			}
			else
			{
			SkillTable.getInstance().getInfo(1204, 2).getEffects(activeChar, activeChar);
			SkillTable.getInstance().getInfo(1086, 2).getEffects(activeChar, activeChar);
			SkillTable.getInstance().getInfo(1035, 4).getEffects(activeChar, activeChar);
			SkillTable.getInstance().getInfo(1268, 4).getEffects(activeChar, activeChar);
			SkillTable.getInstance().getInfo(1036, 2).getEffects(activeChar, activeChar);
			SkillTable.getInstance().getInfo(1068, 3).getEffects(activeChar, activeChar);
			SkillTable.getInstance().getInfo(1242, 3).getEffects(activeChar, activeChar);
			SkillTable.getInstance().getInfo(1040, 3).getEffects(activeChar, activeChar);
			SkillTable.getInstance().getInfo(1045, 6).getEffects(activeChar, activeChar);
			SkillTable.getInstance().getInfo(1388, 1).getEffects(activeChar, activeChar);
			SkillTable.getInstance().getInfo(1259, 4).getEffects(activeChar, activeChar);
			SkillTable.getInstance().getInfo(264, 1).getEffects(activeChar, activeChar);
			SkillTable.getInstance().getInfo(267, 1).getEffects(activeChar, activeChar);
			SkillTable.getInstance().getInfo(268, 1).getEffects(activeChar, activeChar);
			SkillTable.getInstance().getInfo(269, 1).getEffects(activeChar, activeChar);
			SkillTable.getInstance().getInfo(304, 1).getEffects(activeChar, activeChar);
			SkillTable.getInstance().getInfo(271, 1).getEffects(activeChar, activeChar);
			SkillTable.getInstance().getInfo(274, 1).getEffects(activeChar, activeChar);
			SkillTable.getInstance().getInfo(275, 1).getEffects(activeChar, activeChar);
			SkillTable.getInstance().getInfo(310, 1).getEffects(activeChar, activeChar);
			SkillTable.getInstance().getInfo(1062, 2).getEffects(activeChar, activeChar);
			SkillTable.getInstance().getInfo(1323, 1).getEffects(activeChar, activeChar);
			}
		}

Don't give buffs to player, no errors on console.

 

Do something wrong?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...