• Do not use Discord to host any images you post, these links expire quickly! You can learn how to add images to your posts here.
Mining Game Mouse Function

v20.1 Mining Game Mouse Function 2023-03-30

This resource pertains to version 20.1 of Pokémon Essentials.
Pokémon Essentials Version
v20.1 ➖

Just what it says on the tin!​

Can be downloaded as a plugin here or added directly to the scripts.
Find this line in Minigame_Mining -
Ruby:
Expand Collapse Copy
if Input.trigger?(Input::UP) || Input.repeat?(Input::UP)
And replace it with this:
Ruby:
Expand Collapse Copy
      if System.mouse_in_window
        if Input.mouse_x.between?(0,BOARD_WIDTH*32) && Input.mouse_y.between?(64,64+BOARD_HEIGHT*32) #Mouse is on board
          x = Input.mouse_x/32
          y = Input.mouse_y/32
          y -= 2
          newpos = x + y*BOARD_WIDTH
          @sprites["cursor"].position = newpos
          pbHit if Input.trigger?(Input::MOUSELEFT)
        elsif Input.mouse_x.between?(428,508) #mouse is by tool icons
          if Input.mouse_y.between?(98,216) #mouse is by hammer
            if Input.trigger?(Input::MOUSELEFT)
              pbSEPlay("Mining tool change")
              newmode = 1
              @sprites["cursor"].mode = newmode
              @sprites["tool"].src_rect.set(newmode * 68, 0, 68, 100)
              @sprites["tool"].y = 254 - (144 * newmode)
            end
          elsif Input.mouse_y.between?(242,360) #mouse is by pick
            if Input.trigger?(Input::MOUSELEFT)
              pbSEPlay("Mining tool change")
              newmode = 0
              @sprites["cursor"].mode = newmode
              @sprites["tool"].src_rect.set(newmode * 68, 0, 68, 100)
              @sprites["tool"].y = 254 - (144 * newmode)
            end
          end
        end
      elsif Input.trigger?(Input::UP) || Input.repeat?(Input::UP)
Credits
Credit to TechSkylander1518, please!
  • Like
Reactions: MickTK and -FL-
Author
TechSkylander1518
Downloads
619
Views
1,894
First release
Last update

Ratings

5.00 star(s) 2 ratings

More resources from TechSkylander1518

Back
Top