PcNy 1 Posted February 5, 2014 (edited) Is there any item script that makes a player who consumes it can have an effect like @autoloot for a given period of time? If it's not possible. An npc script that charges a player for zeny in exchange for an hour of @autoloot effect would be great too. PS: Players can't directly use @autoloot. Thank you! Edited February 5, 2014 by PcNy Quote Share this post Link to post Share on other sites
0 Angelmelody 221 Posted February 5, 2014 try this - script cieffect -1,{Onatlootend: atcommand "@autoloot 0";end;}and item script Script: <" deltimer "cieffect::Onatlootend"; while(input(.@rate,1,100)!=0); atcommand "@autoloot "+.@rate; addtimer 5000,"cieffect::Onatlootend"; "> 2 PcNy and Uzieal reacted to this Quote Share this post Link to post Share on other sites
0 Adam 3 Posted March 12, 2014 (edited) try this - script cieffect -1,{Onatlootend: atcommand "@autoloot 0";end;}and item script Script: <" deltimer "cieffect::Onatlootend"; while(input(.@rate,1,100)!=0); atcommand "@autoloot "+.@rate; addtimer 5000,"cieffect::Onatlootend"; "> Hey there Can you help please ? I want to attach the @autoloot function to a miscellaneous item (that cannot be "consummed"), also for a week duration; so when the times expires, item gets deleted By the way I read in a different topic the "attachtimer" function shouldn't be used too often, is it relevant in this case ? Thanks. Edited March 12, 2014 by Adam Quote Share this post Link to post Share on other sites
0 Angelmelody 221 Posted March 12, 2014 1. use rentitem script + set itemtype to 11 2. I m not aware of that Quote Share this post Link to post Share on other sites
0 AnnieRuru 957 Posted March 12, 2014 (edited) - 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) Edited March 12, 2014 by AnnieRuru 2 Adam and Alexandria reacted to this Quote Share this post Link to post Share on other sites
0 legion 0 Posted March 13, 2014 - 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) Hi, AnnieRuru, how can I make it like, when a player wears "x" headgear he can use @autoloot? Thanks! Quote Share this post Link to post Share on other sites
0 Adam 3 Posted March 13, 2014 (edited) Hi, AnnieRuru, how can I make it like, when a player wears "x" headgear he can use @autoloot? Thanks! That s exactly what I asked for in the first place, I'm sorry if i didn't make myself clear :/ Edited March 13, 2014 by Adam Quote Share this post Link to post Share on other sites
0 Adam 3 Posted March 13, 2014 - 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) Thanks for this suggestion Annie, it works great this way /no1 Quote Share this post Link to post Share on other sites
Is there any item script that makes a player who consumes it can have an effect like @autoloot for a given period of time?
If it's not possible. An npc script that charges a player for zeny in exchange for an hour of @autoloot effect would be great too.
PS: Players can't directly use @autoloot.
Thank you!
Edited by PcNyShare this post
Link to post
Share on other sites