• Log in or sign up for an account here: https://www.sythe.org/login

-fedexer-'s Adding Global Object Tutorial--I have permission

Does this help?

  • Yes thanks

    Votes: 0 0.0%
  • No, not for me but good for noobs

    Votes: 0 0.0%

  • Total voters
    0
  • Poll closed .

ragalshnagal

Forum Addict

Banned
Joined
Jan 29, 2007
Sythe Gold
0
Messages
476
Location
Mount Olympus!!
I have been looking around for Fedexer's Tutorial on adding global objects for quite some time. I've noticed it is not on this site anymore, so i will post it.

I HAVE PERMISSION FROM FEDEXER

rofl , you know what , if its permission you need then you've got it , i just didnt bother to report it , as the last time i ever did i got the **** flamed out of me , hint the fact i left and in 2 years have only ever made like 22 posts, if even that >.>
Here is page for more proof :S
http://www.rune-server.org/showthread.php?p=382038#post382038


THIS IS NOT MINE, I HAVE NO CREDIT, IM JUST TRYING TO HELP PEOPLE WITH THEIR GLOBAL OBJECTS.I UNDERSTAND IF REPOSTING SOMEONES TUTORIAL IS NOT ALLOWED, AND I TAKE FULL RESPONSABILITY, I JUST WANT PEOPLE TO USE IT AGAIN. IT HELPED ME ALOT.

CREDITS: -fedexer- ( 100000000000000%)

ME(N/A) just reposting
Ok so here it is.



Purpose: Making Global Objects

Difficulty: 3

Assumed Knowledge: you should know how to add voids

Server Base: cheeazscape 78

Classes Modified: client.java

Tested on: cheeazescape 78 and pimpscape




procedure
step 1

ok first of look for this in your client.java (PS YOU DONT NEED TO LOOK FOR THIS JUST ADD THE NEXT BIT WITH YOUR OTHER VOIDS -.- )



/* OBJECTS MAIN */
if you dont have it add this



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);
}
}
}
}
}
and add this


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
}
}
step 2

now add this void under the code you just added



public void NewObjects() {
makeGlobalObject(3004, 3383, 2469, 0, 10);//portal
}
this is an example of a portal in falador park

step 3
next search for
case 121:
and inside that case add this...


NewObjects();
(note adding it here will reduce lag signifigantly...)


now to get this to work add more

AddGlobalObject(3004, 3383, 2469, 0, 10);//portal
to the
public void NewObjects() {
now


makeGlobalObject(3004, 3383, 2469, 0, 10);//portal
ok the



makeGlobalObject
tells the server you wish to make an object
this part



(3004, 3383, 2469, 0, 10);
is the most important

ok the first 2 numbers "3004, 3383" are the x and y coords of the place you want the object
then the "2469" is the object ID in this case a portal
the "0" is the objects facing direction
and then the "10" is for a ground object keep this the same !!


for object facing you can change the number so that it face's a different way and these are the numbers below:


0= WEST | -1 = NORTH | -2 = EAST | -3 = SOUTH
step 4
you may also need to add this if you get errors saying you dont have
winkfinaldratftcn0.gif



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
}
}
credits : -fedexer-
 
I don't get this. when I compiler I got 100 errors exactly.
Can you explain with screen shots or something better.
Btw I am using Testscape.
 
Runescape Gamblingrunescape gambling
Back
Top