-
Notifications
You must be signed in to change notification settings - Fork 83
/
Copy pathZeflmin_Werlikanin.lua
92 lines (88 loc) · 4.39 KB
/
Zeflmin_Werlikanin.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
function event_say(e)
if e.message:findi("hail") then
e.self:Say("Hello ".. e.other:GetName() ..". Come to take a look at the crystal geode? The geode has some very strong magic inside of it that can help you. I can bring out the magic of the geode for you, but a gnome has to make a living! Even if he's stuck in this little hole in the wall all the time. Not that I'm bitter. Each of the crystals I sell is linked to a location in our world. If you give me one of the crystals I can focus the geode to let you and your companions travel there in the blink of an eye!");
end
end
local portals = {
[10092] = {"The Plane of Time"},
[10094] = {"The Plane of Sky"},
[64191] = {"Dragonscale Hills"},
[76000] = {"The Northern Plains of Karana"},
[76001] = {"East Commonlands"},
[76002] = {"The Lavastorm Mountains"},
[76003] = {"Toxxulia Forest"},
[76004] = {"The Greater Faydark"},
[76005] = {"The Dreadlands"},
[76006] = {"The Iceclad Ocean"},
[76007] = {"Cobalt Scar"},
[76009] = {"The Twilight Sea"},
[76010] = {"Stonebrunt Mountains"},
[76011] = {"Wall of Slaughter"},
[76012] = {"Barindu, Hanging Gardens"},
[76070] = {"The Undershore"},
[88735] = {"Arcstone, Isle of Spirits"},
[88736] = {"Goru`kar Mesa"},
[88737] = {"your guild banner"},
[88738] = {"Katta Castrum"},
[88739] = {"The Plane of Time"},
[88740] = {"Brell`s Rest"}
};
function event_trade(e)
local item_lib = require("items");
if item_lib.check_turn_in(e.trade, {item1 = 10092}) then -- Items: Portal Items
set_portal(e,10092);
elseif item_lib.check_turn_in(e.trade, {item1 = 10094}) then -- Items: Portal Items
set_portal(e,10094);
elseif item_lib.check_turn_in(e.trade, {item1 = 64191}) then -- Items: Portal Items
set_portal(e,64191);
elseif item_lib.check_turn_in(e.trade, {item1 = 76000}) then -- Items: Portal Items
set_portal(e,76000);
elseif item_lib.check_turn_in(e.trade, {item1 = 76001}) then -- Items: Portal Items
set_portal(e,76001);
elseif item_lib.check_turn_in(e.trade, {item1 = 76002}) then -- Items: Portal Items
set_portal(e,76002);
elseif item_lib.check_turn_in(e.trade, {item1 = 76003}) then -- Items: Portal Items
set_portal(e,76003);
elseif item_lib.check_turn_in(e.trade, {item1 = 76004}) then -- Items: Portal Items
set_portal(e,76004);
elseif item_lib.check_turn_in(e.trade, {item1 = 76005}) then -- Items: Portal Items
set_portal(e,76005);
elseif item_lib.check_turn_in(e.trade, {item1 = 76006}) then -- Items: Portal Items
set_portal(e,76006);
elseif item_lib.check_turn_in(e.trade, {item1 = 76007}) then -- Items: Portal Items
set_portal(e,76007);
elseif item_lib.check_turn_in(e.trade, {item1 = 76008}) then -- Items: Portal Items
set_portal(e,76008);
elseif item_lib.check_turn_in(e.trade, {item1 = 76009}) then -- Items: Portal Items
set_portal(e,76009);
elseif item_lib.check_turn_in(e.trade, {item1 = 76010}) then -- Items: Portal Items
set_portal(e,76010);
elseif item_lib.check_turn_in(e.trade, {item1 = 76011}) then -- Items: Portal Items
set_portal(e,76011);
elseif item_lib.check_turn_in(e.trade, {item1 = 76012}) then -- Items: Portal Items
set_portal(e,76012);
elseif item_lib.check_turn_in(e.trade, {item1 = 76070}) then -- Items: Portal Items
set_portal(e,76070);
elseif item_lib.check_turn_in(e.trade, {item1 = 88735}) then -- Items: Portal Items
set_portal(e,88735);
elseif item_lib.check_turn_in(e.trade, {item1 = 88736}) then -- Items: Portal Items
set_portal(e,88736);
elseif item_lib.check_turn_in(e.trade, {item1 = 88737}) then -- Items: Portal Items
set_portal(e,88737);
elseif item_lib.check_turn_in(e.trade, {item1 = 88738}) then -- Items: Portal Items
set_portal(e,88738);
elseif item_lib.check_turn_in(e.trade, {item1 = 88739}) then -- Items: Portal Items
set_portal(e,88739);
elseif item_lib.check_turn_in(e.trade, {item1 = 88740}) then -- Items: Portal Items
set_portal(e,88740);
end
item_lib.return_items(e.self, e.other, e.trade);
end
function set_portal(e,item)
local guild_portal = ("guild_portal-"..e.other:GuildID());
if portals[item] ~= nil then
eq.set_data(guild_portal,tostring(item),tostring(eq.seconds("1d")));
e.self:Emote("takes the crystal from you and mutters some arcane words over it. 'The crystal geode is now active, just go step on the crystal platform and you'll be whisked away to your destination! I hope you don't get motion sickness!'");
eq.zone_emote(MT.Yellow,"The Guildhall Portal has been aligned to " .. portals[item][1]);
end
end