扫描二维码关注官方公众号
返回列表
+ 发新帖
查看: 94|回复: 0

[转载发布] 如果你想做RM的加密代码,请进!

[复制链接]
累计送礼:
0 个
累计收礼:
0 个
  • TA的每日心情
    开心
    昨天 18:01
  • 签到天数: 114 天

    连续签到: 4 天

    [LV.6]常住居民II

    2338

    主题

    403

    回帖

    1万

    积分

    管理员

    Rank: 9Rank: 9Rank: 9

    VIP
    6
    卡币
    10627
    OK点
    16
    推广点
    0
    同能卷
    0
    积分
    13396

    灌水之王

    发表于 2024-4-19 17:58:39 | 显示全部楼层 |阅读模式
    引用:
    1. $:.push(Dir.getwd)require 'stringio.rb' 复制代码
    复制代码
    事件中插入
    1. a= StringOutput.new("")Marshal.dump($game_system,a)Marshal.dump($game_screen,a)b=a.stringc= StringInput.new(b)p Marshal.load(c)p Marshal.load(c)复制代码
    复制代码
    具体效果自己看吧,我没有动文件哦,StringIO.rb可以直接复制到代码里面
    附上StringIO.rb(这个文件在Ruby中有两个,一个是Game的一个是1.9的)[code]# encoding: utf-8#--# Copyright (c) 1998-2003 Minero Aoki ## Permission is hereby granted, free of charge, to any person obtaining# a copy of this software and associated documentation files (the# "Software"), to deal in the Software without restriction, including# without limitation the rights to use, copy, modify, merge, publish,# distribute, sublicense, and/or sell copies of the Software, and to# permit persons to whom the Software is furnished to do so, subject to# the following conditions:## The above copyright notice and this permission notice shall be# included in all copies or substantial portions of the Software.## THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.## Note: Originally licensed under LGPL v2+. Using MIT license for Rails# with permission of Minero Aoki.#++class StringInput#:nodoc:  include Enumerable  class  @src.size  end  def each( &block )    stream_check!    begin      @src.each(&block)    ensure      @pos = 0    end  end  def gets    stream_check!    if idx = @src.index(?\n, @pos)      idx += 1  # "\n".size      line = @src[ @pos ... idx ]      @pos = idx      @pos += 1 if @pos == @src.size    else      line = @src[ @pos .. -1 ]      @pos = @src.size + 1    end    @lineno += 1    line  end  def getc    stream_check!    ch = @src[@pos]    @pos += 1    @pos += 1 if @pos == @src.size    ch  end  def read( len = nil )    stream_check!    return read_all unless len    str = @src[@pos, len]    @pos += len    @pos += 1 if @pos == @src.size    str  end  alias sysread read  def read_all    stream_check!    return nil if eof?    rest = @src[@pos ... @src.size]    @pos = @src.size + 1    rest  end  def stream_check!    @closed and raise IOError, 'closed stream'  endendclass StringOutput#:nodoc:  class
    天天去同能,天天有童年!
    回复 送礼论坛版权

    使用道具 举报

    文明发言,和谐互动
    文明发言,和谐互动
    高级模式
    您需要登录后才可以回帖 登录 | 立即注册

    本版积分规则

    关闭

    幸运抽奖

    社区每日抽奖来袭,快来试试你是欧皇还是非酋~

    立即查看

    聊天机器人
    Loading...

    QQ|Archiver|手机版|小黑屋|同能RPG制作大师 ( 沪ICP备12027754号-3 )

    GMT+8, 2025-3-15 00:48 , Processed in 0.126599 second(s), 53 queries .

    Powered by Discuz! X3.4

    Copyright © 2001-2020, Tencent Cloud.

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