| 赞 | 0 |
| VIP | |
| 好人卡 | |
| 积分 | 1 |
| 经验 | |
| 最后登录 | 2013-10-25 |
| 在线时间 | 140 小时 |
- 梦石
- 0
- 星屑
- 67
- 在线时间
- 140 小时
- 注册时间
- 2012-2-6
- 回帖
- 351
|
发表于 2012-2-10 14:53:38
|
显示全部楼层
本帖最后由 杂兵天下 于 2012-2-10 14:58 编辑
LZ明晃晃的版猪字样瞎了我的钛合金狗眼。。。。
- class Game_Interpreter
- def command_303
- return if $game_party.in_battle
- $game_console.run("p "角色原名:"+$game_actors[param[0]].name
- p "请输入角色新名字"
- gnm=s2u(gets)
- gnm=gnm[0..gnm.length-3]
- $game_actors[param[0]].name=gnm
- terminate",@params)
- wait(50)
- end
- end
- #==============================================================================
- # ■ [RMVA]基于控制台的Debugger
- #------------------------------------------------------------------------------
- # 版本:1.00b
- # 作者:光的圆周率
- # 许可协议: FSL - NAM
- #
- # 已经被我改的面目全非了。
- #------------------------------------------------------------------------------
- # 脚本来自66RPG.com 转载请保留版权信息
- #==============================================================================
- class Game_Console
- SetWindowText = Win32API.new("user32", "SetWindowTextA" , "LP", "L")
- SetFocus = Win32API.new("user32", "SetForegroundWindow" , "L" , "L")
- GetWindowRect = Win32API.new("user32", "ShowWindow" , "LL" , "L")
- def terminate#毁尸灭迹。一段toeval代码的最后必须加上terminate。
- system("cls")
- GetWindowRect.call(@Con_hWnd,0)
- SetFocus.call(@Mai_hWnd)
- end
- def initialize
- @Con_hWnd = get_ChWnd
- @Mai_hWnd = get_hWnd
- terminate
- end
- def run(toeval="",param=nil)
- SetFocus.call(@Con_hWnd)
- SetWindowText.call(@Con_hWnd,"Console")
- GetWindowRect.call(@Con_hWnd,4)
- eval toeval
- end
- end
- #==============================================================================
- # ■ Kernel
- #------------------------------------------------------------------------------
- # 获取游戏窗口及控制台窗口的脚本
- # 作者 : 紫苏
- #------------------------------------------------------------------------------
- # 脚本来自66RPG.com 转载请保留版权信息
- #==============================================================================
- module Kernel
- GetWindowThreadProcessId = Win32API.new("user32", "GetWindowThreadProcessId", "LP", "L")
- GetWindow = Win32API.new("user32", "GetWindow", "LL", "L")
- GetClassName = Win32API.new("user32", "GetClassName", "LPL", "L")
- GetCurrentThreadId = Win32API.new("kernel32", "GetCurrentThreadId", "V", "L")
- GetForegroundWindow = Win32API.new("user32", "GetForegroundWindow", "V", "L")
- def get_hWnd
- threadID = GetCurrentThreadId.call
- hWnd = GetWindow.call(GetForegroundWindow.call, 0)
- while hWnd != 0
- if threadID == GetWindowThreadProcessId.call(hWnd, 0)
- className = " " * 11
- GetClassName.call(hWnd, className, 12)
- break if className == "RGSS Player"
- end
- hWnd = GetWindow.call(hWnd, 2)
- end
- return hWnd
- end
- def get_ChWnd
- threadID = GetCurrentThreadId.call
- hWnd = GetWindow.call(GetForegroundWindow.call, 0)
- while hWnd != 0
- if threadID == GetWindowThreadProcessId.call(hWnd, 0)
- className = " " * 18
- GetClassName.call(hWnd, className, 19)
- break if className == "ConsoleWindowClass"
- end
- hWnd = GetWindow.call(hWnd, 2)
- end
- return hWnd
- end
- end
复制代码
奥,我忘记了。
要真正用这个东西必须在Main上写
- $game_console=Game_Console.new
- rgss_main { SceneManager.run }
复制代码
然后必须用game console命令打开带命令提示符的RGSS Interpreter。
如此麻烦的东西。。。LZ还是不要研究了 |
|