[release] TimerItem method
find this
NPCConversationManager.java
add this import
import net.sf.odinms.server.TimerManager;
import net.sf.odinms.server.MapleInventoryManipulator;
import net.sf.odinms.client.MapleInventoryType;
add this method
Quote:
public void personItem(final int id, final short quantity, final byte type, int time) {
TimerManager.getInstance().schedule(new Runnable() {
@Override
public void run() {
StringBuilder logInfo = new StringBuilder(c.getPlayer().getName());
logInfo.append(" received ");
logInfo.append(quantity);
logInfo.append(" from a scripted PlayerInteraction (");
logInfo.append(this.toString());
logInfo.append(")");
MapleInventoryManipulator.addById(c, id, quantity, logInfo.toString());
c.getSession().write(MaplePacketCreator.getShowItemGain(id, quantity, true));
}
}, 0); // start
TimerManager.getInstance().schedule(new Runnable() {
@Override
public void run() {
MapleInventoryManipulator.removeById(c, MapleInventoryType.getByType(type), id, quantity, true, false);
c.getPlayer().getClient().getSession().write(MaplePacketCreator.serverNotice(1, "remove Item"));
}
}, time * 1000); // ? second late
}
EX / cm.personItem(code, quantity, inventorytype, time);
it is made by ReturnSSI(c92h23)
Re: [release] TimerItem method
Re: [release] TimerItem method
Re: [release] TimerItem method
Nice? what exactly is it?
Re: [release] TimerItem method
was wonder about that myself
Re: [release] TimerItem method
it is something like a item that will auto gone in when reach the deadline?
Re: [release] TimerItem method
Re: [release] TimerItem method
Re: [release] TimerItem method
what does it do? : It deletes a certain item after a certain amount of time. Like a quest item in a PQ.
Re: [release] TimerItem method
Oh Like the Nx Iteam They Have a 3 month period
Ew GMS LIKE!
Re: [release] TimerItem method
Cool! this could be useful.
Re: [release] TimerItem method
Re: [release] TimerItem method
The time is in whad format? milliseconds, seconds, mins or hours? @_@
Btw, this is nice.
Re: [release] TimerItem method
Quote:
Originally Posted by
EspadaFung
show us a npc script.
Someone doesn't know much about Java.
You don't NEED an NPC Script.
Why? This is like gMS.
When you buy an NX item, it disappears after 3 months right?
So, this is like gMS, except with any item you want.
Re: [release] TimerItem method