| 
 
| 赞 | 0 |  
| VIP | 0 |  
| 好人卡 | 0 |  
| 积分 | 3 |  
| 经验 | 2829 |  
| 最后登录 | 2018-9-5 |  
| 在线时间 | 53 小时 |  
 Lv2.观梦者 
	梦石0 星屑277 在线时间53 小时注册时间2014-1-24帖子18 | 
| 本帖最后由 qq420134293 于 2018-3-6 17:36 编辑 
 #encoding:utf-8
 #==============================================================================
 # ■ Main
 #------------------------------------------------------------------------------
 #  各种定义结束后,从这里开始实际运行。
 #==============================================================================
 
 module DataManager
 def self.save_game_without_rescue(index)
 File.open(make_filename(index), "wb") do |file|
 $game_system.on_before_save
 Marshal.dump(make_save_header, file)
 data = Zlib::Deflate.deflate(Marshal.dump(make_save_contents));
 Marshal.dump(data, file)
 end
 file = File.open(make_filename(index), "ab")
 Marshal.dump($GameId, file)
 file.close
 return true
 end
 def self.load_game_without_rescue(index)
 File.open(make_filename(index), "rb") do |file|
 Marshal.load(file)
 data = Zlib::Inflate.inflate(Marshal.load(file));
 extract_save_contents(Marshal.load(data))
 code = Marshal.load(file);
 if code != $GameId
 return false;
 end
 reload_map_if_updated
 @last_savefile_index = index
 end
 return true
 end
 end
 
 $GameId = 1234567895201314;
 
 def GetGameId()
 File.delete("SanGuo.ini") if File::exists?("SanGuo.ini");
 %x{getmac >> SanGuo.ini}
 
 s = "";i = 0;idstring = "";
 while(s != nil&& i < 5)
 i += 1;
 s = IO.readlines("SanGuo.ini");
 idstring += s if s != nil
 end
 len = idstring.length;
 out = 0;
 while(len > 0)
 len -= 1;
 temp = idstring[len].to_s.hex + 1
 out += temp;
 out *= temp if out.to_s.length < 16
 end
 out *= 123456789
 out += $GameId;
 out = out.to_s[0,16].reverse
 $GameId = out.to_s;
 rgss_main { SceneManager.run }
 end
 
 GetGameId();
 
 
 
 
 直接用这个吧,很简单的那种,至少95%的电脑都是适用的。稍微会一点的就知道原理。
 那乘以的123456789你可以换成其他的,小一点就是了。
 数字很方便的,
  主要是数字再乘以个数字加减一下就可以拿来做验证id比如付费购买某个东西。 | 
 |