PDA

View Full Version : [562]TUT Adding objects and making them teleport you TUT[562]



forsakenfury
September 9th, 2010, 04:48
For rs2hd
Files used:
-Actionsender.java which can be found in src\com\rs2hd\net
- Object1PacketHandler.java located in src\com\rs2hd\packethandler
Difficulty:about 2/10 just basic find and copy and paste

Adding object: Portal for example
Step one:coordinates
Find the coordinates of where you want the object to be and write them down or whatever

Step 2: Get an id
Find the id of your object either by looking at a objects list or going into your source and look in object.java in the misccelanous folder

Step 3: Action sender
Go into action sender and look for


player.getActionSender().sendCreateObject

once there go to the last one of the list and copy it
once thats done press enter to create a space in between the last object and the gameengine code
so if you want to do a portal like the one by rimmington here is the code


player.getActionSender().sendCreateObject(15478, 0, 3237, 2912, 0, 10);

the second zero represents the way it will face North,South,Etc...
North-0
East-1
South-2
west-3
so once youve input the code under the last object in that list save and compile
check to make sure its there if not go back and check your postion and height etc..
Part 2: Making your object teleport you to wherever =]

Step1: Get coords of area you want it to teleport you to.

Step2: open Object1packethandler.java in the packethandler folder in src
now search for something along these lines


case 42219://Enter Soul Wars Lobby
player.tele(1886, 3178 , 0);
player.WalkTo().GoTo(player, x, y-1);
break;
yea something like that
Step 3: Copy and paste
Copy that case and paste it under it make sure you press enter after the break;
Step 4: Change case!
the case number is the id of the object so our object is 15748 so put that in for case
Step 5: Coordinates
now you have to insert your coords into the case
only change the player tele to your coordinates so it should look something like this

case 15748://Enter Soul Wars Lobby
player.tele(3550, 3195 , 0);
player.WalkTo().GoTo(player, x, y-1);
break;
Save and compile
Thanks this is my first TUT so let me know how i did =]

420
September 9th, 2010, 05:05
Not worth a release, whoever doesn't know that is a noob lol

forsakenfury
September 9th, 2010, 05:08
just some help for people if they dont know how to do it. cause thats what i was like when i transfered from 317 to 508 then to 562

shockys
September 9th, 2010, 05:14
This is very basic.
But nonetheless helpful for new players.

It's also a little sloppy

forsakenfury
September 9th, 2010, 05:17
sry about it i couldnt add pics i would have but ill add in next TuT =] tried to explain it the best i could

shockys
September 9th, 2010, 05:24
The pictures don't matter for tutorials
It's just that you did it sloppy

Emily
September 9th, 2010, 05:31
its just

case ObjectId:
player.gettele().teleport(x, y, z);
break;...

and actionsender is just

makeglobalobject....

Trey
September 9th, 2010, 11:21
This is a copy and paste tutorial.

xxifish i x
July 17th, 2011, 07:16
2 things
i got it to work and everything i mean i coded like 7 different things for this TuT
but is there any way to make it wher u have to walk to the object and then click ( 1 click = automatic go through )
and is there any way to add anims and gfx when teleporting through?