Post: [667] Token per hit system! hit an npc and get tokens.
03-07-2015, 01:48 AM #1
(adsbygoogle = window.adsbygoogle || []).push({}); i just edited it abit so when u hit a 1 u get 1 token instead of random tokens
credits are below

go to npc.java search for

    if (source instanceof Player) {


under that add
    final Player p2 = (Player) source;
int dmg = (hit.getDamage() * 1); //*1 means if u wanna make it so if u hit a 250 u get 250 tokens
if(this.getId()==131) // 131 is the npc id
p2.getPackets().sendGameMessage ("You have gained <col=FF0000>" + dmg + "</col> " + "damage tokens");
if(this.getId()==131)
p2.getInventory().addItem(13653,dmg); //13653 is the item u get if u hit a monster in this case penguin.
(adsbygoogle = window.adsbygoogle || []).push({});
03-07-2015, 05:29 AM #2
Vesia
Haxor!
    
final Player p2 = (Player) source;
int multipler;
int dmg = (hit.getDamage() * multiplier);
if(getId()==131) {
[INDENT]p2.getPackets().sendGameMessage ("You have gained <col=FF0000>" + dmg + "</col> " + "damage tokens");
p2.getInventory().addItem(13653, dmg); //13653 is the item u get if u hit a monster in this case penguin.
[/INDENT]
}


???
03-07-2015, 10:53 PM #3
read.
03-07-2015, 10:56 PM #4
Stunz
Former Staff
Originally posted by the
read.


Nice job mate.

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo