查看: 10593|回复: 24

[RM脚本] 垂钓脚本(已翻译注释)

  [复制链接]
头像被屏蔽

鬼隐

梦石
0
星屑
50
在线时间
0 小时
注册时间
2005-10-23
回帖
150
发表于 2006-6-14 01:02:33 | 显示全部楼层 |阅读模式

加入我们,或者,欢迎回来。

您需要 登录 才可以下载或查看,没有账号?注册会员

×
转自: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


完成。注意下需要自己配合素材,比如钓鱼的行走图之类的。
签名被屏蔽
头像被屏蔽

鬼隐

梦石
0
星屑
50
在线时间
0 小时
注册时间
2005-10-23
回帖
150
发表于 2006-6-14 01:02:33 | 显示全部楼层 |阅读模式

加入我们,或者,欢迎回来。

您需要 登录 才可以下载或查看,没有账号?注册会员

×
转自: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


完成。注意下需要自己配合素材,比如钓鱼的行走图之类的。
签名被屏蔽
梦石
0
星屑
50
在线时间
37 小时
注册时间
2006-2-27
回帖
150
发表于 2006-6-15 02:40:42 | 显示全部楼层
{/gg}具体怎么用呀!
偶是新手看不明白脚本!?
................
回复

使用道具 举报

头像被屏蔽

鬼隐

梦石
0
星屑
50
在线时间
0 小时
注册时间
2005-10-23
回帖
150
 楼主| 发表于 2006-6-15 03:05:50 | 显示全部楼层
以下引用千鸟于2006-6-14 18:40:42的发言:

具体怎么用呀!
偶是新手看不明白脚本!?


已经分开翻译注释过了~
签名被屏蔽
回复

使用道具 举报

头像被屏蔽
梦石
0
星屑
50
在线时间
0 小时
注册时间
2005-10-22
回帖
16
发表于 2006-6-15 03:15:00 | 显示全部楼层
翻完能理解了--所以说阿蓝还是可以帮我代考cet的咩 翻滚中

去试验
回复

使用道具 举报

头像被屏蔽

本尊<

梦石
0
星屑
50
在线时间
0 小时
注册时间
2005-10-22
回帖
146
发表于 2006-6-17 07:58:11 | 显示全部楼层
好啊
回复

使用道具 举报

头像被屏蔽
梦石
0
星屑
50
在线时间
0 小时
注册时间
2006-5-20
回帖
5
发表于 2006-6-18 02:30:44 | 显示全部楼层
D~
回复

使用道具 举报

匿·蹤

梦石
0
星屑
65
在线时间
99 小时
注册时间
2006-3-19
回帖
404
发表于 2006-6-18 03:51:37 | 显示全部楼层
这个是好东西!!!
卐忍 → 解忍 → 元忍 → 隐忍 → 卍忍 → 匿踪(最终)
完全退步到了卐忍阶段
回复

使用道具 举报

斩

梦石
0
星屑
50
在线时间
28 小时
注册时间
2005-12-14
回帖
1784

贵宾

发表于 2006-6-18 04:00:34 | 显示全部楼层
口袋的又一功能挖……{/hx}

回复

使用道具 举报

指舞飞扬

梦石
0
星屑
50
在线时间
0 小时
注册时间
2006-3-5
回帖
454
发表于 2006-6-18 05:23:55 | 显示全部楼层
貌似不错```研究一下{/cy}
世界真奇妙~啥鸟人都有/:|~
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

Powered by Discuz! X5.0 © 2001-2026 Discuz! Team.

在本版发帖返回顶部