Master Yogi Enchant Scrolls.

This is not a Support area! Discuss about the Server here. Non-Server related discussion goes in Off-Topic Discussion.
Forum rules
READ NOW: L2j Forums Rules of Conduct
Post Reply
User avatar
pokiokio
Posts: 259
Joined: Wed Mar 04, 2009 8:08 pm

Master Yogi Enchant Scrolls.

Post by pokiokio »

I have the Master Yogi event and , when the staff is enchanted successfully if it's over +3 then , a small firework animation appears on the head of the char on retail and I'd like to make that happen.
I've searched the itemhandler e.t.c about it but..nothing :S The item ID is "13540".

I'd appreciate if someone could guide me :P
Image
Prolly the youngest L2j user :P
User avatar
denser
Posts: 1392
Joined: Wed May 30, 2007 9:13 pm
Location: Russia
Contact:

Re: Master Yogi Enchant Scrolls.

Post by denser »

enchant packet you need. so it names - exenchant...something in core.
so you can add condition on enclevel>=4 get an animation of firecracker.
Tiger, once tasted human flesh, will want to taste it again
L2J - the place where glad to see you any time!
User avatar
pokiokio
Posts: 259
Joined: Wed Mar 04, 2009 8:08 pm

Re: Master Yogi Enchant Scrolls.

Post by pokiokio »

Yeah but , won't it affect every weapon/armor enchant?
Image
Prolly the youngest L2j user :P
User avatar
janiii
L2j Veteran
L2j Veteran
Posts: 4269
Joined: Wed May 28, 2008 3:15 pm
Location: Slovakia

Re: Master Yogi Enchant Scrolls.

Post by janiii »

in RequestEnchantItem check for which scroll has been used and which enchant level the item already has:

Code: Select all

Index: RequestEnchantItem.java===================================================================--- RequestEnchantItem.java	(revision 3618)+++ RequestEnchantItem.java	(working copy)@@ -19,6 +19,7 @@ import java.util.logging.Logger;  import net.sf.l2j.Config;+import net.sf.l2j.gameserver.datatables.SkillTable; import net.sf.l2j.gameserver.model.L2ItemInstance; import net.sf.l2j.gameserver.model.L2World; import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;@@ -28,6 +29,7 @@ import net.sf.l2j.gameserver.network.serverpackets.ItemList; import net.sf.l2j.gameserver.network.serverpackets.StatusUpdate; import net.sf.l2j.gameserver.network.serverpackets.SystemMessage;+import net.sf.l2j.gameserver.network.serverpackets.MagicSkillUse; import net.sf.l2j.gameserver.util.Util; import net.sf.l2j.util.Rnd; @@ -163,9 +167,29 @@ 					record.setLoggerName("item"); 					_logEnchant.log(record); 				}++				if (scroll.getItemId() == 13540 && item.getEnchantLevel() > 3)+				{+					L2Skill skill = SkillTable.getInstance().getInfo(5965, 1);+					if (skill != null)+					{+						MagicSkillUse msk = new MagicSkillUse(activeChar, activeChar, 5965, 1, 500, 1500);+						activeChar.broadcastPacket(msk);+					}+				} 			} 			else 			{+				if (scroll.getItemId() == 13540)+				{+					L2Skill skill = SkillTable.getInstance().getInfo(5949, 1);+					if (skill != null)+					{+						MagicSkillUse msk = new MagicSkillUse(activeChar, activeChar, 5949, 1, 500, 1500);+						activeChar.broadcastPacket(msk);+					}+				}+ 				if (scrollTemplate.isSafe()) 				{ 					// safe enchant - remain old value
credits go to Charus.
DO NOT EVEN TRY TO MESS WITH ME!
forum flOOder dancing dEVILoper
I don't give private support - PM will be ignored!
User avatar
pokiokio
Posts: 259
Joined: Wed Mar 04, 2009 8:08 pm

Re: Master Yogi Enchant Scrolls.

Post by pokiokio »

Works 100% ;) Tyvm janiii and Charus :3
Image
Prolly the youngest L2j user :P
Post Reply