Originally Posted by
infernal7188
yeah
Go into Player.Java and add the following:
Code:
private long objectCooldown;
Code:
public long getObjectCooldown() {
return objectCooldown;
}
public void setObjectCooldown(long objectCooldown) {
this.objectCooldown = objectCooldown;
}
Now go into ObjectHandler.Java and find your object ID and use the following template as an example.
Code:
else if (id == your object id) {
if (player.getObjectCooldown() > Utils.currentTimeMillis()) {
player.getPackets().sendGameMessage("You can use this again in "
+(player.getObjectCooldown() - Utils.currentTimeMillis()) / 1000 +
" seconds.");
return;
}
else
player.setObjectCooldown(Utils.currentTimeMillis() + 600000);
//do what your object does
}
Any trouble add my skype: BLTBBH