赞 | 0 |
VIP | 0 |
好人卡 | 0 |
积分 | 1 |
经验 | 199480 |
最后登录 | 2008-2-12 |
在线时间 | 0 小时 |
Lv1.梦旅人 (禁止发言) 鬼隐
- 梦石
- 0
- 星屑
- 50
- 在线时间
- 0 小时
- 注册时间
- 2005-10-23
- 帖子
- 168
|
加入我们,或者,欢迎回来。
您需要 登录 才可以下载或查看,没有帐号?注册会员
x
转自:http://www.phanxgames.com/resources/thumbnails.php?album=52
脚本及使用方法如下:
1、首先把下面这个脚本插入main下,并起名垂钓
#==============================================================================
# ■ 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
注:在以上垂钓结果的分支部分,你想怎么设置都可以,自由度比较大。
================================================
2、下面在“ Scene_Map”中找到以下代码:
# 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
按下Z后呼叫垂钓功能
=========================================================
3、把下面的内容插入“def update”和“def transfer_player”之间的任意位置:
#--------------------------------------------------------------------------
# ● Fishing
#--------------------------------------------------------------------------
def fishing
character = $game_player
case character.direction
when 2
lx = character.x
ly = character.y + 1
when 4
lx = character.x - 1
ly = character.y
when 6
lx = character.x + 1
ly = character.y
when 8
lx = character.x
ly = character.y - 1
end
if $game_map.terrain_tag(lx,ly) == 1
Fishing.new
else
Audio.se_play("Audio/SE/057-Wrong01")
end
end
=====================================
4、在window_base下新建一个脚本并贴入以下部分:
#==============================================================================
# ■ Window_Fish
#------------------------------------------------------------------------------
# Fishy!
#==============================================================================
class Window_Fish < Window_Base
#--------------------------------------------------------------------------
# ● Start
#--------------------------------------------------------------------------
def initialize
super(0, 406, 640, 64)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = $defaultfonttype
self.contents.font.size = $defaultfontsize
self.opacity = 0
$fm = " "
refresh
end
#--------------------------------------------------------------------------
# ● Refresh
#--------------------------------------------------------------------------
def refresh
self.contents.clear
self.contents.font.color = normal_color
self.contents.draw_text(4, 0, 640, 32, $fm)
end
end
完成。注意下需要自己配合素材,比如钓鱼的行走图之类的。 |
|