Jump to content
  • 0

[HELP]/[REQUEST] Custom GK


Question

Posted

Guys can someone make me a teleport.java code that teleports a whole party to a x,y,z place?

The request must be taken from partyleader, all pt members must be 85 lvl, close to the gatekeeper and none of them is dead nor in duel mode.

From that teleport.java I want only the onAdvEvent that fires when "teleport" event is clicked (I don't want any html assistance)

and the conditions after teleport event is clicked e.g

if (event.equalsIgnoreCase("teleport"))

that either teleport the party if the conditions are ok or show a message at chat that the conditions are not ok so they can't teleport.

 

 

 

Thanks

1 answer to this question

Recommended Posts

  • 0
Posted

Hm, I think..that you should edit L2TeleporterInstance oraz create simple Quest NPC.

 

My advice is to create boolean.. example:

 

private static boolean checkConditions(L2PcInstance player)

{

L2Party party = player.getParty();

 

if (party == null)

{

player.sendMessage("You do not consist in party and cannot enter.");

return false;

}

if (!player.getParty().isLeader(player))

{

player.sendMessage("Only party leader can use this teleport!");

return false;

}

for (L2PcInstance member: player.getParty().getPartyMembers())

{

if (member.getLevel() < 85)

{

player.sendMessage("Each party member need 85 level!");

return false;

}

if (member.isDead())

{

player.sendMessage("Your party members must be alive!");

return false;

}

}

return true;

}

 

Ahh, and about this question:

 

close to the gatekeeper

 

You should use this to check it:

 

(Iterate over all party members)

 

isInsideRadius(npc, 1000, false, false);

 

Where 1000 is Distance.

 

 

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