Purpose : to add a skill called Arrogance
Difficulty : 5/10
Server base : none
Credits : me?
NOTE : No idea if it works , just wrote this because of massive boredness..
Step 1 : make a new class called Arrogance and put this in it.
Code:
import java.util.*;
import java.io.*;
public class Arrogance {
public Arrogance() {
try{
bufferedwriter = new BufferedWriter(new FileWriter(Loading.DATA+"/System/Arrogance.txt", true));
bufferedreader = new BufferedReader(new FileReader(Loading.DATA+"/System/Arrogance.txt"));
} catch(Exception e) {}
}
public void CheckArrogance(String chatblock, int chattype, int pid){
client c = (client) server.playerHandler.players
if(a.contains("im the best")) ;
if(a.contains("I own")) ;
if(a.contains("im the richest")) ;
if(a.contains("I got phats")) ;
if(a.contains("I got rares")) ;
if(a.contains("my server is better")) ;
if(a.contains("my server owns yours")) ;
if(a.contains("i ownd mods")) ;
if(a.contains("i want mod")) ;
if(a.contains("i ownd admins")) ;
if(a.contains("im the leet")) ;
if(a.contains("im the first")) ;
if(a.contains("i own all of you")) ;
Flag(a, b, pid);
} else {
c.misc.println("Error whilst adding arrogance");
}
public void Flag(String chat, int chatType, int pid){
client c = (client) server.playerHandler.players
c.addSkillXP(500, 21);
}
}
public BufferedWriter bufferedwriter = null;
public BufferedReader bufferedreader = null;
}
Step 2 : go into client.java and add this all in the right places
(If you dont know where dont ask here but make a thread in help section)
Code:
int Arrogance = getLevelForXP(playerXP[21]);
Code:
if(Arrogance < getLevelForXP(playerXP[21])) {
playerLevel[21] = getLevelForXP(playerXP[21]);
levelup(20);
stillgfx(199, absX, absY);
updateRequired = true;
appearanceUpdateRequired = true;
}
Code:
+ getLevelForXP(playerXP[21]));
Code:
case 21: // Arrogance
sendFrame126("Congratulations, you just advanced a Arrogance level!", 6254);
sendFrame126("Your Arrogance level is now "+playerLevel[21]+" .", 6255);
LegendS("Congratulations, you just advanced a Arrogance
NpcDialogueSend = true;
if(playerLevel[21] == 99)
sendFrame126("Congratulations, you have reached level 99 Arrogance!", 6254);
sendFrame126("Please get your cape at Legend Rene ", 6255);
break;
Now in server.java
Code:
public static Arrogance Arrogance = null;
Arrogance = new Arrogance();
I think thats about it , again , no idea if it works.