Code:if (Math.random() < 0.5) { teleportHere(); } else { teleportThere(); }
|
|

Hi if there a code for letting the server have an opinion? [please code the following for rep] I want to have random teleporting into bounty hunter. So i need a code like
(in action buttons) the normal staff, buttonId=573489572394
Show interface bh targ thingy
send strring bla bla for targ..
but when u go in
p.teleTo x:2345245 y:245254
OR YOU CAN TELE TO
p.teleTo x3785622 y:24578248357
ect... so i can set the co ords to the enterances and exits in BH
Code:if (Math.random() < 0.5) { teleportHere(); } else { teleportThere(); }

Gonna try it. If it works ill REP, i've been looking for this for a long time!!!
What about
case 1234:
if (p.bountyhunter) {
 .teleTo(1234, 2953);
} else {
 .teleTo(1253, 2952);
}
break;
Dude errors on yours:
net/com/codeusa/Engine.java
.\net\com\codeusa\net\packethandler\ActionButtons. java:770: 'else' without 'if'
} else {
^
.\net\com\codeusa\net\packethandler\ActionButtons. java:772: 'else' without 'if'
} else {
^
.\net\com\codeusa\net\packethandler\ActionButtons. java:774: 'else' without 'if'
} else {
^
.\net\com\codeusa\net\packethandler\ActionButtons. java:776: 'else' without 'if'
} else {
^
.\net\com\codeusa\net\packethandler\ActionButtons. java:778: 'else' without 'if'
} else {
^
.\net\com\codeusa\net\packethandler\ActionButtons. java:780: 'else' without 'if'
} else {
^
.\net\com\codeusa\net\packethandler\ActionButtons. java:782: 'else' without 'if'
} else {
^
.\net\com\codeusa\net\packethandler\ActionButtons. java:784: 'else' without 'if'
} else {
^
.\net\com\codeusa\net\packethandler\ActionButtons. java:786: 'else' without 'if'
} else {
^
.\net\com\codeusa\net\packethandler\ActionButtons. java:788: 'else' without 'if'
} else {
^
.\net\com\codeusa\net\packethandler\ActionButtons. java:790: 'else' without 'if'
} else {
^
.\net\com\codeusa\net\packethandler\ActionButtons. java:792: 'else' without 'if'
} else {
^
.\net\com\codeusa\net\packethandler\ActionButtons. java:794: 'else' without 'if'
} else {
^
.\net\com\codeusa\net\packethandler\ActionButtons. java:796: 'else' without 'if'
} else {
^
.\net\com\codeusa\net\packethandler\ActionButtons. java:798: 'else' without 'if'
} else {
^
.\net\com\codeusa\net\packethandler\ActionButtons. java:800: 'else' without 'if'
} else {
^
.\net\com\codeusa\net\packethandler\ActionButtons. java:802: 'else' without 'if'
} else {
^
.\net\com\codeusa\net\packethandler\ActionButtons. java:804: 'else' without 'if'
} else {
^
I added if to make it else if but then the errors doubled.
I set it out like this:
if (Math.random() < 0.5) {
p.teleportTo(3146, 3681, 0, 0, 0, 8939, 8941, 1576, 0, 1577, 0); //normal entering place
} else {
p.teleportTo(3138, 3669, 0, 0, 0, 8939, 8941, 1576, 0, 1577, 0);
} else {
p.teleportTo(3124, 3665, 0, 0, 0, 8939, 8941, 1576, 0, 1577, 0);
}

stop double posting and shit and
would go in Process()Code:if (Math.random() < 0.5) { teleportHere(); } else { teleportThere(); }

Bro, Just else statements lol
So on and so on.Code:if (Misc.random(10) == 1) { TeleportMethodHere(); } else if (Misc.random(10) == 2) { TeleMethod2Here(); } else if (Misc.random(10) == 3) { TeleMethod3Here(); }

u sud read some basic java tuts

@Richard thanks for the advise, got any simple ones you know of?
@JohnHax` im gonna try it now if it work rep, and thankslook below please
EDIT: what does (Misc.random(10) == 2 do/mean?
EDIT2: it worked tyvm : ) first z525 yet again, following, pvp bank timers, no random bh entering : )

What does (Misc.random(10) == 2 do/mean?
I posted again so you would look, because edits dont make the post have new media?
| « [508] How To make A Door... ! | where does this go? » |
| Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |