查看: 2374|回复: 3

[已经解决] 呑食天地,求一简单脚本

  [复制链接]
头像被屏蔽
梦石
0
星屑
50
在线时间
0 小时
注册时间
2009-7-7
回帖
58
发表于 2009-7-8 12:43:11 | 显示全部楼层 |阅读模式
提示: 作者被禁止或删除 内容自动屏蔽
头像被屏蔽
梦石
0
星屑
50
在线时间
0 小时
注册时间
2009-7-7
回帖
58
 楼主| 发表于 2009-7-8 12:53:23 | 显示全部楼层
提示: 作者被禁止或删除 内容自动屏蔽
回复

使用道具 举报

天仙

梦石
0
星屑
720
在线时间
184 小时
注册时间
2008-4-15
回帖
4872

贵宾

发表于 2009-7-8 18:41:58 | 显示全部楼层
本帖最后由 雪流星 于 2009-7-8 04:49 编辑

在事件中插入腳本: name_choice
自動生成選擇項

  1. class Game_Message
  2.   attr_accessor :name_choice # bool
  3.   alias tunshi_initialize initialize
  4.   def initialize
  5.     tunshi_initialize
  6.     name_choice = false
  7.   end
  8. end
  9. class Window_Message < Window_Selectable
  10.   alias tunshi_convert_special_characters convert_special_characters
  11.   def convert_special_characters
  12.     tunshi_convert_special_characters
  13.     @text.gsub!(/\\P\[([0-9]+)\]/i) { $game_party.members[$1.to_i].name }
  14.   end
  15.   alias tunshi_input_choice input_choice
  16.   def input_choice
  17.     if $game_message.name_choice
  18.       if Input.trigger?(Input::C)
  19.         Sound.play_decision
  20.         $game_party.remove_actor($game_party.members[@index].id)
  21.         $game_message.name_choice = false
  22.       end
  23.     end
  24.     tunshi_input_choice
  25.   end
  26. end

  27. class Game_Interpreter
  28.   def name_choice
  29.     if $game_party.members.size == 1
  30.       $game_message.texts.push("\\c[10]隊伍僅剩一人")
  31.       return
  32.     end
  33.     names = []
  34.     for n in $game_party.members
  35.       names.push(n.name)
  36.     end
  37.     @params =[names, $game_party.members.size]
  38.     command_102
  39.     $game_message.name_choice = true
  40.   end
  41. end
复制代码
VA脚本开工中...
偷窃脚本1.0 - 已完成
回复

使用道具 举报

头像被屏蔽
梦石
0
星屑
50
在线时间
0 小时
注册时间
2009-7-7
回帖
58
 楼主| 发表于 2009-7-8 22:12:37 | 显示全部楼层
提示: 作者被禁止或删除 内容自动屏蔽
回复

使用道具 举报

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

本版积分规则

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

在本版发帖返回顶部