bauwbas Posted December 21, 2009 Posted December 21, 2009 Ok, i need really help, i want to create Feather of Blessing (There is no server packs where work it) Ok, in gameserver\data\scripts\handlers\itemhandlers I createf file with name FeatherofBlessing.java package handlers.itemhandlers; import net.sf.l2j.gameserver.handler.IItemHandler; import net.sf.l2j.gameserver.model.L2ItemInstance; import net.sf.l2j.gameserver.model.actor.L2Playable; import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance; public class FeatherOfBlessing implements IItemHandler { public void useItem(L2Playable playable, L2ItemInstance item) { L2PcInstance activeChar = (L2PcInstance) playable; if(!activeChar.isAlikeDead()) { activeChar.sendMessage("You cannot be ressurected while alive."); return; } if(activeChar.isInOlympiadMode()) { activeChar.sendMessage("You cannot use this feature during olympiad."); return; } activeChar.sendMessage("You have been ressurected!"); activeChar.getInventory().destroyItemByItemId("RessSystem", 10649, 1, activeChar, activeChar.getTarget()); activeChar.doRevive(); activeChar.broadcastUserInfo(); activeChar.sendMessage("Feather of Blessing has dissapeared."); //return; } } Then i register it in MasterHandler.java ItemHandler.getInstance().registerItemHandler(new FeatherOfBlessing()); Then, i go to etcitem.sql and where is item id 10649 (Feather of blessing) in Handler colum add "FeatherOfBlessing" and in Skill "9010-1;" And the last thing i go to gameserver\data\stats\skills Creating new skill <skill id="9010" levels="1" name="Feather of Blessing"> <set name="target" val="TARGET_SELF"/> <set name="skillType" val="RESURRECT"/> <set name="operateType" val="OP_ACTIVE"/> <set name="castRange" val="400"/> <set name="effectRange" val="600"/> </skill> And then i everything done, my item isint working :// Then i alive, in chat i get msg "You cannot be ressurected while alive.", but then i dead and press item, its nothing. My char don't ress... Have some1 any ideas?
0 down Posted December 21, 2009 Posted December 21, 2009 if(!activeChar.isAlikeDead()) try to change this to if(!activeChar.isDead())
0 bauwbas Posted December 22, 2009 Author Posted December 22, 2009 Same sh1t... Then i Dead ant press on item in chat show msg: Feather of Blessing cannot be used due to unsuitable terms.
0 Intrepid Posted December 22, 2009 Posted December 22, 2009 Same sh1t... Then i Dead ant press on item in chat show msg: Feather of Blessing cannot be used due to unsuitable terms. you need to use skill core support not itemhandler support
0 Setekh Posted December 22, 2009 Posted December 22, 2009 ItemSkills.java sounds familiar? Its an item handler executeing a skill.. you made that skill as ressurect...so whats left to do is pritty simple... In ur etcitem table change that item handler in ItemSkills or ItemSkill (dont remember the correct name) and add the skill id and lvl to identify the skill... and ur done >.>
0 Intrepid Posted December 22, 2009 Posted December 22, 2009 ItemSkills.java sounds familiar? Its an item handler executeing a skill.. you made that skill as ressurect...so whats left to do is pritty simple... In ur etcitem table change that item handler in ItemSkills or ItemSkill (dont remember the correct name) and add the skill id and lvl to identify the skill... and ur done >.> easier if he just rename/copy the existing support of charm of a self resurrect skill or to even use it
0 bauwbas Posted December 22, 2009 Author Posted December 22, 2009 Same... I changed in etc table handler to ItemSkills... added skill in same table.. but not working.
0 Intrepid Posted December 22, 2009 Posted December 22, 2009 Same... I changed in etc table handler to ItemSkills... added skill in same table.. but not working. look L2Skill.java do the core support itemId and itemConsumeId in the skill xml done
0 down Posted December 22, 2009 Posted December 22, 2009 Same sh1t... Then i Dead ant press on item in chat show msg: Feather of Blessing cannot be used due to unsuitable terms. Maybe the problem is in UseItem.java cuz u cannot use items while u'r dead.
Question
bauwbas
Ok, i need really help, i want to create Feather of Blessing (There is no server packs where work it)
Ok, in gameserver\data\scripts\handlers\itemhandlers
I createf file with name
FeatherofBlessing.java
package handlers.itemhandlers; import net.sf.l2j.gameserver.handler.IItemHandler; import net.sf.l2j.gameserver.model.L2ItemInstance; import net.sf.l2j.gameserver.model.actor.L2Playable; import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance; public class FeatherOfBlessing implements IItemHandler { public void useItem(L2Playable playable, L2ItemInstance item) { L2PcInstance activeChar = (L2PcInstance) playable; if(!activeChar.isAlikeDead()) { activeChar.sendMessage("You cannot be ressurected while alive."); return; } if(activeChar.isInOlympiadMode()) { activeChar.sendMessage("You cannot use this feature during olympiad."); return; } activeChar.sendMessage("You have been ressurected!"); activeChar.getInventory().destroyItemByItemId("RessSystem", 10649, 1, activeChar, activeChar.getTarget()); activeChar.doRevive(); activeChar.broadcastUserInfo(); activeChar.sendMessage("Feather of Blessing has dissapeared."); //return; } }Then i register it in MasterHandler.java
Then, i go to etcitem.sql and where is item id 10649 (Feather of blessing) in Handler colum add "FeatherOfBlessing" and in Skill "9010-1;"
And the last thing i go to
gameserver\data\stats\skills
Creating new skill
And then i everything done, my item isint working :// Then i alive, in chat i get msg "You cannot be ressurected while alive.", but then i dead and press item, its nothing. My char don't ress... Have some1 any ideas?
8 answers to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now