搜索
 找回密码
 加入

用警戒塔做传送NPC的详细方法

falcon4585 2014-6-8 23:14:04 1243
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;用警戒塔传送进龙洞;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;用"地狱的深渊地下16层"警戒塔的evt代码修改,问题是如何找到该警戒塔的ID,以便加入其它地图。
;select * from k_npc where strname='警戒塔',找到所有警戒塔sSid,共6个5310,5410,5300,5400,5500,7001。
;迷宫地图ID是33,select * from k_npcpos where zoneid=33,找到所有NpcID,只有7001是警戒塔。
;初步估计EVT代码43501,对应NPC7001(byType值是28)。在没有警戒塔的地图(如30德洛瓦)插入这个NPC试试。
;select * from k_npcpos where zoneid=33 and npcid=7001,找到16个,只有TrapNumber值不同,分别是21到36,应该是每层一个。
;第16层,应该是TrapNumber为16的警戒塔。看来event代码除了跟NPC的bytype值关联还和TrapNumber有关。
;参照k_npcpos内的参数只改坐标,加入警戒塔。
;insert into k_npcpos values('30','7001','100','0','0','0','36','520','250','520','250','520','250','520','250','1','30','0','0','')
;试验证明TrapNumber值为36的警戒塔与EVENT 43501对应。(开始以为EVENT 43508是NPC事件,搜索发现它只是43501的一个子事件)

EVENT 43501; 厚剐狼规凯艰 眉农
E SELECT_MSG 3 4637 40077 6666 4227 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1;拉摸/1瞒带怜
END
;在Quest_Menu_ch.tbl中,40077是文本:移动到龙洞。4227:不,不移动了。4277没有定义子事件。

EVENT 6666
E RUN_EVENT 66661;运行检查物品的evt
E RUN_EVENT 66662;运行传送
END

EVENT 66661 ; First we'll check to see if the item doesn't exist, if it doesn't, End, and display a message.
A HOWMUCH_ITEM 389200000 0 0 ; 如果没有龙珠... ...
;A CHECK_EXIST_ITEM 389200000 此句限制传送人身上的物品,有龙珠(389200000)的可以进入。可以用其做会员传送!
E SELECT_MSG 2 43603 6002 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1;43603你没有龙珠,6002确认
E RETURN ;结束脚本
END

EVENT 66662
E SELECT_MSG 2 43602 6002 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1;4360您携有龙珠,6002确认
;E ZONE_CHANGE 34 117 17 ;传到龙洞,这个坐标如果错误会飘在空中,/村庄回城,然后修改坐标。
E ZONE_CHANGE_PARTY  34 117 17 ;整队传到龙洞
E RETURN ;结束脚本
END

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;用警戒塔传送进龙洞;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
随机推荐

2 回复

falcon4585
2014-6-8 11:19:47
楼主
点击查看详情
贴子内容就是EVT脚本,用启事本就能编辑,文件命名规则就是地图ID.evt,德洛瓦地图ID是30,30.evt就是德洛瓦的脚本。把上面代码复制到30.evt里即可
yangwx
2014-6-8 23:14:04
本帖最后由 yangwx 于 2014-6-8 23:19 编辑

--7001_dungeun.lua--for ko3.0

local Num = GetEventTrigger(UID)
local NPC = 7001;
local i = 0;

if EVENT == 240 then
   EVENT =  Num
end

if EVENT == 241 then
    Ret = 1;
end

if Num < 41000 then

local        HellX = {50, 50, 50, 50, 150, 150, 150, 150, 250, 250, 250, 250, 350, 350, 350, 352, 450, 450, 450, 450}
local HellY = {74, 197, 316, 437, 118, 237, 353, 473, 77, 192, 315, 435, 117, 235, 356, 477, 76, 195, 316, 433}


if EVENT == Num then
ItemA = HowmuchItem(UID, 379111000);  
   if ItemA == 0  then
      EVENT =  30078
   else
      SelectMsg(UID, 2, -1, 40071, NPC, 40075, 30075, 40009, 30078);
   end
end

if EVENT == 30078 then
    i = Num - 40001
    if i  < 1  then
       SelectMsg(UID, 3, -1, 40001, NPC, 40010, 30010, 40041, 30041, 40099, 30099);
    elseif  i  > 18 then
       SelectMsg(UID, 3, -1, 40020, NPC, 40010, 30100, 40041, 30041, 40090, 30090);
    elseif  i  == 11 or   i  == 12 or   i  == 13 or   i  == 15 or   i  == 16 then
       SelectMsg(UID, 3, -1, Num, NPC, 40010, 30011, 40041, 30041, 40090, 30090);
    else
       SelectMsg(UID, 3, -1, Num, NPC, 40010, 30010, 40041, 30041, 40090, 30090);
    end
end

if EVENT == 30075 then
   RobItem(UID, 379111000, 1)
   ZoneChangeParty(UID, 33, 62, 91)
end

if EVENT == 30010 then
   i = Num - 39999
   ZoneChange(UID, 32, HellX, HellY)
end

local ItemA ;
local ItemB ;

