Jump to content
  • 0
Sam Skyy

need help coding spells in 667

Question

hey im coding a 667 rsps and need help changing the spellbook so they come up with a dialogue with multiple teles when you click them i am using feather 667 repack pics of the errors have been attached and the coding is below the tele locations and coords are there just need help fixing the errors

[url]http://gyazo.com/d55...b5c4cfa89918cf4[/url]

[url]http://gyazo.com/b64...6f73271fac9272f[/url]

[CODE]
package com.rs.game.player.dialogues;

import com.rs.game.WorldTile;
import com.rs.game.player.content.Magic;

/*
*
*@author Sam
*
*/
public class TeleportCity extends Dialogue {
@Override
public void run(int interfaceId, int componentId) {
if (stage == -1) {
sendEntityDialogue(SEND_1_TEXT_CHAT,
new String[] { player.getDisplayName(), "Sure why not." },
IS_PLAYER, player.getIndex(), 9827);
stage = 1;
} else if (stage == 1) {
sendDialogue(SEND_5_OPTIONS, "Where Would You Like To Go?", "Ardougne.",
"Camelot.", "Catherby.", "Draynor VIllage", "More Options");
stage = 2;
} else if (stage == 2) {
if (componentId == 1)
teleportPlayer(2662, 3305, 0);
else if (componentId == 2)
teleportPlayer(2757, 3251, 2);
else if (componentId == 3)
teleportPlayer(2809, 3436, 0);
else if (componentId == 4)
Magic.sendNormalTeleportSpell(player, 0, 0, new WorldTile(3080,
3251, 0));
else if (componentId == 5) {
stage = 3;
sendDialogue(SEND_5_OPTIONS, "Where Would You Like To Go?",
"Edgeville.", "Falador.", "Grand Exchange.",
"Lumbridge", "More Options");
}
} else if (stage == 3) {
if (componentId == 1) {
Magic.sendNormalTeleportSpell(player, 0, 0, new WorldTile(3086,
3502, 0));
Magic.sendNormalTeleportSpell(player, 0, 0, new WorldTile(2964,
3378, 0));
else if (componentId == 3)
Magic.sendNormalTeleportSpell(player, 0, 0, new WorldTile(3164,
3487, 0));
else if (componentId == 4)
Magic.sendNormalTeleportSpell(player, 0, 0, new WorldTile(3222,
3218, 0));
else if (componentId == 5) {
stage = 4;
sendDialogue(SEND_5_OPTIONS, "Where Would You Like To Go?",
"Neitznot.", "Tzhaar City", "Varrock.",
"Yanille");
end();
}
}

@Override
public void finish; {

}
}
[/CODE]

Share this post


Link to post
Share on other sites

7 answers to this question

Recommended Posts

  • 0
so you're asking for like, you click on a teleport in the magic book and it opens a dialogue?

Share this post


Link to post
Share on other sites
  • 0
[quote name='Sam Skyy']hey im coding a 667 rsps and need help changing the spellbook so they come up with a dialogue with multiple teles when you click them i am using feather 667 repack pics of the errors have been attached and the coding is below the tele locations and coords are there just need help fixing the errors

[url]http://gyazo.com/d55...b5c4cfa89918cf4[/url]

[url]http://gyazo.com/b64...6f73271fac9272f[/url]

[CODE]
package com.rs.game.player.dialogues;

import com.rs.game.WorldTile;
import com.rs.game.player.content.Magic;

/*
*
*@author Sam
*
*/
public class TeleportCity extends Dialogue {
@Override
public void run(int interfaceId, int componentId) {
if (stage == -1) {
sendEntityDialogue(SEND_1_TEXT_CHAT,
new String[] { player.getDisplayName(), "Sure why not." },
IS_PLAYER, player.getIndex(), 9827);
stage = 1;
} else if (stage == 1) {
sendDialogue(SEND_5_OPTIONS, "Where Would You Like To Go?", "Ardougne.",
"Camelot.", "Catherby.", "Draynor VIllage", "More Options");
stage = 2;
} else if (stage == 2) {
if (componentId == 1)
teleportPlayer(2662, 3305, 0);
else if (componentId == 2)
teleportPlayer(2757, 3251, 2);
else if (componentId == 3)
teleportPlayer(2809, 3436, 0);
else if (componentId == 4)
Magic.sendNormalTeleportSpell(player, 0, 0, new WorldTile(3080,
3251, 0));
else if (componentId == 5) {
stage = 3;
sendDialogue(SEND_5_OPTIONS, "Where Would You Like To Go?",
"Edgeville.", "Falador.", "Grand Exchange.",
"Lumbridge", "More Options");
}
} else if (stage == 3) {
if (componentId == 1) {
Magic.sendNormalTeleportSpell(player, 0, 0, new WorldTile(3086,
3502, 0));
Magic.sendNormalTeleportSpell(player, 0, 0, new WorldTile(2964,
3378, 0));
else if (componentId == 3)
Magic.sendNormalTeleportSpell(player, 0, 0, new WorldTile(3164,
3487, 0));
else if (componentId == 4)
Magic.sendNormalTeleportSpell(player, 0, 0, new WorldTile(3222,
3218, 0));
else if (componentId == 5) {
stage = 4;
sendDialogue(SEND_5_OPTIONS, "Where Would You Like To Go?",
"Neitznot.", "Tzhaar City", "Varrock.",
"Yanille");
end();
}
}

@Override
public void finish; {

}
}
[/CODE][/QUOTE]

images are broken

Share this post


Link to post
Share on other sites
  • 0
No point to use 'Feather' it's one of worst 667's ever done including competely fucked up cache, half of the maps are missing and it's too unstable to host. You would need to rework

*Combat
*Over 15 skills
*Over 5 dupes

Since I see you're not very experienced with Java programming I suggest you to download 718.

Share this post


Link to post
Share on other sites
  • 0
yeah thats what i need @elfranger243

ill upload new links now sorry they r dodgy had to take with phone @officiallulzs3c

[ATTACH]10509[/ATTACH]
[ATTACH]10510[/ATTACH]

Share this post


Link to post
Share on other sites
  • 0
i know coding but only basic and i will download a 718 but it will have to wait so in the mean time i will continue to work on this one to train so if anyone could help me with this it will help alot in future

Share this post


Link to post
Share on other sites
  • 0
Add my skype: NexonLTD i'll do it over teamviewer idk how to explain in english lel

Share this post


Link to post
Share on other sites
  • 0
added you waiting on accept

Share this post


Link to post
Share on other sites

×