- script kdjshfksfj -1,{OnInit: bindatcmd "autoloot", strnpcinfo(0)+"::OnReqItem"; bindatcmd "alootid", strnpcinfo(0)+"::OnReqItem"; bindatcmd "autolootitem", strnpcinfo(0)+"::OnReqItem"; bindatcmd "autoloottype", strnpcinfo(0)+"::OnReqItem"; end;OnReqItem: .@itemid = Red_Potion; // require item if ( !countitem( .@itemid ) ) { message strcharinfo(0), "You must have "+ getitemname( .@itemid ) +" to use "+ .@atcmd_command$; end; } if ( .@atcmd_numparameters ) atcommand .@atcmd_command$ +" "+ implode( .@atcmd_parameters$, " " ); else atcommand .@atcmd_command$; end;}why not just use bindatcmd and overwrite those autoloot stuffsso you can rentitem with an expire tick, then while the player having the items, they can use autoloot
By the way I read in a different topic the "attachtimer" function shouldn't be used too often, is it relevant in this case ?
attachnpctimer and addtimer is a different case
http://herc.ws/wiki/Timers_%28Scripting%29#AttachNPCTimer1. attachnpctimer is a npc type timer that is attached to the npc
2. addtimer is a player type timer that is attached to the player
they are different
3. sleep type timer ... my favorite
4. static timer ... gettimetick(2)