Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //===== Hercules Script ======================================
- //= @botcheck atcmd
- //===== By ===================================================
- //= True Zeal
- //===== Description ==========================================
- //= Runs @whomap2 on a specified list of maps.
- //===== Comments =============================================
- //= Add maps to '.map$' array in OnInit label.
- //============================================================
- - script Bot Check Command FAKE_NPC,{
- //----- Configuration -----
- OnInit:
- // -----------------------------------------------------------
- // Configuration settings.
- // -----------------------------------------------------------
- .@command_name$ = "botcheck"; // Sets the name of the @command (change 'botcheck' to your liking)
- .gm_level = 20; // Sets the minimum GM level required to use command
- .delay_level = 40; // Sets the minimum GM level required to avoid usage delay
- .delay_time = 15; // Sets the delay time between usage (in seconds)
- //--- Sets the list of maps to run @whomap2 on
- setarray(.map$[0],
- "first_map_name", // Note: Every entry excluding the last one must have a comma!
- "second_map_name",
- "last_map_name" // Note: Last entry must never have a comma!
- );
- bindatcmd("" + .@command_name$ + "", "Bot Check Command::OnAtCommand", gm_level);
- end;
- OnAtCommand:
- if (#bot_chk_delay > gettimetick(2))
- {
- message(strcharinfo(PC_NAME),"Please wait a few more seconds before using the command again.");
- end;
- }
- message(strcharinfo(PC_NAME),"Running bot check...");
- for (.@i = 0; .@i < getarraysize(.map$); ++.@i)
- {
- if (getmapusers("" + .map$[.@i] + ""))
- atcommand("@whomap2 " + .map$[.@i] + "");
- sleep2(30);
- }
- sleep2(200);
- message(strcharinfo(PC_NAME),"Bot check complete.");
- if (getgmlevel() < .delay_level)
- #bot_chk_delay = gettimetick(2) + (.delay_time);
- end;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement