白日门传奇添加屠城活动的方法

script目录下autorun.lua添加活动触发脚本

function tchd()

        server.set_temp_var("activityName","屠城活动")

        server.server_exe("gui.PanelActivityGuide.startNotice")

        local map = server.find_map("tucheng");--地图编号

        if map then

                if map:num_monster(26000015) == 0 then

                        map:mon_gen(55,31,26000015,5,6,1,1,"no_owner");--地图坐标,(x,y,怪物id,num,范围,1,1)

                        server.info(10000,0,"屠城活动现在开始 大量BOSS出现在土城等你围杀");

                end

        end

end



function tchdgb()


        local map = server.find_map("tucheng");

        if map then


                map:clear_mon_by_name("BOSS名称")--指定的名称

        end

end

long目录下autorun.lua添加活动时间

day                        18:00                        autorun.tchd

day                        18:30                        autorun.tchdgb



gui下PanelActivityGuide.lua 添加客户端活动显示

{index=16,name="屠城活动",        repeatDay=0, startTime=1800, endTime=1830, levelLimit=80, open=true, openDate=0,openState=0,},



用户评论 0

暂无评论