if EVENT == 30041 then
   ItemA = HowmuchItem(UID, 379081000);
   ItemB = HowmuchItem(UID, 379082000);
   if ItemA > 0 and  ItemB >0  then
      SelectMsg(UID, 3, -1, 40040, NPC, 40061, 30070, 40062, 30071, 40060, 241);
   elseif ItemA > 0 and  ItemB == 0  then
      SelectMsg(UID, 2, -1, 40058, NPC, 40061, 30070, 40060, 241);
   elseif ItemA == 0 and  ItemB > 0  then
      SelectMsg(UID, 2, -1, 40056, NPC, 40062, 30071, 40060, 241);
   else
      SelectMsg(UID, 2, -1, 40022, NPC, 10, 241);
   end
end

if EVENT == 30070 then
   RobItem(UID, 379081000, 1)
   ZoneChangeParty(UID, 32, 250, 192)
end

if EVENT == 30071 then
   RobItem(UID, 379082000, 1)
   ZoneChangeParty(UID, 32, 450, 437)
end

if EVENT == 30011 then
   ItemA = HowmuchItem(UID, 379080000);  
   if ItemA > 0  then
      RobAllItemParty(UID, 379080000)
      i = Num - 39999
      ZoneChangeParty(UID, 32, HellX, HellY)
   else
      SelectMsg(UID, 2, -1, 40021, NPC, 10, 241);
   end
end

if EVENT == 30090 then
   SelectMsg(UID, 2, -1, 40090, NPC, 40090, 30395, 40099, 30099);
end

if EVENT == 30395 then
   i = Num - 40001
   ZoneChange(UID, 32, HellX, HellY)
end

if EVENT == 30099 then
   ZoneChange(UID, 30, 500, 250)
end

if EVENT == 30100 then
   SelectMsg(UID, 2, -1, 40070, NPC, 10, 241);
end

elseif Num > 41000 and Num < 43000 then

local        HellX = {62, 62, 62, 62, 189, 189, 189, 189, 315, 315, 316, 315, 444, 444, 444, 444}
local HellY = {91, 226, 351, 477, 94, 225, 348, 458, 90, 225, 354, 475, 102, 224, 353, 458}


if EVENT == Num then
   i = Num - 42001
   if i  < 1  then
      SelectMsg(UID, 3, -1, 42001, NPC, 40010, 30110, 40041, 30141, 40099, 30496,  40076, 30076, 40077, 30077);
   elseif  i  > 14 then
      SelectMsg(UID, 3, -1, 42016, NPC, 40041, 30141, 40090, 30190,  40076, 30076, 40077, 30077);
   elseif  i  == 10 or   i  == 12 or   i  == 13 or   i  == 14 then
      SelectMsg(UID, 3, -1, Num, NPC, 40010, 30111, 40041, 30141, 40090, 30190,  40076, 30076, 40077, 30077);
   else
      SelectMsg(UID, 3, -1, Num, NPC, 40010, 30110, 40041, 30141, 40090, 30190,  40076, 30076, 40077, 30077);
   end
end


if EVENT == 30077 then
   ItemA = HowmuchItem(UID, 389200000);  
   if ItemA == 0  then
      SelectMsg(UID, 2, -1, 43603, NPC, 10, 241);
   else
      SelectMsg(UID, 2, -1, 43602, NPC, 40077, 30112, 40060, 30077);
   end
end


if EVENT == 30112 then
   RobItem(UID, 389200000, 1)
   ZoneChangeParty(UID, 34, 112, 15)
end

if EVENT == 30076 then
   ZoneChange(UID, 32, 50, 74)
end

if EVENT == 30110 then
   i = Num - 41999
   ZoneChange(UID, 33, HellX, HellY)
end

local ItemA ;
local ItemB ;

if EVENT == 30141 then
   ItemA = HowmuchItem(UID, 379083000);
   ItemB = HowmuchItem(UID, 379084000);
   if ItemA > 0 and  ItemB >0  then
      SelectMsg(UID, 3, -1, 40055, NPC, 40063, 30170, 40064, 30171, 40060, 241);
   elseif ItemA > 0 and  ItemB == 0  then
      SelectMsg(UID, 2, -1, 40054, NPC, 40063, 30170, 40060, 241);
   elseif ItemA == 0 and  ItemB > 0  then
      SelectMsg(UID, 2, -1, 40052, NPC, 40064, 30171, 40060, 241);
   else
      SelectMsg(UID, 2, -1, 40022, NPC, 10, 241);
   end
end

if EVENT == 30170 then
   RobItem(UID, 379083000, 1)
   ZoneChangeParty(UID, 33, 189, 458)
end

if EVENT == 30171 then
   RobItem(UID, 379084000, 1)
   ZoneChangeParty(UID, 33, 444, 458)
end


if EVENT == 30111 then
   ItemA = HowmuchItem(UID, 379080000);  
   if ItemA > 0  then
      RobItem(UID, 379080000, 1)
      i = Num - 41999
      ZoneChangeParty(UID, 33, HellX, HellY)
   else
      SelectMsg(UID, 2, -1, 40021, NPC, 10, 241);
   end
end

if EVENT == 30190 then
   SelectMsg(UID, 2, -1, 40090, NPC, 40090, 30495, 40099, 30496);
end

if EVENT == 30495 then
   i = Num - 42001
   ZoneChange(UID, 33, HellX, HellY)
end

if EVENT == 30496 then
   ZoneChange(UID, 30, 500, 250)
end

else

if EVENT == 43601 then
   SelectMsg(UID, 3, -1, 43601, NPC, 4071, 30096,  4072, 241);
end

if EVENT == 30096 then
   ZoneChange(UID, 33, 445, 459)
end
end

return Ret;
高级模式
游客