查看: 1883|回复: 6

[已经过期] 怎么讲别人不能粘贴的脚本合法粘贴到脚本里

[复制链接]
梦石
0
星屑
50
在线时间
72 小时
注册时间
2013-8-26
回帖
30
发表于 2014-4-13 14:10:37 | 显示全部楼层 |阅读模式

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

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

×

比如喵呜喵5大人的脚本合集里,直接把脚本复制下来是不行的,只能在帖子上弄代码复制才可以,例如这几个

  1. =begin
  2. ===============================================================================
  3.   视觉小说 By喵呜喵5
  4. ===============================================================================

  5. 【说明】

  6.   滚动文字变成视觉小说模式,支持对话中使用的转义字符“\.”、“\!”等  
  7.   本质上不过是修改了传统的文字对话框,将其大小变为全屏幕罢了……
  8.   
  9.   使用的时候先用事件指令中的脚本输入“m5_novel”(不包含双引号),
  10.   然后输入滚动文字  
  11.   实际运行的时候就会以视觉小说的形式显示出来
  12.   (切换对话请使用转义字符“\!”)
  13.   
  14.   因为是初版,并没有添加太多的功能,之后有时间可能会对这个脚本进行优化吧
  15.   
  16. =end
  17. #==============================================================================
  18. # 脚本部分
  19. #==============================================================================  
  20. class Window_Message
  21.   alias m5_update_placement update_placement
  22.   def update_placement
  23.     @position = $game_message.position
  24.     if @position == 3
  25.       self.width = Graphics.width
  26.       self.height = Graphics.height
  27.       self.x = 0
  28.       self.y = 0
  29.     else
  30.       self.width = m5_window_width
  31.       self.height = m5_window_height
  32.       m5_update_placement
  33.     end
  34.   end
  35.   alias m5_need_new_page? need_new_page?
  36.   def need_new_page?(text, pos)
  37.     if @position == 3
  38.       return (pos[:y] + pos[:height] > (Graphics.height - standard_padding * 2)\
  39.       && !text.empty?)
  40.     else
  41.       return m5_need_new_page?(text, pos)
  42.     end    
  43.   end
  44.   alias m5_initialize initialize
  45.   def initialize
  46.     m5_initialize
  47.     self.width = m5_window_width
  48.     self.height = m5_window_height
  49.   end
  50.   alias m5_window_width window_width
  51.   def window_width
  52.     Graphics.width
  53.   end
  54.   alias m5_window_height window_height
  55.   def window_height
  56.     Graphics.height
  57.   end
  58. end
  59. class Game_Interpreter
  60.   def m5_novel
  61.     index,list = @index,@list
  62.     if list[index+1].code == 105
  63.       list[index+1].code = 101
  64.       list[index+1].parameters = ["",0,2,3]
  65.       index += 2      
  66.       while list[index].code == 405
  67.         list[index].code = 401        
  68.         index += 1
  69.       end      
  70.     end
  71.   end
  72. end
