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

Project1

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

[已经过期] 想要按键随时都有效开头结尾怎么写?

[复制链接]

Lv1.梦旅人

梦石
0
星屑
70
在线时间
187 小时
注册时间
2006-9-3
帖子
175
跳转到指定楼层
1
发表于 2012-4-10 17:44:36 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
本帖最后由 eve592370698 于 2012-4-16 15:50 编辑

我用了个截图脚本,想要在任何时候按键都有效,开头和结尾写什么?(调用按键那部分我会了)。


‘‘──he11120于2012-4-10 22:11补充以下内容

战斗中按键是不是都无效啊? 截图功能所需文件.rar (678.07 KB, 下载次数: 2)    添加代码文字无效。。直接复制了。
  1. #==============================================================================
  2. # 本脚本来自[url]www.66RPG.com[/url],使用和转载请保留此信息
  3. #============================================================================== #
  4. # Screenshot V2
  5. # Screen::shot  调用
  6. # Screenshot Script v1 & screenshot.dll v1            created by: Andreas21
  7. # Screenshot Script v2                                created/edit by: cybersam
  8. # the autor is found on a german board...
  9. # the comments are added by me...
  10. # since the autor didnt want to add any comment...
  11. # so thats it from here...
  12. # have fund with it... ^-^
  13. #
  14. # oh yea.. the needed command line is found in "Scene_Map" in "def update"
  15. #
  16. #===============================================================================
  17. module Screen  
  18.   @screen = Win32API.new 'screenshot', 'Screenshot', %w(l l l l p l l), ''
  19.   @readini = Win32API.new 'kernel32', 'GetPrivateProfileStringA', %w(p p p p l p), 'l'
  20.   @findwindow = Win32API.new 'user32', 'FindWindowA', %w(p p), 'l'
  21.   module_function
  22.   #-----------------------------------------------------------------------------
  23.   # here comes the stuff...
  24.   # i add here the stuff for automatic change of the number for the screenshot
  25.   # so it wont overrite the old one...
  26.   # if you want to change so stuff change them in this line below
  27.   # or you can change them in your command line... like
  28.   # Screen::shot("screenshot", 2)
  29.   # this change the name and the type of the screenshot
  30.   # (0 = bmp, 1 = jpg and 2 = png)
  31.   # ----------------------------------------------------------------------------
  32.   def shot(file = "screenshot", typ = 1)
  33.     # to add the right extension...
  34.     if typ == 0
  35.       typname = ".bmp"
  36.     elsif typ == 1
  37.       typname = ".jpg"
  38.     elsif typ == 2
  39.       typname = ".png"
  40.     end
  41.     $game_variables[100] += 1
  42.     file_index = 0   
  43.     dir = "screenshot/"
  44.     # make the filename....
  45.     file_name = dir + file.to_s + $game_variables[100].to_s + typname.to_s   
  46.     # make the screenshot.... Attention dont change anything from here on....
  47.     @screen.call(0,0,640,480,file_name,handel,typ)
  48.   end
  49.   # find the game window...
  50.   def handel
  51.     game_name = "\0" * 256
  52.     @readini.call('Game','Title','',game_name,255,".\\Game.ini")
  53.     game_name.delete!("\0")
  54.     return @findwindow.call('RGSS Player',game_name)
  55.   end
  56. end

  57. #==============================================================================
  58. # 本脚本来自[url]www.66RPG.com[/url],使用和转载请保留此信息
  59. #==============================================================================
复制代码

点评

截图脚本很多,请给出脚本或者工程,谢谢  发表于 2012-4-15 11:54
...........
您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

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

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

GMT+8, 2024-11-30 14:28

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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