幻想森林

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 1345|回复: 6

[新手求助]脚本注释添加

[复制链接]

1

主题

5

帖子

58

积分

②入门

积分
58
QQ
发表于 2007-12-3 01:16:39 | 显示全部楼层 |阅读模式

有人能把下面的脚本添加注释吗?本人新手!!!
引用自
http://bbs.rpgchina.com/read-htm-tid-7271-fpage-0-toread--page-3.html
超级Debug.part1     超级Debug.part2         超级Debug.part3
如果顺便能将使用方法(如下)翻译出来就好了.^_^

This script adds many features to the debug screen (access by hitting F9 during Test Play). When editing variables, you can now push C to enter the variable's value, like in RPG Maker 2000 and 2003. You can also push X to multiply the variable by -1. By pushing X when the left window is active, you can open the Debug Command window (see p_w_picpath). Each option is described with its controls below:

Heal Character: Lets you heal a character.
C Button: Recover the character's HP, SP, and status.
X Button: Recover the character's HP only.
Y Button: Recover the character's SP only.
A Button: Recover the character's status only.
God Mode: If this mode is on, your characters will be ultra-powerful.
Money: Enter the amount of money you want to have in the number window.
Encounters: Decide whether you want random encounters on or off.
Items/Weapons/Armor: Lets you add or remove items, weapons, or armor from the party's inventory.
Right: Gain 1 copy of the item.
Left: Lose 1 copy of the item.
X Button: Lose 10 copies of the item.
Y Button: Gain 10 copies of the item.
Teleport: Teleport to a preset destination. You'll need to edit the script yourself to add destinations.
Walk Speed: Choose one of the six walk speeds for the player character.
Save: Allows you to save anywhere, regardless of whether saving is enabled on the map or not.

