class Fishing
#----------------------------------------------------------------------------
# Start
#----------------------------------------------------------------------------
def initialize
@fw = Window_Fish.new
$fm = "Fishing..."
@fw.refresh
delay(60)
fish
end
#----------------------------------------------------------------------------
# Fishing!
#----------------------------------------------------------------------------
def fish
delay(40)
@fr = rand(4)#这个括号里的数字表示垂钓的结果,你想要几中结果就写几
case @fr
when 0
$game_player.animation_id = 98
$fm = "嘿!钓到一条大家伙,10磅重!"
@fw.refresh
$game_party.gain_item(33, 1)#the item number of the fish is here
delay(60)
when 1
$fm = "见鬼,一块破石头!"
@fw.refresh
delay(60)
when 2
$fm = " 恶,一只烂靴子!"
@fw.refresh
delay(60)
when 3
$game_player.animation_id = 98
$fm = "嘿,我钓到一条,20磅的!"
@fw.refresh
$game_party.gain_item(34, 1)
delay(60)
when 4
$fm = "哎,没钓到!"
@fw.refresh
delay(60)
end
@fw.dispose
end
#----------------------------------------------------------------------------
# Delay
#----------------------------------------------------------------------------
def delay(wait)
count = Graphics.frame_count
while wait + count >= Graphics.frame_count
Graphics.update
end
end
end
# B ボタンが押された場合
if Input.trigger?(Input::B)
# イベント実行中かメニュー禁止中でなければ
unless $game_system.map_interpreter.running? or
$game_system.menu_disabled
# メニュー呼び出しフラグと SE 演奏フラグをセット
$game_temp.menu_calling = true
$game_temp.menu_beep = true
end
end
#在中文版里找到对应的几行代码即可。
再在下面插入以下内容:
# FISHING
# if z pushed call fishing
if Input.trigger?(Input::Z)
fishing
end
# FISHING
class Fishing
#----------------------------------------------------------------------------
# Start
#----------------------------------------------------------------------------
def initialize
@fw = Window_Fish.new
$fm = "Fishing..."
@fw.refresh
delay(60)
fish
end
#----------------------------------------------------------------------------
# Fishing!
#----------------------------------------------------------------------------
def fish
delay(40)
@fr = rand(4)#这个括号里的数字表示垂钓的结果,你想要几中结果就写几
case @fr
when 0
$game_player.animation_id = 98
$fm = "嘿!钓到一条大家伙,10磅重!"
@fw.refresh
$game_party.gain_item(33, 1)#the item number of the fish is here
delay(60)
when 1
$fm = "见鬼,一块破石头!"
@fw.refresh
delay(60)
when 2
$fm = " 恶,一只烂靴子!"
@fw.refresh
delay(60)
when 3
$game_player.animation_id = 98
$fm = "嘿,我钓到一条,20磅的!"
@fw.refresh
$game_party.gain_item(34, 1)
delay(60)
when 4
$fm = "哎,没钓到!"
@fw.refresh
delay(60)
end
@fw.dispose
end
#----------------------------------------------------------------------------
# Delay
#----------------------------------------------------------------------------
def delay(wait)
count = Graphics.frame_count
while wait + count >= Graphics.frame_count
Graphics.update
end
end
end
# B ボタンが押された場合
if Input.trigger?(Input::B)
# イベント実行中かメニュー禁止中でなければ
unless $game_system.map_interpreter.running? or
$game_system.menu_disabled
# メニュー呼び出しフラグと SE 演奏フラグをセット
$game_temp.menu_calling = true
$game_temp.menu_beep = true
end
end
#在中文版里找到对应的几行代码即可。
再在下面插入以下内容:
# FISHING
# if z pushed call fishing
if Input.trigger?(Input::Z)
fishing
end
# FISHING