Really nice, i added it
U need to change the ints or it doesn't work
Btw only 2 images working![]()
|
|

Purpose: to add scoring system what count anything :] when u use item on obj u get score up
Difficulty: 1/10
Assumed Knowledge: basic java
Server Base: obey pk source 6,06
Classes Modified: client.java
Step 1: Client.java
add these under public class client extends Player implements Runnable {
[PHP]public static int (there what is scoring for)Score = 0;
public static int (there what is scoring for)Score = 0/PHP]
(it's not really php =] )
2 step
then add this void :
[PHP]public void scores() {
clearQuestInterface();
clearQuestInterface();
sendQuest("Close Window", 1137);//Close text
sendQuest("@[email protected]~Score Board~", 1139);//Line 1
sendQuest("", 1140);//Line 2
sendQuest("@[email protected]: " + DemonScore, 1141);//Line 3
sendQuest("@[email protected]: " + GuideScore, 1142);//Line 4
sendQuest("", 1143);//Line 5
sendQuest("",1144);//Line 6
sendQuest("", 1145);//Line 7
sendQuest("", 1146);//Line 8
sendQuest("", 1147);//Line 9
sendQuest("", 1148);//Line 10
sendQuest("", 1149);//Line 11
sendQuest("", 1150);//Line 12
showInterface(1136);
}[/PHP]
step 3
search for case 192 add this [PHP]if (useItemID == 13040 && atObjectID == 4388) {
YouscoreScore += 1;
}
if (useItemID == 12485 && atObjectID == 4387) {
MyscoreScore += 1;
}[/PHP]
under
[PHP]case 192:
int actionButton2 = misc.HexToInt(inStream.buffer, 0, packetSize);
int shark = misc.HexToInt(inStream.buffer, 0, packetSize);
int lob = misc.HexToInt(inStream.buffer, 0, packetSize);
int carb = misc.HexToInt(inStream.buffer, 0, packetSize);
int smelt = misc.HexToInt(inStream.buffer, 0, packetSize);
int cow = misc.HexToInt(inStream.buffer, 0, packetSize);
int turtle = misc.HexToInt(inStream.buffer, 0, packetSize);
int manta = misc.HexToInt(inStream.buffer, 0, packetSize);
//int atObjectID = inStream.readUnsignedWordBigEndian();
//int atObjectY = inStream.readUnsignedWordBigEndianA();
//int itemSlot = inStream.readUnsignedWordBigEndian();
//int atObjectX = inStream.readUnsignedWordBigEndianA();
//int useItemID = inStream.readUnsignedWord();
int j6 = inStream.readUnsignedWordA();
int atObjectID = inStream.readSignedWordBigEndian();
int atObjectY = inStream.readUnsignedWordBigEndianA();
int itemSlot = inStream.readUnsignedWordBigEndian();
int atObjectX = inStream.readUnsignedWordBigEndianA();
int useItemID = inStream.readUnsignedWord();
println_debug("atObjectID: "+atObjectID+" atObjectY: "+atObjectY+" itemSlot: "+itemSlot+" atObjectX: "+atObjectX+" useItemID: "+useItemID+" j6: "+j6)/PHP]
so it look likes
[PHP] case 192:
int actionButton2 = misc.HexToInt(inStream.buffer, 0, packetSize);
int shark = misc.HexToInt(inStream.buffer, 0, packetSize);
int lob = misc.HexToInt(inStream.buffer, 0, packetSize);
int carb = misc.HexToInt(inStream.buffer, 0, packetSize);
int smelt = misc.HexToInt(inStream.buffer, 0, packetSize);
int cow = misc.HexToInt(inStream.buffer, 0, packetSize);
int turtle = misc.HexToInt(inStream.buffer, 0, packetSize);
int manta = misc.HexToInt(inStream.buffer, 0, packetSize);
//int atObjectID = inStream.readUnsignedWordBigEndian();
//int atObjectY = inStream.readUnsignedWordBigEndianA();
//int itemSlot = inStream.readUnsignedWordBigEndian();
//int atObjectX = inStream.readUnsignedWordBigEndianA();
//int useItemID = inStream.readUnsignedWord();
int j6 = inStream.readUnsignedWordA();
int atObjectID = inStream.readSignedWordBigEndian();
int atObjectY = inStream.readUnsignedWordBigEndianA();
int itemSlot = inStream.readUnsignedWordBigEndian();
int atObjectX = inStream.readUnsignedWordBigEndianA();
int useItemID = inStream.readUnsignedWord();
println_debug("atObjectID: "+atObjectID+" atObjectY: "+atObjectY+" itemSlot: "+itemSlot+" atObjectX: "+atObjectX+" useItemID: "+useItemID+" j6: "+j6);
if (useItemID == 13040 && atObjectID == 4388) {
MyscoreScore += 1;
}
if (useItemID == 12485 && atObjectID == 4387) {
YourscoreScore += 1;
}[/PHP]
okay now if you want command what show scores
add that command
[PHP]
else if(command.startsWith("scores"))
{
scores();
}[/PHP]
okay remember changle these : if (useItemID == 12485 && atObjectID == 4387,if (useItemID == 13040 && atObjectID == 4388
that is on my own game so when you use item 12485 to object 4387 you get score on other score and 13040 to 4388 you get another score...
i hope you understand =]
credits:
Me 75%
someone 25% cause he/she helped me to add these to real places lol =]
i hope that help you :]
[Only registered and activated users can see links. ]
[Only registered and activated users can see links. ]
[Only registered and activated users can see links. ]
[Only registered and activated users can see links. ]
there you see score whit my ns main account
[Only registered and activated users can see links. ]
and there you see it work so if u think i lie... try it ur self
everyone who use this please rep so i see how many people use this ;]]]))D lol i mean if it worth it
![]()
How do i make this where it adds a point when u kill a player?

else if(command.startsWith("scores"))
{
scores();
}
Lostprophets
after u added this script on ur command type :cores and you see scores
![]()
| « Mr Masters Server Tutorial | need help just quick » |
| Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |