Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

[tut] new 508 tut's

Junior Spellweaver
Joined
May 17, 2007
Messages
131
Reaction score
2
http://forum.ragezone.com/showthread.php?p=3967411#post3967411 for 508 now with update v3.0.3

Credit's go to rune-server members

[508] Yelling
Difficulty: 0
Base: palis 508
(UPDATED - last time only showed first word now shows all)
AS requested heres my code for yelling (you are really thick if you cant do this)
Step 1: put this in frames.java

Code:
public void yell(String s) {
for (Player p5 : Engine.players) {
if(p5 == null)
continue;
if(!p5.online)
continue;
sendMessage(p5,s);
}
}Step 2: add this command

Code:
if (playerCommand.equals("yell")) {
String text = playerCommand.substring(5);
if(text.length() > 5)
p.frames.yell(p.username+": "+text);
}under this (IMPORTANT)

Code:
String playerCommand = p.stream.readString().toLowerCase();

[508]Adding Objects[508]
Description: This will add objects to your 508 server.
Difficulty: 0/10 (Like all "tutorials" becuase they're all C&P. -.-')
Used server: Palidinos76's 508 server (What else?? He's the king!)
Classes modifyed: Player.java, Frames.java, PacketManager.
Credits: 70% Lumby, and T X for Project Duke, 30% Me for modifying the code and finding and adding the sendPlayerCoords & getDistance methods into the right places.
Okay now lets get started, first of all add this in Player.java you should know where to add.
Code:
public void objects() {
//frames.createObject(this, objID, HEIGHT, X, Y, FACE, TYPE);
frames.createObject(this, objID, HEIGHT, X, Y, FACE, TYPE);
}Now save and close, next go into Frames.java and add theese:
Code:
public void createObject(Player p, int objectId, int height, int objectX, int objectY, int face, int objectt) {
if (p == null || p.stream == null || p.disconnected[0]) {
return;
}
if (getDistance(objectX, objectY, p.absX, p.absY) <= 60 && p.heightLevel == height) {
sendPlayerCoords(p, (objectX - ((p.mapRegionX - 6) * 8)), (objectY - ((p.mapRegionY - 6) * 8)));
p.stream.createFrame(224);
p.stream.writeByteC(0);
p.stream.writeWordBigEndian(objectId);
p.stream.writeByteA((objectt << 2) + (face & 3));
}
}below it this
Code:
public void sendPlayerCoords(Player p, int x, int y)
{
if(p == null || p.stream == null || p.disconnected[0])
{
return;
}
p.stream.createFrame(218);
p.stream.writeByteA(x);
p.stream.writeByte(y);
}and below that this
Code:
public int getDistance(int coordX1, int coordY1, int coordX2, int coordY2)
{
int deltaX = coordX2 - coordX1;
int deltaY = coordY2 - coordY1;
return ((int)Math.sqrt(Math.pow(deltaX, 2) + Math.pow(deltaY, 2)));
}and now for the final touch that will make this work, go into PacketManager.java
and add this somewhere
Code:
case 62: //Used to spawn objects.
p.objects();
break;Now close, save and compile.
Any errors please post and I'll try to help you correct them.

[508] GodSword Special Using Special bar
Description: Using all God Swords to use special bar to do an special attack.
Difficulty: 0
Assumed Knowledge: Copy/Paste
Tested Server: Palidino's 508 Server
Files/Classes Modified: Action Button
Procedure :
Firstly Do Ian...'s Tutorial:
Secondly Open Up Your Action Buttons And Add This Inside:

Code:
case 81:
if (buttonId == 10 && p.equipment[3] == 11694) {//armadyl
p.requestGFX(1222,1);
p.requestAnim(7074,1);
}//coded by Donny from


if (buttonId == 10 && p.equipment[3] == 11696) {//bandos
p.requestGFX(1223,1);
p.requestAnim(7073,1);
}


if (buttonId == 10 && p.equipment[3] == 11698) {//saradomin
p.requestGFX(1220,1);
p.requestAnim(7071,1);
}


if (buttonId == 10 && p.equipment[3] == 11700) {//zamorak
p.requestGFX(1221,1);
p.requestAnim(7070,1);
}
break;Thirdly And Last: Save and Close Then Compile Run

Credits: Ian... (Special Bar Tut),Donny (Gave Out Codes For GS Specs) And Finaly Palidino (For The Server).
Got Errors? Post Here Im Free to Help
Picture:
super man - [tut] new 508 tut's - RaGEZONE Forums


(508)Working Skill Level 1
Description: Working Skill Level 1
Difficulty: 1/10?
Assumed Knowledge: Simple Tut
Tested Server: palidino76 508
Files/Classes Modified: Player.java
Step 1.
Go To Server 508,sc,palidino76,rs2,players
Open Player.java And Search
Code:
skillLvl = 99;u will see this
Code:
public Player(Socket socket, int id) {
this.socket = new PlayerSocket(this, socket);
playerId = id;
look[1] = 10;
look[2] = 18;
look[3] = 26;
look[4] = 33;
look[5] = 36;
look[6] = 42;
for (int i = 0; i < skillLvl.length; i++) {
skillLvl = 99;
skillXP = 999999999;
}Step 2.
changed this
Code:
skillLvl = 1;
skillXP = 1;Green:changed Stats 99 to 1
Red:Changed xp
super man - [tut] new 508 tut's - RaGEZONE Forums


[Bug-fix] Buffer expanding
Description: Fix buffer expanding so it doesn't crash.
Difficulty: lolwut
Assumed Knowledge: Java
Tested Server: My 508
Files/Classes Modified: palidino76.rs2.util.Stream
Procedure
Step 1: Open the above listed file. Fine this method:
Code:
public void expandOutBuffer() {
/*
* Expand the buffer if its too small by adding 5000 more byes worth of space.
*/
byte[] oldBuffer = outBuffer;
outBuffer = new byte[oldBuffer.length + 5000];
System.arraycopy(oldBuffer, 0, outBuffer, 0, oldBuffer.length);
}Change:
System.arraycopy(oldBuffer, 0, outBuffer, 0, outBuffer.length);
To:
System.arraycopy(oldBuffer, 0, outBuffer, 0, oldBuffer.length);
[508]Item On Players Full C&P
Heres the full tutorial for people (Note this uses LegendX's 508)
First go to where you put legendX's 508 server then go to the packets folder.
Make a new java file named itemOnPlayers
And put the following in it.

Code:
/*
* Class itemOnPlayers
*
* Version 1.0
*
* Monday, August 25, 2008
*
* Created by Death-Droid ,Code by Ren
 
Junior Spellweaver
Joined
Jan 5, 2008
Messages
147
Reaction score
0
Re: (tut) new 508 tut's(tut)

Thanks abunch for this :]
 
Initiate Mage
Joined
Feb 18, 2007
Messages
99
Reaction score
0
Re: (tut) new 508 tut's(tut)

The full chat one doesnt work properly btw, Cell menchaned that and says how to get full chat. Other than that, nice i guess -.-
 
Initiate Mage
Joined
Sep 6, 2008
Messages
84
Reaction score
0
Re: (tut) new 508 tut's(tut)

this tut have been update on lol
 
Back
Top