Nathan
November 21st, 2010, 01:55
Yes im owner nathan of *********** so dont say i leeched.
instead of having vengTimer in process and idk if this code is correct but works fine for me. Note: im trying to use events if this event is wrong correct me plz
player.java.
My method
public void vengtimer(final Player p) {
EventManager.getSingleton().addEvent(
new Event() {
public void execute(EventContainer c) {
if (vengeanceDelay > 0) {
vengeanceDelay--;
}
if (vengeanceDelay == 0) {
vengeanceDelay = -1;
c.stop();
}
}
}, 30000);
};
Leanbows method.
public void vengtimer(final Player p) {
EventManager.getSingleton().addEvent(new Event() {
public void execute(EventContainer c) {
if (vengeanceDelay > 0) {
vengeanceDelay--;
vengeanceDelay = -1;
c.stop();
}
}
}, 30000);
};
both methods work so yh.
declare all ints ect.
PlayerMagic.java
search
Code:
case 14: //Vengeance
implent these 2 at the bottom of the code.
Code:
p.vengtimer(p);
p.vengeanceDelay = 1;
instead of having vengTimer in process and idk if this code is correct but works fine for me. Note: im trying to use events if this event is wrong correct me plz
player.java.
My method
public void vengtimer(final Player p) {
EventManager.getSingleton().addEvent(
new Event() {
public void execute(EventContainer c) {
if (vengeanceDelay > 0) {
vengeanceDelay--;
}
if (vengeanceDelay == 0) {
vengeanceDelay = -1;
c.stop();
}
}
}, 30000);
};
Leanbows method.
public void vengtimer(final Player p) {
EventManager.getSingleton().addEvent(new Event() {
public void execute(EventContainer c) {
if (vengeanceDelay > 0) {
vengeanceDelay--;
vengeanceDelay = -1;
c.stop();
}
}
}, 30000);
};
both methods work so yh.
declare all ints ect.
PlayerMagic.java
search
Code:
case 14: //Vengeance
implent these 2 at the bottom of the code.
Code:
p.vengtimer(p);
p.vengeanceDelay = 1;