Jump to content
  • 0
Sign in to follow this  
kerbiii

Help with this script please

Question

26 answers to this question

Recommended Posts

  • 0

haha, Im also the gm cant warp. need to wait for 5 minute. T_T

i want to be use on my player only. how to adjust ?

Here

 

-	script	atcmd_warpdelay	-1,{OnInit:	bindatcmd "warp",strnpcinfo(3)+"::OnAtcommand",0,99;	end;OnAtcommand:	set .@min,5;	//delay in mins	set .@gmlvl,99;	// GM lvl to bypass the delay	set .@delay,.@min * 60;	if (warpdelay > gettimetick(2) && getgmlevel() < .@gmlvl) {		set .@delaytime,warpdelay - gettimetick(2);		message strcharinfo(0),"You must wait "+.@delaytime+" seconds to use this command again.";		end;	}	setarray .@param$,.@atcmd_parameters$[0],.@atcmd_parameters$[1],.@atcmd_parameters$[2];	set .@map$,implode(.@param$," ");	atcommand "@warp "+.@map$+"";	set warpdelay,gettimetick(2) + .@delay;	end;}

Share this post


Link to post
Share on other sites
  • 0

a script that will put a 5mins cooldown delay on commands such as @warp

hmm i don't think this could be added as a script and if it could i do not know how. But cydh made and src edit for it. But i'm not 100% sure if it work's on Hercules SVN. Make a back up and try it out.

 

http://rathena.org/board/topic/83569-delay-to-use-command/

Share this post


Link to post
Share on other sites
  • 0

 

a script that will put a 5mins cooldown delay on commands such as @warp

hmm i don't think this could be added as a script and if it could i do not know how. But cydh made and src edit for it. But i'm not 100% sure if it work's on Hercules SVN. Make a back up and try it out.

 

http://rathena.org/board/topic/83569-delay-to-use-command/

is that specific chosen commands or all commands? will try it now

Share this post


Link to post
Share on other sites
  • 0

 

 

a script that will put a 5mins cooldown delay on commands such as @warp

hmm i don't think this could be added as a script and if it could i do not know how. But cydh made and src edit for it. But i'm not 100% sure if it work's on Hercules SVN. Make a back up and try it out.

 

http://rathena.org/board/topic/83569-delay-to-use-command/

is that specific chosen commands or all commands? will try it now

Pretty sure it's all commands, not positive as to i've not used it on my SVN but do let me know ;O

Share this post


Link to post
Share on other sites
  • 0

a script that will put a 5mins cooldown delay on commands such as @warp

 

-	script	atcmd_warpdelay	-1,{OnInit:	bindatcmd "warp",strnpcinfo(3)+"::OnAtcommand",0,99;	end;OnAtcommand:	set .@min,5;	//delay in mins	set .@delay,.@min * 60;	if (warpdelay > gettimetick(2)) {		set .@delaytime,warpdelay - gettimetick(2);		message strcharinfo(0),"You must wait "+.@delaytime+" seconds to use this command again.";		end;	}	setarray .@param$,.@atcmd_parameters$[0],.@atcmd_parameters$[1],.@atcmd_parameters$[2];	set .@map$,implode(.@param$," ");	atcommand "@warp "+.@map$+"";	set warpdelay,gettimetick(2) + .@delay;	end;}
Edited by kyeme
Changed var @warpdelay to warpdelay

Share this post


Link to post
Share on other sites
  • 0

help fix this script

 

 

- script warpdelay -1,{
if(getgroupid()<2) end;
OnInit:
bindatcmd "@warp",strnpcinfo(0)+"::OnCommand";
end;
OnCommand:
if(gettimetick(2) < cooldowntime ){
dispbottom "Please wait 5 minutes to use @warp again!";
end;
}
atcommand "@warp";
set cooldowntime,gettimetick(2)+300;
end;
}

 

 

everytime i use @warp prontera

 

i receive the message "Please enter a map (usage: @warp/@rura/@mapmove <mapname> <x> <y>)

then i cant use the command for 5mins,

so the delay is working but the command @warp is not working properly anymore

Share this post


Link to post
Share on other sites
  • 0
-	script	Sample	-1,{    OnInit:        bindatcmd "warp",strnpcinfo(3)+"::OnWarp";        end;    OnWarp:        if ( gettimetick(2) < delay ) {            dispbottom "Time left before you can use @warp : " +(delay - gettimetick(2))+ " seconds.";            end;        }        if ( .@atcmd_numparameters > 3 || !.@atcmd_numparameters ) {            dispbottom "Usage : @warp <map name>,<x>,<y>";            end;        }        atcommand "@warp " +implode(.@atcmd_parameters$, " ");        delay = gettimetick(2) + 100; // add 100 seconds delay        end;}
Edited by Patskie

Share this post


Link to post
Share on other sites
  • 0

 

@kyeme

 

 

@var -->this type of variable will  lost  when Character re-login

Ohh thank you :D

bindatcmd "warp",strnpcinfo(3)+"::OnAtcommand",0,99;

 

what is the use of  0,99

Share this post


Link to post
Share on other sites
  • 0

^

*bindatcmd "command","<NPC object name>::<event label>"{,<group level>,<group level char>,<log>};

You can also disregard the 0,99 part since the @warp command is used by all users ( normal players or not )  in most private servers.

Share this post


Link to post
Share on other sites
  • 0

^

*bindatcmd "command","<NPC object name>::<event label>"{,<group level>,<group level char>,<log>};

You can also disregard the 0,99 part since the @warp command is used by all users ( normal players or not )  in most private servers.

i see thanks

Share this post


Link to post
Share on other sites
  • 0

 

 

@kyeme

 

 

@var -->this type of variable will  lost  when Character re-login

Ohh thank you :D

how to set it for group level 2 and below only

Here:

 

bindatcmd "warp",strnpcinfo(3)+"::OnAtcommand",2,99;

 

99 is for Group lvl 99.. you can control the player for example: #warp kerbii prontera

Share this post


Link to post
Share on other sites
  • 0

 

-	script	Sample	-1,{    OnInit:        bindatcmd "warp",strnpcinfo(3)+"::OnWarp";        end;    OnWarp:        if ( gettimetick(2) < delay ) {            dispbottom "Time left before you can use @warp : " +(delay - gettimetick(2))+ " seconds.";            end;        }        if ( .@atcmd_numparameters > 3 || !.@atcmd_numparameters ) {            dispbottom "Usage : @warp <map name>,<x>,<y>";            end;        }        atcommand "@warp " +implode(.@atcmd_parameters$, " ");        delay = gettimetick(2) + 100; // add 100 seconds delay        end;}

 

i try this and my client crash.

Share this post


Link to post
Share on other sites
  • 0

 

 

 

@kyeme

 

 

@var -->this type of variable will  lost  when Character re-login

Ohh thank you :D

how to set it for group level 2 and below only

Here:

 

bindatcmd "warp",strnpcinfo(3)+"::OnAtcommand",2,99;

 

99 is for Group lvl 99.. you can control the player for example: #warp kerbii prontera

i change it and only my gm 99 is not able to warp but the regular account can warp muultiple times

Share this post


Link to post
Share on other sites
  • 0

@kyeme, now its work.

+1 for you. Thanks alot :)

is that possible for @go ?

- script atcmd_godelay -1,{

OnInit:

bindatcmd "go",strnpcinfo(3)+"::OnAtcommand",0;

end;

OnAtcommand:

set .@min,1; //delay in mins

set .@gmlvl,2; // GM lvl to bypass the delay

set .@delay,.@min * 60;

if (@godelay > gettimetick(2)) && getgmlevel() < .@gmlvl) {

set .@delaytime,@godelay - gettimetick(2);

message strcharinfo(0),"You must wait "+.@delaytime+" seconds to use this command again.";

end;

}

setarray .@param$,.@atcmd_parameters$[0],.@atcmd_parameters$[1],.@atcmd_parameters$[2];

set .@map$,implode(.@param$," ");

atcommand "@go "+.@map$+"";

set @godelay,gettimetick(2) + .@delay;

end;

Share this post


Link to post
Share on other sites
  • 0

@kyeme, now its work.

+1 for you. Thanks alot :)

is that possible for @go ?

Yes, just copy that script and bind @go with very few modifications.

 

 

@kyeme if i set gm lvl 2 on that will gm lvl 2 - 99 will bypass that?

Yes.

Share this post


Link to post
Share on other sites
  • 0

 

@kyeme, now its work.

+1 for you. Thanks alot :)

is that possible for @go ?

- script atcmd_godelay -1,{

OnInit:
bindatcmd "go",strnpcinfo(3)+"::OnAtcommand",0,99;
end;
 
OnAtcommand:
set .@min,1; //delay in mins
set .@gmlvl,2; // GM lvl to bypass the delay
set .@delay,.@min * 60;
if (godelay > gettimetick(2) && getgmlevel() < .@gmlvl) {
set .@delaytime,godelay - gettimetick(2);
message strcharinfo(0),"You must wait "+.@delaytime+" seconds to use this command again.";
end;
}
setarray .@param$,.@atcmd_parameters$[0],.@atcmd_parameters$[1],.@atcmd_parameters$[2];
set .@map$,implode(.@param$," ");
atcommand "@go "+.@map$+"";
set godelay,gettimetick(2) + .@delay;
end;
}

here for @go i just edit it :)

Edited by kerbiii

Share this post


Link to post
Share on other sites
  • 0

 

 

@kyeme, now its work.

+1 for you. Thanks alot :)

is that possible for @go ?

- script atcmd_godelay -1,{

OnInit:

bindatcmd "go",strnpcinfo(3)+"::OnAtcommand",0;

end;

OnAtcommand:

set .@min,1; //delay in mins

set .@gmlvl,2; // GM lvl to bypass the delay

set .@delay,.@min * 60;

if (@godelay > gettimetick(2)) && getgmlevel() < .@gmlvl) {

set .@delaytime,@godelay - gettimetick(2);

message strcharinfo(0),"You must wait "+.@delaytime+" seconds to use this command again.";

end;

}

setarray .@param$,.@atcmd_parameters$[0],.@atcmd_parameters$[1],.@atcmd_parameters$[2];

set .@map$,implode(.@param$," ");

atcommand "@go "+.@map$+"";

set @godelay,gettimetick(2) + .@delay;

end;

here for @go i just edit it :)

 

thx alot :)

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...
Sign in to follow this  

×
×
  • Create New...

Important Information

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