复制代码

  1. =begin
  2. ===============================================================================
  3.   对话框光标 By喵呜喵5
  4. ===============================================================================

  5. 【说明】

  6.   允许使用任意图片作为对话框下一句提示的光标  
  7.   
  8. =end
  9. $m5script = {} if $m5script.nil?
  10. $m5script["M5MessageCursor"] = true
  11. module M5MessageCursor
  12. #==============================================================================
  13. # 设定部分
  14. #==============================================================================

  15.   FILENAME = "Cursor"
  16.   #光标图片的文件名,放到Graphics\System文件夹下
  17.   
  18.   FRAME = 4
  19.   #光标图片的帧数,只有一张图片并且不需要动画效果这里填写1就好了
  20.   
  21.   DURA = 10
  22.   #光标播放动画效果时每张图片的持续时间
  23.   
  24.   POS1 = [491,387]
  25.   #对话框居下时光标的[X,Y]坐标
  26.   
  27.   POS2 = [491,239]
  28.   #对话框居中时光标的[X,Y]坐标
  29.   
  30.   POS3 = [491,91]
  31.   #对话框居上时光标的[X,Y]坐标
  32.   
  33.   Z = 201
  34.   #光标的Z坐标,当光标遮住某些窗口时请尝试修改这里
  35.   
  36.   SWI = 1
  37.   #对应ID的开关打开的时候,不显示光标
  38.   
  39. #==============================================================================
  40. # 设定结束
  41. #==============================================================================
  42. #==============================================================================
  43. # 脚本部分
  44. #==============================================================================
  45. end
  46. #--------------------------------------------------------------------------
  47. # ● 光标精灵的类
  48. #--------------------------------------------------------------------------
  49. class Sprite_MessageCursor < Sprite_Base
  50.   #--------------------------------------------------------------------------
  51.   # ●载入
  52.   #--------------------------------------------------------------------------
  53.   include M5MessageCursor
  54.   def initialize
  55.     @viewport = Viewport.new(-Graphics.width/2, -Graphics.height/2, 
  56.       Graphics.width*2, Graphics.height*2)
  57.     @viewport.z = Z
  58.     super(@viewport)
  59.     self.bitmap = Cache.system(FILENAME)
  60.     self.visible = false
  61.     update_placement
  62.     @duration = @frame = 0
  63.     @width = self.bitmap.width / FRAME
  64.     update
  65.   end
  66.   #--------------------------------------------------------------------------
  67.   # ●设置位置
  68.   #--------------------------------------------------------------------------
  69.   def update_placement(pos = 2)
  70.     self.x,self.y = pos == 2 ? POS1 : (pos == 1 ? POS2 : POS3)
  71.     self.x += Graphics.width/2
  72.     self.y += Graphics.height/2
  73.   end
  74.   #--------------------------------------------------------------------------
  75.   # ●释放
  76.   #--------------------------------------------------------------------------
  77.   def dispose
  78.     @viewport.dispose
  79.     super
  80.   end
  81.   #--------------------------------------------------------------------------
  82.   # ● 更新动画效果
  83.   #--------------------------------------------------------------------------
  84.   def update
  85.     super
  86.     if self.visible
  87.       hide if $game_switches[SWI]    
  88.       if @duration > 0
  89.         @duration -= 1
  90.       else
  91.         self.src_rect.set(@frame * @width, 0, @width, self.bitmap.height)
  92.         @duration = DURA
  93.         @frame = (@frame == FRAME-1) ? 0 : @frame +1
  94.       end
  95.     end
  96.   end
  97.   #--------------------------------------------------------------------------
  98.   # ● 显示光标
  99.   #--------------------------------------------------------------------------
  100.   def show
  101.     self.visible = true
  102.   end
  103.   #--------------------------------------------------------------------------
  104.   # ● 隐藏光标
  105.   #--------------------------------------------------------------------------
  106.   def hide
  107.     self.visible = false    
  108.   end
  109.   #--------------------------------------------------------------------------
  110.   # ● 是否显示?
  111.   #--------------------------------------------------------------------------
  112.   def need_show?
  113.     return false if $game_switches[SWI]
  114.     !self.visible
  115.   end
  116. end
  117. #--------------------------------------------------------------------------
  118. # ●对话框的类
  119. #--------------------------------------------------------------------------
  120. class Window_Message
  121.   #--------------------------------------------------------------------------
  122.   # ● 载入光标精灵
  123.   #--------------------------------------------------------------------------
  124.   alias m5_20140305_initialize initialize
  125.   def initialize
  126.     m5_20140305_initialize
  127.     @message_cursor = Sprite_MessageCursor.new
  128.   end
  129.   #--------------------------------------------------------------------------
  130.   # ● 释放光标精灵
  131.   #--------------------------------------------------------------------------
  132.   alias m5_20140305_dispose dispose
  133.   def dispose
  134.     m5_20140305_dispose
  135.     @message_cursor.dispose
  136.   end
  137.   #--------------------------------------------------------------------------
  138.   # ● 更新光标精灵
  139.   #--------------------------------------------------------------------------
  140.   alias m5_20140305_update update
  141.   def update
  142.     m5_20140305_update
  143.     @message_cursor.update
  144.     @message_cursor.show if self.pause && self.open? && @message_cursor.need_show?
  145.     @message_cursor.hide if @message_cursor.visible and 
  146.     ((!self.pause && self.open? && @message_cursor.visible) or $game_switches[M5MessageCursor::SWI])    
  147.   end
  148.   #--------------------------------------------------------------------------
  149.   # ● 更新光标位置
  150.   #--------------------------------------------------------------------------
  151.   alias m5_20140305_update_placement update_placement
  152.   def update_placement
  153.     m5_20140305_update_placement
  154.     @message_cursor.update_placement(@position)
  155.   end
  156. end
