Jump to content
  • 0

Feather of Blessing


bauwbas
 Share

Question

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?

 

Link to comment
Share on other sites

8 answers to this question

Recommended Posts

  • 0

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

Link to comment
Share on other sites

  • 0

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

Link to comment
Share on other sites

  • 0

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

Link to comment
Share on other sites

  • 0

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

Link to comment
Share on other sites

  • 0

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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

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.

 Share



×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock