Use: [ code ] [ /code ]
|
Hello
First off Make A New Java Class At
Src.com.rs.game.player.Dialogues
I will add CaveEntrance.java
Code;
package com.rs.game.player.dialogues;
import com.rs.game.WorldTile;
import com.rs.game.player.content.Magic;
public final class CaveEntrance extends Dialogue {
@Override
public void start() {
sendDialogue(
"<col=99CCFF>Do You Want To Be Teleported To Gnome Agilty?");
}
@Override
public void run(int interfaceId, int componentId) {
if (stage == -1) {
stage = 0;
sendOptionsDialogue(
"<col=FF3300>Would U Like To Go?",
"<col=FFFF00>Yes Please",
"<col=FF9933>Stay Here");
} else if (stage == 0) {
if (componentId == OPTION_1) {
Magic.sendNormalTeleportSpell(player, 0, 0, new WorldTile(2470,
3436, 0));
}
end();
}
}
@Override
public void finish() {
// TODO Auto-generated method stub
}
}
U Can Also Change teleport and messages or put ur own Object
now u will need to spawn object at
src.com.rs.utils.NpcSpawning.java
open it and go almost to the end
then add this code
World.spawnObject(new WorldObject(ObjectId, 10, 2, X_coords, Y_coords, 0), true);
after that go to
src.com.rs.game.player.dialouges.DialogueHandler
then go almost to the end
and add this code
Class<Dialogue> value43 = (Class<Dialogue>) Class
.forName(CaveEntrance.class.getCanonicalName());
handledDialogues.put("CaveEntrance", value43);
if there is value42 already then u need to type value43 for your object and name change name of java class
then save all and compile if u got any questions send me private message or post it on help section here:http://www.rune-server.org/runescape...t-server/help/
in game just click on object and if u did all right u will get the dialouge open.
hope u like it
Use: [ code ] [ /code ]
its my first time sorry
Thanks but for some people who just started it will be good
Not if conventions aren't good.
thanks arto i will next time
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |