im new so dont flame please
i havent added npcs so do it yourself
also dont post this at any other sites without permission/credits please.(its added at rune-server and rune l*cus)
also im not finished but its usable, also please tell me what i could do better and how i could do it.
add this class:
[SPOIL]
public class Slayer {

public int[] lowSlayer = {}; //1 to 10
public int[] alowSlayer = {}; // 10 to 30
public int[] mediumSlayer = {}; //30 to 45
public int[] bmediumSlayer = {}; // 45 to 60
public int[] highSlayer = {};// 60 to 85
public int[] ahighSlayer = {}; //85 to 90
public int[] veryHighSlayer = {}; //85 to 90



public int lowSlayer()
{
return lowSlayer[(int) (Math.random() * lowSlayer.length)];
}
public int alowSlayer()
{
return alowSlayer[(int) (Math.random() * alowSlayer.length)];
}

public int mediumSlayer()
{
return mediumSlayer[(int) (Math.random() * mediumSlayer.length)];
}

public int bmediumSlayer()
{
return bmediumSlayer[(int) (Math.random() * bmediumSlayer.length)];
}
public int highSlayer()
{
return highSlayer[(int) (Math.random() * highSlayer.length)];
}
public int ahighSlayer()
{
return ahighSlayer[(int) (Math.random() * ahighSlayer.length)];
}
public int veryHighSlayer()
{
return veryHighSlayer[(int) (Math.random() * veryHighSlayer.length)];
}



public void Tasks()
{

if (c.playerLevel[18] >= 1 && c.playerLevel[18] <= 10) {
c.taskID = lowSlayer();
c.taskAmount = 10 + misc.random(40);
c.talk2("Your task is to kill "+c.taskAmount+" "+c.GetNpcName(c.taskID)+"s.", "", 1597);
}
if (c.playerLevel[18] >= 10 && c.playerLevel[18] <= 30) {
c.taskID = alowSlayer();
c.taskAmount = 10 + misc.random(40);
c.talk2("Your task is to kill "+c.taskAmount+" "+c.GetNpcName(c.taskID)+"s.", "", 1597);
}
if (c.playerLevel[18] >= 30 && c.playerLevel[18] <= 45) {
c.taskID = mediumSlayer();
c.taskAmount = 10 + misc.random(40);
c.talk2("Your task is to kill "+c.taskAmount+" "+c.GetNpcName(c.taskID)+"s.", "", 1597);
}
if (c.playerLevel[18] >= 45 && c.playerLevel[18] <= 60) {
c.taskID = bmediumSlayer();
c.taskAmount = 10 + misc.random(40);
c.talk2("Your task is to kill "+c.taskAmount+" "+c.GetNpcName(c.taskID)+"s.", "", 1597);
}
if (c.playerLevel[18] >= 60 && c.playerLevel[18] <= 85) {
c.taskID = highSlayer();
c.taskAmount = 10 + misc.random(40);
c.talk2("Your task is to kill "+c.taskAmount+" "+c.GetNpcName(c.taskID)+"s.", "", 1597);
}
if (c.playerLevel[18] >= 85 && c.playerLevel[18] <= 90) {
c.taskID = ahighSlayer();
c.taskAmount = 10 + misc.random(40);
c.talk2("Your task is to kill "+c.taskAmount+" "+c.GetNpcName(c.taskID)+"s.", "", 1597);
}
if (c.playerLevel[18] >= 90 && c.playerLevel[18] <= 99) {
c.taskID = veryHighSlayer();
c.taskAmount = 10 + misc.random(40);
c.talk2("Your task is to kill "+c.taskAmount+" "+c.GetNpcName(c.taskID)+"s.", "", 1597);
}
}
public void slayerTalk()
{
c.interfaceEffect = 3;
c.clearQuestInterface();
c.sendFrame126("", 2494);
c.sendFrame126("I need an assignment", 2495);
c.sendFrame126("Do you have anything for trade?", 2496);
c.sendFrame126("Er...nothing...", 2497);
c.sendFrame126("", 2498);
c.sendQuestSomething(8143);
c.sendFrame164(2492);
c.flushOutStream();
}

public void slayerGem()
{
c.interfaceEffect = 4;
c.clearQuestInterface();
c.sendFrame126("How am I doing so far?", 2494);
c.sendFrame126("Who are you?", 2495);
c.sendFrame126("Where are you?", 2496);
c.sendFrame126("Nothing really.", 2497);
c.sendFrame126("", 2498);
c.sendQuestSomething(8143);
c.sendFrame164(2492);
c.flushOutStream();
}


private client c;
public Slayer(client client) {
this.c = client;
}
}

[/SPOIL]
to use it, add this in client.java
Code:
private Slayer Slayer = new Slayer(this);
                  	public Slayer getSlay() { //usage: getSl().voidname();
		return Slayer;
	}
then find your slayertalk and gems
and replace with this
Code:
	public void slayerTalk() 
	{
getSlay().slayerTalk();
	}

	public void slayerGem() 
	{
getSlay().slayerGem();
	}
then find this
Code:
	public void giveTask()
and replace with this
Code:
	public void giveTask() 
	{
getSlay().Tasks();
	}
and thats it
CREDITS:
me
minutes