To use this script, replace Scene_Debug with the one provided, then add the new class Window_Dataset after all the other window classes, then replace the methods shown in Game_Actor. Finally, add the statements in Game_Character and Game_Temp, as shown.






  1. class Scene_Debug
  2. # ------------------------------
  3. def main
  4.   @left_window = Window_DebugLeft.new
  5.   @right_window = Window_DebugRight.new
  6.   c1 = "Heal Character"
  7.   c2 = "God Mode"
  8.   c3 = "Money"
  9.   c4 = "Encounters"
  10.   c5 = "Items"
  11.   c6 = "Weapons"
  12.   c7 = "Armor"
  13.   c8 = "Teleport"
  14.   c9 = "Walk Speed"
  15.   c10 = "Save"
  16.   x1 = "On"
  17.   x2 = "Off"
  18.   w1 = "Slowest"
  19.   w2 = "Slower"
  20.   w3 = "Slow"
  21.   w4 = "Fast"
  22.   w5 = "Faster"
  23.   w6 = "Fastest"
  24.   d1 = "Destination 1"
  25.   main_commands = [c1, c2, c3, c4, c5, c6, c7, c8, c9, c10]
  26.   speed_commands = [w1, w2, w3, w4, w5, w6]
  27.   toggle_commands = [x1, x2]
  28.   warp_commands = [d1]
  29.   @other_window = Window_Command.new(240, main_commands)
  30.   @speed_window = Window_Command.new(120, speed_commands)
  31.   @enc_window = Window_Command.new(80, toggle_commands)
  32.   @god_window = Window_Command.new(80, toggle_commands)
  33.   @warp_window = Window_Command.new(240, warp_commands)
  34.   @target_window = Window_Target.new
  35.   @money_window = Window_Gold.new
  36.   @number_window = Window_InputNumber.new(7)
  37.   @var_window = Window_InputNumber.new(8)
  38.   @help_window = Window_Base.new(192, 352, 448, 128)
  39.   @help_window.contents = Bitmap.new(406, 96)
  40.   @help_window.contents.font.name = "Arial"
  41.   @help_window.contents.font.size = 24
  42.   @left_window.top_row = $game_temp.debug_top_row
  43.   @left_window.index = $game_temp.debug_index
  44.   @right_window.mode = @left_window.mode
  45.   @right_window.top_id = @left_window.top_id
  46.   @other_window.visible = false
  47.   @other_window.active = false
  48.   @target_window.visible = false
  49.   @target_window.active = false
  50.   @enc_window.visible = false
  51.   @enc_window.active = false
  52.   @god_window.visible = false
  53.   @god_window.active = false
  54.   @speed_window.visible = false
  55.   @speed_window.active = false
  56.   @warp_window.visible = false
  57.   @warp_window.active = false
  58.   @money_window.visible = false
  59.   @money_window.active = false
  60.   @number_window.visible = false
  61.   @number_window.active = false
  62.   @var_window.visible = false
  63.   @var_window.active = false
  64.   @itemset_window = Window_Dataset.new(1)
  65.   @itemset_window.visible = false
  66.   @itemset_window.active = false
  67.   @weaponset_window = Window_Dataset.new(2)
  68.   @weaponset_window.visible = false
  69.   @weaponset_window.active = false
  70.   @armorset_window = Window_Dataset.new(3)
  71.   @armorset_window.visible = false
  72.   @armorset_window.active = false
  73.   @other_window.opacity = 255
  74.   @other_window.x = 100
  75.   @other_window.y = 48
  76.   @other_window.z = 200
  77.   @target_window.x = 304
  78.   @target_window.y = 0
  79.   @target_window.z = 300
  80.   @target_window.opacity = 255
  81.   @enc_window.x = 225
  82.   @enc_window.y = 180
  83.   @enc_window.z = 210
  84.   @enc_window.opacity = 255
  85.   @god_window.x = 225
  86.   @god_window.y = 180
  87.   @god_window.z = 210
  88.   @god_window.opacity = 255
  89.   @speed_window.x = 270
  90.   @speed_window.y = 100
  91.   @speed_window.z = 220
  92.   @speed_window.opacity = 255
  93.   @warp_window.x = 270
  94.   @warp_window.y = 100
  95.   @warp_window.z = 220
  96.   @warp_window.opacity = 255
  97.   @itemset_window.x = 0
  98.   @itemset_window.y = 0
  99.   @itemset_window.z = 1000
  100.   @itemset_window.opacity = 255
  101.   @weaponset_window.x = 0
  102.   @weaponset_window.y = 0
  103.   @weaponset_window.z = 1000
  104.   @weaponset_window.opacity = 255
  105.   @armorset_window.x = 0
  106.   @armorset_window.y = 0
  107.   @armorset_window.z = 1000
  108.   @armorset_window.opacity = 255
  109.   @money_window.x = 270
  110.   @money_window.y = 100
  111.   @money_window.z = 700
  112.   @money_window.opacity = 255
  113.   @number_window.x = 270
  114.   @number_window.y = 164
  115.   @number_window.z = 710
  116.   @number_window.opacity = 255
  117.   @var_window.x = 270
  118.   @var_window.y = 164
  119.   @var_window.z = 710
  120.   @var_window.opacity = 255
  121.   @variable_edit = 0
  122.   Graphics.transition
  123.   loop do
  124.     Graphics.update
  125.     Input.update
  126.     update
  127.     if $scene != self
  128.     break
  129.     end
  130.   end
  131.   $game_map.refresh
  132.   Graphics.freeze
  133.   @left_window.dispose
  134.   @right_window.dispose
  135.   @help_window.dispose
  136.   @other_window.dispose
  137.   @god_window.dispose
  138.   @speed_window.dispose
  139.   @enc_window.dispose
  140.   @target_window.dispose
  141.   @warp_window.dispose
  142.   @itemset_window.dispose
  143.   @weaponset_window.dispose
  144.   @armorset_window.dispose
  145.   @money_window.dispose
  146.   @var_window.dispose
  147. end
  148. # ------------------------------
  149. def update
  150.   @right_window.mode = @left_window.mode
  151.   @right_window.top_id = @left_window.top_id
  152.   @left_window.update
  153.   @right_window.update
  154.   @other_window.update
  155.   @enc_window.update
  156.   @itemset_window.update
  157.   @weaponset_window.update
  158.   @armorset_window.update
  159.   @target_window.update
  160.   @god_window.update
  161.   @speed_window.update
  162.   @warp_window.update
  163.   @money_window.update
  164.   @number_window.update
  165.   @var_window.update
  166.   $game_temp.debug_top_row = @left_window.top_row
  167.   $game_temp.debug_index = @left_window.index
  168.   if @left_window.active
  169.     update_left
  170.     return
  171.   end
  172.   if @right_window.active
  173.     update_right
  174.     return
  175.   end
  176.   if @other_window.active
  177.     update_command
  178.     return
  179.   end
  180.   if @target_window.active
  181.     update_target
  182.     return
  183.   end
  184.   if @enc_window.active
  185.     update_enc
  186.     return
  187.   end
  188.   if @itemset_window.active
  189.     update_itemset
  190.     return
  191.   end
  192.     if @weaponset_window.active
  193.     update_weaponset
  194.     return
  195.   end
  196.   if @armorset_window.active
  197.     update_armorset
  198.     return
  199.   end
  200.   if @god_window.active
  201.     update_god
  202.     return
  203.   end
  204.   if @speed_window.active
  205.     update_speed
  206.     return
  207.   end
  208.   if @warp_window.active
  209.     update_warp
  210.     return
  211.   end
  212.     if @number_window.active
  213.     update_money
  214.     return
  215.   end
  216.     if @var_window.active
  217.     update_var
  218.     return
  219.   end
  220. end
  221. # ------------------------------
  222. def update_left
  223.   if Input.trigger?(Input::B)
  224.     $game_system.se_play($data_system.cancel_se)
  225.     $scene = Scene_Map.new
  226.     return
  227.   end
  228.   if Input.trigger?(Input::C)
  229.     $game_system.se_play($data_system.decision_se)
  230.     if @left_window.mode == 0
  231.     text1 = "C (Enter) : ON / OFF"
  232.     @help_window.contents.draw_text(4, 0, 406, 32, text1)
  233.     else
  234.     text1 = "Left : -1   Right : +1"
  235.     text2 = "L : -10"
  236.     text3 = "R : +10"
  237.     text4 = "C: Enter Value"
  238.     text5 = "X: Change Sign"
  239.     @help_window.contents.draw_text(4, 0, 200, 32, text1)
  240.     @help_window.contents.draw_text(4, 32, 200, 32, text2)
  241.     @help_window.contents.draw_text(4, 64, 200, 32, text3)
  242.     @help_window.contents.draw_text(240, 0, 180, 32, text4)
  243.     @help_window.contents.draw_text(240, 32, 180, 32, text5)
  244.     end
  245.     @left_window.active = false
  246.     @right_window.active = true
  247.     @right_window.index = 0
  248.     return
  249.   end
  250.   if Input.trigger?(Input::X)
  251.     $game_system.se_play($data_system.decision_se)
  252.     @other_window.visible = true
  253.     @left_window.active = false
  254.     @other_window.active = true
  255.   end
  256. end
  257. # ------------------------------
  258. def update_command
  259.   if Input.trigger?(Input::B)
  260.     $game_system.se_play($data_system.cancel_se)
  261.     @other_window.active = false
  262.     @left_window.active = true
  263.     @other_window.visible = false
  264.     return
  265.   end
  266.   if Input.trigger?(Input::C)
  267.     $game_system.se_play($data_system.decision_se)
  268.     case @other_window.index
  269.     when 0
  270.     @other_window.active = false
  271.     @target_window.active = true
  272.     @target_window.visible = true
  273.     @target_window.index = 0
  274.     when 1
  275.     @god_window.index = 1
  276.     if $game_temp.god_mode
  277.       @god_window.index = 0
  278.     end
  279.     @god_window.active = true
  280.     @god_window.visible = true
  281.     @other_window.active = false
  282.     when 2
  283.     @number_window.number = 0
  284.     @money_window.visible = true
  285.     @number_window.active = true
  286.     @number_window.visible = true
  287.     @other_window.active = false
  288.     when 3
  289.     @enc_window.index = 0
  290.     if $game_system.encounter_disabled
  291.       @enc_window.index = 1
  292.     end
  293.     @enc_window.active = true
  294.     @enc_window.visible = true
  295.     @other_window.active = false
  296.     when 4
  297.     @itemset_window.index = 0
  298.     @itemset_window.active = true
  299.     @itemset_window.visible = true
  300.     @other_window.active = false
  301.     when 5
  302.     @weaponset_window.index = 0
  303.     @weaponset_window.active = true
  304.     @weaponset_window.visible = true
  305.     @other_window.active = false
  306.     when 6
  307.     @armorset_window.index = 0
  308.     @armorset_window.active = true
  309.     @armorset_window.visible = true
  310.     @other_window.active = false
  311.     when 7
  312.     @warp_window.active = true
  313.     @warp_window.visible = true
  314.     @other_window.active = false
  315.     when 8
  316.     @speed_window.index = $game_player.move_speed - 1
  317.     @speed_window.active = true
  318.     @speed_window.visible = true
  319.     @other_window.active = false
  320.     when 9
  321.     $scene = Scene_Save.new
  322.     return
  323.     end
  324.   end
  325. end
  326. # ------------------------------
  327. def update_money
  328.   if Input.trigger?(Input::B)
  329.     $game_system.se_play($data_system.cancel_se)
  330.     @number_window.active = false
  331.     @other_window.active = true
  332.     @money_window.visible = false
  333.     @number_window.visible = false
  334.     return
  335.   end
  336.   if Input.trigger?(Input::C)
  337.     $game_system.se_play($data_system.decision_se)
  338.     $game_party.lose_gold(9999999)
  339.     $game_party.gain_gold(@number_window.number)
  340.     @money_window.refresh
  341.   end
  342.   if Input.repeat?(Input::X)
  343.     $game_system.se_play($data_system.cursor_se)
  344.     $game_party.gain_gold(9999999)
  345.     @money_window.refresh
  346.   end
  347.   if Input.repeat?(Input::Y)
  348.     $game_system.se_play($data_system.cursor_se)
  349.     $game_party.lose_gold(9999999)
  350.     @money_window.refresh
  351.   end
  352. end
  353.   # ------------------------------
  354. def update_itemset
  355.   if Input.trigger?(Input::B)
  356.     $game_system.se_play($data_system.cancel_se)
  357.     @itemset_window.active = false
  358.     @other_window.active = true
  359.     @itemset_window.visible = false
  360.     return
  361.   end
  362.   if Input.repeat?(Input::RIGHT)
  363.     $game_system.se_play($data_system.cursor_se)
  364.     $game_party.gain_item(@itemset_window.index + 1, 1)
  365.     @itemset_window.refresh
  366.   end
  367.   if Input.repeat?(Input::LEFT)
  368.     $game_system.se_play($data_system.cursor_se)
  369.     $game_party.lose_item(@itemset_window.index + 1, 1)
  370.     @itemset_window.refresh
  371.   end
  372.   if Input.repeat?(Input::X)
  373.     $game_system.se_play($data_system.cursor_se)
  374.     $game_party.lose_item(@itemset_window.index + 1, 10)
  375.     @itemset_window.refresh
  376.   end
  377.   if Input.repeat?(Input::Y)
  378.     $game_system.se_play($data_system.cursor_se)
  379.     $game_party.gain_item(@itemset_window.index + 1, 10)
  380.     @itemset_window.refresh
  381.   end
  382. end
  383.   # ------------------------------
  384. def update_weaponset
  385.   if Input.trigger?(Input::B)
  386.     $game_system.se_play($data_system.cancel_se)
  387.     @weaponset_window.active = false
  388.     @other_window.active = true
  389.     @weaponset_window.visible = false
  390.     return
  391.   end
  392.   if Input.repeat?(Input::RIGHT)
  393.     $game_system.se_play($data_system.cursor_se)
  394.     $game_party.gain_weapon(@weaponset_window.index + 1, 1)
  395.     @weaponset_window.refresh
  396.   end
  397.   if Input.repeat?(Input::LEFT)
  398.     $game_system.se_play($data_system.cursor_se)
  399.     $game_party.lose_weapon(@weaponset_window.index + 1, 1)
  400.     @weaponset_window.refresh
  401.   end
  402.   if Input.repeat?(Input::X)
  403.     $game_system.se_play($data_system.cursor_se)
  404.     $game_party.lose_weapon(@weaponset_window.index + 1, 10)
  405.     @weaponset_window.refresh
  406.   end
  407.   if Input.repeat?(Input::Y)
  408.     $game_system.se_play($data_system.cursor_se)
  409.     $game_party.gain_weapon(@weaponset_window.index + 1, 10)
  410.     @weaponset_window.refresh
  411.   end
  412. end
  413. # -------------------------------
  414.   def update_enc
  415.   if Input.trigger?(Input::B)
  416.     $game_system.se_play($data_system.cancel_se)
  417.     @enc_window.active = false
  418.     @other_window.active = true
  419.     @enc_window.visible = false
  420.     return
  421.   end
  422.   if Input.trigger?(Input::C)
  423.     case @enc_window.index
  424.     when 0
  425.     $game_system.se_play($data_system.decision_se)
  426.     $game_system.encounter_disabled = false
  427.     @enc_window.active = false
  428.     @other_window.active = true
  429.     @enc_window.visible = false
  430.     when 1
  431.     $game_system.se_play($data_system.decision_se)
  432.     $game_system.encounter_disabled = true
  433.     @enc_window.active = false
  434.     @other_window.active = true
  435.     @enc_window.visible = false
  436.     end
  437.   end
  438. end
  439.   # -------------------------------
  440.   def update_god
  441.   if Input.trigger?(Input::B)
  442.     $game_system.se_play($data_system.cancel_se)
  443.     @god_window.active = false
  444.     @other_window.active = true
  445.     @god_window.visible = false
  446.     return
  447.   end
  448.   if Input.trigger?(Input::C)
  449.     case @god_window.index
  450.     when 0
  451.     $game_system.se_play($data_system.decision_se)
  452.     $game_temp.god_mode = true
  453.     @god_window.active = false
  454.     @other_window.active = true
  455.     @god_window.visible = false
  456.     when 1
  457.     $game_system.se_play($data_system.decision_se)
  458.     $game_temp.god_mode = false
  459.     @god_window.active = false
  460.     @other_window.active = true
  461.     @god_window.visible = false
  462.     end
  463.   end
  464. end
  465.   # -------------------------------
  466. def update_speed
  467.   if Input.trigger?(Input::B)
  468.     $game_system.se_play($data_system.cancel_se)
  469.     @speed_window.active = false
  470.     @other_window.active = true
  471.     @speed_window.visible = false
  472.     return
  473.   end
  474.   if Input.trigger?(Input::C)
  475.     $game_system.se_play($data_system.decision_se)
  476.     $game_player.move_speed = @speed_window.index + 1
  477.     @speed_window.active = false
  478.     @other_window.active = true
  479.     @speed_window.visible = false
  480.   end
  481. end
  482.   # -------------------------------
  483.   def update_warp
  484.   if Input.trigger?(Input::B)
  485.     $game_system.se_play($data_system.cancel_se)
  486.     @warp_window.active = false
  487.     @other_window.active = true
  488.     @warp_window.visible = false
  489.     return
  490.   end
  491.   if Input.trigger?(Input::C)
  492.     $game_system.se_play($data_system.decision_se)
  493.     $game_temp.player_transferring = true
  494.     case @warp_window.index
  495.     when 0
  496.     $game_temp.player_new_map_id = 1
  497.     $game_temp.player_new_x = 1
  498.     $game_temp.player_new_y = 1
  499.     @warp_window.active = false
  500.     @other_window.active = true
  501.     @warp_window.visible = false
  502.     end
  503.   end
  504. end
  505. # ------------------------------
  506. def update_target
  507.   if Input.trigger?(Input::B)
  508.     $game_system.se_play($data_system.cancel_se)
  509.     @target_window.active = false
  510.     @other_window.active = true
  511.     @target_window.visible = false
  512.     return
  513.   end
  514.   if Input.trigger?(Input::C)
  515.     $game_system.se_play($data_system.save_se)
  516.     for i in 1..$data_states.size
  517.     $game_party.actors[@target_window.index].remove_state(i)
  518.     end
  519.     $game_party.actors[@target_window.index].hp += 9999
  520.     $game_party.actors[@target_window.index].sp += 9999
  521.     @target_window.refresh
  522.   end
  523.   if Input.trigger?(Input::X)
  524.     $game_system.se_play($data_system.save_se)
  525.     $game_party.actors[@target_window.index].hp += 9999
  526.     @target_window.refresh
  527.   end
  528.   if Input.trigger?(Input::Y)
  529.     $game_system.se_play($data_system.save_se)
  530.     $game_party.actors[@target_window.index].sp += 9999
  531.     @target_window.refresh
  532.   end
  533.   if Input.trigger?(Input::A)
  534.     $game_system.se_play($data_system.save_se)
  535.     for i in 1..$data_states.size
  536.     $game_party.actors[@target_window.index].remove_state(i)
  537.     end
  538.     @target_window.refresh
  539.   end
  540. end
  541. # ------------------------------
  542. def update_var
  543.   if Input.trigger?(Input::B)
  544.     $game_system.se_play($data_system.cancel_se)
  545.     @var_window.active = false
  546.     @var_window.visible = false
  547.     @right_window.active = true
  548.     return
  549.   end
  550.   if Input.trigger?(Input::C)
  551.     $game_system.se_play($data_system.decision_se)
  552.     $game_variables[@variable_edit] = @var_window.number
  553.     @right_window.refresh
  554.     @var_window.active = false
  555.     @var_window.visible = false
  556.     @right_window.active = true
  557.   end
  558. end
  559. # ------------------------------
  560. def update_right
  561.   if Input.trigger?(Input::B)
  562.     $game_system.se_play($data_system.cancel_se)
  563.     @left_window.active = true
  564.     @right_window.active = false
  565.     @right_window.index = -1
  566.     @help_window.contents.clear
  567.     return
  568.   end
  569.   current_id = @right_window.top_id + @right_window.index
  570.   if @right_window.mode == 0
  571.     if Input.trigger?(Input::C)
  572.     $game_system.se_play($data_system.decision_se)
  573.     $game_switches[current_id] = (not $game_switches[current_id])
  574.     @right_window.refresh
  575.     return
  576.     end
  577.   end
  578.   if @right_window.mode == 1
  579.     if Input.repeat?(Input::RIGHT)
  580.     $game_system.se_play($data_system.cursor_se)
  581.     $game_variables[current_id] += 1
  582.     if $game_variables[current_id] > 99999999
  583.       $game_variables[current_id] = 99999999
  584.     end
  585.     @right_window.refresh
  586.     return
  587.     end
  588.     if Input.repeat?(Input::LEFT)
  589.     $game_system.se_play($data_system.cursor_se)
  590.     $game_variables[current_id] -= 1
  591.     if $game_variables[current_id] < -99999999
  592.       $game_variables[current_id] = -99999999
  593.     end
  594.     @right_window.refresh
  595.     return
  596.     end
  597.     if Input.repeat?(Input::C)
  598.     $game_system.se_play($data_system.decision_se)
  599.     current_id = @right_window.top_id + @right_window.index
  600.     @variable_edit = current_id
  601.     @var_window.number = $game_variables[current_id].abs
  602.     @var_window.visible = true
  603.     @var_window.active = true
  604.     @right_window.active = false
  605.     end
  606.     if Input.repeat?(Input::X)
  607.     $game_system.se_play($data_system.decision_se)
  608.     current_id = @right_window.top_id + @right_window.index
  609.     $game_variables[current_id] *= -1
  610.     @right_window.refresh
  611.     end
  612.     if Input.repeat?(Input::R)
  613.     $game_system.se_play($data_system.cursor_se)
  614.     $game_variables[current_id] += 10
  615.     if $game_variables[current_id] > 99999999
  616.       $game_variables[current_id] = 99999999
  617.     end
  618.     @right_window.refresh
  619.     return
  620.     end
  621.     if Input.repeat?(Input::L)
  622.     $game_system.se_play($data_system.cursor_se)
  623.     $game_variables[current_id] -= 10
  624.     if $game_variables[current_id] < -99999999
  625.       $game_variables[current_id] = -99999999
  626.     end
  627.     @right_window.refresh
  628.     return
  629.     end
  630.   end
  631. end
  632. end
  633. class Window_Dataset < Window_Selectable
  634. #---------------------------------
  635. def initialize(type)
  636.   super(0, 0, 300, 480)
  637.   self.contents = Bitmap.new(width - 32, height - 32)
  638.   self.back_opacity = 160
  639.   self.contents.font.name = "Arial"
  640.   self.contents.font.size = 24
  641.   @type = type
  642.   if @type == 1
  643.     @item_max = $data_items.size - 1
  644.   end
  645.   if @type == 2
  646.     @item_max = $data_weapons.size - 1
  647.   end
  648.   if @type == 3
  649.     @item_max = $data_armors.size - 1
  650.   end
  651.   refresh
  652. end
  653. #---------------------------------
  654. def refresh
  655.   if self.contents != nil
  656.     self.contents.dispose
  657.     self.contents = nil
  658.   end
  659.   y = 0
  660.   self.contents = Bitmap.new(width - 32, 32 * @item_max)
  661.   self.contents.clear
  662.   self.contents.font.name = "Arial"
  663.   self.contents.font.size = 24
  664.   self.opacity = 255
  665.   self.back_opacity = 255
  666.   if @type == 1
  667.     for i in 1..$data_items.size - 1
  668.     draw_item_name($data_items[i], 4, i*32 - 32)
  669.     number = $game_party.item_number(i).to_s
  670.     self.contents.draw_text(4, i*32 - 32, 262, 32, number, 2)
  671.     end
  672.   end
  673.   if @type == 2
  674.     for i in 1..$data_weapons.size - 1
  675.     draw_item_name($data_weapons[i], 4, i*32 - 32)
  676.     number = $game_party.weapon_number(i).to_s
  677.     self.contents.draw_text(4, i*32 - 32, 262, 32, number, 2)
  678.   end
  679.   end
  680.   if @type == 3
  681.     for i in 1..$data_armors.size - 1
  682.     draw_item_name($data_armors[i], 4, i*32 - 32)
  683.     number = $game_party.armor_number(i).to_s
  684.     self.contents.draw_text(4, i*32 - 32, 262, 32, number, 2)
  685.   end
  686.   end
  687. end
  688. #---------------------------------
  689. def update
  690. super
  691. end
  692. end
  693. class Game_Actor < Game_Battler
  694. # -------------------------------------
  695. def base_maxhp
  696.   if $game_temp.god_mode
  697.     return 9999
  698.   end
  699.   return $data_actors[@actor_id].parameters[0, @level]
  700. end
  701. # -------------------------------------
  702. def base_maxsp
  703.   if $game_temp.god_mode
  704.     return 9999
  705.   end
  706.   return $data_actors[@actor_id].parameters[1, @level]
  707. end
  708. # -------------------------------------
  709. def base_str
  710.   if $game_temp.god_mode
  711.     return 999
  712.   end
  713.   n = $data_actors[@actor_id].parameters[2, @level]
  714.   weapon = $data_weapons[@weapon_id]
  715.   armor1 = $data_armors[@armor1_id]
  716.   armor2 = $data_armors[@armor2_id]
  717.   armor3 = $data_armors[@armor3_id]
  718.   armor4 = $data_armors[@armor4_id]
  719.   n += weapon != nil ? weapon.str_plus : 0
  720.   n += armor1 != nil ? armor1.str_plus : 0
  721.   n += armor2 != nil ? armor2.str_plus : 0
  722.   n += armor3 != nil ? armor3.str_plus : 0
  723.   n += armor4 != nil ? armor4.str_plus : 0
  724.   return [[n, 1].max, 999].min
  725. end
  726. # -------------------------------------
  727. def base_dex
  728.   if $game_temp.god_mode
  729.     return 999
  730.   end
  731.   n = $data_actors[@actor_id].parameters[3, @level]
  732.   weapon = $data_weapons[@weapon_id]
  733.   armor1 = $data_armors[@armor1_id]
  734.   armor2 = $data_armors[@armor2_id]
  735.   armor3 = $data_armors[@armor3_id]
  736.   armor4 = $data_armors[@armor4_id]
  737.   n += weapon != nil ? weapon.dex_plus : 0
  738.   n += armor1 != nil ? armor1.dex_plus : 0
  739.   n += armor2 != nil ? armor2.dex_plus : 0
  740.   n += armor3 != nil ? armor3.dex_plus : 0
  741.   n += armor4 != nil ? armor4.dex_plus : 0
  742.   return [[n, 1].max, 999].min
  743. end
  744. # -------------------------------------
  745. def base_agi
  746.   if $game_temp.god_mode
  747.     return 999
  748.   end
  749.   n = $data_actors[@actor_id].parameters[4, @level]
  750.   weapon = $data_weapons[@weapon_id]
  751.   armor1 = $data_armors[@armor1_id]
  752.   armor2 = $data_armors[@armor2_id]
  753.   armor3 = $data_armors[@armor3_id]
  754.   armor4 = $data_armors[@armor4_id]
  755.   n += weapon != nil ? weapon.agi_plus : 0
  756.   n += armor1 != nil ? armor1.agi_plus : 0
  757.   n += armor2 != nil ? armor2.agi_plus : 0
  758.   n += armor3 != nil ? armor3.agi_plus : 0
  759.   n += armor4 != nil ? armor4.agi_plus : 0
  760.   return [[n, 1].max, 999].min
  761. end
  762. # -------------------------------------
  763. def base_int
  764.   if $game_temp.god_mode
  765.     return 999
  766.   end
  767.   n = $data_actors[@actor_id].parameters[5, @level]
  768.   weapon = $data_weapons[@weapon_id]
  769.   armor1 = $data_armors[@armor1_id]
  770.   armor2 = $data_armors[@armor2_id]
  771.   armor3 = $data_armors[@armor3_id]
  772.   armor4 = $data_armors[@armor4_id]
  773.   n += weapon != nil ? weapon.int_plus : 0
  774.   n += armor1 != nil ? armor1.int_plus : 0
  775.   n += armor2 != nil ? armor2.int_plus : 0
  776.   n += armor3 != nil ? armor3.int_plus : 0
  777.   n += armor4 != nil ? armor4.int_plus : 0
  778.   return [[n, 1].max, 999].min
  779. end
  780. # -------------------------------------
  781. def base_atk
  782.   if $game_temp.god_mode
  783.     return 9999999
  784.   end
  785.   weapon = $data_weapons[@weapon_id]
  786.   return weapon != nil ? weapon.atk : 0
  787. end
  788. # -------------------------------------
  789. def base_pdef
  790.   if $game_temp.god_mode
  791.     return 999999
  792.   end
  793.   weapon = $data_weapons[@weapon_id]
  794.   armor1 = $data_armors[@armor1_id]
  795.   armor2 = $data_armors[@armor2_id]
  796.   armor3 = $data_armors[@armor3_id]
  797.   armor4 = $data_armors[@armor4_id]
  798.   pdef1 = weapon != nil ? weapon.pdef : 0
  799.   pdef2 = armor1 != nil ? armor1.pdef : 0
  800.   pdef3 = armor2 != nil ? armor2.pdef : 0
  801.   pdef4 = armor3 != nil ? armor3.pdef : 0
  802.   pdef5 = armor4 != nil ? armor4.pdef : 0
  803.   return pdef1 + pdef2 + pdef3 + pdef4 + pdef5
  804. end
  805. # -------------------------------------
  806. def base_mdef
  807.   if $game_temp.god_mode
  808.     return 999999
  809.   end
  810.   weapon = $data_weapons[@weapon_id]
  811.   armor1 = $data_armors[@armor1_id]
  812.   armor2 = $data_armors[@armor2_id]
  813.   armor3 = $data_armors[@armor3_id]
  814.   armor4 = $data_armors[@armor4_id]
  815.   mdef1 = weapon != nil ? weapon.mdef : 0
  816.   mdef2 = armor1 != nil ? armor1.mdef : 0
  817.   mdef3 = armor2 != nil ? armor2.mdef : 0
  818.   mdef4 = armor3 != nil ? armor3.mdef : 0
  819.   mdef5 = armor4 != nil ? armor4.mdef : 0
  820.   return mdef1 + mdef2 + mdef3 + mdef4 + mdef5
  821. end
  822. end
  823. class Game_Character
  824. attr_accessor :move_speed # Add this after the other attr_accessors.
  825. end
  826. class Game_Temp
  827. attr_accessor :god_mode # Add this after the other attr_accessors.
  828. @god_mode = false # Add this after the other variable initializations.
  829. end
