An item behaves like @autoloot

PcNy

New member
Messages
34
Points
0
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!

 
Last edited by a moderator:
try this

Code:
-	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";	">
 
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
default_smile.png


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
default_smile.png


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.

 
Last edited by a moderator:
- 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)

 
Last edited by a moderator:
- 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!

 
- 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

 
Back
Top