找回密码
 register

QQ登录

只需一步,快速开始

查看: 29|回复: 0

[游戏攻略] 源端摆摊购买的Lua回调脚本备忘ua

[复制链接]

[游戏攻略] 源端摆摊购买的Lua回调脚本备忘ua

[复制链接]
  • 打卡等级:热心大叔
  • 打卡总天数:185
  • 打卡月天数:8
  • 打卡总奖励:183
  • 最近打卡:2025-05-08 13:47:30
Waylee

主题

0

回帖

1万

积分

仙帝

积分
19557
Waylee 2025-5-6 15:28 | 显示全部楼层 |阅读模式 | Google Chrome | Windows 10

马上注册,查看网站隐藏内容!!

您需要 登录 才可以下载或查看,没有账号?register

×
x888892_g_scriptId=888892

-- MF_IS_BAN_EXCHANGE           = 116   -- 是否禁止交易[引擎占用]
-- MF_IS_BAN_STALL              = 117   -- 是否禁止摆摊[引擎占用]
-- MF_IS_BAN_RECEXCHANGE        = 118   -- 是否允许被交易
-- MF_IS_BAN_STALLBUY           = 119   -- 是否禁止摆摊购买
--**********************************
-- 摆摊前回调 返回值:2允许 其他拒绝
--**********************************
function x888892_IS_BAN_STALL( sceneId, selfId,arg)
    if LuaFnIsObjValid(sceneId, selfId) ~= 1 or LuaFnIsCanDoScriptLogic(sceneId,selfId) ~= 1 then
        return 1
    end
    if GetMissionFlag(sceneId, selfId,MF_IS_BAN_STALL) == 0 then
        x888892_Tips(sceneId,selfId,"没有摆摊上架权限!")
        return 1; 
    end
    x888892_Tips(sceneId,selfId,"您拥有上架权限,上架成功!")
    return 2; 
end

--**********************************
-- 交易前回调 返回值:2允许 其他拒绝
--**********************************
function x888892_IS_BAN_EXCHANGE( sceneId, selfId,tarobjID)
    if LuaFnIsObjValid(sceneId, selfId) ~= 1 or LuaFnIsCanDoScriptLogic(sceneId,selfId) ~= 1 then
        x888892_Tips(sceneId,selfId,"操作失败!")
        return 1
    end
    if LuaFnIsObjValid(sceneId, tarobjID) ~= 1 or LuaFnIsCanDoScriptLogic(sceneId,tarobjID) ~= 1 then
        x888892_Tips(sceneId,selfId,"目标当前状态不合法!")
        return 1
    end
    if GetMissionFlag(sceneId, selfId,MF_IS_BAN_EXCHANGE) == 0 then
        x888892_Tips(sceneId,selfId,"你没有交易权限!")
        return 1; 
    end

    if GetMissionFlag(sceneId,tarobjID,MF_IS_BAN_EXCHANGE) == 0 then
        x888892_Tips(sceneId,selfId,"目标玩家没有交易权限!")
        return 1; 
    end
    return 2; 
end

--**********************************
-- 摆摊购买回调 返回值:2允许 其他拒绝
--**********************************
function x888892_MF_IS_BAN_STALLBUY( sceneId, selfId,arg)
    if LuaFnIsObjValid(sceneId, selfId) ~= 1 or LuaFnIsCanDoScriptLogic(sceneId,selfId) ~= 1 then
        x888892_Tips(sceneId,selfId,"操作失败!")
        return 1
    end
    if GetMissionFlag(sceneId, selfId,MF_IS_BAN_STALLBUY) == 0 then
        x888892_Tips(sceneId,selfId,"您没有摆摊购买权限!")
        return 1; 
    end
    return 2; 
end

function x888892_Tips( sceneId, selfId,msg )
    BeginEvent( sceneId )
        AddText( sceneId, msg)
    EndEvent( sceneId )
    DispatchMissionTips( sceneId, selfId )
end
您需要登录后才可以回帖 登录 | register

本版积分规则

雪舞知识库 | 浙ICP备15015590号-1 | 萌ICP备20232229号|浙公网安备33048102000118号 |网站地图|天天打卡

GMT+8, 2025-5-8 22:09 , Processed in 0.092525 second(s), 5 queries , Redis On.

Powered by XueWu Licensed

Copyright © Tencent Cloud.

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