[Tut] Clickable Npcs

Status
Not open for further replies.
Newbie Spellweaver
Joined
Jun 27, 2007
Messages
35
Reaction score
0
Clickable Npcs Tut
Reason: Good for slayer
Server Base: Zamorak
Editing: Client.java

Step1:
First open up client.java

Then Find:
else if (NPCID == 2259) // Mage Of Zamorak

Step2:
Right ontop of it addthis:

else if (NPCID == npcid) // Details
{
skillX = server.npcHandler.npcs[NPCSlot].absX;
skillY = server.npcHandler.npcs[NPCSlot].absY;
//Do something here//
}

Lol A very simple code.

Example:

else if (NPCID == 1648) // Crawlinghand Slayerxp
{
skillX = server.npcHandler.npcs[NPCSlot].absX;
skillY = server.npcHandler.npcs[NPCSlot].absY;
addSkillXP(0,1000);
}

Hope you enjoyed!
 
Re: [Basic] Clickable Npcs

else if (NPCID == 1648) // Crawlinghand Slayerxp
{
skillX = server.npcHandler.npcs[NPCSlot].absX;
skillY = server.npcHandler.npcs[NPCSlot].absY;
addSkillXP(0,1000);
}

so probably when i mass click it i gain exp?
there are a few options for it:

trade with the npc(shop)
talk to the npc(shop)
finish a clue
quests
teleports
etc etc..
but adding experience doesnt fit good..
 
Re: [Basic] Clickable Npcs

Yep it can mass unless you put a timer on it.
Quests are good im using it for my normal rs remake project.
 
Re: [Basic] Clickable Npcs

How can i put a timer on this?

find:
public class client extends player implements runnable {

press enter after the {
then add:
public int randomtimer = 0;
then go to
public boolean process
and add..
if(randomtimer > 0){randomtimer -= 1;}
then at the npc..
if(randomtimer == 0){
addSkillXP(15,9999999);
randomtimer = 10000;}

done.

btw, the timer is not a good thing to add. once you log out, the timer resets to 0.
 
Re: [Basic] Clickable Npcs

[Basic] is not an appropriate prefix for a title. I will change it for you this time; however next time action will be taken against your account for not complying with our rules.

Regards,
Brandon
 
Is there also a way to add the xp when the npc is dead?
Cuz im working on slayer lol, added everything except the xp if a npc dies...
 
Status
Not open for further replies.
Back