use dialogues for options and for each option make it teleport you.
|
I am trying to make this object to teleport me to 3 different places and I am not sure what the code is. I was thinking it might be
Spoiler for This:
but that looks stupid
Does anyone have a much better code so I can place in my server
use dialogues for options and for each option make it teleport you.
What?
Or just make a new dialogue so when you click the object you doCode:if (objectId == ###) { c.getPA().startTeleport2(x, y, h); }then have the choices etc.Code:c.getDH().sendDialogue(#);
But I don't want the players to have a choice. It's kinda like the Bounty Hunter craters where you click on it and it takes you to a random place inside Bounty Hunter. I want it to kinda be like that if you get what I mean
make sure to import RandomCode:public void randomTele() { Random rNum = new Random(); int num; num = rNum.nextInt(3) + 1; switch(num) { case 1: teleShit(); break; case 2: teleShit(); break; case 3: teleShit(); break; } }
ThenCode:import java.util.Random;
havnt even checked this out but it should workCode:if (objid = ##) { randomTele(); c.sendMessage("You've teleported to a random place dude"); }
Public void randomTele() {
if (objectid = Ex: The crator ID) {
int i = Misc.random(3);
if (i == 1) {
c.getPA().startTeleport("x coord, y coord, z coord");
}
if (i==2) {
c.getPA().startTeleport("x coord, y coord, z coord");
}
if (i==3) {
c.getPA().startTeleport("x coord, y coord, z coord");
}
}
}
Not sure if the annotations mark (""""""") should be between. If it doesn't, remove them.
Credits:
att ftw
Derekh
Me For combining them and making a few adjustements.
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |