Enable command upon reaching a certain 'Base Level'?

Valiente

New member
Messages
90
Points
0
I'm thinking of a script that does this and I have been searching. I couldn't find one!

Anyone has a script that has the same concept?

 
use this 

---------------------------------------*bindatcmd "command","<NPC object name>::<event label>"{,<group level>,<group level char>,<log>};This command will bind a NPC event label to an atcommand. Upon execution of the atcommand, the user will invoke the NPC event label. Each atcommand is only allowed one binding. If you rebind, it will override the original binding. If group level is provided, only users of that group level or above will be able to access the command, if not provided, everyone will be able to access the command."group level char" is the minimum group level required for the label to be used on others like a char command would, e.g. "#command "target" params", when not provided, "group level char" defaults to 99."log" whether to log the usages of this command with the atcommand log (1 = log, 0 = no log), default is to not log.The following variables are set upon execution: .@atcmd_command$ = The name of the @command used. .@atcmd_parameters$[] = Array containing the given parameters, starting from an index of 0. .@atcmd_numparameters = The number of parameters defined.Example:When a user types the command "@test", an angel effect will be shown.- script atcmd_example -1,{OnInit: bindatcmd "test",strnpcinfo(3)+"::OnAtcommand"; end;OnAtcommand: specialeffect2 338; end;}---------------------------------------

there would be limitless possibilities using that command w/o having to edit the source. 

for instance in your case

- script certainlevel -1,{OnInit: bindatcmd "certainlevel",strnpcinfo(3)+"::OnBaseLevel"; end;OnBaseLevel: if(BaseLevel < 10){ end; }; dispbottom "You can use the command"; end;}

if player is lower than level 10, nothing will happen.

 
Last edited by a moderator:
if the player is trying to use the command without reaching the level requirement.. how to add this message?
"you must be level 10 above to use this command"

 
if the player is trying to use the command without reaching the level requirement.. how to add this message?

"you must be level 10 above to use this command"
- script certainlevel -1,{OnInit: bindatcmd "certainlevel",strnpcinfo(3)+"::OnBaseLevel"; end;OnBaseLevel:   if(BaseLevel < 10){ dispbottom "You must be level 10 above to use this command"; end; }; dispbottom "You can use the command"; end;} 


default_ani_meow.gif


 
if the player is trying to use the command without reaching the level requirement.. how to add this message?

"you must be level 10 above to use this command"
- script certainlevel -1,{OnInit: bindatcmd "certainlevel",strnpcinfo(3)+"::OnBaseLevel"; end;OnBaseLevel:   if(BaseLevel < 10){ dispbottom "You must be level 10 above to use this command"; end; }; dispbottom "You can use the command"; end;} 


default_ani_meow.gif
thank you sir.. you're so malufet ^^

 
Back
Top