#!/usr/bin/perl
my $copy = qq~
#################################
#
# 传奇复制物品自动批量删除工具
# 较耗费系统资源,请先做好备份并停止游戏服务器运行
#
# 本工具需要系统安装perl解析器,将此源码保存为.pl文件,直接运行
#
#################################
~;
print $copy;
print "请回车确认操作开始:";
print "\n正在读入数据库,这可能需要几秒种,请稍等..\n";
my $MIRDB = 'D:/MirServer/mud2/DBSrv200/FDB/Mir.DB';
open (MIR,$MIRDB);
binmode(MIR);
my @mir =
my $mir = join("",@mir);
undef(@mir);
my (%stditem,%stditem2);
my $insert = "\x00" x 24;
substr($mir,0,124) = '';
my $i = int(length($mir) / 3164);
my $i0 = $i;
print "成功读取$i个角色数据,准备操作...\n";
my $i2 = 0;
while ($i){$i --;
print "搜索并检查第$i2个角色的物品...","\n";
my $this = substr($mir,0,3164);
substr($mir,0,3164) = '';
my $i3 = 49;
my $this1 = substr($this,484,1176);
my $this2 = substr($this,1964,960);
while($i3){
$i3 --;
substr($this1,0,24) = '';
my $a = substr($this1,0,4);
next if $a eq "\x00\x00\x00\x00";
$stditem2{&GetAscByBin($a)} = 1 if exists($stditem{$a});
$stditem{$a} = 1;
}
$i3 = 40;
while($i3){
$i3 --;
substr($this2,0,24) = '';
my $a = substr($this2,0,4);
next if $a eq "\x00\x00\x00\x00";
$stditem2{&GetAscByBin($a)} = 1 if exists($stditem{$a});
$stditem{$a} = 1;
}
$i2 ++;
}
close MIR;
&deleteitem(%stditem2);
#***************************
sub deleteitem
{
my %stditem2 = @_;print "\n";
$stditem2{0} = undef;
open (MIR,"+<$MIRDB");
binmode(MIR);
my @mir =
my $mir = join("",@mir);
undef(@mir);
my $insert = "\x00" x 24;
substr($mir,0,124) = '';
my $i = int(length($mir) / 3164);
print "已经得到复制品列表,接下来将准备删除复制物品,请等待...\n";
my ($i2,$i4) = (0,0);
while ($i){$i --;
print "搜索并处理第$i2个角色的物品...","\n";
my $this = substr($mir,0,3164);
substr($mir,0,3164) = '';
seek(MIR,3164 * $i2 + 124,0);
seek(MIR,484 + 24,1);
my $i3 = 49;
my $this1 = substr($this,484,1176);
my $this2 = substr($this,1964,960);
while($i3){
$i3 --;my $seek;
substr($this1,0,24) = '';
my $a = substr($this1,0,4);
if ($stditem2{&GetAscByBin($a)}){$seek = 1;print MIR $insert;$i4 ++;}
seek(MIR,24,1) unless $seek;
}
$i3 = 40;
seek(MIR,304,1);
while($i3){
$i3 --;my $seek;
substr($this2,0,24) = '';
my $a = substr($this2,0,4);
if ($stditem2{&GetAscByBin($a)}){$seek = 1;print MIR $insert;$i4 ++;}
seek(MIR,24,1) unless $seek;
}
$i2 ++;
}
close MIR;
print "总共删除 $i4 件复制物品,按回车退出程序。";
}
#***********
sub GetAscByBin
{
my $res = shift;
my $res2 = 0;
my $len = length($res);
while($len){
$len --;
$res2 += ord(substr($res,$len,1)) * (2 ** (8 * $len));
}
return $res2;
}
#********
sub GetStrByNum
{
my ($num,$len) = @_;
my $i = 1;
my $res;
while ($i){
my $a = 2 ** ($i * 8);
last if $a > $num;
$i ++;
}
$len = $i unless $len;
&error("不能转换数字,因为长度超过限定。") if $i > $len;
my $i2 = $len - $i;
while ($i){
my $a = 2 ** (($i - 1) * 8);
my $this = int ($num / $a);
$res = chr($this) . $res;
$num = $num % $a;
$i --;
}
$res .= "\x00" x $i2;
return $res;
}
☉推荐使用第三方专业下载工具下载本站软件,使用 WinRAR v3.10 以上版本解压本站软件。
☉如果这个软件总是不能下载的请点击报告错误,谢谢合作!!
☉下载本站资源,如果服务器暂不能下载请过一段时间重试!
☉如果遇到什么问题,请到本站论坛去咨寻,我们将在那里提供更多 、更好的资源!
☉本站提供的一些商业软件是供学习研究之用,如用于商业用途,请购买正版。
☉为了防止盗链本站下载资源,所有下载仅提供给注册会员,会员注册地址
1.76精品传奇_1.76天下毁灭_1.76复古传奇_英雄合击_中变靓装传奇_无忧传奇
传奇花屏补丁,花屏补丁,土城花屏补丁,盟重土城花屏补丁下载,土城花屏补丁下载,沙巴克花屏补丁,传奇土城花屏补丁下载
网站每天发布最新、最好的传奇版本下载和与传奇服务端配套开区传奇模版,网游技术教程全部免费下载!
无忧网络是目前唯一家所有的传奇服务端,传奇私服花屏补丁,盟重花屏补丁和传奇客户端下载都经过站长亲自测试并配有真实测试图!
所有的工具软件和传奇版本在发布之前,都会经过站长亲自测试,保证chuanqisf可以进入游戏,所有软件都无毒无插件!
本站声明:本站所有技术资料与下载资源均为网络搜集整理,并不代表本站的观点与立场,如有侵犯您的权益,请来信指出,本站将立即改正Copyright © 2002-2014 无忧网络 版权所有蜀ICP备09041899号