Jump to content
  • 0
ZerotoHero

No autoloot in level 50 or higher

Question

13 answers to this question

Recommended Posts

  • 0

I'd src edit it or complicate the NPC a bit, since you may have it enabled, reach to lvl 50 and this script would make it unable to disable it via the command, thus having autoloot till you relog. Also... Seems you never use the atcommand by the useatcmd script command?

Share this post


Link to post
Share on other sites
  • 0

I'd src edit it or complicate the NPC a bit, since you may have it enabled, reach to lvl 50 and this script would make it unable to disable it via the command, thus having autoloot till you relog. Also... Seems you never use the atcommand by the useatcmd script command?

We can have that check by following

OnPCBaseLvUpEvent:if (BaseLevel >=50){ atcommand "@autoloot 0";}

Share this post


Link to post
Share on other sites
  • 0

 

I'd src edit it or complicate the NPC a bit, since you may have it enabled, reach to lvl 50 and this script would make it unable to disable it via the command, thus having autoloot till you relog. Also... Seems you never use the atcommand by the useatcmd script command?

We can have that check by following

OnPCBaseLvUpEvent:if (BaseLevel >=50){ atcommand "@autoloot 0";}

thanks for the answer sir, but my another question is when your level are below 50, the autoloot command seems not working and no effect at all

Share this post


Link to post
Share on other sites
  • 0

Try this, a mixture of what everybody said here:

 

-	script	atcmd_example	-1,{OnInit:	bindatcmd "autoloot",strnpcinfo(3)+"::OnAtcommand";	end;OnAtcommand:	if (BaseLevel >= 50)	{		dispbottom "You can't use this command.";	} else {		useatcmd .@atcmd_command$;	}	end;OnPCBaseLvUpEvent:	if (BaseLevel >= 50) {		atcommand "@autoloot 0";	}	end;}

Share this post


Link to post
Share on other sites
  • 0

i already do that sir, but when i type the @autoloot command nothing appear or happen. even when im unload the npc
the autoloot command seems not working, whats wrong with my hercules @_@

 

PS: im using the lastest Hercules

Edited by ZerotoHero

Share this post


Link to post
Share on other sites
  • 0

it's because it's binded, meaning everything that's been in the script, that will be done.

 

the best thing to do is write a plugin to overwrite the command

Share this post


Link to post
Share on other sites
  • 0

it's because it's binded, meaning everything that's been in the script, that will be done.

 

the best thing to do is write a plugin to overwrite the command

Noo,, Script can work well...

 

-	script	atcmd_example	-1,{OnInit:	bindatcmd "autoloot",strnpcinfo(3)+"::OnAtcommand";	end;OnAtcommand:	if (BaseLevel >= 50)	{		dispbottom "You cannot use this command.";	} else {		atcommand "@autoloot "+atoi(.@atcmd_parameters$);	}	end;OnPCBaseLvUpEvent:	if (BaseLevel >= 50) {		atcommand "@autoloot 0";	}	end;}

Share this post


Link to post
Share on other sites
  • 0

I think bindatcmd was not overwriting original cmd  properly, Cause bindatcmd was case sensitive , so it can still 

be used by converting cmd letters to uppercase/lowercase

 

e.g.

@AUToloot 100

 

require modification on atcommand.c to make it non -case -sensitive

 

 

diff --git a/src/map/atcommand.c b/src/map/atcommand.cindex 719b140..2b0770d 100644--- a/src/map/atcommand.c+++ b/src/map/atcommand.c@@ -64,7 +64,7 @@ struct atcmd_binding_data* get_atcommandbind_byname(const char* name) { 	if( *name == atcommand->at_symbol || *name == atcommand->char_symbol ) 		name++; // for backwards compatibility -	ARR_FIND( 0, atcommand->binding_count, i, strcmp(atcommand->binding[i]->command, name) == 0 );+	ARR_FIND( 0, atcommand->binding_count, i, strcmpi(atcommand->binding[i]->command, name) == 0 );  	return ( i < atcommand->binding_count ) ? atcommand->binding[i] : NULL; }

 

 

 

Share this post


Link to post
Share on other sites
  • 0

Well, it could have limitation. :) I have tried it in binding other commands.. But since this topic is regarding autoloot, then it can be done through that workaround.. :)

Share this post


Link to post
Share on other sites
  • 0

I think bindatcmd was not overwriting original cmd  properly, Cause bindatcmd was case sensitive , so it can still 

be used by converting cmd letters to uppercase/lowercase

 

e.g.

@AUToloot 100

 

require modification on atcommand.c to make it non -case -sensitive

 

 

diff --git a/src/map/atcommand.c b/src/map/atcommand.cindex 719b140..2b0770d 100644--- a/src/map/atcommand.c+++ b/src/map/atcommand.c@@ -64,7 +64,7 @@ struct atcmd_binding_data* get_atcommandbind_byname(const char* name) { 	if( *name == atcommand->at_symbol || *name == atcommand->char_symbol ) 		name++; // for backwards compatibility -	ARR_FIND( 0, atcommand->binding_count, i, strcmp(atcommand->binding[i]->command, name) == 0 );+	ARR_FIND( 0, atcommand->binding_count, i, strcmpi(atcommand->binding[i]->command, name) == 0 );  	return ( i < atcommand->binding_count ) ? atcommand->binding[i] : NULL; }

 

 

 

 

Ind fixed strcmpi thing has some time already xD

Share this post


Link to post
Share on other sites
  • 0

 

I think bindatcmd was not overwriting original cmd  properly, Cause bindatcmd was case sensitive , so it can still 

be used by converting cmd letters to uppercase/lowercase

 

e.g.

@AUToloot 100

 

require modification on atcommand.c to make it non -case -sensitive

 

 

diff --git a/src/map/atcommand.c b/src/map/atcommand.cindex 719b140..2b0770d 100644--- a/src/map/atcommand.c+++ b/src/map/atcommand.c@@ -64,7 +64,7 @@ struct atcmd_binding_data* get_atcommandbind_byname(const char* name) { 	if( *name == atcommand->at_symbol || *name == atcommand->char_symbol ) 		name++; // for backwards compatibility -	ARR_FIND( 0, atcommand->binding_count, i, strcmp(atcommand->binding[i]->command, name) == 0 );+	ARR_FIND( 0, atcommand->binding_count, i, strcmpi(atcommand->binding[i]->command, name) == 0 );  	return ( i < atcommand->binding_count ) ? atcommand->binding[i] : NULL; }

 

 

 

 

Ind fixed strcmpi thing has some time already xD

 

Ouch! dunno why my local git master  don't have that commit  I'll check and re-download again

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.