Skip to content

Commit

Permalink
DP | Clean up the code + Bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
Nik0-0 committed Feb 27, 2024
1 parent dfeaadc commit 27b689b
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 59 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ $say $(bot_name) $(id) $(map)
$execute unless entity @e[tag=$(bot_name)] run scoreboard players set spawn nn_nextbot_spawn $(id)
$tp @e[tag=$(bot_name)_z,tag=!done] @e[tag=$(map),limit=1,sort=random]
$tag @e[tag=$(bot_name)_z,tag=!done] add done
function nnb_spawnsystem:map_detect
schedule function nnb_spawnsystem:map_detect 30t
116 changes: 58 additions & 58 deletions nnb_spawnsystem/main.jmc
Original file line number Diff line number Diff line change
Expand Up @@ -113,63 +113,63 @@ switch(nn_map:map) {

//Spawn Bots based on map stuff
function call_bots() {
//$say "Map: $(sel_map)";
$execute if score spawn nn_spawn matches 1 run function nnb_spawnsystem:setup_bots {"bot_name":"metal_pipe","id":"1","map":"$(sel_map)"};
$execute if score spawn nn_spawn matches 2 run function nnb_spawnsystem:setup_bots {"bot_name":"toob","id":"2","map":"$(sel_map)"};
$execute if score spawn nn_spawn matches 3 run function nnb_spawnsystem:setup_bots {"bot_name":"crying_sans","id":"3","map":"$(sel_map)"};
$execute if score spawn nn_spawn matches 4 run function nnb_spawnsystem:setup_bots {"bot_name":"pbj","id":"4","map":"$(sel_map)"};
$execute if score spawn nn_spawn matches 5 run function nnb_spawnsystem:setup_bots {"bot_name":"smile_ghost","id":"5","map":"$(sel_map)"};
$execute if score spawn nn_spawn matches 6 run function nnb_spawnsystem:setup_bots {"bot_name":"idiot","id":"6","map":"$(sel_map)"};
$execute if score spawn nn_spawn matches 7 run function nnb_spawnsystem:setup_bots {"bot_name":"ohl","id":"7","map":"$(sel_map)"};
$execute if score spawn nn_spawn matches 8 run function nnb_spawnsystem:setup_bots {"bot_name":"meem","id":"8","map":"$(sel_map)"};
$execute if score spawn nn_spawn matches 9 run function nnb_spawnsystem:setup_bots {"bot_name":"nope","id":"9","map":"$(sel_map)"};
$execute if score spawn nn_spawn matches 10 run function nnb_spawnsystem:setup_bots {"bot_name":"noob","id":"10","map":"$(sel_map)"};
$execute if score spawn nn_spawn matches 11 run function nnb_spawnsystem:setup_bots {"bot_name":"observer","id":"11","map":"$(sel_map)"};
$execute if score spawn nn_spawn matches 12 run function nnb_spawnsystem:setup_bots {"bot_name":"benny","id":"12","map":"$(sel_map)"};
$execute if score spawn nn_spawn matches 13 run function nnb_spawnsystem:setup_bots {"bot_name":"racoon","id":"13","map":"$(sel_map)"};
$execute if score spawn nn_spawn matches 14 run function nnb_spawnsystem:setup_bots {"bot_name":"fazmug","id":"14","map":"$(sel_map)"};
$execute if score spawn nn_spawn matches 15 run function nnb_spawnsystem:setup_bots {"bot_name":"donot","id":"15","map":"$(sel_map)"};
$execute if score spawn nn_spawn matches 16 run function nnb_spawnsystem:setup_bots {"bot_name":"bear5","id":"16","map":"$(sel_map)"};
$execute if score spawn nn_spawn matches 17 run function nnb_spawnsystem:setup_bots {"bot_name":"blabber","id":"17","map":"$(sel_map)"};
$execute if score spawn nn_spawn matches 18 run function nnb_spawnsystem:setup_bots {"bot_name":"chilly","id":"18","map":"$(sel_map)"};
$execute if score spawn nn_spawn matches 19 run function nnb_spawnsystem:setup_bots {"bot_name":"smurf_cat","id":"19","map":"$(sel_map)"};
$execute if score spawn nn_spawn matches 20 run function nnb_spawnsystem:setup_bots {"bot_name":"intruder","id":"20","map":"$(sel_map)"};
$execute if score spawn nn_spawn matches 21 run function nnb_spawnsystem:setup_bots {"bot_name":"jet","id":"21","map":"$(sel_map)"};
$execute if score spawn nn_spawn matches 22 run function nnb_spawnsystem:setup_bots {"bot_name":"darkness","id":"22","map":"$(sel_map)"};
$execute if score spawn nn_spawn matches 23 run function nnb_spawnsystem:setup_bots {"bot_name":"bear","id":"23","map":"$(sel_map)"};
$execute if score spawn nn_spawn matches 24 run function nnb_spawnsystem:setup_bots {"bot_name":"litlle_gerry","id":"24","map":"$(sel_map)"};
$execute if score spawn nn_spawn matches 26 run function nnb_spawnsystem:setup_bots {"bot_name":"fan","id":"26","map":"$(sel_map)"};
$execute if score spawn nn_spawn matches 27 run function nnb_spawnsystem:setup_bots {"bot_name":"boykisser","id":"27","map":"$(sel_map)"};
$execute if score spawn nn_spawn matches 28 run function nnb_spawnsystem:setup_bots {"bot_name":"subspace_tripmine","id":"28","map":"$(sel_map)"};
$execute if score spawn nn_spawn matches 29 run function nnb_spawnsystem:setup_bots {"bot_name":"nothing","id":"29","map":"$(sel_map)"};
$execute if score spawn nn_spawn matches 30 run function nnb_spawnsystem:setup_bots {"bot_name":"nuke","id":"30","map":"$(sel_map)"};
$execute if score spawn nn_spawn matches 31 run function nnb_spawnsystem:setup_bots {"bot_name":"flash","id":"31","map":"$(sel_map)"};
$execute if score spawn nn_spawn matches 32 run function nnb_spawnsystem:setup_bots {"bot_name":"osc","id":"32","map":"$(sel_map)"};
$execute if score spawn nn_spawn matches 33 run function nnb_spawnsystem:setup_bots {"bot_name":"cb","id":"33","map":"$(sel_map)"};
$execute if score spawn nn_spawn matches 34 run function nnb_spawnsystem:setup_bots {"bot_name":"dragon","id":"34","map":"$(sel_map)"};
$execute if score spawn nn_spawn matches 35 run function nnb_spawnsystem:setup_bots {"bot_name":"carter","id":"35","map":"$(sel_map)"};
$execute if score spawn nn_spawn matches 36 run function nnb_spawnsystem:setup_bots {"bot_name":"shroom","id":"36","map":"$(sel_map)"};
$execute if score spawn nn_spawn matches 37 run function nnb_spawnsystem:setup_bots {"bot_name":"grumbo","id":"37","map":"$(sel_map)"};
$execute if score spawn nn_spawn matches 38 run function nnb_spawnsystem:setup_bots {"bot_name":"giggle","id":"38","map":"$(sel_map)"};
$execute if score spawn nn_spawn matches 39 run function nnb_spawnsystem:setup_bots {"bot_name":"rei","id":"39","map":"$(sel_map)"};
$execute if score spawn nn_spawn matches 40 run function nnb_spawnsystem:setup_bots {"bot_name":"ico","id":"40","map":"$(sel_map)"};
$execute if score spawn nn_spawn matches 41 run function nnb_spawnsystem:setup_bots {"bot_name":"leorio","id":"41","map":"$(sel_map)"};
$execute if score spawn nn_spawn matches 42 run function nnb_spawnsystem:setup_bots {"bot_name":"mohu","id":"42","map":"$(sel_map)"};
$execute if score spawn nn_spawn matches 43 run function nnb_spawnsystem:setup_bots {"bot_name":"jack","id":"43","map":"$(sel_map)"};
$execute if score spawn nn_spawn matches 44 run function nnb_spawnsystem:setup_bots {"bot_name":"unfortunate","id":"44","map":"$(sel_map)"};
$execute if score spawn nn_spawn matches 45 run function nnb_spawnsystem:setup_bots {"bot_name":"lolguy","id":"45","map":"$(sel_map)"};
$execute if score spawn nn_spawn matches 46 run function nnb_spawnsystem:setup_bots {"bot_name":"smiler","id":"46","map":"$(sel_map)"};
$execute if score spawn nn_spawn matches 47 run function nnb_spawnsystem:setup_bots {"bot_name":"boba","id":"47","map":"$(sel_map)"};
$execute if score spawn nn_spawn matches 48 run function nnb_spawnsystem:setup_bots {"bot_name":"squewe","id":"48","map":"$(sel_map)"};
$execute if score spawn nn_spawn matches 49 run function nnb_spawnsystem:setup_bots {"bot_name":"ccat","id":"49","map":"$(sel_map)"};
$execute if score spawn nn_spawn matches 50 run function nnb_spawnsystem:setup_bots {"bot_name":"andy","id":"50","map":"$(sel_map)"};
$execute if score spawn nn_spawn matches 51 run function nnb_spawnsystem:setup_bots {"bot_name":"inhabitant","id":"51","map":"$(sel_map)"};
$execute if score spawn nn_spawn matches 52 run function nnb_spawnsystem:setup_bots {"bot_name":"leoret","id":"52","map":"$(sel_map)"};
$execute if score spawn nn_spawn matches 53 run function nnb_spawnsystem:setup_bots {"bot_name":"dread","id":"53","map":"$(sel_map)"};
$execute if score spawn nn_spawn matches 54 run function nnb_spawnsystem:setup_bots {"bot_name":"catnap","id":"54","map":"$(sel_map)"};
$execute if score spawn nn_spawn matches 55 run function nnb_spawnsystem:setup_bots {"bot_name":"mrl","id":"55","map":"$(sel_map)"};
$execute if score spawn nn_spawn matches 56 run function nnb_spawnsystem:setup_bots {"bot_name":"trespasser","id":"56","map":"$(sel_map)"};
$execute if score spawn nn_spawn matches 57 run function nnb_spawnsystem:setup_bots {"bot_name":"anim8or","id":"57","map":"$(sel_map)"};
//$say "Map: $(sel_map)";
$execute if score spawn nn_spawn matches 1 run function nnb_spawnsystem:setup_bots {"bot_name":"metal_pipe","id":"1","map":"$(sel_map)"};
$execute if score spawn nn_spawn matches 2 run function nnb_spawnsystem:setup_bots {"bot_name":"toob","id":"2","map":"$(sel_map)"};
$execute if score spawn nn_spawn matches 3 run function nnb_spawnsystem:setup_bots {"bot_name":"crying_sans","id":"3","map":"$(sel_map)"};
$execute if score spawn nn_spawn matches 4 run function nnb_spawnsystem:setup_bots {"bot_name":"pbj","id":"4","map":"$(sel_map)"};
$execute if score spawn nn_spawn matches 5 run function nnb_spawnsystem:setup_bots {"bot_name":"smile_ghost","id":"5","map":"$(sel_map)"};
$execute if score spawn nn_spawn matches 6 run function nnb_spawnsystem:setup_bots {"bot_name":"idiot","id":"6","map":"$(sel_map)"};
$execute if score spawn nn_spawn matches 7 run function nnb_spawnsystem:setup_bots {"bot_name":"ohl","id":"7","map":"$(sel_map)"};
$execute if score spawn nn_spawn matches 8 run function nnb_spawnsystem:setup_bots {"bot_name":"meem","id":"8","map":"$(sel_map)"};
$execute if score spawn nn_spawn matches 9 run function nnb_spawnsystem:setup_bots {"bot_name":"nope","id":"9","map":"$(sel_map)"};
$execute if score spawn nn_spawn matches 10 run function nnb_spawnsystem:setup_bots {"bot_name":"noob","id":"10","map":"$(sel_map)"};
$execute if score spawn nn_spawn matches 11 run function nnb_spawnsystem:setup_bots {"bot_name":"observer","id":"11","map":"$(sel_map)"};
$execute if score spawn nn_spawn matches 12 run function nnb_spawnsystem:setup_bots {"bot_name":"benny","id":"12","map":"$(sel_map)"};
$execute if score spawn nn_spawn matches 13 run function nnb_spawnsystem:setup_bots {"bot_name":"racoon","id":"13","map":"$(sel_map)"};
$execute if score spawn nn_spawn matches 14 run function nnb_spawnsystem:setup_bots {"bot_name":"fazmug","id":"14","map":"$(sel_map)"};
$execute if score spawn nn_spawn matches 15 run function nnb_spawnsystem:setup_bots {"bot_name":"donot","id":"15","map":"$(sel_map)"};
$execute if score spawn nn_spawn matches 16 run function nnb_spawnsystem:setup_bots {"bot_name":"bear5","id":"16","map":"$(sel_map)"};
$execute if score spawn nn_spawn matches 17 run function nnb_spawnsystem:setup_bots {"bot_name":"blabber","id":"17","map":"$(sel_map)"};
$execute if score spawn nn_spawn matches 18 run function nnb_spawnsystem:setup_bots {"bot_name":"chilly","id":"18","map":"$(sel_map)"};
$execute if score spawn nn_spawn matches 19 run function nnb_spawnsystem:setup_bots {"bot_name":"smurf_cat","id":"19","map":"$(sel_map)"};
$execute if score spawn nn_spawn matches 20 run function nnb_spawnsystem:setup_bots {"bot_name":"intruder","id":"20","map":"$(sel_map)"};
$execute if score spawn nn_spawn matches 21 run function nnb_spawnsystem:setup_bots {"bot_name":"jet","id":"21","map":"$(sel_map)"};
$execute if score spawn nn_spawn matches 22 run function nnb_spawnsystem:setup_bots {"bot_name":"darkness","id":"22","map":"$(sel_map)"};
$execute if score spawn nn_spawn matches 23 run function nnb_spawnsystem:setup_bots {"bot_name":"bear","id":"23","map":"$(sel_map)"};
$execute if score spawn nn_spawn matches 24 run function nnb_spawnsystem:setup_bots {"bot_name":"litlle_gerry","id":"24","map":"$(sel_map)"};
$execute if score spawn nn_spawn matches 26 run function nnb_spawnsystem:setup_bots {"bot_name":"fan","id":"26","map":"$(sel_map)"};
$execute if score spawn nn_spawn matches 27 run function nnb_spawnsystem:setup_bots {"bot_name":"boykisser","id":"27","map":"$(sel_map)"};
$execute if score spawn nn_spawn matches 28 run function nnb_spawnsystem:setup_bots {"bot_name":"subspace_tripmine","id":"28","map":"$(sel_map)"};
$execute if score spawn nn_spawn matches 29 run function nnb_spawnsystem:setup_bots {"bot_name":"nothing","id":"29","map":"$(sel_map)"};
$execute if score spawn nn_spawn matches 30 run function nnb_spawnsystem:setup_bots {"bot_name":"nuke","id":"30","map":"$(sel_map)"};
$execute if score spawn nn_spawn matches 31 run function nnb_spawnsystem:setup_bots {"bot_name":"flash","id":"31","map":"$(sel_map)"};
$execute if score spawn nn_spawn matches 32 run function nnb_spawnsystem:setup_bots {"bot_name":"osc","id":"32","map":"$(sel_map)"};
$execute if score spawn nn_spawn matches 33 run function nnb_spawnsystem:setup_bots {"bot_name":"cb","id":"33","map":"$(sel_map)"};
$execute if score spawn nn_spawn matches 34 run function nnb_spawnsystem:setup_bots {"bot_name":"dragon","id":"34","map":"$(sel_map)"};
$execute if score spawn nn_spawn matches 35 run function nnb_spawnsystem:setup_bots {"bot_name":"carter","id":"35","map":"$(sel_map)"};
$execute if score spawn nn_spawn matches 36 run function nnb_spawnsystem:setup_bots {"bot_name":"shroom","id":"36","map":"$(sel_map)"};
$execute if score spawn nn_spawn matches 37 run function nnb_spawnsystem:setup_bots {"bot_name":"grumbo","id":"37","map":"$(sel_map)"};
$execute if score spawn nn_spawn matches 38 run function nnb_spawnsystem:setup_bots {"bot_name":"giggle","id":"38","map":"$(sel_map)"};
$execute if score spawn nn_spawn matches 39 run function nnb_spawnsystem:setup_bots {"bot_name":"rei","id":"39","map":"$(sel_map)"};
$execute if score spawn nn_spawn matches 40 run function nnb_spawnsystem:setup_bots {"bot_name":"ico","id":"40","map":"$(sel_map)"};
$execute if score spawn nn_spawn matches 41 run function nnb_spawnsystem:setup_bots {"bot_name":"leorio","id":"41","map":"$(sel_map)"};
$execute if score spawn nn_spawn matches 42 run function nnb_spawnsystem:setup_bots {"bot_name":"mohu","id":"42","map":"$(sel_map)"};
$execute if score spawn nn_spawn matches 43 run function nnb_spawnsystem:setup_bots {"bot_name":"jack","id":"43","map":"$(sel_map)"};
$execute if score spawn nn_spawn matches 44 run function nnb_spawnsystem:setup_bots {"bot_name":"unfortunate","id":"44","map":"$(sel_map)"};
$execute if score spawn nn_spawn matches 45 run function nnb_spawnsystem:setup_bots {"bot_name":"lolguy","id":"45","map":"$(sel_map)"};
$execute if score spawn nn_spawn matches 46 run function nnb_spawnsystem:setup_bots {"bot_name":"smiler","id":"46","map":"$(sel_map)"};
$execute if score spawn nn_spawn matches 47 run function nnb_spawnsystem:setup_bots {"bot_name":"boba","id":"47","map":"$(sel_map)"};
$execute if score spawn nn_spawn matches 48 run function nnb_spawnsystem:setup_bots {"bot_name":"squewe","id":"48","map":"$(sel_map)"};
$execute if score spawn nn_spawn matches 49 run function nnb_spawnsystem:setup_bots {"bot_name":"ccat","id":"49","map":"$(sel_map)"};
$execute if score spawn nn_spawn matches 50 run function nnb_spawnsystem:setup_bots {"bot_name":"andy","id":"50","map":"$(sel_map)"};
$execute if score spawn nn_spawn matches 51 run function nnb_spawnsystem:setup_bots {"bot_name":"inhabitant","id":"51","map":"$(sel_map)"};
$execute if score spawn nn_spawn matches 52 run function nnb_spawnsystem:setup_bots {"bot_name":"leoret","id":"52","map":"$(sel_map)"};
$execute if score spawn nn_spawn matches 53 run function nnb_spawnsystem:setup_bots {"bot_name":"dread","id":"53","map":"$(sel_map)"};
$execute if score spawn nn_spawn matches 54 run function nnb_spawnsystem:setup_bots {"bot_name":"catnap","id":"54","map":"$(sel_map)"};
$execute if score spawn nn_spawn matches 55 run function nnb_spawnsystem:setup_bots {"bot_name":"mrl","id":"55","map":"$(sel_map)"};
$execute if score spawn nn_spawn matches 56 run function nnb_spawnsystem:setup_bots {"bot_name":"trespasser","id":"56","map":"$(sel_map)"};
$execute if score spawn nn_spawn matches 57 run function nnb_spawnsystem:setup_bots {"bot_name":"anim8or","id":"57","map":"$(sel_map)"};
}

// Universal spawn bot stuff
Expand All @@ -178,7 +178,7 @@ function setup_bots() {
$execute unless entity @e[tag=$(bot_name)] run scoreboard players set spawn nn_nextbot_spawn $(id);
$tp @e[tag=$(bot_name)_z,tag=!done] @e[tag=$(map),limit=1,sort=random];
$tag @e[tag=$(bot_name)_z,tag=!done] add done;
map_detect();
schedule function map_detect() 30t;
}


Expand Down

0 comments on commit 27b689b

Please sign in to comment.