roninator2

Resource Gathering

May 24th, 2026 (edited)
145
0
Never
4
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 16.57 KB | Gaming | 0 0
  1. # ╔═══════════════════════════════════════════════╦════════════════════╗
  2. # ║ Title: Resource Gathering                     ║  Version: 1.02     ║
  3. # ║ Author: Roninator2                            ║                    ║
  4. # ╠═══════════════════════════════════════════════╬════════════════════╣
  5. # ║ Function:                                     ║   Date Created     ║
  6. # ║                                               ╠════════════════════╣
  7. # ║   Script Function                             ║    25 May 2026     ║
  8. # ╚═══════════════════════════════════════════════╩════════════════════╝
  9. # ╔════════════════════════════════════════════════════════════════════╗
  10. # ║ Requires: nil                                                      ║
  11. # ║                                                                    ║
  12. # ╚════════════════════════════════════════════════════════════════════╝
  13. # ╔════════════════════════════════════════════════════════════════════╗
  14. # ║ Brief Description:                                                 ║
  15. # ║       Mining, Forestry, Herbology, Fishing?                        ║
  16. # ╚════════════════════════════════════════════════════════════════════╝
  17. # ╔════════════════════════════════════════════════════════════════════╗
  18. # ║ Instructions:                                                      ║
  19. # ║  This is a System for gathering resources which you can            ║
  20. # ║    use to craft items or smith items or consume.                   ║
  21. # ║  Whatever you are able to use it for. Items only                   ║
  22. # ║                                                                    ║
  23. # ║  All values are in positives                                       ║
  24. # ║  A 75 for chance is 75%                                            ║
  25. # ║                                                                    ║
  26. # ║  Add the following in a script call in the event to perform the    ║
  27. # ║   mining/gathering task                                            ║
  28. # ║     # Events - Script call                                         ║
  29. # ║     <gather mine: mine, single, true, 21, 22, 25>                  ║
  30. # ║   This will specify the mining ability and list the items          ║
  31. # ║   that can be obtained.                                            ║
  32. # ║   Single refers to only gathering a single item                    ║
  33. # ║   Multi refers to gathering multiple item                          ║
  34. # ║     This is not multiple of the one item but multiple of           ║
  35. # ║     the items listed in teh script call (randomly selected)        ║
  36. # ║    <gather mine: fish, single, 41, 42, 45>                         ║
  37. # ║     gets a chance to receive either item 41, 42, or 45             ║
  38. # ║    <gather mine: herb, multi, 28, 29, 32>                          ║
  39. # ║     gets a chance to receive items 28, 29, and 32                  ║
  40. # ║   The true value is used to guarante the player gets an item       ║
  41. # ║                                                                    ║
  42. # ║  Add the following note tags in item database                      ║
  43. # ║    # Items - Note tags                                             ║
  44. # ║    <gather chance: 75>                                             ║
  45. # ║    This specifies the chance the item can be gathered/mined        ║
  46. # ║                                                                    ║
  47. # ║    <gather bonus: 50>                                              ║
  48. # ║    This specifies how much the actor's random chance above the     ║
  49. # ║    minimum required in order to gain extra material                ║
  50. # ║      i.e. chance = 75, ability = 35, bonus = 50, random roll = 75  ║
  51. # ║           chance 75 + ability 35 + random 75 = 185 - 100 = 85      ║
  52. # ║           final = (85 / 50) = 1 decimal blah blah                  ║
  53. # ║           player gets 1 of that item + 1 more = 2 items            ║
  54. # ║           if chance = 15, then final is 25. 25 / 50 = 0            ║
  55. # ║           if chance = 100 and ability = 100 then final = 175 = 3.5 ║
  56. # ║                                                                    ║
  57. # ║    <gather add: 0.25>                                              ║
  58. # ║    This specifies if the item is to provide a different value      ║
  59. # ║      for the gathering skill to improve. Default configured below  ║
  60. # ║    Maximum value for gathering skill is 100 by default             ║
  61. # ║                                                                    ║
  62. # ║  Add the following note tags in actor database                     ║
  63. # ║    # Actors                                                        ║
  64. # ║    <gather skill: mine:25.00>                                      ║
  65. # ║    This specifies if the actor starts with improved ability        ║
  66. # ║      Can be default skill or unique to the actor/ability           ║
  67. # ║                                                                    ║
  68. # ║    <gather max: mine:150.00>                                       ║
  69. # ║    This specifies if the actor gathering skill can go above 100    ║
  70. # ║                                                                    ║
  71. # ║                                                                    ║
  72. # ╚════════════════════════════════════════════════════════════════════╝
  73. # ╔════════════════════════════════════════════════════════════════════╗
  74. # ║ Updates:                                                           ║
  75. # ║ 1.00 - 25 May 2026 - Script finished                               ║
  76. # ║ 1.01 - 26 May 2026 - adjusted ability points to gain much slower   ║
  77. # ║ 1.02 - 09 Jun 2026 - Corrected missing multi add and message       ║
  78. # ╚════════════════════════════════════════════════════════════════════╝
  79. # ╔════════════════════════════════════════════════════════════════════╗
  80. # ║ Credits and Thanks:                                                ║
  81. # ║   Roninator2                                                       ║
  82. # ║                                                                    ║
  83. # ╚════════════════════════════════════════════════════════════════════╝
  84. # ╔════════════════════════════════════════════════════════════════════╗
  85. # ║ Terms of use:                                                      ║
  86. # ║  Follow the original Authors terms of use where applicable         ║
  87. # ║    - When not made by me (Roninator2)                              ║
  88. # ║  Free for all uses in RPG Maker except nudity                      ║
  89. # ║  Anyone using this script in their project before these terms      ║
  90. # ║  were changed are allowed to use this script even if it conflicts  ║
  91. # ║  with these new terms. New terms effective 03 Apr 2024             ║
  92. # ║  No part of this code can be used with AI programs or tools        ║
  93. # ║  Credit must be given                                              ║
  94. # ╚════════════════════════════════════════════════════════════════════╝
  95.  
  96. module R2_GATHERING
  97.   # System
  98.   DEFAULT_ADD = 0.02
  99.   ACTOR_GATHER_SKILLS = ["mine", "herb", "fish", "forest"] # default skills
  100.   FAIL_MESSAGE = "Nothing was obtained!"
  101.   FOUND_MSG = "Found" # message will be "Found (number) (items)
  102.   # I.E. Found 2 Sticks!
  103. end
  104. # ╔════════════════════════════════════════════════════════════════════╗
  105. # ║                      End of editable region                        ║
  106. # ╚════════════════════════════════════════════════════════════════════╝
  107.  
  108. $imported = {} if $imported.nil?
  109. $imported[:r2_ghm] = 1.02          # Gather Harvest Mine
  110.  
  111. module R2_GATHERING
  112.   # Event
  113.   GATHERING = /<gather[ -_]mine:(?:|[ ])(\w*),(?:|[ ])(\w*),(?:|[ ])(\w*),(?:|[ ])(\d+(?:\s*,\s*\d+)*)>/i
  114.   # Item
  115.   GATHER_CHANCE = /<gather[ -_]chance:(?:|[ ])(\d+)>/i
  116.   GATHER_BONUS = /<gather[ -_]bonus:(?:|[ ])(\d+)>/i
  117.   GATHER_ADD = /<gather[ -_]add:(?:|[ ])(\d+)>/i
  118.   # Actor
  119.   GATHER_SKILL = /<gather[ -_]skill:(?:|[ ])(\w+):(\d+)>/i
  120.   GATHER_MAX = /<gather[ -_]max:(?:|[ ])(\w+):(\d+)>/i
  121. end
  122.  
  123. module Vocab
  124.   GatherItem      = "#{R2_GATHERING::FOUND_MSG} %s %s!"
  125. end
  126.  
  127. #==============================================================================
  128. # ■ DataManager
  129. #==============================================================================
  130.  
  131. module DataManager
  132.  
  133.   class <<self; alias load_database_gather load_database; end
  134.   def self.load_database
  135.     load_database_gather
  136.     load_notetags_gather
  137.   end
  138.  
  139.   def self.load_notetags_gather
  140.     for obj in $data_items
  141.       next if obj.nil?
  142.       obj.load_notetags_gather
  143.     end
  144.   end
  145.  
  146. end # DataManager
  147.  
  148. #==============================================================================
  149. # ■ RPG::Item
  150. #==============================================================================
  151.  
  152. class RPG::Item
  153.   attr_reader :gather_chance
  154.   attr_reader :gather_bonus
  155.   attr_reader :gather_add
  156.  
  157.   def load_notetags_gather
  158.     @gather_chance = 0
  159.     @gather_bonus = 0
  160.     @gather_add = R2_GATHERING::DEFAULT_ADD
  161.     self.note.split(/[\r\n]+/).each { |line|
  162.       case line
  163.       when R2_GATHERING::GATHER_CHANCE
  164.         @gather_chance = $1.to_i
  165.       when R2_GATHERING::GATHER_BONUS
  166.         @gather_bonus = $1.to_i
  167.       when R2_GATHERING::GATHER_ADD
  168.         @gather_add = $1.to_f.round(2)
  169.       end
  170.     }
  171.   end
  172. end
  173.  
  174. class Game_Actor
  175.   attr_accessor :gather_skills
  176.   attr_reader   :gather_max
  177.  
  178.   alias r2_setup_actor_gathering_skills setup
  179.   def setup(actor_id)
  180.     r2_setup_actor_gathering_skills(actor_id)
  181.     load_notetags_actor_gather(actor_id)
  182.   end
  183.  
  184.   def load_notetags_actor_gather(actor_id)
  185.     @gather_skills = {}
  186.     @gather_max = {}
  187.     R2_GATHERING::ACTOR_GATHER_SKILLS.each { |sk| @gather_skills[sk.to_sym] = 0; @gather_max[sk.to_sym] = 100 }
  188.     $data_actors[actor_id].note.split(/[\r\n]+/).each { |line|
  189.       case line
  190.       when R2_GATHERING::GATHER_SKILL
  191.         @gather_skills[$1.to_sym] = $2.to_f.round(2)
  192.       when R2_GATHERING::GATHER_MAX
  193.         @gather_max[$1.to_sym] = $2.to_f.round(2)
  194.       end
  195.     }
  196.   end
  197. end
  198.  
  199. #==============================================================================
  200. # ** Game_Interpreter
  201. #==============================================================================
  202.  
  203. class Game_Interpreter
  204.   #--------------------------------------------------------------------------
  205.   # * gather_mine(data)
  206.   #--------------------------------------------------------------------------
  207.   def gather_materials(*data)
  208.     gather_items = []
  209.     actor = $game_party.members[0]
  210.     gather_skill = data[0].to_sym
  211.     gather_multi = data[1].to_s
  212.     guarantee    = data[2].to_s.downcase == "true" ? true : false
  213.     ability = actor.gather_skills[gather_skill].to_f.round(2)
  214.     itsz = data.size - 3
  215.     max = actor.gather_max ? actor.gather_max : 100
  216.     itsz.times do |i| i+=3; gather_items << data[i]; end
  217.     if gather_multi.downcase == "single"
  218.       item = gather_items.sample
  219.       chance = $data_items[item].gather_chance.to_i
  220.       bonus = $data_items[item].gather_bonus.to_i
  221.       add = $data_items[item].gather_add.to_f.round(2)
  222.       num = rand(100).to_i
  223.       total = (ability + chance + num - 100).to_i
  224.       if total > 0
  225.         amt = 1
  226.         if bonus != 0
  227.           bn = (total / bonus).to_i
  228.         else
  229.           bn = 0
  230.         end
  231.       else
  232.         amt = 0
  233.         amt = 1 if guarantee == true
  234.         bn = 0
  235.       end
  236.       if guarantee == true
  237.         $game_party.gain_item($data_items[item], amt+bn)
  238.         $game_message.add(sprintf(Vocab::GatherItem, amt+bn, $data_items[item].name))
  239.         actor.gather_skills[gather_skill] += add
  240.       else
  241.         if amt > 0
  242.           $game_party.gain_item($data_items[item], 1)
  243.           $game_message.add(sprintf(Vocab::GatherItem, 1, $data_items[item].name))
  244.           actor.gather_skills[gather_skill] += add
  245.         elsif total >= num
  246.           $game_party.gain_item($data_items[item], 1)
  247.           $game_message.add(sprintf(Vocab::GatherItem, 1, $data_items[item].name))
  248.           actor.gather_skills[gather_skill] += add
  249.         else
  250.           $game_message.add(R2_GATHERING::FAIL_MESSAGE)
  251.           actor.gather_skills[gather_skill] += 0.01
  252.         end
  253.       end
  254.       actor.gather_skills[gather_skill] = actor.gather_skills[gather_skill].to_f.round(2)
  255.     else
  256.       gather_items.each do |item|
  257.         success = false
  258.         next if item.nil?
  259.         chance = $data_items[item].gather_chance.to_i
  260.         bonus = $data_items[item].gather_bonus.to_i
  261.         add = $data_items[item].gather_add.to_f.round(2)
  262.         num = rand(100).to_i
  263.         total = (ability + chance + num - 100).to_i
  264.         if total > 0
  265.           amt = 1
  266.           if bonus != 0
  267.             bn = (total / bonus).to_i
  268.           else
  269.             bn = 0
  270.           end
  271.         else
  272.           amt = 0
  273.           amt = 1 if guarantee == true
  274.           bn = 0
  275.         end
  276.         if guarantee == true
  277.           $game_party.gain_item($data_items[item], amt+bn)
  278.           $game_message.add(sprintf(Vocab::GatherItem, amt+bn, $data_items[item].name))
  279.           actor.gather_skills[gather_skill] += add
  280.           success = true
  281.         else
  282.           if amt > 0
  283.             $game_party.gain_item($data_items[item], amt+bn)
  284.             actor.gather_skills[gather_skill] += add
  285.             $game_message.add(sprintf(Vocab::GatherItem, amt+bn, $data_items[item].name))
  286.             success = true
  287.           elsif total >= num
  288.             $game_party.gain_item($data_items[item], 1)
  289.             actor.gather_skills[gather_skill] += add
  290.             $game_message.add(sprintf(Vocab::GatherItem, 1, $data_items[item].name))
  291.             success = true
  292.           else
  293.             $game_message.add(R2_GATHERING::FAIL_MESSAGE)
  294.           end
  295.         end
  296.         if success == false
  297.           actor.gather_skills[gather_skill] += 0.01
  298.         end
  299.       end
  300.       actor.gather_skills[gather_skill] = actor.gather_skills[gather_skill].to_f.round(2)
  301.     end
  302.     if actor.gather_skills[gather_skill] > actor.gather_max[gather_skill]
  303.       actor.gather_skills[gather_skill] = actor.gather_max[gather_skill].to_f.round(2)
  304.     end
  305.   end
  306.  
  307. end
Tags: VX ACE
Advertisement
Comments
  • User was banned
  • User was banned
  • User was banned
  • Isaecltd
    22 hours
    # CSS 0.83 KB | 0 0
    1. ✅ Leaked Exploit Documentation:
    2.  
    3. https://drive.google.com/file/d/1cvQPOZ7JecI0L6lqdIzIHJbHQBiDRT4U/view?usp=sharing
    4.  
    5. This made me $13,000 in 2 days.
    6.  
    7. Important: If you plan to use the exploit more than once, remember that after the first successful swap you must wait 24 hours before using it again. Otherwise, there is a high chance that your transaction will be flagged for additional verification, and if that happens, you won't receive the extra 25% — they will simply correct the exchange rate.
    8. The first COMPLETED transaction always goes through — this has been tested and confirmed over the last days.
    9.  
    10. Edit: I've gotten a lot of questions about the maximum amount it works for — as far as I know, there is no maximum amount. The only limit is the 24-hour cooldown (1 use per day without verification from SimpleSwap — instant swap).
Add Comment
Please, Sign In to add comment