RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
Move By Clicking

0 Members and 3 Guests are viewing this topic.

*
Full Metal Mod - He will pillage your women!
Rep:
Level 93
The RGSS Dude
Here it is, just input these four scripts above main (in order!) -

I edited everything and wrote the Scene_Map addition, the path finder was not done by me, I just removed the SDK dependancy for it because I know you all would flame me if I didn't :P

Just for clarification, once again, the only thing I actualy wrote is the Scene_Map addition. I rewrote the Mouse Coordinates script, but the part of it that makes it work was by Guedez.


Mouse Coordinates -
Code: [Select]
#==================================================================
# GMUS Guedez Mouse Use System
# Version: 1.0
# Released: 26/5/2006 Last Update: 1/6/2006
# Thx to: Cadafalso, Near Fantastica, and some guys from asylum!
# EDITED BY TSUNOKIETTE (to get neccesary parts only)
#==================================================================

$getCursorPos = Win32API.new("user32", "GetCursorPos", ['P'], 'V')

class Mouse_Coordinates
 
  attr_reader :x
  attr_reader :y
 
  def initialize
    @x = get_pos('x')
    @y = get_pos('y')
  end
 
  def update
    @x = get_pos('x')
    @y = get_pos('y')
  end
 
#==============================Thx to: Cadafalso===================
  def get_pos(coord_type)
    lpPoint = " " * 8 # store two LONGs
    $getCursorPos.Call(lpPoint)
    x,y = lpPoint.unpack("LL") # get the actual values
    if coord_type == 'x'
      return x
    elsif coord_type == 'y'
      return y
    end
  end
#==================================================================

end

Input -
Code: [Select]
  #======================================
  # ? Keyboard Script
  #---------------------------------------------------------------------------
  # ?By: Cybersam
  #   Date: 25/05/05
  #   Version 4
  # EDITED BY TSUNOKIETTE (to get neccesary parts only)
  #======================================
 
  module Kboard
   #--------------------------------------------------------------------------
   $RMouse_BUTTON_L = 0x01        # left mouse button
   $RMouse_BUTTON_R = 0x02        # right mouse button
   $RMouse_BUTTON_M = 0x04        # middle mouse button
   $RMouse_BUTTON_4 = 0x05        # 4th mouse button
   $RMouse_BUTTON_5 = 0x06        # 5th mouse button
   #--------------------------------------------------------------------------
   GetKeyState = Win32API.new("user32","GetAsyncKeyState",['i'],'i')
   GetKeyboardState = Win32API.new("user32","GetKeyState",['i'],'i')
   GetSetKeyState = Win32API.new("user32","SetKeyboardState",['i'],'i')
   #--------------------------------------------------------------------------
   module_function
   #--------------------------------------------------------------------------
   def keyb(rkey)
      if GetKeyState.call(rkey) != 0
        return 1
      end
      return 0
   end
    #--------------------------------------------------------------------------
   def keyboard(rkey)
     GetKeyState.call(rkey) & 0x01 == 1  #
   end
   #--------------------------------------------------------------------------
   def key(rkey, key = 0)
     GetKeyboardState.call(rkey) & 0x01 == key #
   end
  end

Path Finder (not done by me) -
Code: [Select]
#==============================================================================
#  Path Finding
#==============================================================================
# Near Fantastica
# Version 1
# 29.11.05
#==============================================================================
# Lets the Player or Event draw a path from an desonation to the source. This
# method is very fast and because the palthfinding is imbeded into the Game
# Character the pathfinding can be inturputed or redrawn at any time.
#==============================================================================
# Player :: $game_player.find_path(x,y)
# Event Script Call :: self.event.find_path(x,y)
# Event Movement Script Call :: self.find_path(x,y)
#-----
# SDK DEPENDANCY REMOVED BY TSUNOKIETTE (SUE ME)
#==============================================================================
  class Game_Character
    #--------------------------------------------------------------------------
    alias nf_pf_game_character_initialize initialize
    alias nf_pf_game_character_update update
    #--------------------------------------------------------------------------
    attr_accessor :map
    attr_accessor :runpath
    #--------------------------------------------------------------------------
    def initialize
      nf_pf_game_character_initialize
      @map = nil
      @runpath = false
    end
    #--------------------------------------------------------------------------
    def update
      run_path if @runpath == true
      nf_pf_game_character_update
    end
    #--------------------------------------------------------------------------
    def run_path
      return if moving?
      step = @map[@x,@y]
      if step == 1
        @map = nil
        @runpath = false
        return
      end
      dir = rand(2)
      case dir
      when 0
        move_right if @map[@x+1,@y] == step - 1 and step != 0
        move_down if @map[@x,@y+1] == step - 1 and step != 0
        move_left if @map[@x-1,@y] == step -1 and step != 0
        move_up if @map[@x,@y-1] == step - 1 and step != 0
      when 1
        move_up if @map[@x,@y-1] == step - 1 and step != 0
        move_left if @map[@x-1,@y] == step -1 and step != 0
        move_down if @map[@x,@y+1] == step - 1 and step != 0
        move_right if @map[@x+1,@y] == step - 1 and step != 0
      end
    end
    #--------------------------------------------------------------------------
    def find_path(x,y)
      sx, sy = @x, @y
      result = setup_map(sx,sy,x,y)
      @runpath = result[0]
      @map = result[1]
      @map[sx,sy] = result[2] if result[2] != nil
    end
    #--------------------------------------------------------------------------
    def clear_path
      @map = nil
      @runpath = false
    end
    #--------------------------------------------------------------------------
    def setup_map(sx,sy,ex,ey)
      map = Table.new($game_map.width, $game_map.height)
      map[ex,ey] = 1
      old_positions = []
      new_positions = []
      old_positions.push([ex, ey])
      depth = 2
      depth.upto(100){|step|
        loop do
          break if old_positions[0] == nil
          x,y = old_positions.shift
          return [true, map, step] if x == sx and y+1 == sy
          if $game_player.passable?(x, y, 2) and map[x,y + 1] == 0
            map[x,y + 1] = step
            new_positions.push([x,y + 1])
          end
          return [true, map, step] if x-1 == sx and y == sy
          if $game_player.passable?(x, y, 4) and map[x - 1,y] == 0
            map[x - 1,y] = step
            new_positions.push([x - 1,y])
          end
          return [true, map, step] if x+1 == sx and y == sy
          if $game_player.passable?(x, y, 6) and map[x + 1,y] == 0
            map[x + 1,y] = step
            new_positions.push([x + 1,y])
          end
          return [true, map, step] if x == sx and y-1 == sy
          if $game_player.passable?(x, y, 8) and map[x,y - 1] == 0
            map[x,y - 1] = step
            new_positions.push([x,y - 1])
          end
        end
        old_positions = new_positions
        new_positions = []
      }
      return [false, nil, nil]
    end
  end
 
  class Game_Map
    #--------------------------------------------------------------------------
    alias pf_game_map_setup setup
    #--------------------------------------------------------------------------
    def setup(map_id)
      pf_game_map_setup(map_id)
      $game_player.clear_path
    end
  end
 
  class Game_Player
    def update_player_movement
      $game_player.clear_path if Input.dir4 != 0
      # Move player in the direction the directional button is being pressed
      case Input.dir4
      when 2
        move_down
      when 4
        move_left
      when 6
        move_right
      when 8
        move_up
      end
    end
  end
 
  class Interpreter
    #--------------------------------------------------------------------------
    def event
      return $game_map.events[@event_id]
    end
  end

Scene_Map Addition (still place above main!) -
Code: [Select]
#==============================================================================
# ** Scene_Map
#------------------------------------------------------------------------------
#  This class performs map screen processing.
#==============================================================================

class Scene_Map
  include? Kboard
  #--------------------------------------------------------------------------
  # * Main Processing
  #--------------------------------------------------------------------------
  alias main_orig main
  def main
    @mouse_coordinates = Mouse_Coordinates.new
    main_orig
  end
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  alias update_orig update
  def update
    update_orig
    # Update Mouse Coordinates
    @mouse_coordinates.update
    if Kboard.keyboard($RMouse_BUTTON_L)
      # Get current coordinates
      real_coord_x = @mouse_coordinates.x
      real_coord_y = @mouse_coordinates.y
      # Get column and row
      tile_coord_x = real_coord_x / 32
      tile_coord_y = real_coord_y / 32
      # Get rid of the variance of 8 * 6
      # ( 0 being the origin )
      tile_coord_x -= 8
      tile_coord_y -= 6
      # If Negative Set to 0 for Safety
      tile_coord_x = 0 unless tile_coord_x > -1
      tile_coord_y = 0 unless tile_coord_y > -1
      # Move
      $game_player.find_path(tile_coord_x,tile_coord_y)
    end
  end
end

