Look for where your server handles npc drops. When it drops the items, add a killcount to your player.
|
I am going to create a minigame for my rsps and this minigame needs a killcount. I need help with learning how to add a killcount only for a specific npc. can anyone help me out?
Look for where your server handles npc drops. When it drops the items, add a killcount to your player.
So if you have a minigame attributes class, then you could set a kill counter in there so it's individualized versus for everyone otherwise in your minigame class you can just make a normal counter. private int counter = 0; and then you can make some getters and setters. What base are you using? For ruse you can go to NPCDeathTask and be like if(npc.getId() == THE_NPC_ID) MY_MINIGAME.setKillCount(getKillCount() + 1); or player.getMinigameAttributes().getMyMinigame().set KillCount(getKillCount() + 1);
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |