Jump to content
  • 0
PcNy

An item behaves like @autoloot

Question

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 PcNy

Share this post


Link to post
Share on other sites

7 answers to this question

Recommended Posts

  • 0

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";	">

Share this post


Link to post
Share on other sites
  • 0

 

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 by Adam

Share this post


Link to post
Share on other sites
  • 0

-	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 stuffs

so 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#AttachNPCTimer

1. 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 by AnnieRuru

Share this post


Link to post
Share on other sites
  • 0

 

-	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 stuffs

so 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#AttachNPCTimer

1. 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!

Share this post


Link to post
Share on other sites
  • 0

 

 

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 by Adam

Share this post


Link to post
Share on other sites
  • 0

 

-	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 stuffs

so 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#AttachNPCTimer

1. 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

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.