复制代码

  1. =begin
  2. ===============================================================================
  3.  对话显示姓名 By喵呜喵5
  4. ===============================================================================

  5. 【说明】

  6. 通过在对话中加入

  7. \name[姓名]

  8. 则可以在对话中显示姓名,通过修改设定部分的设定乃至修改脚本可以让这个姓名显示脚本看起
  9. 来更漂亮一些
  10. 实在不会修改的话,默认的样式应该也还过得去吧……


  11. =end
  12. module M5Name
  13. #==============================================================================
  14. #  设定部分
  15. #==============================================================================

  16.   LINE = 4
  17.   #文章显示的行数,姓名框会占用一行
  18.   
  19.   FONT = ["黑体"]
  20.   #姓名所使用的字体
  21.   
  22.   SIZE = 20
  23.   #姓名字体的大小,不建议超过你默认的文字大小,不然会发生奇怪的换页……
  24.   
  25.   COLOR = Color.new(0,0,0, 210)
  26.   #姓名的颜色,四个数值分别是R、G、B以及透明度
  27.   
  28.   BOLD = false
  29.   #姓名是否加粗
  30.   
  31.   ITALIC = false
  32.   #姓名是否斜体
  33.   
  34.   SHADOW = false
  35.   #姓名是否有阴影
  36.   
  37.   OUT = true
  38.   #姓名是否加边框
  39.   
  40.   OUT_COLOR = Color.new(255, 255, 255, 100)
  41.   #姓名边框的颜色,四个数值分别是R、G、B以及透明度
  42.   
  43.   ALIGN =  0
  44.   #姓名的对齐方式,0,1,2分别是居左、居中、居右

  45.   COLOR1 = Color.new(255, 255, 255, 128)
  46.   #姓名的背景框左边的颜色,四个数值分别是R、G、B以及透明度
  47.   #有能力建议直接修改下方的脚本调整成适合自己游戏的样式
  48.   
  49.   COLOR2 = Color.new(255, 255, 255, 0)
  50.   #姓名的背景框右边的颜色,四个数值分别是R、G、B以及透明度
  51.   #有能力建议直接修改下方的脚本调整成适合自己游戏的样式
  52.   
  53. #==============================================================================
  54. #  设定结束
  55. #==============================================================================
  56. end
  57. #==============================================================================
  58. #  脚本部分
  59. #==============================================================================
  60. class Window_Message < Window_Base    
  61.   def visible_line_number
  62.     return M5Name::LINE
  63.   end  
  64.   def process_all_text
  65.     open_and_wait
  66.     text = convert_escape_characters($game_message.all_text)
  67.     text.slice!(/\ename\[(.+?)\]/i)
  68.     @showname = $1
  69.     pos = {}
  70.     new_page(text, pos)
  71.     process_character(text.slice!(0, 1), text, pos) until text.empty?
  72.   end  
  73.   def new_line_x
  74.     $game_message.face_name.empty? ? 0 : 112
  75.   end  
  76.   def new_page(text, pos)
  77.     contents.clear
  78.     draw_face($game_message.face_name, $game_message.face_index, 0,0)
  79.     contents.font.name = M5Name::FONT
  80.     contents.font.bold = M5Name::BOLD
  81.     contents.font.italic = M5Name::ITALIC
  82.     contents.font.outline = M5Name::OUT
  83.     contents.font.shadow = M5Name::SHADOW
  84.     contents.font.color = M5Name::COLOR
  85.     contents.font.out_color = M5Name::OUT_COLOR
  86.     contents.font.size = M5Name::SIZE
  87.     if @showname != nil
  88.       draw_namebackground(text_size(@showname))
  89.       draw_text($game_message.face_name.empty? ? 0 : 112,0,contents_width,
  90.       M5Name::SIZE, @showname,M5Name::ALIGN)
  91.       pos[:y] = M5Name::SIZE
  92.     else
  93.       pos[:y] = 0
  94.     end    
  95.     reset_font_settings
  96.     pos[:x] = new_line_x
  97.     pos[:new_x] = new_line_x
  98.     pos[:height] = calc_line_height(text)
  99.     @showname = ""
  100.     clear_flags    
  101.   end
  102.   def reset_font_settings
  103.     change_color(normal_color)
  104.     contents.font.bold = Font.default_bold 
  105.     contents.font.italic = Font.default_italic
  106.     contents.font.name = Font.default_name
  107.     contents.font.outline = Font.default_outline 
  108.     contents.font.shadow = Font.default_shadow 
  109.     contents.font.size = Font.default_size
  110.     contents.font.out_color = Font.default_out_color
  111.   end
  112. #==============================================================================
  113. #  以下内容用来描绘姓名框的背景,有能力的建议自行对其修改成适合自己游戏的样式
  114. #==============================================================================  
  115.   
  116.   def draw_namebackground(rect)
  117.     temp_rect = rect.clone
  118.     temp_rect.x = $game_message.face_name.empty? ? 0 : 112
  119.     temp_rect.width = 460    
  120.     contents.gradient_fill_rect(temp_rect, name_color1, name_color2)
  121.   end
  122.   
  123.   def name_color1
  124.     M5Name::COLOR1
  125.   end
  126.   
  127.   def name_color2
  128.     M5Name::COLOR2
  129.   end
  130.   
  131. end
  132. #==============================================================================
  133. #  脚本结束
  134. #==============================================================================
