Tribals.io spawner

Script to spawn tools, items, and players in Tribals.io game using Tampermonkey.

  1. // ==UserScript==
  2. // @name Tribals.io spawner
  3. // @namespace http://tampermonkey.net/
  4. // @version 1.0
  5. // @description Script to spawn tools, items, and players in Tribals.io game using Tampermonkey.
  6. // @author lauti/lilbubble
  7. // @match https://tribals.io/*
  8. // @grant none
  9. // @license MIT
  10. // ==/UserScript==
  11.  
  12. /**
  13. * Function to spawn a tool, item, or player in Tribals.io game.
  14. *
  15. * @param {string} type - The type of object to spawn (tool, item, or player).
  16. * @param {string} name - The name of the object to spawn.
  17. * @returns {void}
  18. */
  19. function spawnObject(type, name) {
  20. // Check if the type is valid
  21. if (type !== "tool" && type !== "item" && type !== "player") {
  22. console.error("Invalid object type. Please choose 'tool', 'item', or 'player'.");
  23. return;
  24. }
  25.  
  26. // Check if the name is provided
  27. if (!name) {
  28. console.error("Please provide the name of the object to spawn.");
  29. return;
  30. }
  31.  
  32. // Spawn the object based on the type and name
  33. switch (type) {
  34. case "tool":
  35. spawnTool(name);
  36. break;
  37. case "item":
  38. spawnItem(name);
  39. break;
  40. case "player":
  41. spawnPlayer(name);
  42. break;
  43. }
  44. }
  45.  
  46. /**
  47. * Function to spawn a tool in Tribals.io game.
  48. *
  49. * @param {string} toolName - The name of the tool to spawn.
  50. * @returns {void}
  51. */
  52. function spawnTool(toolName) {
  53. // Code to spawn the tool in the game
  54. console.log(`Spawning tool: ${toolName}`);
  55. }
  56.  
  57. /**
  58. * Function to spawn an item in Tribals.io game.
  59. *
  60. * @param {string} itemName - The name of the item to spawn.
  61. * @returns {void}
  62. */
  63. function spawnItem(itemName) {
  64. // Code to spawn the item in the game
  65. console.log(`Spawning item: ${itemName}`);
  66. }
  67.  
  68. /**
  69. * Function to spawn a player in Tribals.io game.
  70. *
  71. * @param {string} playerName - The name of the player to spawn.
  72. * @returns {void}
  73. */
  74. function spawnPlayer(playerName) {
  75. // Code to spawn the player in the game
  76. console.log(`Spawning player: ${playerName}`);
  77. }
  78.  
  79. // Usage Example
  80.  
  81. // Spawn a tool
  82. spawnObject("tool", "hammer");
  83.  
  84. // Spawn an item
  85. spawnObject("item", "health potion");
  86.  
  87. // Spawn a player
  88. spawnObject("player", "John Doe");

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址