本帖最后由 复制粘贴就是干 于 2024-7-18 23:09 编辑
1、配置人形怪 MirServer\Mir200\Envir\MonUseItems\xxx.txt
[Info]
;职业
Job=0
;性别
Gender=0
;头发
Hair=5
;使用魔法
UseSkill=烈火剑法,半月弯刀,刺杀剑术
;是不是掉背包装备,1=掉,0=不掉
DropItem=0
;是不是掉身上装备,1=掉,0=不掉
DropUseItem=0
;掉身上装备几率
DieDropUseItemRate=10
;是否允许挖取身上装备1=是,0=否 (挖取装备就不走爆率文件的爆率了 2选1)
ButchUseItem=0
;挖取身上装备机率,0为百分百,数字越大,机率越小
ButchItemRate=10
;允许挖取几件装备
ButchItemCount=1
;身体坚韧度,数字越大,挖的时间越长
ButchUseItemBodyLeathery=150
;挖取身上装备收费模式(按照货币ID)不管有没有挖到装备都会收费
ButchChargeClass=0
;挖取身上装备每次收费点数
ButchChargeCount=1
UseAllSkillByJob=0
[UseItems]
;基础套装复活配置(=0生效基础属性,=1基础和套装属性=2基础,套装,复活属性)
CalcItemAbil=0
;衣服
UseItems0=布衣(男)
;武器
UseItems1=木剑
;照明物
UseItems2=
;项链
UseItems3=
;头盔
UseItems4=
;左手镯
UseItems5=
;右手镯
UseItems6=
;左戒指
UseItems7=
;右戒指
UseItems8=
;物品
UseItems9=
;腰带
UseItems10=
;鞋子
UseItems11=
;宝石
UseItems12=
;斗笠
UseItems13=
2、添加怪物数据库 MirServer\Mir200\Envir\Data\cfg_monster.xls
3、添加BUFF表 MirServer\Mir200\Envir\Data\cfg_buff.xls
4、添加触发 我使用了三种触发分别是 玩家登陆触发、宝宝死亡触发、玩家属性变化触发 可按需添加
5、业务脚本编写
-- 玩家登陆触发
function goPalyerLogin(actor)
local nCount = getbaseinfo(actor, 38)
if nCount > 0 then
return
end
local pets = recallmobex(actor, "xxx", 0, 0, 0, 1, 65535, 0, 0, 1, 0, 100)
changeslaveattackhumpowerrate(actor, "xxx", 0)
if pets[1] then
local attr = attrtab(actor)
if hasbuff(pets[1], 20025) then
delbuff(pets[1], 20025)
end
addbuff(pets[1], 20025, nil, 1, actor, attr)
addhpper(pets[1], "=", 100)
end
end
-- 宝宝死亡触发
function goPlayerPetDie(actor, pet)
delaycall(actor,1000,0,"业务:玩家宝宝:goPalyerLogin")
end
-- 玩家属性变化触发
function goPlayerAttrChange(actor)
local pet = getslavebyindex(actor, 0)
if pet then
local attr = attrtab(actor)
if hasbuff(pet, 20025) then
delbuff(pet, 20025)
end
addbuff(pet, 20025, nil, 1, actor, attr)
addhpper(pet, "=", 100)
end
end