How to add boss ticket System to 667-728 rsps
Hey this is my first ever tut so please take it easy on me, i will be showing you how to make a boss ticket system.
First go into player.java
Add these in there aomse were
public int Bandos = 0;
public int Totalbosskills = 0;
Then go into Npc.java and add this in the public void drop method/ or replace it with this [CODE]
[CODE]
public void drop() {
String pvm = "You are Rewarded 500 Pvm Ticket for killing this boss";
try {
Drop[] drops = NPCDrops.getDrops(id);
if (drops == null)
return;
Player killer = getMostDamageReceivedSourcePlayer();
if (killer == null)
return;
if (getId() == 6062) {
killer.getInventory().addItem(2996, 1);
killer.getPackets().sendGameMessage(pvm);
killer.Totalbosskills += 1;
killer.Corp += 1;
}
Drop[] possibleDrops = new Drop[drops.length];
int possibleDropsCount = 0;
for (Drop drop : drops) {
if (drop.getRate() == 100)
sendDrop(killer, drop);
else {
if ((Utils.getRandomDouble(99) + 1) <= drop.getRate() * 1.5)
possibleDrops[possibleDropsCount++] = drop;
}
}
if (possibleDropsCount > 0)
sendDrop(killer, possibleDrops[Utils.getRandom(possibleDropsCount - 1)]);
} catch (Exception e) {
e.printStackTrace();
} catch (Error e) {
e.printStackTrace();
}
}
there you go then just compile and run should work for some people who is new to coding, and if you have any problems ill try and fix them. thanks