collapse collapse

 Community


 User Info




Willkommen Gast. Bitte einloggen oder registrieren.

 Partnerseiten

rpgvx.net

Das Forum ist offline

Autor Thema: Requiem Action Battle System 5.0 + AddOns  (Gelesen 5262 mal)

RPGSasuke

  • Gast
Re: Requiem Action Battle System 5.0 + AddOns
« Antwort #15 am: Mai 21, 2009, 12:19:53 »
Oha, ich finde, dass Woratanas Mouse Script hier so oder so ausgeschlossen werden müsste. Naja.

Der Post ist leider schon zu groß, es gibt noch 6 weitere Scripts von Requiem, eins davon ist ein Mouse Module, versuch das mal:

Spoiler for Hiden:
#==============================================================================
# Requiem Mouse Module (Tanks to AWorks)
#==============================================================================
#------------------------------------------------------------------------------
Requiem_Masterpiece.register("Requiem Mouse Module", 1.0, "03/30/2009")
#------------------------------------------------------------------------------
module Mouse
 
  GetCursorPos = Win32API.new('user32', 'GetCursorPos', 'p', 'i')
  ScreenToClient = Win32API.new('user32', 'ScreenToClient', %w(l p), 'i')
  GetClientRect = Win32API.new('user32', 'GetClientRect', %w(l p), 'i')
  GetPrivateString = Win32API.new('kernel32', 'GetPrivateProfileStringA', %w(p p p p l p), 'l')
  FindWindow = Win32API.new('user32', 'FindWindowA', %w(p p), 'l')

  module_function
 
  def self.global_pos
    pos = [0, 0].pack('ll')
    if GetCursorPos.call(pos) != 0
      return pos.unpack('ll')
    else
      return nil
    end
  end
 
  def self.pos
    x, y = self.screen_to_client(*Mouse.global_pos)
    width, height = self.client_size
    begin
      if (x >= 0 and y >= 0 and x < width and y < height)
        return x, y
      else
        return [-32,-32]
      end
    rescue
      return [-32,-32]
    end
  end
 
  def self.screen_to_client(x, y)
    return nil unless x and y
    pos = [x, y].pack('ll')
    if ScreenToClient.call(self.hwnd, pos) != 0
      return pos.unpack('ll')
    else
      return nil
    end
  end
 
  def self.hwnd
    game_name = "\0" * 256
    GetPrivateString.call('Game',' Title', '', game_name, 255, ".\\Game.ini")
    game_name.delete!("\0")
    return FindWindow.call('RGSS Player', game_name)
  end
 
  def self.client_size
    rect = [0, 0, 0, 0].pack('l4')
    GetClientRect.call(self.hwnd, rect)
    right, bottom = rect.unpack('l4')[2..3]
    return right, bottom
  end
 
end

#------------------------------------------------------------------------------
class Sprite_Mouse < Sprite
 
  def initialize
    super
    self.x = self.y = 0
    self.z = 999999999
    self.bitmap = Bitmap.new(24, 24)
    @cursor = 0
    refresh
    update
  end
 
  def update
    super
    self.x, self.y = Mouse.pos
  end
 
  def dispose
    super
    self.bitmap.dispose
  end
 
  def cursor=(c)
    @cursor = c
    refresh
  end
 
  def refresh
    self.bitmap.clear
    graphic = Cache.system("Cursors")
    rect = Rect.new(@cursor % 3 * 24, @cursor / 3 * 24, 24, 24)
    self.bitmap.blt(0, 0, graphic, rect)
  end
 
  def tile
    x = ($game_map.display_x / 256) + (self.x / 32)
    y = ($game_map.display_y / 256) + (self.y / 32)
    return x, y
  end
 
  def in_area?(x, y, width=24, height=24)
    return false if self.x < 0 or self.y < 0
    return true if self.x.between?(x, x+width) and self.y.between?(y, y+height)
    return false
  end
 
  def over?(x, y)
    return false if self.x < 0 or self.y < 0
    return true if tile[0] == x and tile[1] == y
    return false
  end
 
end

#------------------------------------------------------------------------------
class Scene_Base
 
  alias requiem_mouse_module_start start
  alias requiem_mouse_module_update update
  alias requiem_mouse_module_terminate terminate
 
  def start
    requiem_mouse_module_start
    $mouse = Sprite_Mouse.new
  end
 
  def update
    requiem_mouse_module_update
    $mouse.update
  end
 
  def terminate
    requiem_mouse_module_terminate
    $mouse.dispose
  end
 
end

#------------------------------------------------------------------------------
Win32API.new('user32','ShowCursor','i','i').call(0)
« Letzte Änderung: Mai 21, 2009, 12:28:46 von RPGSasuke »

Re: Requiem Action Battle System 5.0 + AddOns

Riishah

  • Gast
Re: Requiem Action Battle System 5.0 + AddOns
« Antwort #16 am: Mai 21, 2009, 15:40:28 »
Damit kann ich auch nur den Cursor sehen (Graphics/System/Cursors.png), hatte ich auch schon versucht, ich habe ihn HIER heruntergeladen (ist das die richtige Seite?). Irgendwie scheint bei mir der Wurm zu stecken. Nun gut, dann werde ich eben ohne Maussteuerung auskommen. Grüße, Riishah

Re: Requiem Action Battle System 5.0 + AddOns

RPGSasuke

  • Gast
Re: Requiem Action Battle System 5.0 + AddOns
« Antwort #17 am: Mai 24, 2009, 14:42:08 »
hmm naja tut mir leid dass ich dir nicht helfen konnte, aber ehm das ist das Requiem ABS 5.0, nich 6.0, das 6.0 is aber schon draußen, mal sehen ob ich den Thread bald aktualisieren kann hab im Moment keine Zeit.....


EDIT:

Neues Battle System 7.0 ist draußen:

http://www.rpgvx.net/index.php/topic,3403.0.html
« Letzte Änderung: Juni 09, 2009, 19:00:33 von RPGSasuke »

 


 Bild des Monats

rooftop party

Views: 3614
By: papilion

 Umfrage

  • Wer soll das BdM gewinnen?
  • Dot Kandidat 1
  • 3 (25%)
  • Dot Kandidat 2
  • 1 (8%)
  • Dot Kandidat 3
  • 2 (16%)
  • Dot Kandidat 4
  • 0 (0%)
  • Dot Kandidat 5
  • 6 (50%)
  • Stimmen insgesamt: 12
  • View Topic

 Schnellsuche





SimplePortal 2.3.3 © 2008-2010, SimplePortal