TRUE credit is in the comments at the top of each script.
« Last Edit: December 24, 2006, 11:49:07 PM by Tsunokiette »
"The wonderful thing about Tiggers
Is Tiggers are wonderful things
Their tops are made out of rubber
Their bottoms are made out of springs

They’re bouncy, trouncy, flouncy, pouncy
Fun, fun, fun, fun, fun!
But the most wonderful thing about Tiggers
Is I’m the only one, I’m the only one."

********
Rep:
Level 96
2011 Most Missed Member2010 Zero To Hero
Wait a minute...Yup, still awesome.

******
Rep:
Level 92
Welcome Poster of Year 2006 Award
Ok, this script now burns the whole point of Rpg Maker, and makes it a Point-Click Game Maker.
Do you want to be part of a growing Gaming Community, with many galleries, comics, active community, and gfx artists? Also known to be friendly. Also want some free anime music just for signing up? Play in the arcade?



Click Community Forums to join!

< Zelda Fan Club

********
Rep:
Level 96
2011 Most Missed Member2010 Zero To Hero
I would just use it for a mini game, personally, and I wouldn't think you would want to be limited to one type of game in the first place, so what's the big deal?

******
Rep:
Level 92
Welcome Poster of Year 2006 Award
Does this script allow you to use both, or just one?
Do you want to be part of a growing Gaming Community, with many galleries, comics, active community, and gfx artists? Also known to be friendly. Also want some free anime music just for signing up? Play in the arcade?



Click Community Forums to join!

< Zelda Fan Club

****
Rep: +0/-0Level 91
it's an excellent script, a stroke of genius, but if you really wanted a point and click game you might as well just use click team. but i give this script a 9/10.