复制代码
回复

使用道具 举报

1

主题

5

帖子

58

积分

②入门

积分
58
QQ
 楼主| 发表于 2007-12-3 01:18:11 | 显示全部楼层
非常感谢!
回复 支持 反对

使用道具 举报

1

主题

5

帖子

58

积分

②入门

积分
58
QQ
 楼主| 发表于 2007-12-3 01:56:56 | 显示全部楼层
而且在测试的时候还发生脚本错误:

回复 支持 反对

使用道具 举报

1

主题

5

帖子

58

积分

②入门

积分
58
QQ
 楼主| 发表于 2007-12-3 02:01:48 | 显示全部楼层
如果上面的图片看不到的话,
这里有文本.

脚本 &#39;scene_debug&#39;  的 668 行 发生了 SyntaxError
回复 支持 反对

使用道具 举报

1

主题

5

帖子

58

积分

②入门

积分
58
QQ
 楼主| 发表于 2007-12-3 02:03:02 | 显示全部楼层
咋回事捏? [s:3]
回复 支持 反对

使用道具 举报

550

主题

9117

帖子

214748万

积分

超级版主

如同神一般的存在,腿神!拖后腿的神~~

Rank: 8Rank: 8

积分
2147483647
发表于 2007-12-5 18:30:40 | 显示全部楼层
大半夜连发4贴。。。。有问题发提问区才有人看么。。。


那个是语法错误 [s:5]
我就是你们的神,庶民们,追随我吧!跟着我一起拖后腿!
回复 支持 反对

使用道具 举报

550

主题

9117

帖子

214748万

积分

超级版主

如同神一般的存在,腿神!拖后腿的神~~

Rank: 8Rank: 8

积分
2147483647
发表于 2007-12-5 18:31:57 | 显示全部楼层
加注释。。。很好很强大。。。。 [s:5]   

我是这里最懒的人。。。等待别人把。。。建议你别抱有希望
我就是你们的神,庶民们,追随我吧!跟着我一起拖后腿!
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|幻想森林

GMT+8, 2025-6-21 02:24 , Processed in 0.014567 second(s), 21 queries .

Powered by Discuz! X3.4

© 2001-2017 Comsenz Inc.

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