kerbiii 5 Posted November 17, 2013 a script that will put a 5mins cooldown delay on commands such as @warp Quote Share this post Link to post Share on other sites
0 kyeme 71 Posted November 17, 2013 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;} 1 mrlongshen reacted to this Quote Share this post Link to post Share on other sites
0 Shio 0 Posted November 17, 2013 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/ Quote Share this post Link to post Share on other sites
0 kerbiii 5 Posted November 17, 2013 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 1 Shio reacted to this Quote Share this post Link to post Share on other sites
0 Shio 0 Posted November 17, 2013 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 Quote Share this post Link to post Share on other sites
0 kyeme 71 Posted November 17, 2013 (edited) 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 November 17, 2013 by kyeme Changed var @warpdelay to warpdelay 1 kerbiii reacted to this Quote Share this post Link to post Share on other sites
0 Angelmelody 221 Posted November 17, 2013 @kyeme @var -->this type of variable will lost when Character re-login Quote Share this post Link to post Share on other sites
0 kerbiii 5 Posted November 17, 2013 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 Quote Share this post Link to post Share on other sites
0 Patskie 88 Posted November 17, 2013 (edited) - 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 November 17, 2013 by Patskie Quote Share this post Link to post Share on other sites
0 kyeme 71 Posted November 17, 2013 @kyeme @var -->this type of variable will lost when Character re-login Ohh thank you Quote Share this post Link to post Share on other sites
0 kerbiii 5 Posted November 17, 2013 @kyeme @var -->this type of variable will lost when Character re-login Ohh thank you bindatcmd "warp",strnpcinfo(3)+"::OnAtcommand",0,99; what is the use of 0,99 Quote Share this post Link to post Share on other sites
0 Patskie 88 Posted November 17, 2013 ^ *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. 1 kerbiii reacted to this Quote Share this post Link to post Share on other sites
0 kerbiii 5 Posted November 17, 2013 ^ *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 Quote Share this post Link to post Share on other sites
0 mrlongshen 22 Posted November 17, 2013 @kerbii is that script works ? Quote Share this post Link to post Share on other sites
0 kerbiii 5 Posted November 17, 2013 (edited) @kerbii is that script works ? yes it works Edited November 17, 2013 by kerbiii Quote Share this post Link to post Share on other sites
0 kerbiii 5 Posted November 17, 2013 @kyeme @var -->this type of variable will lost when Character re-login Ohh thank you how to set it for group level 2 and below only Quote Share this post Link to post Share on other sites
0 kyeme 71 Posted November 17, 2013 @kyeme @var -->this type of variable will lost when Character re-login Ohh thank you 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 Quote Share this post Link to post Share on other sites
0 mrlongshen 22 Posted November 17, 2013 - 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. Quote Share this post Link to post Share on other sites
0 kerbiii 5 Posted November 17, 2013 @kyeme @var -->this type of variable will lost when Character re-login Ohh thank you 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 Quote Share this post Link to post Share on other sites
0 mrlongshen 22 Posted November 17, 2013 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 ? Quote Share this post Link to post Share on other sites
0 mrlongshen 22 Posted November 17, 2013 @kyeme, now its work. +1 for you. Thanks alot is that possible for @go ? Quote Share this post Link to post Share on other sites
0 kerbiii 5 Posted November 17, 2013 @kyeme if i set gm lvl 2 on that will gm lvl 2 - 99 will bypass that? Quote Share this post Link to post Share on other sites
0 kerbiii 5 Posted November 17, 2013 @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; Quote Share this post Link to post Share on other sites
0 jaBote 438 Posted November 17, 2013 @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. 1 mrlongshen reacted to this Quote Share this post Link to post Share on other sites
0 kerbiii 5 Posted November 17, 2013 (edited) @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 November 17, 2013 by kerbiii 1 mrlongshen reacted to this Quote Share this post Link to post Share on other sites
0 mrlongshen 22 Posted November 17, 2013 @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 Quote Share this post Link to post Share on other sites
a script that will put a 5mins cooldown delay on commands such as @warp
Share this post
Link to post
Share on other sites