-#Script made by Rosstail - -#SPAWN RANDOM NPCS spawn_random_npcs: type: task debug: false script: - #CHOOSE THE MINIUM AND MAXIMUM AMOUNT OF NPCS SPAWNED IN A ROW - - flag global min_spawn:3 - - flag global max_spawn:7 - ###############################################" - - flag global debug_spawn:off - - flag global nb_spawn:].to[]> - - flag global nb_spawn_ds: - - while { - - run npc_name_choose instantly - - flag global spawn_no%loop_index%: - - execute as_server "npc spawn " - - flag global nb_spawn:-- - } -#DELETE THE RANDOMLY SPAWNED NPCS + #CHOOSE THE FORK OF NPC SPAWNED AS SAME TIME + - define min_npc 3.0 + - define max_npc 7.0 + ############################################### + - flag server nb_npc_st:].to[]> + - flag server nb_npc_sp: + - while : + #CHOOSE THE FORK OF NPC'S ID + - define min_id 0 + - define max_id 29 + - define ids ].to[]> + ########################################## + - flag server npc_no_: + - execute as_server "npc spawn " + - flag server nb_npc_sp:-- + delete_random_npcs: type: task debug: false script: - - flag global debug_spawn:off - - while { - - despawn - - flag global nb_spawn_ds:-- - } + - flag server nb_npc_ds: + - while : + - execute as_server "npc despawn ]>" + - flag server nb_npc_ds:-- + - - flag global nb_spawn:0 - -#PUT ALL THE NAMES YOU WANT -npc_name_choose: - type: task - debug: false - script: - - choose "": - #WHEN THE DEBUG MODE IS OFF - - case "off": - - random: - #REPEAT THESES FLAGS FOR EACH NPC YOU WANT - - flag global npc_name: - - flag global npc_name: - #WHEN THE DEBUG MODE IS ON - - case "on": - #REPEAT THESES FLAGS FOR EACH NPC YOU WANT - - despawn - - despawn - etc... - -#DELETE CURRENT NPS AND SPAWN ANOTHER EACH HOURS actions_npcs: type: world debug: false events: on system time hourly: - run delete_random_npcs instantly - wait 10s - run spawn_random_npcs instantly - -#IF ONE DAY TOO MANY NPCS ARE SPAWNED IN THE SAME TIME -debug_npc: - type: world - debug: false - events: - on server start: - #PUT IT "ON" TO DESPAWN ALL NPCS AFTER A SERVER RESTART - - flag global debug_spawn:off - - run npc_name_choose instantly - #DON'T TOUCH THIS - - flag global debug_spawn:off