复制代码


有什么别的方法能把这些脚本不发代码地复制下来呢?求教!

梦石
1
星屑
23371
在线时间
9572 小时
注册时间
2012-6-19
回帖
7021

开拓者短篇九导演组冠军

发表于 2014-4-13 15:02:47 | 显示全部楼层
直接复制的话会提示什么错误?
回复

使用道具 举报

梦石
0
星屑
50
在线时间
72 小时
注册时间
2013-8-26
回帖
30
 楼主| 发表于 2014-4-19 12:48:00 | 显示全部楼层
喵呜喵5 发表于 2014-4-13 15:02
直接复制的话会提示什么错误?

唔,无论那个脚本,都会说第几行的脚本出错
回复

使用道具 举报

梦石
1
星屑
23371
在线时间
9572 小时
注册时间
2012-6-19
回帖
7021

开拓者短篇九导演组冠军

发表于 2014-4-19 13:17:38 | 显示全部楼层
逆向刺杀者 发表于 2014-4-19 12:48
唔,无论那个脚本,都会说第几行的脚本出错

第几行?哪个错误?
回复

使用道具 举报

梦石
0
星屑
125
在线时间
486 小时
注册时间
2007-5-27
回帖
788
发表于 2014-4-19 14:00:42 | 显示全部楼层
喵呜喵5 发表于 2014-4-19 13:17
第几行?哪个错误?

恐怕是他连帖子里的内容跟前面的01020304之类的东西一起给复制进去了吧……
回复

使用道具 举报

老黄鸡

梦石
4
星屑
46140
在线时间
7978 小时
注册时间
2009-7-6
回帖
13343

MZ评测员RM创作大赛01组委会开拓者贵宾

发表于 2014-4-19 15:31:47 | 显示全部楼层
没看见代码框右上角有个复制么,如果是OPERA浏览器貌似这个复制也不行,换浏览器吧。
RGDirect - DirectX驱动的RGSS,点我了解.
(排满,暂停)RM全系列成套系统定制请联系QQ1213237796
不接受对其他插件维护的委托
回复

使用道具 举报

发表于 2014-4-19 16:06:59 来自手机 | 显示全部楼层

  1. 还有
复制代码
你一起复制进去干什么。。。
lz你是来搞笑的吗
回复

使用道具 举报

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

本版积分规则

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

在本版发帖返回顶部