设为首页收藏本站|繁體中文

Project1

 找回密码
 注册会员
搜索
查看: 4579|回复: 25
打印 上一主题 下一主题

请人写一脚本。

 关闭 [复制链接]
头像被屏蔽

Lv1.梦旅人 (禁止发言)

喵,小柯的宠物

梦石
0
星屑
50
在线时间
0 小时
注册时间
2007-12-15
帖子
2310
跳转到指定楼层
1
发表于 2008-1-30 23:26:59 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
提示: 作者被禁止或删除 内容自动屏蔽
签名被屏蔽

Lv1.梦旅人

梦石
0
星屑
50
在线时间
17 小时
注册时间
2007-5-28
帖子
364
2
发表于 2008-1-30 23:27:23 | 只看该作者
怎么感觉像模拟人生的翻版……
回复 支持 反对

使用道具 举报

Lv2.观梦者

傻♂逼

梦石
0
星屑
369
在线时间
1605 小时
注册时间
2007-3-13
帖子
6562

烫烫烫开拓者

3
发表于 2008-1-30 23:27:56 | 只看该作者
我来帮你!
回复 支持 反对

使用道具 举报

头像被屏蔽

Lv1.梦旅人 (禁止发言)

喵,小柯的宠物

梦石
0
星屑
50
在线时间
0 小时
注册时间
2007-12-15
帖子
2310
4
 楼主| 发表于 2008-1-30 23:29:16 | 只看该作者
提示: 作者被禁止或删除 内容自动屏蔽
签名被屏蔽
回复 支持 反对

使用道具 举报

头像被屏蔽

Lv1.梦旅人 (禁止发言)

梦石
0
星屑
50
在线时间
0 小时
注册时间
2007-12-28
帖子
136
5
发表于 2008-1-30 23:31:36 | 只看该作者
提示: 作者被禁止或删除 内容自动屏蔽
回复 支持 反对

使用道具 举报

Lv3.寻梦者 (暗夜天使)

名侦探小柯

梦石
0
星屑
3263
在线时间
3616 小时
注册时间
2006-9-6
帖子
37399

开拓者贵宾第3届短篇游戏大赛主流游戏组亚军第5届短篇游戏比赛亚军

6
发表于 2008-1-30 23:34:25 | 只看该作者
其实我觉得那个条太简陋了……|||

做好了我也拿去用……
不知道模拟游戏该做什么题材好……
免的又跟原来一样太空……
回复 支持 反对

使用道具 举报

头像被屏蔽

Lv1.梦旅人 (禁止发言)

喵,小柯的宠物

梦石
0
星屑
50
在线时间
0 小时
注册时间
2007-12-15
帖子
2310
7
 楼主| 发表于 2008-1-30 23:38:41 | 只看该作者
提示: 作者被禁止或删除 内容自动屏蔽
签名被屏蔽
回复 支持 反对

使用道具 举报

Lv3.寻梦者 (暗夜天使)

名侦探小柯

梦石
0
星屑
3263
在线时间
3616 小时
注册时间
2006-9-6
帖子
37399

开拓者贵宾第3届短篇游戏大赛主流游戏组亚军第5届短篇游戏比赛亚军

8
发表于 2008-1-30 23:39:22 | 只看该作者
以下引用殤。于2008-1-30 15:38:41的发言:


以下引用越前リョーマ于2008-1-30 15:34:25的发言:

其实我觉得那个条太简陋了……|||

做好了我也拿去用……
不知道模拟游戏该做什么题材好……
免的又跟原来一样太空……


PIA~


以下引用csh于2008-1-30 15:31:36的发言:

可能真的是磨米人生


好搞笑,磨米人生=v=

那人不认识龙龙……

也没玩过模拟人生……
再加电脑盲+白字师……
回复 支持 反对

使用道具 举报

Lv2.观梦者

傻♂逼

梦石
0
星屑
369
在线时间
1605 小时
注册时间
2007-3-13
帖子
6562

烫烫烫开拓者

9
发表于 2008-1-31 00:56:23 | 只看该作者
把图片放在PICTURE目录
脚本:
  1. class Window_In < Window_Base
  2.   #--------------------------------------------------------------------------
  3.   # ● 初始化对象
  4.   #--------------------------------------------------------------------------
  5.   def initialize
  6.     @pic = Sprite.new
  7.     @pic.z = 9999
  8.     @pic.bitmap = Cache.picture("变量界面图2_82135405")
  9.     @height = @pic.bitmap.height
  10.     @pic.x = 3
  11.     @pic.y = 416-@height
  12. #    self.z = 99999
  13.     super(0, 416-@height, 544, WLH + @height)
  14.     self.opacity = 0
  15.     #super(0, 0, 544, WLH + 500)
  16.    
  17.     refresh
  18.   end
  19.   def dispose
  20.     super
  21.     @pic.bitmap.dispose
  22.     @pic.dispose
  23.   end
  24.   #--------------------------------------------------------------------------
  25.   # ● 刷新
  26.   #--------------------------------------------------------------------------
  27.   def refresh
  28.     self.contents.clear
  29.     item
  30.     $game_variables[1] = 100 if $game_variables[1]>100
  31.     $game_variables[2] = 100 if $game_variables[2]>100
  32.     $game_variables[3] = 100 if $game_variables[3]>100
  33.     $game_variables[4] = 100 if $game_variables[4]>100
  34.     draw_currency_value($game_party.gold, -23, 60, 140)
  35.     x = 174
  36.     y = 38
  37.     $g = $game_party.gold
  38.     draw_currency_line($game_variables[1],x,y)
  39.     x = 174
  40.     y = 55
  41.     $v = []
  42.     $v[1] = $game_variables[1]
  43.     draw_currency_line($game_variables[2],x,y)
  44.     x = 174+65+32+13
  45.     y = 37
  46.     $v[2] = $game_variables[2]
  47.     draw_currency_line($game_variables[3],x,y)
  48.     x = 174+65+32+13
  49.     y = 56
  50.     $v[3] = $game_variables[3]
  51.     draw_currency_line($game_variables[4],x,y)
  52.     $v[4] = $game_variables[4]
  53.     draw_currency_item
  54.   end
  55.   def draw_currency_item
  56.     for i in 0...5
  57.       draw_item(i)
  58.     end
  59.   end
  60.   def draw_item(index)
  61.     x = 362+(index*32)
  62.     y = 60
  63.     item = @data[index]
  64.     if item != nil
  65.     icon_index = item.icon_index
  66.     bitmap = Cache.system("Iconset")
  67.     rect = Rect.new(icon_index % 16 * 24, icon_index / 16 * 24, 24, 24)
  68.     self.contents.blt(x, y, bitmap, rect, 255)
  69.     end
  70.   end
  71.   def draw_currency_line(value,x,y)
  72.     gw = 66 * value / 100
  73.     gc1 = hp_gauge_color1
  74.     gc2 = hp_gauge_color2
  75.     #self.contents.fill_rect(x, y + WLH - 8, 72, 6, gauge_back_color)
  76.     self.contents.gradient_fill_rect(x, y + WLH - 8, gw, 6, gc1, gc2)
  77.   end
  78.   def updated?
  79.     if @data != item_i
  80.       return true
  81.     else
  82.       return false
  83.     end
  84.   end
  85.   #--------------------------------------------------------------------------
  86.   # ● 列表中包含的物品
  87.   #     item : 物品
  88.   #--------------------------------------------------------------------------
  89.   def include?(item)
  90.     return false if item == nil
  91.     if $game_temp.in_battle
  92.       return false unless item.is_a?(RPG::Item)
  93.     end
  94.     return true
  95.   end
  96.   #--------------------------------------------------------------------------
  97.   # ● 取得物品
  98.   #--------------------------------------------------------------------------
  99.   def item
  100.     @data = []
  101.     for item in $game_party.items
  102.       next unless include?(item)
  103.       @data.push(item)
  104.       if item.is_a?(RPG::Item) and item.id == $game_party.last_item_id
  105.         #self.index = @data.size - 1
  106.       end
  107.     end
  108.     @data.push(nil) if include?(nil)
  109.     #@item_max = @data.size
  110.   end
  111.   #--------------------------------------------------------------------------
  112.   # ● 取得物品
  113.   #--------------------------------------------------------------------------
  114.   def item_i
  115.     data = []
  116.     for item in $game_party.items
  117.       next unless include?(item)
  118.       data.push(item)
  119.       if item.is_a?(RPG::Item) and item.id == $game_party.last_item_id
  120.         #self.index = @data.size - 1
  121.       end
  122.     end
  123.     data.push(nil) if include?(nil)
  124.     return data
  125.     #@item_max = @data.size
  126.   end
  127. end
