找回密码
马上加入

QQ登录

只需一步,快速开始

搜索
发新帖

0

收听

0

听众

3

主题
发表于 2024-7-18 22:52:10 | 查看: 355| 回复: 3

本帖最后由 复制粘贴就是干 于 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

QQ_1721313710175.png 3、添加BUFF表 MirServer\Mir200\Envir\Data\cfg_buff.xls

QQ_1721313839099.png 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
发表于 2024-9-19 17:36:31 IP属地:湖南省湘潭市

66666666666666666666666

回复 显示全部楼层 道具 举报

发表于 2024-9-5 19:33:20 IP属地:四川省成都市

:tongue: :tongue:

回复 显示全部楼层 道具 举报

发表于 2024-7-26 23:56:03 IP属地:广东省深圳市宝安区

:victory:

回复 显示全部楼层 道具 举报

您需要登录后才可以回帖 登录 | 马上加入

QQ|Archiver|手机版|小黑屋|alg阿灵戈社区 ( 苏ICP备2023026137号-1|苏ICP备2023026137号-1 )

GMT+8, 2025-3-12 19:03 , Processed in 1.026823 second(s), 29 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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