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

Project1

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

bug

 关闭 [复制链接]

Lv2.观梦者 (管理员)

八云紫的式神

梦石
0
星屑
549
在线时间
1243 小时
注册时间
2008-1-1
帖子
4282

烫烫烫

跳转到指定楼层
1
发表于 2009-10-7 07:10:13 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
这个字RGE里报220行SyntaxError,RMVX报212行SyntaxError,212行才是正确的
212:class MoveCommand(code = 0, parameters = [])
220:end

  1. module RPG
  2.   class Map
  3.     def initialize(width, height)
  4.       @width = width
  5.       @height = height
  6.       @scroll_type = 0
  7.       @autoplay_bgm = false
  8.       @bgm = RPG::BGM.new
  9.       @autoplay_bgs = false
  10.       @bgs = RPG::BGS.new("", 80)
  11.       @disable_dashing = false
  12.       @encounter_list = []
  13.       @encounter_step = 30
  14.       @parallax_name = ""
  15.       @parallax_loop_x = false
  16.       @parallax_loop_y = false
  17.       @parallax_sx = 0
  18.       @parallax_sy = 0
  19.       @parallax_show = false
  20.       @data = Table.new(width, height, 3)
  21.       @events = {}
  22.     end
  23.     attr_accessor :width
  24.     attr_accessor :height
  25.     attr_accessor :scroll_type
  26.     attr_accessor :autoplay_bgm
  27.     attr_accessor :bgm
  28.     attr_accessor :autoplay_bgs
  29.     attr_accessor :bgs
  30.     attr_accessor :disable_dashing
  31.     attr_accessor :encounter_list
  32.     attr_accessor :encounter_step
  33.     attr_accessor :parallax_name
  34.     attr_accessor :parallax_loop_x
  35.     attr_accessor :parallax_loop_y
  36.     attr_accessor :parallax_sx
  37.     attr_accessor :parallax_sy
  38.     attr_accessor :parallax_show
  39.     attr_accessor :data
  40.     attr_accessor :events
  41.   end
  42. end
  43. module RPG
  44.   class MapInfo
  45.     def initialize
  46.       @name = ""
  47.       @parent_id = 0
  48.       @order = 0
  49.       @expanded = false
  50.       @scroll_x = 0
  51.       @scroll_y = 0
  52.     end
  53.     attr_accessor :name
  54.     attr_accessor :parent_id
  55.     attr_accessor :order
  56.     attr_accessor :expanded
  57.     attr_accessor :scroll_x
  58.     attr_accessor :scroll_y
  59.   end
  60. end
  61. module RPG
  62.   class Area
  63.     def initialize
  64.       @id = 0
  65.       @name = ""
  66.       @map_id = 0
  67.       @rect = Rect.new(0,0,0,0)
  68.       @encounter_list = []
  69.       @order = 0
  70.     end
  71.     attr_accessor :id
  72.     attr_accessor :name
  73.     attr_accessor :map_id
  74.     attr_accessor :rect
  75.     attr_accessor :encounter_list
  76.     attr_accessor :order
  77.   end
  78. end
  79. module RPG
  80.   class Event
  81.     def initialize(x, y)
  82.       @id = 0
  83.       @name = ""
  84.       @x = x
  85.       @y = y
  86.       @pages = [RPG::Event::Page.new]
  87.     end
  88.     attr_accessor :id
  89.     attr_accessor :name
  90.     attr_accessor :x
  91.     attr_accessor :y
  92.     attr_accessor :pages
  93.   end
  94. end
  95. module RPG
  96.   class Event
  97.     class Page
  98.       def initialize
  99.         @condition = RPG::Event::Page::Condition.new
  100.         @graphic = RPG::Event::Page::Graphic.new
  101.         @move_type = 0
  102.         @move_speed = 3
  103.         @move_frequency = 3
  104.         @move_route = RPG::MoveRoute.new
  105.         @walk_anime = true
  106.         @step_anime = false
  107.         @direction_fix = false
  108.         @through = false
  109.         @priority_type = 0
  110.         @trigger = 0
  111.         @list = [RPG::EventCommand.new]
  112.       end
  113.       attr_accessor :condition
  114.       attr_accessor :graphic
  115.       attr_accessor :move_type
  116.       attr_accessor :move_speed
  117.       attr_accessor :move_frequency
  118.       attr_accessor :move_route
  119.       attr_accessor :walk_anime
  120.       attr_accessor :step_anime
  121.       attr_accessor :direction_fix
  122.       attr_accessor :through
  123.       attr_accessor :priority_type
  124.       attr_accessor :trigger
  125.       attr_accessor :list
  126.     end
  127.   end
  128. end
  129. module RPG
  130.   class Event
  131.     class Page
  132.       class Condition
  133.         def initialize
  134.           @switch1_valid = false
  135.           @switch2_valid = false
  136.           @variable_valid = false
  137.           @self_switch_valid = false
  138.           @item_valid = false
  139.           @actor_valid = false
  140.           @switch1_id = 1
  141.           @switch2_id = 1
  142.           @variable_id = 1
  143.           @variable_value = 0
  144.           @self_switch_ch = "A"
  145.           @item_id = 1
  146.           @actor_id = 1
  147.         end
  148.         attr_accessor :switch1_valid
  149.         attr_accessor :switch2_valid
  150.         attr_accessor :variable_valid
  151.         attr_accessor :self_switch_valid
  152.         attr_accessor :item_valid
  153.         attr_accessor :actor_valid
  154.         attr_accessor :switch1_id
  155.         attr_accessor :switch2_id
  156.         attr_accessor :variable_id
  157.         attr_accessor :variable_value
  158.         attr_accessor :self_switch_ch
  159.         attr_accessor :item_id
  160.         attr_accessor :actor_id
  161.       end
  162.     end
  163.   end
  164. end
  165. module RPG
  166.   class Event
  167.     class Page
  168.       class Graphic
  169.         def initialize
  170.           @tile_id = 0
  171.           @character_name = ""
  172.           @character_index = 0
  173.           @direction = 2
  174.           @pattern = 0
  175.         end
  176.         attr_accessor :tile_id
  177.         attr_accessor :character_name
  178.         attr_accessor :character_index
  179.         attr_accessor :direction
  180.         attr_accessor :pattern
  181.       end
  182.     end
  183.   end
  184. end
  185. module RPG
  186.   class EventCommand
  187.     def initialize(code = 0, indent = 0, parameters = [])
  188.       @code = code
  189.       @indent = indent
  190.       @parameters = parameters
  191.     end
  192.     attr_accessor :code
  193.     attr_accessor :indent
  194.     attr_accessor :parameters
  195.   end
  196. end
  197. module RPG
  198.   class MoveRoute
  199.     def initialize
  200.       @repeat = true
  201.       @skippable = false
  202.       @wait = false
  203.       @list = [RPG::MoveCommand.new]
  204.     end
  205.     attr_accessor :repeat
  206.     attr_accessor :skippable
  207.     attr_accessor :wait
  208.     attr_accessor :list
  209.   end
  210. end
  211. module RPG
  212.   class MoveCommand(code = 0, parameters = [])
  213.     def initialize
  214.       @code = code
  215.       @parameters = parameters
  216.     end
  217.     attr_accessor :code
  218.     attr_accessor :parameters
  219.   end
  220. end
  221. module RPG
  222.   class Actor
  223.     def initialize
  224.       @id = 0
  225.       @name = ""
  226.       @class_id = 1
  227.       @initial_level = 1
  228.       @exp_basis = 25
  229.       @exp_inflation = 35
  230.       @character_name = ""
  231.       @character_index = 0
  232.       @face_name = ""
  233.       @face_index = 0
  234.       @parameters = Table.new(6,100)
  235.       for i in 1..99
  236.         @parameters[0,i] = 400+i*50
  237.         @parameters[1,i] = 80+i*10
  238.         @parameters[2,i] = 15+i*5/4
  239.         @parameters[3,i] = 15+i*5/4
  240.         @parameters[4,i] = 20+i*5/2
  241.         @parameters[5,i] = 20+i*5/2
  242.       end
  243.       @weapon_id = 0
  244.       @armor1_id = 0
  245.       @armor2_id = 0
  246.       @armor3_id = 0
  247.       @armor4_id = 0
  248.       @two_swords_style = false
  249.       @fix_equipment = false
  250.       @auto_battle = false
  251.       @super_guard = false
  252.       @pharmacology = false
  253.       @critical_bonus = false
  254.     end
  255.     attr_accessor :id
  256.     attr_accessor :name
  257.     attr_accessor :class_id
  258.     attr_accessor :initial_level
  259.     attr_accessor :exp_basis
  260.     attr_accessor :exp_inflation
  261.     attr_accessor :character_name
  262.     attr_accessor :character_index
  263.     attr_accessor :face_name
  264.     attr_accessor :face_index
  265.     attr_accessor :parameters
  266.     attr_accessor :weapon_id
  267.     attr_accessor :armor1_id
  268.     attr_accessor :armor2_id
  269.     attr_accessor :armor3_id
  270.     attr_accessor :armor4_id
  271.     attr_accessor :two_swords_style
  272.     attr_accessor :fix_equipment
  273.     attr_accessor :auto_battle
  274.     attr_accessor :super_guard
  275.     attr_accessor :pharmacology
  276.     attr_accessor :critical_bonus
  277.   end
  278. end
  279. module RPG
  280.   class Class
  281.     def initialize
  282.       @id = 0
  283.       @name = ""
  284.       @position = 0
  285.       @weapon_set = []
  286.       @armor_set = []
  287.       @element_ranks = Table.new(1)
  288.       @state_ranks = Table.new(1)
  289.       @learnings = []
  290.       @skill_name_valid = false
  291.       @skill_name = ""
  292.     end
  293.     attr_accessor :id
  294.     attr_accessor :name
  295.     attr_accessor :position
  296.     attr_accessor :weapon_set
  297.     attr_accessor :armor_set
  298.     attr_accessor :element_ranks
  299.     attr_accessor :state_ranks
  300.     attr_accessor :learnings
  301.     attr_accessor :skill_name_valid
  302.     attr_accessor :skill_name
  303.   end
  304. end
  305. module RPG
  306.   class Class
  307.     class Learning
  308.       def initialize
  309.         @level = 1
  310.         @skill_id = 1
  311.       end
  312.       attr_accessor :level
  313.       attr_accessor :skill_id
  314.     end
  315.   end
  316. end
  317. module RPG
  318.   class BaseItem
  319.     def initialize
  320.       @id = 0
  321.       @name = ""
  322.       @icon_index = 0
  323.       @description = ""
  324.       @note = ""
  325.     end
  326.     attr_accessor :id
  327.     attr_accessor :name
  328.     attr_accessor :icon_index
  329.     attr_accessor :description
  330.     attr_accessor :note
  331.   end
  332. end
  333. module RPG
  334.   class UsableItem < BaseItem
  335.     def initialize
  336.       super
  337.       @scope = 0
  338.       @occasion = 0
  339.       @speed = 0
  340.       @animation_id = 0
  341.       @common_event_id = 0
  342.       @base_damage = 0
  343.       @variance = 20
  344.       @atk_f = 0
  345.       @spi_f = 0
  346.       @physical_attack = false
  347.       @damage_to_mp = false
  348.       @absorb_damage = false
  349.       @ignore_defense = false
  350.       @element_set = []
  351.       @plus_state_set = []
  352.       @minus_state_set = []
  353.     end
  354.     def for_opponent?
  355.       return [1, 2, 3, 4, 5, 6].include?(@scope)
  356.     end
  357.     def for_friend?
  358.       return [7, 8, 9, 10, 11].include?(@scope)
  359.     end
  360.     def for_dead_friend?
  361.       return [9, 10].include?(@scope)
  362.     end
  363.     def for_user?
  364.       return [11].include?(@scope)
  365.     end
  366.     def for_one?
  367.       return [1, 3, 4, 7, 9, 11].include?(@scope)
  368.     end
  369.     def for_two?
  370.       return [5].include?(@scope)
  371.     end
  372.     def for_three?
  373.       return [6].include?(@scope)
  374.     end
  375.     def for_random?
  376.       return [4, 5, 6].include?(@scope)
  377.     end
  378.     def for_all?
  379.       return [2, 8, 10].include?(@scope)
  380.     end
  381.     def dual?
  382.       return [3].include?(@scope)
  383.     end
  384.     def need_selection?
  385.       return [1, 3, 7, 9].include?(@scope)
  386.     end
  387.     def battle_ok?
  388.       return [0, 1].include?(@occasion)
  389.     end
  390.     def menu_ok?
  391.       return [0, 2].include?(@occasion)
  392.     end
  393.     attr_accessor :scope
  394.     attr_accessor :occasion
  395.     attr_accessor :speed
  396.     attr_accessor :animation_id
  397.     attr_accessor :common_event_id
  398.     attr_accessor :base_damage
  399.     attr_accessor :variance
  400.     attr_accessor :atk_f
  401.     attr_accessor :spi_f
  402.     attr_accessor :physical_attack
  403.     attr_accessor :damage_to_mp
  404.     attr_accessor :absorb_damage
  405.     attr_accessor :ignore_defense
  406.     attr_accessor :element_set
  407.     attr_accessor :plus_state_set
  408.     attr_accessor :minus_state_set
  409.   end
  410. end
  411. module RPG
  412.   class Skill < UsableItem
  413.     def initialize
  414.       super
  415.       @scope = 1
  416.       @mp_cost = 0
  417.       @hit = 100
  418.       @message1 = ""
  419.       @message2 = ""
  420.     end
  421.     attr_accessor :mp_cost
  422.     attr_accessor :hit
  423.     attr_accessor :message1
  424.     attr_accessor :message2
  425.   end
  426. end
  427. module RPG
  428.   class Item < UsableItem
  429.     def initialize
  430.       super
  431.       @scope = 7
  432.       @price = 0
  433.       @consumable = true
  434.       @hp_recovery_rate = 0
  435.       @hp_recovery = 0
  436.       @mp_recovery_rate = 0
  437.       @mp_recovery = 0
  438.       @parameter_type = 0
  439.       @parameter_points = 0
  440.     end
  441.     attr_accessor :price
  442.     attr_accessor :consumable
  443.     attr_accessor :hp_recovery_rate
  444.     attr_accessor :hp_recovery
  445.     attr_accessor :mp_recovery_rate
  446.     attr_accessor :mp_recovery
  447.     attr_accessor :parameter_type
  448.     attr_accessor :parameter_points
  449.   end
  450. end
  451. module RPG
  452.   class Weapon < BaseItem
  453.     def initialize
  454.       super
  455.       @animation_id = 0
  456.       @price = 0
  457.       @hit = 95
  458.       @atk = 0
  459.       @def = 0
  460.       @spi = 0
  461.       @agi = 0
  462.       @two_handed = false
  463.       @fast_attack = false
  464.       @dual_attack = false
  465.       @critical_bonus = false
  466.       @element_set = []
  467.       @state_set = []
  468.     end
  469.     attr_accessor :animation_id
  470.     attr_accessor :price
  471.     attr_accessor :hit
  472.     attr_accessor :atk
  473.     attr_accessor :def
  474.     attr_accessor :spi
  475.     attr_accessor :agi
  476.     attr_accessor :two_handed
  477.     attr_accessor :fast_attack
  478.     attr_accessor :dual_attack
  479.     attr_accessor :critical_bonus
  480.     attr_accessor :element_set
  481.     attr_accessor :state_set
  482.   end
  483. end
  484. module RPG
  485.   class Armor < BaseItem
  486.     def initialize
  487.       super
  488.       @kind = 0
  489.       @price = 0
  490.       @eva = 0
  491.       @atk = 0
  492.       @def = 0
  493.       @spi = 0
  494.       @agi = 0
  495.       @prevent_critical = false
  496.       @half_mp_cost = false
  497.       @double_exp_gain = false
  498.       @auto_hp_recover = false
  499.       @element_set = []
  500.       @state_set = []
  501.     end
  502.     attr_accessor :kind
  503.     attr_accessor :price
  504.     attr_accessor :eva
  505.     attr_accessor :atk
  506.     attr_accessor :def
  507.     attr_accessor :spi
  508.     attr_accessor :agi
  509.     attr_accessor :prevent_critical
  510.     attr_accessor :half_mp_cost
  511.     attr_accessor :double_exp_gain
  512.     attr_accessor :auto_hp_recover
  513.     attr_accessor :element_set
  514.     attr_accessor :state_set
  515.   end
  516. end
  517. module RPG
  518.   class Enemy
  519.     def initialize
  520.       @id = 0
  521.       @name = ""
  522.       @battler_name = ""
  523.       @battler_hue = 0
  524.       @maxhp = 10
  525.       @maxmp = 10
  526.       @atk = 10
  527.       @def = 10
  528.       @spi = 10
  529.       @agi = 10
  530.       @hit = 95
  531.       @eva = 5
  532.       @exp = 0
  533.       @gold = 0
  534.       @drop_item1 = RPG::Enemy::DropItem.new
  535.       @drop_item2 = RPG::Enemy::DropItem.new
  536.       @levitate = false
  537.       @has_critical = false
  538.       @element_ranks = Table.new(1)
  539.       @state_ranks = Table.new(1)
  540.       @actions = [RPG::Enemy::Action.new]
  541.       @note = ""
  542.     end
  543.     attr_accessor :id
  544.     attr_accessor :name
  545.     attr_accessor :battler_name
  546.     attr_accessor :battler_hue
  547.     attr_accessor :maxhp
  548.     attr_accessor :maxmp
  549.     attr_accessor :atk
  550.     attr_accessor :def
  551.     attr_accessor :spi
  552.     attr_accessor :agi
  553.     attr_accessor :hit
  554.     attr_accessor :eva
  555.     attr_accessor :exp
  556.     attr_accessor :gold
  557.     attr_accessor :drop_item1
  558.     attr_accessor :drop_item2
  559.     attr_accessor :levitate
  560.     attr_accessor :has_critical
  561.     attr_accessor :element_ranks
  562.     attr_accessor :state_ranks
  563.     attr_accessor :actions
  564.     attr_accessor :note
  565.   end
  566. end
  567. module RPG
  568.   class Enemy
  569.     class DropItem
  570.       def initialize
  571.         @kind = 0
  572.         @item_id = 1
  573.         @weapon_id = 1
  574.         @armor_id = 1
  575.         @denominator = 1
  576.       end
  577.       attr_accessor :kind
  578.       attr_accessor :item_id
  579.       attr_accessor :weapon_id
  580.       attr_accessor :armor_id
  581.       attr_accessor :denominator
  582.     end
  583.   end
  584. end
  585. module RPG
  586.   class Enemy
  587.     class Action
  588.       def initialize
  589.         @kind = 0
  590.         @basic = 0
  591.         @skill_id = 1
  592.         @condition_type = 0
  593.         @condition_param1 = 0
  594.         @condition_param2 = 0
  595.         @rating = 5
  596.       end
  597.       def skill?
  598.         return @kind == 1
  599.       end
  600.       attr_accessor :kind
  601.       attr_accessor :basic
  602.       attr_accessor :skill_id
  603.       attr_accessor :condition_type
  604.       attr_accessor :condition_param1
  605.       attr_accessor :condition_param2
  606.       attr_accessor :rating
  607.     end
  608.   end
  609. end
  610. module RPG
  611.   class Troop
  612.     def initialize
  613.       @id = 0
  614.       @name = ""
  615.       @members = []
  616.       @pages = [RPG::BattleEventPage.new]
  617.     end
  618.     attr_accessor :id
  619.     attr_accessor :name
  620.     attr_accessor :members
  621.     attr_accessor :pages
  622.   end
  623. end
  624. module RPG
  625.   class Troop
  626.     class Member
  627.       def initialize
  628.         @enemy_id = 1
  629.         @x = 0
  630.         @y = 0
  631.         @hidden = false
  632.         @immortal = false
  633.       end
  634.       attr_accessor :enemy_id
  635.       attr_accessor :x
  636.       attr_accessor :y
  637.       attr_accessor :hidden
  638.       attr_accessor :immortal
  639.     end
  640.   end
  641. end
  642. module RPG
  643.   class Troop
  644.     class Page
  645.       def initialize
  646.         @condition = RPG::Troop::Page::Condition.new
  647.         @span = 0
  648.         @list = [RPG::EventCommand.new]
  649.       end
  650.       attr_accessor :condition
  651.       attr_accessor :span
  652.       attr_accessor :list
  653.     end
  654.   end
  655. end
  656. module RPG
  657.   class Troop
  658.     class Page
  659.       class Condition
  660.         def initialize
  661.           @turn_ending = false
  662.           @turn_valid = false
  663.           @enemy_valid = false
  664.           @actor_valid = false
  665.           @switch_valid = false
  666.           @turn_a = 0
  667.           @turn_b = 0
  668.           @enemy_index = 0
  669.           @enemy_hp = 50
  670.           @actor_id = 1
  671.           @actor_hp = 50
  672.           @switch_id = 1
  673.         end
  674.         attr_accessor :turn_ending
  675.         attr_accessor :turn_valid
  676.         attr_accessor :enemy_valid
  677.         attr_accessor :actor_valid
  678.         attr_accessor :switch_valid
  679.         attr_accessor :turn_a
  680.         attr_accessor :turn_b
  681.         attr_accessor :enemy_index
  682.         attr_accessor :enemy_hp
  683.         attr_accessor :actor_id
  684.         attr_accessor :actor_hp
  685.         attr_accessor :switch_id
  686.       end
  687.     end
  688.   end
  689. end
  690. module RPG
  691.   class State
  692.     def initialize
  693.       @id = 0
  694.       @name = ""
  695.       @icon_index = 0
  696.       @restriction = 0
  697.       @priority = 5
  698.       @atk_rate = 100
  699.       @def_rate = 100
  700.       @spi_rate = 100
  701.       @agi_rate = 100
  702.       @nonresistance = false
  703.       @offset_by_opposite = false
  704.       @slip_damage = false
  705.       @reduce_hit_ratio = false
  706.       @battle_only = true
  707.       @release_by_damage = false
  708.       @hold_turn = 0
  709.       @auto_release_prob = 0
  710.       @message1 = ""
  711.       @message2 = ""
  712.       @message3 = ""
  713.       @message4 = ""
  714.       @element_set = []
  715.       @state_set = []
  716.       @note = ""
  717.     end
  718.     attr_accessor :id
  719.     attr_accessor :name
  720.     attr_accessor :icon_index
  721.     attr_accessor :restriction
  722.     attr_accessor :priority
  723.     attr_accessor :atk_rate
  724.     attr_accessor :def_rate
  725.     attr_accessor :spi_rate
  726.     attr_accessor :agi_rate
  727.     attr_accessor :nonresistance
  728.     attr_accessor :offset_by_opposite
  729.     attr_accessor :slip_damage
  730.     attr_accessor :reduce_hit_ratio
  731.     attr_accessor :battle_only
  732.     attr_accessor :release_by_damage
  733.     attr_accessor :hold_turn
  734.     attr_accessor :auto_release_prob
  735.     attr_accessor :message1
  736.     attr_accessor :message2
  737.     attr_accessor :message3
  738.     attr_accessor :message4
  739.     attr_accessor :element_set
  740.     attr_accessor :state_set
  741.     attr_accessor :note
  742.   end
  743. end
  744. module RPG
  745.   class Animation
  746.     def initialize
  747.       @id = 0
  748.       @name = ""
  749.       @animation1_name = ""
  750.       @animation1_hue = 0
  751.       @animation2_name = ""
  752.       @animation2_hue = 0
  753.       @position = 1
  754.       @frame_max = 1
  755.       @frames = [RPG::Animation::Frame.new]
  756.       @timings = []
  757.     end
  758.     attr_accessor :id
  759.     attr_accessor :name
  760.     attr_accessor :animation1_name
  761.     attr_accessor :animation1_hue
  762.     attr_accessor :animation2_name
  763.     attr_accessor :animation2_hue
  764.     attr_accessor :position
  765.     attr_accessor :frame_max
  766.     attr_accessor :frames
  767.     attr_accessor :timings
  768.   end
  769. end
  770. module RPG
  771.   class Animation
  772.     class Frame
  773.       def initialize
  774.         @cell_max = 0
  775.         @cell_data = Table.new(0, 0)
  776.       end
  777.       attr_accessor :cell_max
  778.       attr_accessor :cell_data
  779.     end
  780.   end
  781. end
  782. module RPG
  783.   class Animation
  784.     class Timing
  785.       def initialize
  786.         @frame = 0
  787.         @se = RPG::SE.new("", 80)
  788.         @flash_scope = 0
  789.         @flash_color = Color.new(255,255,255,255)
  790.         @flash_duration = 5
  791.       end
  792.       attr_accessor :frame
  793.       attr_accessor :se
  794.       attr_accessor :flash_scope
  795.       attr_accessor :flash_color
  796.       attr_accessor :flash_duration
  797.     end
  798.   end
  799. end
  800. module RPG
  801.   class CommonEvent
  802.     def initialize
  803.       @id = 0
  804.       @name = ""
  805.       @trigger = 0
  806.       @switch_id = 1
  807.       @list = [RPG::EventCommand.new]
  808.     end
  809.     attr_accessor :id
  810.     attr_accessor :name
  811.     attr_accessor :trigger
  812.     attr_accessor :switch_id
  813.     attr_accessor :list
  814.   end
  815. end
  816. module RPG
  817.   class System
  818.     def initialize
  819.       @game_title = ""
  820.       @version_id = 0
  821.       @party_members = [1]
  822.       @elements = [nil, ""]
  823.       @switches = [nil, ""]
  824.       @variables = [nil, ""]
  825.       @passages = Table.new(8192)
  826.       @boat = RPG::System::Vehicle.new
  827.       @ship = RPG::System::Vehicle.new
  828.       @airship = RPG::System::Vehicle.new
  829.       @title_bgm = RPG::BGM.new
  830.       @battle_bgm = RPG::BGM.new
  831.       @battle_end_me = RPG::ME.new
  832.       @gameover_me = RPG::ME.new
  833.       @sounds = []
  834.       20.times { @sounds.push(RPG::SE.new) }
  835.       @test_battlers = []
  836.       @test_troop_id = 1
  837.       @start_map_id = 1
  838.       @start_x = 0
  839.       @start_y = 0
  840.       @terms = RPG::System::Terms.new
  841.       @battler_name = ""
  842.       @battler_hue = 0
  843.       @edit_map_id = 1
  844.     end
  845.     attr_accessor :game_title
  846.     attr_accessor :version_id
  847.     attr_accessor :party_members
  848.     attr_accessor :elements
  849.     attr_accessor :switches
  850.     attr_accessor :variables
  851.     attr_accessor :passages
  852.     attr_accessor :boat
  853.     attr_accessor :ship
  854.     attr_accessor :airship
  855.     attr_accessor :title_bgm
  856.     attr_accessor :battle_bgm
  857.     attr_accessor :battle_end_me
  858.     attr_accessor :gameover_me
  859.     attr_accessor :sounds
  860.     attr_accessor :test_battlers
  861.     attr_accessor :test_troop_id
  862.     attr_accessor :start_map_id
  863.     attr_accessor :start_x
  864.     attr_accessor :start_y
  865.     attr_accessor :terms
  866.     attr_accessor :battler_name
  867.     attr_accessor :battler_hue
  868.     attr_accessor :edit_map_id
  869.   end
  870. end
  871. module RPG
  872.   class System
  873.     class Vehicle
  874.       def initialize
  875.         @character_name = ""
  876.         @character_index = 0
  877.         @bgm = RPG::BGM.new
  878.         @start_map_id = 0
  879.         @start_x = 0
  880.         @start_y = 0
  881.       end
  882.       attr_accessor :character_name
  883.       attr_accessor :character_index
  884.       attr_accessor :bgm
  885.       attr_accessor :start_map_id
  886.       attr_accessor :start_x
  887.       attr_accessor :start_y
  888.     end
  889.   end
  890. end
  891. module RPG
  892.   class System
  893.     class Terms
  894.       def initialize
  895.         @level = ""
  896.         @level_a = ""
  897.         @hp = ""
  898.         @hp_a = ""
  899.         @mp = ""
  900.         @mp_a = ""
  901.         @atk = ""
  902.         @def = ""
  903.         @spi = ""
  904.         @agi = ""
  905.         @weapon = ""
  906.         @armor1 = ""
  907.         @armor2 = ""
  908.         @armor3 = ""
  909.         @armor4 = ""
  910.         @weapon1 = ""
  911.         @weapon2 = ""
  912.         @attack = ""
  913.         @skill = ""
  914.         @guard = ""
  915.         @item = ""
  916.         @equip = ""
  917.         @status = ""
  918.         @save = ""
  919.         @game_end = ""
  920.         @fight = ""
  921.         @escape = ""
  922.         @new_game = ""
  923.         @continue = ""
  924.         @shutdown = ""
  925.         @to_title = ""
  926.         @cancel = ""
  927.         @gold = ""
  928.       end
  929.       attr_accessor :level
  930.       attr_accessor :level_a
  931.       attr_accessor :hp
  932.       attr_accessor :hp_a
  933.       attr_accessor :mp
  934.       attr_accessor :mp_a
  935.       attr_accessor :atk
  936.       attr_accessor :def
  937.       attr_accessor :spi
  938.       attr_accessor :agi
  939.       attr_accessor :weapon
  940.       attr_accessor :armor1
  941.       attr_accessor :armor2
  942.       attr_accessor :armor3
  943.       attr_accessor :armor4
  944.       attr_accessor :weapon1
  945.       attr_accessor :weapon2
  946.       attr_accessor :attack
  947.       attr_accessor :skill
  948.       attr_accessor :guard
  949.       attr_accessor :item
  950.       attr_accessor :equip
  951.       attr_accessor :status
  952.       attr_accessor :save
  953.       attr_accessor :game_end
  954.       attr_accessor :fight
  955.       attr_accessor :escape
  956.       attr_accessor :new_game
  957.       attr_accessor :continue
  958.       attr_accessor :shutdown
  959.       attr_accessor :to_title
  960.       attr_accessor :cancel
  961.       attr_accessor :gold
  962.     end
  963.   end
  964. end
  965. module RPG
  966.   class System
  967.     class TestBattler
  968.       def initialize
  969.         @actor_id = 1
  970.         @level = 1
  971.         @weapon_id = 0
  972.         @armor1_id = 0
  973.         @armor2_id = 0
  974.         @armor3_id = 0
  975.         @armor4_id = 0
  976.       end
  977.       attr_accessor :actor_id
  978.       attr_accessor :level
  979.       attr_accessor :weapon_id
  980.       attr_accessor :armor1_id
  981.       attr_accessor :armor2_id
  982.       attr_accessor :armor3_id
  983.       attr_accessor :armor4_id
  984.     end
  985.   end
  986. end
  987. module RPG
  988.   class AudioFile
  989.     def initialize(name = "", volume = 100, pitch = 100)
  990.       @name = name
  991.       @volume = volume
  992.       @pitch = pitch
  993.     end
  994.     attr_accessor :name
  995.     attr_accessor :volume
  996.     attr_accessor :pitch
  997.   end
  998. end
  999. module RPG
  1000.   class BGM < AudioFile
  1001.     @@last = BGM.new
  1002.     def play
  1003.       if @name.empty?
  1004.         Audio.bgm_stop
  1005.         @@last = BGM.new
  1006.       else
  1007.         Audio.bgm_play("Audio/BGM/" + @name, @volume, @pitch)
  1008.         @@last = self
  1009.       end
  1010.     end
  1011.     def self.stop
  1012.       Audio.bgm_stop
  1013.       @@last = BGM.new
  1014.     end
  1015.     def self.fade(time)
  1016.       Audio.bgm_fade(time)
  1017.       @@last = BGM.new
  1018.     end
  1019.     def self.last
  1020.       @@last
  1021.     end
  1022.   end
  1023. end
  1024. module RPG
  1025.   class BGS < AudioFile
  1026.     @@last = BGS.new
  1027.     def play
  1028.       if @name.empty?
  1029.         Audio.bgs_stop
  1030.         @@last = BGS.new
  1031.       else
  1032.         Audio.bgs_play("Audio/BGS/" + @name, @volume, @pitch)
  1033.         @@last = self
  1034.       end
  1035.     end
  1036.     def self.stop
  1037.       Audio.bgs_stop
  1038.       @@last = BGS.new
  1039.     end
  1040.     def self.fade(time)
  1041.       Audio.bgs_fade(time)
  1042.       @@last = BGS.new
  1043.     end
  1044.     def self.last
  1045.       @@last
  1046.     end
  1047.   end
  1048. end
  1049. module RPG
  1050.   class ME < AudioFile
  1051.     def play
  1052.       if @name.empty?
  1053.         Audio.me_stop
  1054.       else
  1055.         Audio.me_play("Audio/ME/" + @name, @volume, @pitch)
  1056.       end
  1057.     end
  1058.     def self.stop
  1059.       Audio.me_stop
  1060.     end
  1061.     def self.fade(time)
  1062.       Audio.me_fade(time)
  1063.     end
  1064.   end
  1065. end
  1066. module RPG
  1067.   class SE < AudioFile
  1068.     def play
  1069.       unless @name.empty?
  1070.         Audio.se_play("Audio/SE/" + @name, @volume, @pitch)
  1071.       end
  1072.     end
  1073.     def self.stop
  1074.       Audio.se_stop
  1075.     end
  1076.   end
  1077. end
复制代码

本帖子中包含更多资源

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

x
rm for linux(wine)制作中,期待夏娜SAMA能实现到webrm上

Lv1.梦旅人

℃ake

梦石
0
星屑
50
在线时间
8 小时
注册时间
2009-6-6
帖子
787
2
发表于 2009-10-7 07:12:34 | 只看该作者
完全看不懂带module的{:4_83:}
貌似module xxx里面的class很奇怪,跟我们平常看到的class不同。
我爱66RPG,但我讨厌66.
回复 支持 反对

使用道具 举报

Lv2.观梦者 (管理员)

八云紫的式神

梦石
0
星屑
549
在线时间
1243 小时
注册时间
2008-1-1
帖子
4282

烫烫烫

3
 楼主| 发表于 2009-10-7 07:28:09 | 只看该作者
因为发现一点bug所以楼顶的内容换了= -
rm for linux(wine)制作中,期待夏娜SAMA能实现到webrm上
回复 支持 反对

使用道具 举报

Lv3.寻梦者

孤独守望

梦石
0
星屑
3121
在线时间
1534 小时
注册时间
2006-10-16
帖子
4321

开拓者贵宾

4
发表于 2009-10-7 08:30:59 | 只看该作者
谁会给class参数啊= =而且还是有爱的默认参数……
MS是把class定义无效了所以判定为多出来一个end
菩提本非树,明镜本非台。回头自望路漫漫。不求姻缘,但求再见。
本来无一物,何处惹尘埃。风打浪吹雨不来。荒庭遍野,扶摇难接。
不知道多久更新一次的博客
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
9 小时
注册时间
2007-2-19
帖子
21
5
发表于 2009-10-7 08:32:47 | 只看该作者
回lz  rmvx ruby 1.81  rge ruby 1.86    版本不同 对异常的处理不太一样 报错位置不一样很正常的= =
冰冷的雪花
回复 支持 反对

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2024-5-6 10:51

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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