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

108 lines
3.4 KiB
Lua
Raw Normal View History

2020-06-22 17:49:02 +08:00
function FreeSaMenu(meindex, index)
-- char.TalkToCli(meindex, -1, char.getWorkInt(meindex,"NPC<50><43>ʱ3"), "<22><>ɫ")
local սģ = char.getWorkInt(meindex,"ս<EFBFBD><EFBFBD>");
parameter = {meindex}
if index == 11 then
if սģ ==0 then
char.Encounter(meindex)
char.TalkToCli(meindex, -1, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ԭ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>У<EFBFBD>", "<EFBFBD><EFBFBD>ɫ")
else
char.TalkToCli(meindex, -1, "<EFBFBD><EFBFBD><EFBFBD>Ѿ<EFBFBD>ս<EFBFBD><EFBFBD><EFBFBD>У<EFBFBD>", "<EFBFBD><EFBFBD>ɫ")
end
elseif index == 12 then
char.ClearEncounter(meindex);
char.TalkToCli(meindex, -1, "<EFBFBD>ر<EFBFBD>ԭ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>У<EFBFBD>", "<EFBFBD><EFBFBD>ɫ")
elseif index == 13 then
if սģ == 0 then
other.CallFunction("CheckTalked", "data/ablua/npc/check/check.lua", parameter)
end
-- other.CallFunction("ShowHead", "data/ablua/npc/vipshop/vipshop.lua", parameter)
elseif index == 14 then
other.CallFunction("QueryMissionTalked", "data/ablua/npc/querymission/querymission.lua", parameter)
elseif index == 16 then
other.CallFunction("FreeDataInfoShow", "data/ablua/freedatainfoshow.lua", parameter)
elseif index == 17 then
lssproto.SaMenu(meindex, index, "http://www.stoneage.es")
elseif index == 18 then
lssproto.SaMenu(meindex, index, "http://www.stoneage.es/forum.php")
elseif index == 19 then
lssproto.SaMenu(meindex, index, "http://www.stoneage.es/pay.php")
elseif index == 20 then
char.setWorkInt(meindex,"NPC<EFBFBD><EFBFBD>ʱ3",1)
other.CallFunction("OnlineService", "data/ablua/npc/onlineservice/onlineservice.lua", parameter)
elseif index == 21 then
lssproto.SaMenu(meindex, index, "http://www.stoneage.es/forum.php?mod=viewthread&tid=54&extra=page%3D1")
elseif index == 22 then
lssproto.SaMenu(meindex, index, "http://www.stoneage.es/bbs/forum.php?mod=viewthread&tid=226")
elseif index == 30 then--<2D>л<EFBFBD><D0BB>ӳ<EFBFBD>
if char.getWorkInt(meindex, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>") == 1 then
ת<EFBFBD>ƶ<EFBFBD><EFBFBD><EFBFBD>[meindex]={};
local <EFBFBD><EFBFBD>Ա<EFBFBD><EFBFBD> = "";
local <EFBFBD><EFBFBD><EFBFBD><EFBFBD>=0;
for i=1,4 do
local <EFBFBD><EFBFBD>Ա<EFBFBD><EFBFBD><EFBFBD><EFBFBD> = char.getWorkInt(meindex, "<EFBFBD><EFBFBD>Ա" .. i+1)
if char.check(<EFBFBD><EFBFBD>Ա<EFBFBD><EFBFBD><EFBFBD><EFBFBD>) == 1 then
<EFBFBD><EFBFBD><EFBFBD><EFBFBD> = <EFBFBD><EFBFBD><EFBFBD><EFBFBD> + 1;
ת<EFBFBD>ƶ<EFBFBD><EFBFBD><EFBFBD>[meindex][<EFBFBD><EFBFBD><EFBFBD><EFBFBD>] = <EFBFBD><EFBFBD>Ա<EFBFBD><EFBFBD><EFBFBD><EFBFBD>;
<EFBFBD><EFBFBD>Ա<EFBFBD><EFBFBD> = string.format("%s %s\n",<EFBFBD><EFBFBD>Ա<EFBFBD><EFBFBD>,char.getChar(ת<EFBFBD>ƶ<EFBFBD><EFBFBD><EFBFBD>[meindex][<EFBFBD><EFBFBD><EFBFBD><EFBFBD>],"<EFBFBD><EFBFBD><EFBFBD><EFBFBD>"));
end
end
local <EFBFBD><EFBFBD><EFBFBD><EFBFBD> = "1 <09><>ѡ<EFBFBD><D1A1><EFBFBD>µĶӳ<C4B6>\n"..<EFBFBD><EFBFBD>Ա<EFBFBD><EFBFBD>;
lssproto.windows(meindex, 2, 8, 0, char.getWorkInt( npcindex, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>"), <EFBFBD><EFBFBD><EFBFBD><EFBFBD>)
else
char.TalkToCli(meindex, -1, "<EFBFBD>ù<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ҫ<EFBFBD>ӳ<EFBFBD>Ȩ<EFBFBD><EFBFBD>", "<EFBFBD><EFBFBD>ɫ")
end
else
char.TalkToCli(meindex, -1, "<EFBFBD><EFBFBD>δ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>", "<EFBFBD><EFBFBD>ɫ")
end
end
function WindowTalked( NPC<EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <EFBFBD><EFBFBD>ť, <EFBFBD><EFBFBD><EFBFBD><EFBFBD>)
if <EFBFBD><EFBFBD><EFBFBD><EFBFBD> == 0 then
local ѡ<EFBFBD><EFBFBD> = tonumber(<EFBFBD><EFBFBD><EFBFBD><EFBFBD>);
if ѡ<EFBFBD><EFBFBD> > 0 and ѡ<EFBFBD><EFBFBD> < 5 then
char.DischargeParty(<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,0);
char.JoinParty(ת<EFBFBD>ƶ<EFBFBD><EFBFBD><EFBFBD>[<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>][ѡ<EFBFBD><EFBFBD>],<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,0);
char.TalkToCli(ת<EFBFBD>ƶ<EFBFBD><EFBFBD><EFBFBD>[<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>][ѡ<EFBFBD><EFBFBD>], -1, "<EFBFBD><EFBFBD><EFBFBD>Ķ<EFBFBD><EFBFBD>ѡ<EFBFBD>"..char.getChar(<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,"<EFBFBD><EFBFBD><EFBFBD><EFBFBD>").."<EFBFBD><EFBFBD><EFBFBD>Ѷӳ<EFBFBD>Ȩ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>", "<EFBFBD><EFBFBD>ɫ")
char.TalkToCli(<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, -1, "<EFBFBD><EFBFBD><EFBFBD>ɹ<EFBFBD><EFBFBD>Ѷӳ<EFBFBD>Ȩ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѡ<EFBFBD>"..char.getChar(ת<EFBFBD>ƶ<EFBFBD><EFBFBD><EFBFBD>[<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>][ѡ<EFBFBD><EFBFBD>],"<EFBFBD><EFBFBD><EFBFBD><EFBFBD>").."<EFBFBD><EFBFBD>", "<EFBFBD><EFBFBD>ɫ");
for i =1,table.getn(ת<EFBFBD>ƶ<EFBFBD><EFBFBD><EFBFBD>[<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>]) do
if i ~= ѡ<EFBFBD><EFBFBD> then
char.JoinParty(ת<EFBFBD>ƶ<EFBFBD><EFBFBD><EFBFBD>[<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>][ѡ<EFBFBD><EFBFBD>],ת<EFBFBD>ƶ<EFBFBD><EFBFBD><EFBFBD>[<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>][i],0);
end
end
char.Encounter(ת<EFBFBD>ƶ<EFBFBD><EFBFBD><EFBFBD>[<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>][ѡ<EFBFBD><EFBFBD>])
end
end
end
function Create(name, metamo, floor, x, y, dir)
npcindex = npc.CreateNpc(name, metamo, floor, x, y, dir)
char.setFunctionPointer(npcindex, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>¼<EFBFBD>", "WindowTalked", "")
end
function data()
ת<EFBFBD>ƶ<EFBFBD><EFBFBD><EFBFBD>={};
--[[
11 ԭ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
12 ȡ<EFBFBD><EFBFBD>ԭ<EFBFBD><EFBFBD>
13 ֧Ʊ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
14 <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѯ
16 <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ
20 <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʹ<EFBFBD><EFBFBD>
21 <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
22 <EFBFBD><EFBFBD><EFBFBD>ְ<EFBFBD><EFBFBD><EFBFBD>
]]
end
function main()
data()
Create("<EFBFBD><EFBFBD>ѯ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>NPC<EFBFBD><EFBFBD>ʱ", 100000, 777, 20, 21, 4);
end