***
Rep:
Level 89
who want to play worms 4
eerrrrrrrrr there is one problem the caracter never stopes right on the mouse
......___|__
__/******\=======#
|**M1A2 ***:\
(@=@=@=@=@)

copy this tank and we wil concer the world

http://www.nintendo-europe.com/NOE/nl/NL/register/index.jsp?m=l&a=robot797
klik this link and give me stars

*
Full Metal Mod - He will pillage your women!
Rep:
Level 93
The RGSS Dude
eerrrrrrrrr there is one problem the caracter never stopes right on the mouse

Here's how to fix it, first replace the Scene_Map addition with this -

Code: [Select]
#==============================================================================
# ** Scene_Map
#------------------------------------------------------------------------------
#  This class performs map screen processing.
#==============================================================================

class Scene_Map
  include? Kboard
  #--------------------------------------------------------------------------
  # * Main Processing
  #--------------------------------------------------------------------------
  alias main_orig main
  def main
    @mouse_coordinates = Mouse_Coordinates.new
    main_orig
  end
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  alias update_orig update
  def update
    update_orig
    # Update Mouse Coordinates
    @mouse_coordinates.update
    if Kboard.keyboard($RMouse_BUTTON_R)
      # Get current coordinates
      real_coord_x = @mouse_coordinates.x
      real_coord_y = @mouse_coordinates.y
      # Get column and row
      tile_coord_x = real_coord_x / 32
      tile_coord_y = real_coord_y / 32
      print "Column : [#{tile_coord_x}] Row : [#{tile_coord_y}]"
    end
  end
end

This is what we call a method for testing the script, this is what is going to help us fix your problem.

Next, start a test play, and *obviously* choose new game. Then what you want to do is RIGHT CLICK the top left tile (all the way in the top left corner) and a window will pop up.

It should say something like -

Column : [8] Row : [6]

The numbers in the brackets will be what we call the "variance".

Take note of these numbers.

Now replace the Scene_Map addition with the original found in my first post.

Find this part in it -

Code: [Select]
      # Get rid of the variance of 8 * 6
      # ( 0 being the origin )
      tile_coord_x -= 8
      tile_coord_y -= 6

Replace the top number with the number you got for the column and the bottom number with the number you got for the row.

This should solve your problem.

If it doesn't or you don't understand anything I've said, say so and I'll try to help.

- Tsuno Out
« Last Edit: September 04, 2006, 04:26:40 PM by Tsunokiette »
"The wonderful thing about Tiggers
Is Tiggers are wonderful things
Their tops are made out of rubber
Their bottoms are made out of springs

They’re bouncy, trouncy, flouncy, pouncy
Fun, fun, fun, fun, fun!
But the most wonderful thing about Tiggers
Is I’m the only one, I’m the only one."

***
Rep:
Level 87
RMU Admin
OMG! you don't know how long i been looking for this thank you very much

*
A Random Custom Title
Rep:
Level 96
wah
Necro... Please note the dates the posts were made next time :P

pokeball :)OfflineMale
********
Cheese
Rep:
Level 95
?
Necro... Please note the dates the posts were made next time :P

?_? xD he was saying he likes teh scripts, nothing wrong with that.
Watch out for: HaloOfTheSun

*
A Random Custom Title
Rep:
Level 96
wah
Yeah... But it's just weird when you see posts just popping out and bleh. I guess my train of thought on that stopped there -_- Sorry, Polraudio.

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Best Member2012 Best RPG Maker User (Scripting)2012 Favorite Staff Member2012 Most Mature MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Use of Avatar and Signature Space2011 Best RPG Maker User (Scripting)2011 Most Mature Member2011 Favourite Staff Member2011 Best Veteran2010 Best Use Of Avatar And Signature Space2010 Favourite Staff Member
If anything, it was a much needed bump. I never even noticed this before. It's good.

*
A Random Custom Title
Rep:
Level 96
wah
Yeah, I just tested this out. XP Again, gomenaisai.

**
Rep:
Level 87
Okay can you make it so it shows a courser. Becuase when I used the script no couser was showed. Please help i looked for this before and none worked so may you make the couser show?



*
A Random Custom Title
Rep:
Level 96
wah
Try moving the mouse around? The mouse is the cursor.

**
Rep: +0/-0Level 87
Where it all happens.......and stops!
lol, I recognize the date and all, but while its still being talked about, I pasted the code in and everything works fine. I open my game and go to play and the game crashes. I know its not my computer cause I custom built this thing myself, and its not and old computer. Anyone else had this problem?
Those who have all the answers, arn't up to date on the questions.

*
Full Metal Mod - He will pillage your women!
Rep:
Level 93
The RGSS Dude
lol, I recognize the date and all, but while its still being talked about, I pasted the code in and everything works fine. I open my game and go to play and the game crashes. I know its not my computer cause I custom built this thing myself, and its not and old computer. Anyone else had this problem?

What error do you get?
"The wonderful thing about Tiggers
Is Tiggers are wonderful things
Their tops are made out of rubber
Their bottoms are made out of springs

They’re bouncy, trouncy, flouncy, pouncy
Fun, fun, fun, fun, fun!
But the most wonderful thing about Tiggers
Is I’m the only one, I’m the only one."

**
Rep: +0/-0Level 87
Where it all happens.......and stops!
I get this error message. Like I said, the game just crashes right after I choose, "new game"

Those who have all the answers, arn't up to date on the questions.

***
Rep:
Level 88
Thats a near-Unfixable problem that results from having PK. I know..I used to use it...yesterday >.>


Ok...I'm getting an error where it dosent move, and when it does...it takes minutes to react...
Games in progress:
Tome of Arastovia: 7% complete at 2 hours of gametime

*
A Random Custom Title
Rep:
Level 96
wah
Ok...I'm getting an error where it dosent move, and when it does...it takes minutes to react...
Lag?

*
Crew Slut
Rep:
Level 93
You'll love it!
For taking a crack at the RMRK Wiki
Hmm...no error for me, but it doesn't even work. Do I have to call the script? I put them in as he said, yet the controls are still the same old arrow keys...  :-\

*
Full Metal Mod - He will pillage your women!
Rep:
Level 93
The RGSS Dude
Hmm...no error for me, but it doesn't even work. Do I have to call the script? I put them in as he said, yet the controls are still the same old arrow keys...  :-\

Of course the arrow keys will still work. But try clicking. :/
"The wonderful thing about Tiggers
Is Tiggers are wonderful things
Their tops are made out of rubber
Their bottoms are made out of springs

They’re bouncy, trouncy, flouncy, pouncy
Fun, fun, fun, fun, fun!
But the most wonderful thing about Tiggers
Is I’m the only one, I’m the only one."

*
A Random Custom Title
Rep:
Level 96
wah
One question: Can you choose options in menus with the mouse? If so, the arrow keys should be turned off somehow. :P

*
Crew Slut
Rep:
Level 93
You'll love it!
For taking a crack at the RMRK Wiki
Hmm...no error for me, but it doesn't even work. Do I have to call the script? I put them in as he said, yet the controls are still the same old arrow keys...  :-\

Of course the arrow keys will still work. But try clicking. :/

I did, I'm going to go take a shower, I'll try again when I get get back!   :D