Page 1 of 1

Scroll of escape

Posted: Sun Jun 07, 2009 8:26 pm
by trantadoros33
Hi guys , i am trying to change the scroll of escape cords when a noble uses it

so what i do it go at useitem.java and in runimpl()

i add this :

if (activeChar.isNoble())
{
activeChar.teleToLocation(x,z,y);
}

when a player now users any kind of scroll he got teleporter to the arena , but the animation is still running and when it finish he will teleported back to the nearest town ...

any help would be appreciated!

Re: Scroll of escape

Posted: Sun Jun 07, 2009 8:50 pm
by RiZe
Look at the end of useItem method in Datapack (data/scripts/handlers/itemhandlers/ScrollOfEscape.java). There is starting SOE animation and is scheduled EscapeFinalizer which provides the teleport to nearest town.

Re: Scroll of escape

Posted: Sun Jun 07, 2009 9:03 pm
by janiii
make a return statement after the teleport code, so that the code under it doesn't get called.

Re: Scroll of escape

Posted: Mon Jun 08, 2009 5:01 am
by trantadoros33
RiZe wrote:Look at the end of useItem method in Datapack (data/scripts/handlers/itemhandlers/ScrollOfEscape.java). There is starting SOE animation and is scheduled EscapeFinalizer which provides the teleport to nearest town.
You probably speak for another pack .. it doesnt have scrollofescape.java in itemhandlers ...
janiii wrote:make a return statement after the teleport code, so that the code under it doesn't get called.
I added one , but now it teleports me without consuming the soe's and doesnt even show the animation that it uses the soe.

Still searching.

Re: Scroll of escape

Posted: Mon Jun 08, 2009 10:51 am
by kerberos_20
teleport coords are handled from handlers/skillhandlers/recall.java
place your stuffs inside
if (skill.getSkillType() == L2SkillType.TELEPORT)
{
.........
.........
}

Re: Scroll of escape

Posted: Mon Jun 08, 2009 12:24 pm
by trantadoros33
kerberos_20 wrote:teleport coords are handled from handlers/skillhandlers/recall.java
place your stuffs inside
if (skill.getSkillType() == L2SkillType.TELEPORT)
{
.........
.........
}

true , worked.