Can you possibly show us a code?
|
Hello
My code is based on the rune evo v3.
I made it so that Kuradal can assign other slayer monsters then the standard that was in the source file.
But when i'm going to kill these monsters they don't give slayer exp.
Do I need to add this exp or something?
Does someone know the answer to my problem?
Many thanks
KatieQetesh
Can you possibly show us a code?
SlayerTask.java old
private transient static int[] tasks = { 1648, 1637, 1612, 1643, 6215 };
private transient static int[] amount = { 15, 20, 25, 30, 35 };
private int currentTask = -1;
private int currentTaskAmount = -1;
private transient Player player;
public void setPlayer(Player player) {
this.player = player;
}
public void resetTask() {
this.currentTask = -1;
this.currentTaskAmount = -2;
}
public String getName() {
return NPCDefinitions.getNPCDefinitions(currentTask).getN ame();
}
public void getNewTask() {
this.currentTask = tasks[Utils.random(tasks.length - 1)];
this.currentTaskAmount = amount[Utils.random(tasks.length - 1)];
}
SlayerTask.jave new
private transient static int[] tasks = { 1648, 1637, 1612, 1643, 6215 };
private transient static int[] tasks2 = { 1610, 1613, 1591, 52 };
private transient static int[] tasks3 = { 1615, 2783, 1592, 55 };
private transient static int[] amount = { 15, 20, 25, 30, 35 };
private int currentTask = -1;
private int currentTask2 = -1;
private int currentTask3 = -1;
private int currentTaskAmount = -1;
private transient Player player;
public void setPlayer(Player player) {
this.player = player;
}
public void resetTask() {
this.currentTask = -1;
this.currentTaskAmount = -2;
}
public String getName(Player player) {
int skilllevel = player.getSkills().getLevel(18);
if (skilllevel<50){
return NPCDefinitions.getNPCDefinitions(currentTask).getN ame();
}
else if(skilllevel<75){
return NPCDefinitions.getNPCDefinitions(currentTask2).get Name();
}
else {
return NPCDefinitions.getNPCDefinitions(currentTask3).get Name();
}
}
public void getNewTask(Player player) {
int skilllevel = player.getSkills().getLevel(18);
if (skilllevel<50){
this.currentTask = tasks[Utils.random(tasks.length - 1)];
}
else if(skilllevel<75){
this.currentTask2 = tasks2[Utils.random(tasks2.length - 1)];
}
else {
this.currentTask3 = tasks2[Utils.random(tasks3.length - 1)];
}
this.currentTaskAmount = amount[Utils.random(tasks.length - 1)];
}
I have no idea what i did, but it is working now. Thx anyway
Thread Closed.
Don't now what i di but it's working now. Thx anyway
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |