蜀门蟠桃园活动脚本

作者:leo人气:更新:2021-09-09 20:15:44

--------------------------------------------------------

--蟠桃园

--------------------------------------------------------

CAI_7779 = class(CAIObject)


function CAI_7779:ctor(id, objid) --函数定义时间

self.dwLastTime = 0

end


function CAI_7779:OnCreate(creatorid) --函数取刷新

  SendMedia("#cffff00[蟠桃活动:]#n,开启了入口在成都铁匠旁,赶快加入吧,本次活动持续15分钟,下午14点到22点两小时一次...", 3);

  OutputLog("蟠桃园活动-入口刷新");

end

x = {425,429,420,410,417,414,403,393,386,359,363,353,364,358,376,368,367,383,391,401,412,430,423,393,385,366,362,361,362,369,383,396,414,385,370};

y = {-1390,-1380,-1405,-1411,-1421,-1428,-1424,-1430,-1420,-1426,-1416,-1405,-1399,-1390,-1405,-1389,-1381,-1397,-1411,-1412,-1415,-1421,-1384,-1376,-1382,-1394,-1397,-1414,-1423,-1433,-1424,-1427,-1418,-1408,-1393};


mb ={};



function CAI_7779:OnUpdate(dwNow) --函数取执行

if self.dwLastTime == 0 then

self.dwLastTime = dwNow

return

end

if dwNow - self.dwLastTime > 60 then

     self.dwLastTime = dwNow

        for i=1,50 do

        local m = math.random(1,table.getn(x));

        local c = math.random(1,10);

        if IsDead(mb[i]) == 1 or mb[i] == 0  then

          Disappear(mb[i])

  if i < 30 then

          mb[i] = CreateNpc(self.ObjID,7781,x[m],y[m],15)

          else

          mb[i] = CreateNpc(self.ObjID,7781,x[m],y[m],15)

          end

         else

         Disappear(mb[i])

          if i < 30 then

          mb[i] = CreateNpc(self.ObjID,7781,x[m],y[m],15)

          else

          mb[i] = CreateNpc(self.ObjID,7781,x[m],y[m],15)

          end

     end

    end

  end

end


function CAI_7779:OnInteractive(uid, event) --函数取功能

local Ap_content=""

local strUsername = GetUserNameByObjId(uid);

if event=="defaulttalk" then

elseif event == "Ap_PanXml" then

SetPosition(uid, 377, -1373) --传送功能

AddEffect(0, uid, 8011) --变身功能

SendMedia("#cffff00[蟠桃活动:]#n玩家#c00ff00#u【"..strUsername.."】#n进入了蟠桃园活动地图", 3);

OutputLog(strUsername.."-进入蟠桃园");

end

return Ap_content;

end


AITable[7779] = CAI_7779         --蟠桃园

-------------------------------------------------------------------------------


标签:蜀门蟠桃园脚本

豫ICP备2021020237号