|
Legendm2引擎DB扩展
DB扩展
今天教大家扩展DB,首先我随便下了一份服务端,很老的,我将DB替换到现在的版本里,再运行M2,看看出现的扩展提示:
正在加载物品数据库...
2010-4-24 20:28:46 Start ServerEngine Exception, Field 'UniqueItem' not found
2010-4-24 20:28:48 Access violation at address 02EB2230 in module 'mSystemModule.dll'. Read of address 00001798
2010-4-24 20:28:50 Access violation at address 02EB2230 in module 'mSystemModule.dll'. Read of address 00001798
这些提示就是没扩展DB,如果说大家已经扩展了之前部分DB,但是没有扩展内功后的DB,那么就会提示出后者的那些DB。
现在大家看我DB扩展演示。
首先我们选择数据库名 Leg引擎DB ,注意,很多人的服务器里都是几个区的,如果说你的版本都是一样的话,
那么DB应该都是一样的,随便选择一个就行了,如果说你的DB数据库不是Leg引擎DB的话,那么你就在DBC2000
里选择你对应的数据库名称,现在进行SQL对数据的扩展。
1、Monster.DB 扩展列ExploreItem,该列为怪物死亡后是否可探索(挖取物品),1=可探索,0=普通暴装备
可探索模式下,需要的灵符数设置等同与卧龙名将设置。
==============================================================================================
打开DBE(不要打开Monster),右键菜单,选择:SQL Statements,输入以下命令,然后点Run,
多次输入命令按Retry按钮重新输入既可:
Alter Table Monster Add Column ExploreItem SmallInt;
然后选择打开Monster,以下命令可以同时执行,以怪物名做为分类,可以自行编辑:
UpDate Monster.DB Set ExploreItem=0 WHERE (Race <> 0);
UpDate Monster.DB Set ExploreItem=1 WHERE (Name Like '%雷炎%'); 可自行设置,这里设置以后就是 ExploreItem=1 的怪物是可以探索的
2、StdItems.DB 扩展,以下扩展主要为交易市场功能使用,个别扩展的列为以后将开发的功能使用。
ItemType 是对市场物品进行分类,Reference 为物品附加说明,请根据实际情况自己分类
类型参考:
USERMARKET_TYPE_WEAPON = 1; //武器
USERMARKET_TYPE_NECKLACE = 2; //项链
USERMARKET_TYPE_RING = 3; //戒指
USERMARKET_TYPE_BRACELET = 4; //手镯
USERMARKET_TYPE_CHARM = 5; //符 毒
USERMARKET_TYPE_HELMET = 6; //头盔
USERMARKET_TYPE_BELT = 7; //腰带
USERMARKET_TYPE_SHOES = 8; //靴子
USERMARKET_TYPE_ARMOR = 9; //衣服盔甲
USERMARKET_TYPE_DRINK = 10; //药水
USERMARKET_TYPE_JEWEL = 11; //宝石
USERMARKET_TYPE_BOOK = 12; //书籍
USERMARKET_TYPE_MINERAL = 13; //矿石
USERMARKET_TYPE_QUEST = 14; //任务物品
USERMARKET_TYPE_ETC = 15; //其他
==============================================================================================
打开DBE(不要打开StdItems),逐次输入以下命令:
Alter Table StdItems Add Column Uniqueitem SmallInt;
Alter Table StdItems Add Column overlap SmallInt;
Alter Table StdItems Add Column ItemType SmallInt;
Alter Table StdItems Add Column itemset SmallInt;
Alter Table StdItems Add Column Reference VarChar(60);
打开StdItems,以下命令可以同时执行:
UpDate StdItems.DB Set itemset=0 WHERE (name <> '');
UpDate StdItems.DB Set overlap=0 WHERE (name <> '');
UpDate StdItems.DB Set Reference='' WHERE (name <> '');
UpDate StdItems.DB Set Reference='这是男性专用布衣,穿着无痛苦无\副作用是居家旅行的必备物品.' WHERE (name = '布衣(男)');
UpDate StdItems.DB Set Uniqueitem=0 WHERE (name <> '');
UpDate StdItems.DB Set ItemType = 0 WHERE (name <> '');
UpDate StdItems.DB Set ItemType = 1 Where (stdmode in (5,6));
UpDate StdItems.DB Set ItemType = 2 Where (stdmode in (19,20,21));
UpDate StdItems.DB Set ItemType = 3 Where (stdmode in (22,23));
UpDate StdItems.DB Set ItemType = 4 Where (stdmode in (24,26));
UpDate StdItems.DB Set ItemType = 5 Where (stdmode = 25);
UpDate StdItems.DB Set ItemType = 6 Where (stdmode = 15);
UpDate StdItems.DB Set ItemType = 7 Where (stdmode in (27, 54, 64));
UpDate StdItems.DB Set ItemType = 8 Where (stdmode in (28, 52, 62));
UpDate StdItems.DB Set ItemType = 9 Where (stdmode in (10, 11));
UpDate StdItems.DB Set ItemType = 10 Where (stdmode in (0,1,2,3));
UpDate StdItems.DB Set ItemType = 11 Where (Name Like '%宝石%');
UpDate StdItems.DB Set ItemType = 12 Where (stdmode = 4);
UpDate StdItems.DB Set ItemType = 13 Where (stdmode in (43));
UpDate StdItems.DB Set ItemType = 14 Where (stdmode in (41));
UpDate StdItems.DB Set ItemType = 15 Where (stdmode in (42));
先扩展Monster.DB,打开Leg引擎DB分别执行以下SQL命令:
Alter Table Monster Add Column InLevel Integer //怪物内功等级,会加强攻防
Alter Table Monster Add Column IPExp Integer //怪物内功经验
UpDate Monster.DB Set IPExp=0 WHERE (Race <> 0);
UpDate Monster.DB Set InLevel=0 WHERE (Race <> 0);
[!] 扩展技能到15级,
扩展Magic.DB,打开Leg引擎DB分别执行以下SQL命令,各需要等级、经验自行设置:
其中 MaxTrainLv 为最高可自然升级的技能级别,
可以使用:ChangeTranPoint 技能名 操作符(+ - =) 数值 //修改技能经验点
-----------------------------------------------------------------
以下一次执行: (NeedL%d-每个技能级别需要人物等级)
Alter Table Magic Add Column NeedL4 Integer;
Alter Table Magic Add Column NeedL5 Integer;
Alter Table Magic Add Column NeedL6 Integer;
Alter Table Magic Add Column NeedL7 Integer;
Alter Table Magic Add Column NeedL8 Integer;
Alter Table Magic Add Column NeedL9 Integer;
Alter Table Magic Add Column NeedL10 Integer;
Alter Table Magic Add Column NeedL11 Integer;
Alter Table Magic Add Column NeedL12 Integer;
Alter Table Magic Add Column NeedL13 Integer;
Alter Table Magic Add Column NeedL14 Integer;
Alter Table Magic Add Column NeedL15 Integer;
以下一次执行:
UpDate Magic.DB Set NeedL4=(NeedL3 + (NeedL3 - NeedL2)) WHERE (MagID <> 0);
UpDate Magic.DB Set NeedL5=(NeedL4 + (NeedL3 - NeedL2)) WHERE (MagID <> 0);
UpDate Magic.DB Set NeedL6=(NeedL5 + (NeedL3 - NeedL2)) WHERE (MagID <> 0);
UpDate Magic.DB Set NeedL7=(NeedL6 + (NeedL3 - NeedL2)) WHERE (MagID <> 0);
UpDate Magic.DB Set NeedL8=(NeedL7 + (NeedL3 - NeedL2)) WHERE (MagID <> 0);
UpDate Magic.DB Set NeedL9=(NeedL8 + (NeedL3 - NeedL2)) WHERE (MagID <> 0);
UpDate Magic.DB Set NeedL10=(NeedL9 + (NeedL3 - NeedL2)) WHERE (MagID <> 0);
UpDate Magic.DB Set NeedL11=(NeedL10 + (NeedL3 - NeedL2)) WHERE (MagID <> 0);
UpDate Magic.DB Set NeedL12=(NeedL11 + (NeedL3 - NeedL2)) WHERE (MagID <> 0);
UpDate Magic.DB Set NeedL13=(NeedL12 + (NeedL3 - NeedL2)) WHERE (MagID <> 0);
UpDate Magic.DB Set NeedL14=(NeedL13 + (NeedL3 - NeedL2)) WHERE (MagID <> 0);
UpDate Magic.DB Set NeedL15=(NeedL14 + (NeedL3 - NeedL2)) WHERE (MagID <> 0); 这段出错,可以不管。自己设置
以下一次执行: (L%dTrain-每个技能级别需要升级经验)
Alter Table Magic Add Column L4Train Integer;
Alter Table Magic Add Column L5Train Integer;
Alter Table Magic Add Column L6Train Integer;
Alter Table Magic Add Column L7Train Integer;
Alter Table Magic Add Column L8Train Integer;
Alter Table Magic Add Column L9Train Integer;
Alter Table Magic Add Column L10Train Integer;
Alter Table Magic Add Column L11Train Integer;
Alter Table Magic Add Column L12Train Integer;
Alter Table Magic Add Column L13Train Integer;
Alter Table Magic Add Column L14Train Integer;
Alter Table Magic Add Column L15Train Integer;
以下一次执行:
UpDate Magic.DB Set L4Train=(L3Train * 2) WHERE (MagID <> 0);
UpDate Magic.DB Set L5Train=(L4Train * 2) WHERE (MagID <> 0);
UpDate Magic.DB Set L6Train=(L5Train * 2) WHERE (MagID <> 0);
UpDate Magic.DB Set L7Train=(L6Train * 2) WHERE (MagID <> 0);
UpDate Magic.DB Set L8Train=(L7Train * 2) WHERE (MagID <> 0);
UpDate Magic.DB Set L9Train=(L8Train * 2) WHERE (MagID <> 0);
UpDate Magic.DB Set L10Train=(L9Train * 2) WHERE (MagID <> 0);
UpDate Magic.DB Set L11Train=(L10Train * 2) WHERE (MagID <> 0);
UpDate Magic.DB Set L12Train=(L11Train * 2) WHERE (MagID <> 0);
UpDate Magic.DB Set L13Train=(L12Train * 2) WHERE (MagID <> 0);
UpDate Magic.DB Set L14Train=(L13Train * 2) WHERE (MagID <> 0);
UpDate Magic.DB Set L15Train=(L14Train * 2) WHERE (MagID <> 0);
以下一次执行: (MaxTrainLv-最高可升级的技能级别)
Alter Table Magic Add Column MaxTrainLv Integer;
以下一次执行:
UpDate Magic.DB Set MaxTrainLv=3 WHERE (MagID <> 0);
以上就是整个M2对DB需要做的扩展,现在我们运行一次M2看看,
2010-4-24 20:36:37 [错误信息] 城堡初始化城门失败,检查怪物数据库里有没城门的设置: MainDoor
2010-4-24 20:36:37 [错误信息] 城堡初始化左城墙失败,检查怪物数据库里有没左城墙的设置: LeftWall
2010-4-24 20:36:37 [错误信息] 城堡初始化中城墙失败,检查怪物数据库里有没中城墙的设置: CenterWall
2010-4-24 20:36:37 [错误信息] 城堡初始化右城墙失败,检查怪物数据库里有没右城墙的设置: RightWall 这些是因为我现在的DB是老版的
城墙的名称都是中文,不是英文设置,基本上全部OK了,DB整个扩展完成,还有一个,就是对BOOT的修改,因为加密的原因,
每个机器在注册了M2以后,都必须修改BOOT,否则会出现怪物0血不死,人物释放魔法缓慢,M2报错等问题,那么现在大家看我修改BOOT。
[boot loader]
timeout=3
default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS
[operating systems]
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Professional" /noexecute=AlwaysOff/fastdetect
C:\mxldr=MaxDOS 工具?
然后将服务器重起即可完毕
|
上一篇:传奇私服广告怎上才有效果,传奇私服广告的选择.下一篇:传奇黑屏解决方法
|