Jump to content
  • 0
Sign in to follow this  
ExtremeRage

Cannot get teleport command to work

Question

So I tried making a tele command to teleport staff to the staffzone which allows them to step into portals and the portal teleport them to new content to test it all. I have tried a few things and it does not work. please help.

This is the code. Please Help.

[CODE] if (cmd[0].equals("SZ")) {
if (player.isDead() || player.isLocked()) {
player.sendMessage("You are unable to teleport home at this time.");
return true;
}
Magic.sendNormalTeleportSpell(player, 0, 0, new WorldTile(1375, 6621, 0));
return true;
}[/CODE]

Share this post


Link to post
Share on other sites

11 answers to this question

Recommended Posts

  • 0
[CODE]
if (cmd[0].equals("SZ")) {
if (player.isDead() || player.isLocked()) {
player.sendMessage("You are unable to teleport home at this time.");
return false;
}
Magic.sendNormalTeleportSpell(player, 0, 0, new WorldTile(1375, 6621, 0));
return true;
}
[/CODE]
Your code looks proper, all I did in that was change one of the returns to false.

Share this post


Link to post
Share on other sites
  • 0
[quote name='falconpunch'][CODE]
if (cmd[0].equals("SZ")) {
if (player.isDead() || player.isLocked()) {
player.sendMessage("You are unable to teleport home at this time.");
return false;
}
Magic.sendNormalTeleportSpell(player, 0, 0, new WorldTile(1375, 6621, 0));
return true;
}
[/CODE]
Your code looks proper, all I did in that was change one of the returns to false.[/QUOTE]

May I ask you to explain why it needed to e changed?

Share this post


Link to post
Share on other sites
  • 0
what is this 718
god i have a lot to learn lol

Share this post


Link to post
Share on other sites
  • 0
[quote name='OP411']what is this 718
god i have a lot to learn lol[/QUOTE]

Yes its 718 with lots of rework.

Share this post


Link to post
Share on other sites
  • 0
maybe one day i can open up a higher revision
best of luck with this project

Share this post


Link to post
Share on other sites
  • 0
hmm, not that similary coded. :D

Share this post


Link to post
Share on other sites
  • 0
[quote name='ExtremeRage']May I ask you to explain why it needed to e changed?[/QUOTE]

I believe it's returning false that the player teleported (code executed). Did it work?

Share this post


Link to post
Share on other sites
  • 0
[quote name='falconpunch']I believe it's returning false that the player teleported (code executed). Did it work?[/QUOTE]

No it did not work. I have still not been able to get it to work

Share this post


Link to post
Share on other sites
  • 0
Well one thought occurred.... instead of SZ try putting in sz aka lowercase and lay off the caps lock while coding.

Share this post


Link to post
Share on other sites
  • 0
[quote name='Chronicscape']Well one thought occurred.... instead of SZ try putting in sz aka lowercase and lay off the caps lock while coding.[/QUOTE]

I tried that as well. It didn't work.

Share this post


Link to post
Share on other sites
Sign in to follow this  

×