PDA

View Full Version : 562 Objects



flavius
March 28th, 2011, 07:29
Heres my code, everything works but it only opens when i'm on a certain tile.
Can anyone tell me how to get the object to open the interface with have to be on a certain tile?




case 16599:// info book.
player.getActionSender().sendInterface(275, false);
for(int i = 0; i < 316; i++) {
player.getActionSender().sendString("",275,i);
}
player.getActionSender().sendString("Blank scape [562] Info.", 275, 2);
player.getActionSender().sendString("", 275, 10);
player.getActionSender().sendString("", 275, 11);
player.getActionSender().sendString("", 275, 12);
player.getActionSender().sendString("", 275, 13);
player.getActionSender().sendString("", 275, 14);
player.getActionSender().sendString("", 275, 15);
player.getActionSender().sendString("<col=ff0000>Blankscape Server Info", 275, 16);
player.getActionSender().sendString("<col=ff0000>The new Home", 275, 17);
player.getActionSender().sendString("The new home of Blankscape was fully", 275, 18);
player.getActionSender().sendString("Coded by Flavius.", 275, 19);
player.getActionSender().sendString("You the platforms to tele to unique Islands", 275, 20);
player.getActionSender().sendString("<col=ff0000>Staff", 275, 21);
player.getActionSender().sendString("Flavius<img=2>Owner", 275, 22);
player.getActionSender().sendString("Cancel<img=2>Co-Owner", 275, 23);
player.getActionSender().sendString("<col=ff0000>Admins", 275, 24);
player.getActionSender().sendString("Cat<img=2>Head Admin", 275, 25);
player.getActionSender().sendString("Blaga<img=2>Admin", 275, 26);
player.getActionSender().sendString("<col=ff0000>Mods", 275, 27);
player.getActionSender().sendString("Poopy<img=2>Head Mod", 275, 28);
player.getActionSender().sendString("Harleytheblk<img=2>Mod", 275, 29);
player.getActionSender().sendString("<col=ff0000>Other Info", 275, 30);
player.getActionSender().sendString("For commands do ::commands", 275, 31);
player.getActionSender().sendString("For other commands do ::commands1-14", 275, 32);
player.getActionSender().sendString("<col=ff0000>Go vote and Visit the site and Forums!", 275, 33);
player.getActionSender().sendString("Vote<img=2>", 275, 34);
player.getActionSender().sendString("The Offical Site<img=2>", 275, 35);
player.getActionSender().sendString("-----", 275, 36);
player.getActionSender().sendString("<col=ff0000> More info.", 275, 37);
player.getActionSender().sendString("Do ::info for more.", 275, 38);
player.getActionSender().sendString("<col=ff0000>END.", 275, 39);
break;

If it can't, is it possible for it to walk to the certain tile then for it to open with out having to click again?

Pot Up
March 28th, 2011, 07:51
yh you could do something like

in Player.java add,

pulic boolean walking = false;
now add this on what ever you want it to do


player.WalkTo().WalkTo(player, X,Y );
if(player.getLocation().getX == X) {
if (player.getLocation().getY == Y){
your interface
}
}


i think that should work

flavius
March 29th, 2011, 04:43
yh you could do something like

in Player.java add,

pulic boolean walking = false;
now add this on what ever you want it to do


player.WalkTo().WalkTo(player, X,Y );
if(player.getLocation().getX == X) {
if (player.getLocation().getY == Y){
your interface
}
}


i think that should work

Can it be without the
" if(player.getLocation().getX == X) {
if (player.getLocation().getY == Y){"???

And also does it matter if its a different Height? Or could I just use if (player.getLocation().getz == 2) ??

EDIT:
It works no problems compiling... but it still has to go to a certain tile to open the interface. and it doesn't walk to the place i tell it too.