You need this
Code:
public void makeGlobalObject(int x, int y, int typeID, int orientation, int tileObjectType){ //Makes Global objects
for (Player p : server.playerHandler.players){
if(p != null){
client person = (client)p;
if((person.playerName != null || person.playerName != "null")){
if(person.distanceToPoint(x, y) <= 60){
person.createNewTileObject(x, y, typeID, orientation, tileObjectType);
}
}
}
}
}
Then go to case 121 and add this under it
Then just add a method
Code:
public void NewObjects() {
makeGlobalObject(3004, 3383, 2469, 0, 10);//portal
}
The first number is the “x” coordinate and the second is the “y” coordinate. The third number is the Object ID. The fourth number is which direction you want the object facing and the last number is what type of object it is
And you might need this
Code:
public void ReplaceObject2(int objectX, int objectY, int NewObjectID, int Face, int ObjectType) {
outStream.createFrame(85);
outStream.writeByteC(objectY - (mapRegionY * 8));
outStream.writeByteC(objectX - (mapRegionX * 8));
outStream.createFrame(101);
outStream.writeByteC((ObjectType<<2) + (Face&3));
outStream.writeByte(0);
if (NewObjectID != -1) {
outStream.createFrame(151);
outStream.writeByteS(0);
outStream.writeWordBigEndian(NewObjectID);
outStream.writeByteS((ObjectType<<2) + (Face&3));
//FACE: 0= WEST | -1 = NORTH | -2 = EAST | -3 = SOUTH
//ObjectType: 0-3 wall objects, 4-8 wall decoration, 9: diag. walls, 10-11 world objects, 12-21: roofs, 22: floor decoration
}
}
Credit - bokiller5
http://www.rune-server.org/showthread.php?t=109273