查看: 2821|回复: 2

[已经解决] F8截图脚本有没有

  [复制链接]
梦石
0
星屑
50
在线时间
40 小时
注册时间
2012-3-31
回帖
60
发表于 2012-4-14 01:50:55 | 显示全部楼层 |阅读模式

加入我们,或者,欢迎回来。

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

×
F8截图脚本有没有
全国最好的RPG论坛
44rpg.uueasy.com
梦石
0
星屑
50
在线时间
470 小时
注册时间
2010-6-25
回帖
294
发表于 2012-4-14 08:46:00 | 显示全部楼层
本帖最后由 腐琴琴 于 2012-4-14 08:50 编辑

理论上应该有……

我只知道一个傻傻的方法:
找一个截图脚本,然后找到执行的命令。
接下来用并行处理的公共事件,当F8被按下时执行。

===================================
这两个东西是截图范例脚本送的,截图必备物:
QQ截图20120414084610.jpg

公共事件用并行处理,游戏的时候打开开关(但我怀疑会卡的囧囧的)
调节分歧的语句嘛也可以随便改的吧?F8改成别的也可以吧……
然后中间是截图脚本范例里面送的执行语句
QQ截图20120414084618.jpg

这个是把范例里面的脚本COPY过来然后加上公共事件了
Project10.rar (893.56 KB, 下载次数: 149)


然后这个就是主站上面的脚本了……
[pre lang="php" line="1"]#===============================================================================
#
# Screenshot V2
#
# Screenshot Script v1 & screenshot.dll v1            created by: Andreas21
# Screenshot Script v2                                created/edit by: cybersam
# the autor is found on a german board...
# the comments are added by me...
# since the autor didnt want to add any comment...
# so thats it from here...
# have fund with it... ^-^
#
# oh yea.. the needed command line is found in "Scene_Map" in "def update"
#
#===============================================================================
module Screen  
  @screen = Win32API.new 'screenshot', 'Screenshot', %w(l l l l p l l), ''
  @readini = Win32API.new 'kernel32', 'GetPrivateProfileStringA', %w(p p p p l p), 'l'
  @findwindow = Win32API.new 'user32', 'FindWindowA', %w(p p), 'l'
  module_function
  #-----------------------------------------------------------------------------
  # here comes the stuff...
  # i add here the stuff for automatic change of the number for the screenshot
  # so it wont overrite the old one...
  # if you want to change so stuff change them in this line below
  # or you can change them in your command line... like
  # Screen::shot("screenshot", 2)
  # this change the name and the type of the screenshot
  # (0 = bmp, 1 = jpg and 2 = png)
  # ----------------------------------------------------------------------------
  def shot(file = "screenshot", typ = 2)
    # to add the right extension...
    if typ == 0
      typname = ".bmp"
    elsif typ == 1
      typname = ".jpg"
    elsif typ == 2
      typname = ".png"
    end   
    file_index = 0   
    dir = "Graphics/Pictures/"   
    # make the filename....
    file_name = dir + file.to_s + typname.to_s   
    # make the screenshot.... Attention dont change anything from here on....
    @screen.call(0,0,640,480,file_name,handel,typ)
  end
  # find the game window...
  def handel
    game_name = "\0" * 256
    @readini.call('Game','Title','',game_name,255,".\\Game.ini")
    game_name.delete!("\0")
    return @findwindow.call('RGSS Player',game_name)
  end
end[/pre]

那啥截图的位置这里要改就改吧。
dir = "Graphics/Pictures/


回复

使用道具 举报

梦石
0
星屑
50
在线时间
40 小时
注册时间
2012-3-31
回帖
60
 楼主| 发表于 2012-4-14 14:51:11 | 显示全部楼层
万分感谢


‘‘──纷纷雪于2012-4-14 18:13补充以下内容

把图保存在这个位置是吗  Graphics/Pictures   
’’

点评

默认的是这样的。如果你有需要可以改动。  发表于 2012-4-14 19:22
哦对了,脚本的第二句Graphics.freeze好像要删掉,不然会卡住。  发表于 2012-4-14 16:47
全国最好的RPG论坛
44rpg.uueasy.com
回复

使用道具 举报

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

本版积分规则

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

在本版发帖返回顶部