复制代码
  1. #==============================================================================
  2. # ■ Scene_Map
  3. #------------------------------------------------------------------------------
  4. #  处理地图画面的类。
  5. #==============================================================================

  6. class Scene_Map < Scene_Base
  7.   #--------------------------------------------------------------------------
  8.   # ● 开始处理
  9.   #--------------------------------------------------------------------------
  10.   def start
  11.     super
  12.     $window_in = Window_In.new
  13.     $window_in.z = 99998
  14.     $game_map.refresh
  15.     @spriteset = Spriteset_Map.new
  16.     @message_window = Window_Message.new
  17.     @message_window.z = 99999
  18.   end
  19.   #--------------------------------------------------------------------------
  20.   # ● 执行变换
  21.   #--------------------------------------------------------------------------
  22.   def perform_transition
  23.     if Graphics.brightness == 0       # 战斗后、载入后
  24.       fadein(30)
  25.     else                              # 返回至菜单
  26.       Graphics.transition(15)
  27.     end
  28.   end
  29.   #--------------------------------------------------------------------------
  30.   # ● 结束处理
  31.   #--------------------------------------------------------------------------
  32.   def terminate
  33.     super
  34.     if $scene.is_a?(Scene_Battle)     # 正在切换战斗画面的情况下
  35.       @spriteset.dispose_characters   # 为了生成背景隐藏角色
  36.     end
  37.     $window_in.dispose
  38.     snapshot_for_background
  39.     @spriteset.dispose
  40.     @message_window.dispose
  41.     if $scene.is_a?(Scene_Battle)     # 正在切换战斗画面的情况下
  42.       perform_battle_transition       # 执行战斗前变换
  43.     end
  44.   end
  45.   #--------------------------------------------------------------------------
  46.   # ● 基本更新处理
  47.   #--------------------------------------------------------------------------
  48.   def update_basic
  49.     Graphics.update                   # 更新游戏画面
  50.     Input.update                      # 更新输入信息
  51.    # a = $game_variables
  52.     #if $v[1] != a[1] or
  53.     #  $v[2] != a[1] or
  54.     #  $v[3] != a[3] or
  55.     #  $v[4] != a[4] or
  56.     #  $g != $game_party.gold or
  57.     #  $window_in.updated?
  58.    #end
  59.     $game_map.update                  # 更新地图
  60.     @spriteset.update                 # 更新活动块元件
  61.   end
  62.   #--------------------------------------------------------------------------
  63.   # ● フレーム更新
  64.   #--------------------------------------------------------------------------
  65.   def update
  66.     super
  67.      #$window_in.dispose
  68.      $window_in.refresh# = Window_In.new
  69.      #$window_in.z = 99998

  70.     $game_map.interpreter.update      # 更新解释器
  71.     $game_map.update                  # 更新滴入
  72.     $game_player.update               # 更新玩家
  73.     $game_system.update               # 更新计时器
  74.     @spriteset.update                 # 更新活动块元件
  75.     @message_window.update            # 更新消息窗口
  76.     unless $game_message.visible      # 正在显示消息以外的情况
  77.       update_transfer_player
  78.       update_encounter
  79.       update_call_menu
  80.       update_call_debug
  81.       update_scene_change
  82.     end
  83.   end
  84.   #--------------------------------------------------------------------------
  85.   # ● 画面淡入
  86.   #     duration : 时间
  87.   #    在地图画面、Graphics.fadeout 直接使用会造成天气效果与远景卷动等不正常的
  88.   # 现象、所以执行动态淡入。
  89.   #--------------------------------------------------------------------------
  90.   def fadein(duration)
  91.     Graphics.transition(0)
  92.     for i in 0..duration-1
  93.       Graphics.brightness = 255 * i / duration
  94.       update_basic
  95.     end
  96.     Graphics.brightness = 255
  97.   end
  98.   #--------------------------------------------------------------------------
  99.   # ● 画面淡出
  100.   #     duration : 时间
  101.   #    与上面的淡入相同、不直接使用 Graphics.fadein。
  102.   #--------------------------------------------------------------------------
  103.   def fadeout(duration)
  104.     Graphics.transition(0)
  105.     for i in 0..duration-1
  106.       Graphics.brightness = 255 - 255 * i / duration
  107.       update_basic
  108.     end
  109.     Graphics.brightness = 0
  110.   end
  111.   #--------------------------------------------------------------------------
  112.   # ● 处理场所移动
  113.   #--------------------------------------------------------------------------
  114.   def update_transfer_player
  115.     return unless $game_player.transfer?
  116.     fade = (Graphics.brightness > 0)
  117.     fadeout(30) if fade
  118.     @spriteset.dispose              # 释放活动块元件
  119.     $game_player.perform_transfer   # 执行场所移动
  120.     $game_map.autoplay              # 自动切换 BGM 与 BGS
  121.     $game_map.update
  122.     Graphics.wait(15)
  123.     @spriteset = Spriteset_Map.new  # 在生成活动块元件
  124.     fadein(30) if fade
  125.     Input.update
  126.   end
  127.   #--------------------------------------------------------------------------
  128.   # ● 遇敌处理
  129.   #--------------------------------------------------------------------------
  130.   def update_encounter
  131.     return if $game_player.encounter_count > 0        # 未满遭遇步数?
  132.     return if $game_map.interpreter.running?          # 正在执行事件?
  133.     return if $game_system.encounter_disabled         # 禁止遇敌?
  134.     troop_id = $game_player.make_encounter_troop_id   # 确定敌方队伍
  135.     return if $data_troops[troop_id] == nil           # 敌方队伍无效?
  136.     $game_troop.setup(troop_id)
  137.     $game_troop.can_escape = true
  138.     $game_temp.battle_proc = nil
  139.     $game_temp.next_scene = "battle"
  140.     preemptive_or_surprise
  141.   end
  142.   #--------------------------------------------------------------------------
  143.   # ● 确定先行攻击和被偷袭的概率
  144.   #--------------------------------------------------------------------------
  145.   def preemptive_or_surprise
  146.     actors_agi = $game_party.average_agi
  147.     enemies_agi = $game_troop.average_agi
  148.     if actors_agi >= enemies_agi
  149.       percent_preemptive = 5
  150.       percent_surprise = 3
  151.     else
  152.       percent_preemptive = 3
  153.       percent_surprise = 5
  154.     end
  155.     if rand(100) < percent_preemptive
  156.       $game_troop.preemptive = true
  157.     elsif rand(100) < percent_surprise
  158.       $game_troop.surprise = true
  159.     end
  160.   end
  161.   #--------------------------------------------------------------------------
  162.   # ● 判断取消按钮调用菜单
  163.   #--------------------------------------------------------------------------
  164.   def update_call_menu
  165.     if Input.trigger?(Input::B)
  166.       return if $game_map.interpreter.running?        # 正在执行事件?
  167.       return if $game_system.menu_disabled            # 禁止菜单?
  168.       $game_temp.menu_beep = true                     # 设置播放 SE 标志
  169.       $game_temp.next_scene = "menu"
  170.     end
  171.   end
  172.   #--------------------------------------------------------------------------
  173.   # ● 判断 F9 键调用调试模式
  174.   #--------------------------------------------------------------------------
  175.   def update_call_debug
  176.     if $TEST and Input.press?(Input::F9)    # 测试游戏中 F9 键
  177.       $game_temp.next_scene = "debug"
  178.     end
  179.   end
  180.   #--------------------------------------------------------------------------
  181.   # ● 执行画面切换
  182.   #--------------------------------------------------------------------------
  183.   def update_scene_change
  184.     return if $game_player.moving?    # 角色正在移动?
  185.     case $game_temp.next_scene
  186.     when "battle"
  187.       call_battle
  188.     when "shop"
  189.       call_shop
  190.     when "name"
  191.       call_name
  192.     when "menu"
  193.       call_menu
  194.     when "save"
  195.       call_save
  196.     when "debug"
  197.       call_debug
  198.     when "gameover"
  199.       call_gameover
  200.     when "title"
  201.       call_title
  202.     else
  203.       $game_temp.next_scene = nil
  204.     end
  205.   end
  206.   #--------------------------------------------------------------------------
  207.   # ● 切换至战斗画面
  208.   #--------------------------------------------------------------------------
  209.   def call_battle
  210.     @spriteset.update
  211.     Graphics.update
  212.     $game_player.make_encounter_count
  213.     $game_player.straighten
  214.     $game_temp.map_bgm = RPG::BGM.last
  215.     $game_temp.map_bgs = RPG::BGS.last
  216.     RPG::BGM.stop
  217.     RPG::BGS.stop
  218.     Sound.play_battle_start
  219.     $game_system.battle_bgm.play
  220.     $game_temp.next_scene = nil
  221.     $scene = Scene_Battle.new
  222.   end
  223.   #--------------------------------------------------------------------------
  224.   # ● 切换至商店画面
  225.   #--------------------------------------------------------------------------
  226.   def call_shop
  227.     $game_temp.next_scene = nil
  228.     $scene = Scene_Shop.new
  229.   end
  230.   #--------------------------------------------------------------------------
  231.   # ● 切换至名称输入画面
  232.   #--------------------------------------------------------------------------
  233.   def call_name
  234.     $game_temp.next_scene = nil
  235.     $scene = Scene_Name.new
  236.   end
  237.   #--------------------------------------------------------------------------
  238.   # ● 切换至菜单画面
  239.   #--------------------------------------------------------------------------
  240.   def call_menu
  241.     if $game_temp.menu_beep
  242.       Sound.play_decision
  243.       $game_temp.menu_beep = false
  244.     end
  245.     $game_temp.next_scene = nil
  246.     $scene = Scene_Menu.new
  247.   end
  248.   #--------------------------------------------------------------------------
  249.   # ● 切换至存档画面
  250.   #--------------------------------------------------------------------------
  251.   def call_save
  252.     $game_temp.next_scene = nil
  253.     $scene = Scene_File.new(true, false, true)
  254.   end
  255.   #--------------------------------------------------------------------------
  256.   # ● 切换至调试画面
  257.   #--------------------------------------------------------------------------
  258.   def call_debug
  259.     Sound.play_decision
  260.     $game_temp.next_scene = nil
  261.     $scene = Scene_Debug.new
  262.   end
  263.   #--------------------------------------------------------------------------
  264.   # ● 切换至游戏结束画面
  265.   #--------------------------------------------------------------------------
  266.   def call_gameover
  267.     $game_temp.next_scene = nil
  268.     $scene = Scene_Gameover.new
  269.   end
  270.   #--------------------------------------------------------------------------
  271.   # ● 切换至标题画面
  272.   #--------------------------------------------------------------------------
  273.   def call_title
  274.     $game_temp.next_scene = nil
  275.     $scene = Scene_Title.new
  276.     fadeout(60)
  277.   end
  278.   #--------------------------------------------------------------------------
  279.   # ● 执行战斗前变换
  280.   #--------------------------------------------------------------------------
  281.   def perform_battle_transition
  282.     Graphics.transition(80, "Graphics/System/BattleStart", 80)
  283.     Graphics.freeze
  284.   end
  285. end
复制代码

系统信息:本贴由楼主认可为正确答案,66RPG感谢您的热情解答~
哎呀,蛋疼什么的最有爱了
回复 支持 反对

使用道具 举报

头像被屏蔽

Lv1.梦旅人 (禁止发言)

喵,小柯的宠物

梦石
0
星屑
50
在线时间
0 小时
注册时间
2007-12-15
帖子
2310
10
 楼主| 发表于 2008-1-31 01:02:31 | 只看该作者
提示: 作者被禁止或删除 内容自动屏蔽
回复 支持 反对

使用道具 举报

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

本版积分规则

拿上你的纸笔,建造一个属于你的梦想世界,加入吧。
 注册会员
找回密码

站长信箱:[email protected]|手机版|小黑屋|无图版|Project1游戏制作

GMT+8, 2024-5-16 02:34

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表