PDA

View Full Version : [377] Camera angle packet.



Fire cape
July 11th, 2010, 12:32
Description: Adding a packet that controls the camera angle, possibly used for cutscenes.
Assumed Knowledge: How to read.
Tested Server: Rs377d
Files/Classes modified: ActionSender.
Files/Classes added: N/A

This is what your adding:
Only the registered members can see the link.

Normal camera.


/**
* Camera angle. possibly used for cutscenes.
* @param x the x coordinate of the camera.
* @param y the y coordinate of the camera.
* @param height the height of the camera.
* @param speed the speed of the camera
* @param angle the angle of the camera.
* @return the action sender instance, for chaining.
*/
public ActionSender camera(int x, int y, int height, int speed, int angle) {
Rs2PacketBuilder packet = new Rs2PacketBuilder(167);
packet.put((byte) ((byte) x/64));
packet.put((byte) ((byte) y/64));
packet.putShort(height);
packet.put((byte) speed);
packet.put((byte) angle);
player.getSession().write(packet.toPacket());
return this;
}

Verry similar to the other camera, possibly used for the spinning camera?


/**
* Spinning camera? possibly used for cutscenes.
* @param x the x coordinate of the camera.
* @param y the y coordinate of the camera.
* @param height the height of the camera.
* @param speed the speed of the camera.
* @param angle the angle of the camera.
* @return the action sender instance, for chaining.
*/
public ActionSender spinningCamera(int x, int y, int height, int speed, int angle) {
Rs2PacketBuilder packet = new Rs2PacketBuilder(3);
packet.put((byte) x);
packet.put((byte) y);
packet.putShort(height);
packet.put((byte) speed);
packet.put((byte) angle);
player.getSession().write(packet.toPacket());
return this;
}


Stopping the camera.


/**
* Stops the camera.
* @return the action sender instance, for chaining.
*/
public ActionSender stopCamera() {
Rs2PacketBuilder packet = new Rs2PacketBuilder(148);
player.getSession().write(packet.toPacket());
return this;
}

Emperor
July 11th, 2010, 12:34
Very nice, Might use this for quests on a new project with Ryan and me.

Fire cape
July 11th, 2010, 12:35
Very nice, Might use this for quests on a new project with Ryan and me.

Good luck.
The 317 packets are 177, 166, and 107 if you need them.

Emperor
July 11th, 2010, 12:35
Good luck.
The 317 packets are 177, 166, and 107 if you need them.

Thanks, I'll write it down.

Fire cape
July 11th, 2010, 12:43
Thanks, I'll write it down.

Seeing as no ones posting I might aswell tell you the exact ones lol.

177 is the normal camera.
166 is the spinning camera.
107 is stopping the camera.

Have fun.

Emperor
July 11th, 2010, 12:46
Seeing as no ones posting I might aswell tell you the exact ones lol.

177 is the normal camera.
166 is the spinning camera.
107 is stopping the camera.

Have fun.

Lol, they will start posting sooner or later.

Thanks again.

e-scape
July 11th, 2010, 15:32
Hm.. not bad :) i probably will use it.

Relapse
July 12th, 2010, 03:55
Not bad, cut-scenes are pretty cool, my friend had one that started our 525 custom tut island

saintscape
December 14th, 2010, 04:59
so how do i start the cam like how do i look at it ingame?