stoneage8.5/服务器端lua文件/ablua/item/attcteffect.lua

48 lines
1.6 KiB
Lua
Raw Normal View History

2020-06-22 17:49:02 +08:00
<EFBFBD><EFBFBD>¼<EFBFBD><EFBFBD><EFBFBD>߼<EFBFBD>¼={};
function WindowTalked ( meindex, charaindex, seqno, select, data)
if seqno == 1 then
local <EFBFBD><EFBFBD><EFBFBD><EFBFBD>λ<EFBFBD><EFBFBD> = other.atoi(data);
if <EFBFBD><EFBFBD><EFBFBD><EFBFBD>λ<EFBFBD><EFBFBD> >=1 and <EFBFBD><EFBFBD><EFBFBD><EFBFBD>λ<EFBFBD><EFBFBD><=4 then
local <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> = char.getCharPet(charaindex, <EFBFBD><EFBFBD><EFBFBD><EFBFBD>λ<EFBFBD><EFBFBD>-1);
if char.check(<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) == 1 then
<EFBFBD><EFBFBD>¼<EFBFBD><EFBFBD><EFBFBD>߼<EFBFBD>¼[charaindex][3] = <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>;
local <EFBFBD>Ի<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> = "<EFBFBD>Ƿ<EFBFBD><EFBFBD><EFBFBD> "..char.getChar(<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,"<EFBFBD><EFBFBD><EFBFBD><EFBFBD>") .." ѧϰ<D1A7><CFB0><EFBFBD><EFBFBD>Ч<EFBFBD><D0A7>"
lssproto.windows(charaindex, "<EFBFBD>Ի<EFBFBD><EFBFBD><EFBFBD>", "ȷ<EFBFBD><EFBFBD><><C8A1>", 2, char.getWorkInt( npcindex, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>"),<EFBFBD>Ի<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> )
end
end
elseif seqno == 2 then
if select == 1 then
local <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ЧID = other.atoi(item.getChar(<EFBFBD><EFBFBD>¼<EFBFBD><EFBFBD><EFBFBD>߼<EFBFBD>¼[charaindex][1], "<EFBFBD>ֶ<EFBFBD>"))
char.setInt(<EFBFBD><EFBFBD>¼<EFBFBD><EFBFBD><EFBFBD>߼<EFBFBD>¼[charaindex][3],"<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ч",<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ЧID);
char.DelItem(charaindex, <EFBFBD><EFBFBD>¼<EFBFBD><EFBFBD><EFBFBD>߼<EFBFBD>¼[charaindex][2]);
char.TalkToCli(charaindex, -1, "<EFBFBD><EFBFBD><EFBFBD>ij<EFBFBD><EFBFBD><EFBFBD>"..char.getChar(<EFBFBD><EFBFBD>¼<EFBFBD><EFBFBD><EFBFBD>߼<EFBFBD>¼[charaindex][3],"<EFBFBD><EFBFBD><EFBFBD><EFBFBD>").."ϰ<EFBFBD>ù<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ч,<2C><>ȥ<EFBFBD><C8A5><EFBFBD><EFBFBD><EFBFBD>ɣ<EFBFBD>", "<EFBFBD><EFBFBD>ɫ")
<EFBFBD><EFBFBD>¼<EFBFBD><EFBFBD><EFBFBD>߼<EFBFBD>¼[charaindex]=nil;
end
end
end
function attackeffect(itemindex, charaindex, toindex, haveitemindex)
<EFBFBD><EFBFBD>¼<EFBFBD><EFBFBD><EFBFBD>߼<EFBFBD>¼[charaindex]={};
<EFBFBD><EFBFBD>¼<EFBFBD><EFBFBD><EFBFBD>߼<EFBFBD>¼[charaindex][1]=itemindex;
<EFBFBD><EFBFBD>¼<EFBFBD><EFBFBD><EFBFBD>߼<EFBFBD>¼[charaindex][2]=haveitemindex;
lssproto.windows(charaindex, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>", "ȷ<EFBFBD><EFBFBD>", 1, char.getWorkInt( npcindex, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>"), "")
end
function Create(name, metamo, floor, x, y, dir)
--<2D><><EFBFBD><EFBFBD>NPC(NPC<50><43><EFBFBD>֣<EFBFBD>ͼ<EFBFBD><CDBC><EFBFBD>ţ<EFBFBD><C5A3><EFBFBD>ͼ<EFBFBD>ţ<EFBFBD><C5A3><EFBFBD><EFBFBD><EFBFBD>X<EFBFBD><58><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Y<EFBFBD><59><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)<29><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><D2BB>NPC<50><43><EFBFBD><EFBFBD>
npcindex = npc.CreateNpc(name, metamo, floor, x, y, dir)
char.setFunctionPointer(npcindex, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>¼<EFBFBD>", "WindowTalked", "")
end
function data()
end
function main()
Create("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ЧNPC",100000,777,20,20,3);
item.addLUAListFunction( "ITEM_ATTACKEFFECT", "attackeffect", "")
end