mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-06-09 05:54:50 +02:00
Merge branch 'ioncannon/quest_system' into Jorge/quest_system
This commit is contained in:
commit
4e5a07afa4
64 changed files with 429 additions and 526 deletions
|
@ -1,84 +0,0 @@
|
|||
--[[
|
||||
|
||||
PopulaceSpecialEventCryer Script
|
||||
|
||||
Actor Class script to handle the 6 NPCs (technically 3, the actors were duped) involved in the Foundation Day 2011 & 2012 events.
|
||||
In 2011 they appear to be used for recruitment information for their respective Grand Company.
|
||||
In 2012, they were used for exchanging Over-aspected Crystals/Clusters for GC seals as part of the ongoing Atomos event.
|
||||
|
||||
Functions:
|
||||
|
||||
For 2011.
|
||||
eventTalkStep0(joined) - NPC dialog about joining their cause to fight back Imperials. joined = 0 or 1. Function has hardcoded actor IDs, won't work with 2012 versions
|
||||
eventTalkNotGCmenber(npcGC) - NPC dialog when you're not part of their grand company.
|
||||
|
||||
For 2012.
|
||||
eventTalkCrystalExchange(player, npcGC, hasCrystal) - NPC dialog explaining they want over-aspected crystals. Brings up crystal exchange prompt if hasCrystal = 1.
|
||||
eventTalkCsOverflow(player, npcGC) - Error message that you can't hold the seals being offered.
|
||||
eventTalkCrystalExchange2(player, npcGC) - NPC dialog for accepting exchange of crystals for seals
|
||||
|
||||
--]]
|
||||
|
||||
require ("global")
|
||||
|
||||
function init(npc)
|
||||
return false, false, 0, 0;
|
||||
end
|
||||
|
||||
|
||||
local gcRep = {
|
||||
[1001619] = 1, -- Maelstrom Representative 2011
|
||||
[1002105] = 1, -- Maelstrom Representative 2012
|
||||
[1001623] = 2, -- Adder Representative 2011
|
||||
[1002109] = 2, -- Adder Representative 2012
|
||||
[1001627] = 3, -- Flame Representative 2011
|
||||
[1002113] = 3, -- Flame Representative 2012
|
||||
}
|
||||
|
||||
|
||||
function onEventStarted(player, npc, triggerName)
|
||||
local playerGC = player.gcCurrent;
|
||||
local npcId = npc:GetActorClassId();
|
||||
local npcGC = gcRep[npcId];
|
||||
local npcGCSeal = 1000200 + npcGC;
|
||||
local hasCrystal = 1;
|
||||
local crystal = 3020537;
|
||||
local cluster = 3020413;
|
||||
local eventMode = 2012;
|
||||
|
||||
|
||||
if eventMode == 2011 then
|
||||
if playerGC == 0 then
|
||||
callClientFunction(player, "eventTalkStep0", 0);
|
||||
elseif playerGC == npcGC then
|
||||
callClientFunction(player, "eventTalkStep0", 1);
|
||||
else
|
||||
callClientFunction(player, "eventTalkNotGCmenber", npcGC);
|
||||
end
|
||||
|
||||
elseif eventMode == 2012 then
|
||||
choice = callClientFunction(player, "eventTalkCrystalExchange", player, npcGC, hasCrystal);
|
||||
|
||||
if choice == 1 then
|
||||
--callClientFunction(player, "eventTalkCsOverflow", player, npcGC);
|
||||
player:SendMessage(0x20, "", "You pretend to hand over four over-aspected crystals.");
|
||||
callClientFunction(player, "eventTalkCrystalExchange2", player, npcGC);
|
||||
|
||||
local invCheck = player:GetItemPackage(INVENTORY_CURRENCY):AddItem(npcGCSeal, 1000, 1);
|
||||
if invCheck == INV_ERROR_SUCCESS then
|
||||
player:SendGameMessage(player, GetWorldMaster(), 25071, MESSAGE_TYPE_SYSTEM, crystal, 1, npcGCSeal, 1, 4, 1000);
|
||||
end
|
||||
elseif choice == 2 then
|
||||
player:SendMessage(0x20, "", "You pretend to hand over an over-aspected cluster.");
|
||||
--callClientFunction(player, "eventTalkCsOverflow", player, npcGC);
|
||||
callClientFunction(player, "eventTalkCrystalExchange2", player, npcGC);
|
||||
|
||||
local invCheck = player:GetItemPackage(INVENTORY_CURRENCY):AddItem(npcGCSeal, 3000, 1);
|
||||
if invCheck == INV_ERROR_SUCCESS then
|
||||
player:SendGameMessage(player, GetWorldMaster(), 25071, MESSAGE_TYPE_SYSTEM, cluster, 1, npcGCSeal, 1, 1, 3000);
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
player:EndEvent();
|
||||
end
|
|
@ -23,16 +23,18 @@ function onTrigger(player, argc, animation, regionId, layoutId, maxLayoutId)
|
|||
end
|
||||
|
||||
local pos = player:GetPos();
|
||||
local x = pos[0];
|
||||
local y = pos[1];
|
||||
local z = pos[2];
|
||||
local zone = pos[4];
|
||||
local x = pos[1];
|
||||
local y = pos[2];
|
||||
local z = pos[3];
|
||||
local zone = pos[5];
|
||||
|
||||
actorClassId = tonumber(actorClassId);
|
||||
|
||||
if (actorClassId ~= nil) then
|
||||
zone = player:GetZone();
|
||||
actor = zone:SpawnActor(actorClassId, "mapobj", pos[0], pos[1], pos[2], tonumber(regionId), tonumber(layoutId));
|
||||
actor = zone:SpawnActor(actorClassId, "mapobj", pos[1], pos[2], pos[3], tonumber(regionId), tonumber(layoutId));
|
||||
|
||||
print("test");
|
||||
wait(0.8);
|
||||
actor:PlayMapObjAnimation(player, animation);
|
||||
zone:DespawnActor("mapobj");
|
||||
|
|
|
@ -20,8 +20,8 @@ function onBeginLogin(player)
|
|||
end
|
||||
|
||||
--For Opening. Set Director and reset position incase d/c
|
||||
if (player:HasQuest(110001) == true and player:GetZoneID() == 193) then
|
||||
director = player:GetZone():CreateDirector("OpeningDirector", false);
|
||||
if (player:HasQuest(110001) == true and player.CurrentArea.ZoneId == 193) then
|
||||
director = player.CurrentArea:CreateDirector("OpeningDirector", false);
|
||||
player:AddDirector(director);
|
||||
director:StartDirector(true);
|
||||
player:SetLoginDirector(director);
|
||||
|
@ -32,8 +32,8 @@ function onBeginLogin(player)
|
|||
player.positionZ = -36.91;
|
||||
player.rotation = 0.025;
|
||||
player:GetQuest(110001):ClearData();
|
||||
elseif (player:HasQuest(110005) == true and player:GetZoneID() == 166) then
|
||||
director = player:GetZone():CreateDirector("OpeningDirector", false);
|
||||
elseif (player:HasQuest(110005) == true and player.CurrentArea.ZoneId == 166) then
|
||||
director = player.CurrentArea:CreateDirector("OpeningDirector", false);
|
||||
player:AddDirector(director);
|
||||
director:StartDirector(false);
|
||||
player:SetLoginDirector(director);
|
||||
|
@ -45,8 +45,8 @@ function onBeginLogin(player)
|
|||
player.rotation = -1.26721;
|
||||
player:GetQuest(110005):ClearQuestData();
|
||||
player:GetQuest(110005):ClearQuestFlags();
|
||||
elseif (player:HasQuest(110009) == true and player:GetZoneID() == 184) then
|
||||
--director = player:GetZone():CreateDirector("OpeningDirector", false);
|
||||
elseif (player:HasQuest(110009) == true and player.CurrentArea.ZoneId == 184) then
|
||||
--director = player.CurrentArea:CreateDirector("OpeningDirector", false);
|
||||
--player:AddDirector(director);
|
||||
--director:StartDirector(false);
|
||||
--player:SetLoginDirector(director);
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
|
||||
shopInfo = {
|
||||
welcomeText = 5,
|
||||
shopPack = 3008,
|
||||
tutorialId = 35
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
|
||||
shopInfo = {
|
||||
welcomeText = 94,
|
||||
shopPack = 0x67,
|
||||
shopCurrancy = nil
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
require ("global")
|
||||
|
||||
function onEventStarted(player, npc)
|
||||
defaultSea = GetStaticActor("DftSea");
|
||||
callClientFunction(player, "delegateEvent", player, defaultSea, "defaultTalkWithMerchant002_001", nil, nil, nil);
|
||||
player:endEvent();
|
||||
end
|
|
@ -0,0 +1,5 @@
|
|||
|
||||
shopInfo = {
|
||||
welcomeText = 97,
|
||||
shopPack = 3010
|
||||
}
|
|
@ -0,0 +1,5 @@
|
|||
|
||||
shopInfo = {
|
||||
welcomeText = 100,
|
||||
shopPack = 3013
|
||||
}
|
|
@ -0,0 +1,5 @@
|
|||
|
||||
shopInfo = {
|
||||
welcomeText = 99,
|
||||
shopPack = 3012
|
||||
}
|
|
@ -0,0 +1,5 @@
|
|||
|
||||
shopInfo = {
|
||||
welcomeText = 98,
|
||||
shopPack = 3011
|
||||
}
|
|
@ -0,0 +1,5 @@
|
|||
|
||||
shopInfo = {
|
||||
welcomeText = 106,
|
||||
shopPack = 3007
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
|
||||
shopInfo = {
|
||||
selectMode = 2,
|
||||
welcomeText = 281,
|
||||
shopPack = {5001, 5002, 5007, 5008},
|
||||
tutorialId = -1
|
||||
}
|
|
@ -0,0 +1,5 @@
|
|||
|
||||
shopInfo = {
|
||||
welcomeText = 84,
|
||||
shopPack = 3018
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
|
||||
shopInfo = {
|
||||
selectMode = 3,
|
||||
welcomeText = 281,
|
||||
shopPack = {5004, 5005, 5006, 5003},
|
||||
tutorialId = -1
|
||||
}
|
|
@ -0,0 +1,5 @@
|
|||
|
||||
shopInfo = {
|
||||
welcomeText = 103,
|
||||
shopPack = 3015
|
||||
}
|
|
@ -0,0 +1,5 @@
|
|||
|
||||
shopInfo = {
|
||||
welcomeText = 102,
|
||||
shopPack = 3016
|
||||
}
|
|
@ -0,0 +1,5 @@
|
|||
|
||||
shopInfo = {
|
||||
welcomeText = 104,
|
||||
shopPack = 3017
|
||||
}
|
|
@ -0,0 +1,5 @@
|
|||
|
||||
shopInfo = {
|
||||
welcomeText = 112,
|
||||
shopPack = 3001
|
||||
}
|
|
@ -0,0 +1,5 @@
|
|||
|
||||
shopInfo = {
|
||||
welcomeText = 96,
|
||||
shopPack = 3009
|
||||
}
|
|
@ -0,0 +1,5 @@
|
|||
|
||||
shopInfo = {
|
||||
welcomeText = 105,
|
||||
shopPack = 3004
|
||||
}
|
|
@ -0,0 +1,5 @@
|
|||
|
||||
shopInfo = {
|
||||
welcomeText = 108,
|
||||
shopPack = 3006
|
||||
}
|
|
@ -0,0 +1,5 @@
|
|||
|
||||
shopInfo = {
|
||||
welcomeText = 101,
|
||||
shopPack = 3014
|
||||
}
|
|
@ -0,0 +1,5 @@
|
|||
|
||||
shopInfo = {
|
||||
welcomeText = 237,
|
||||
shopPack = 3023
|
||||
}
|
|
@ -0,0 +1,5 @@
|
|||
|
||||
shopInfo = {
|
||||
welcomeText = 109,
|
||||
shopPack = 3005
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
|
||||
shopInfo = {
|
||||
welcomeText = 69,
|
||||
shopPack = 3020,
|
||||
tutorialId = 35
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
|
||||
shopInfo = {
|
||||
welcomeText = 64,
|
||||
shopPack = 3021,
|
||||
tutorialId = 34
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
|
||||
shopInfo = {
|
||||
welcomeText = 76,
|
||||
shopPack = 3022,
|
||||
tutorialId = 39
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
|
||||
shopInfo = {
|
||||
welcomeText = 54,
|
||||
shopPack = 3019,
|
||||
tutorialId = 32
|
||||
}
|
|
@ -0,0 +1,5 @@
|
|||
|
||||
shopInfo = {
|
||||
welcomeText = 265,
|
||||
shopPack = 3024
|
||||
}
|
|
@ -0,0 +1,5 @@
|
|||
|
||||
shopInfo = {
|
||||
welcomeText = 111,
|
||||
shopPack = 3003
|
||||
}
|
|
@ -0,0 +1,5 @@
|
|||
|
||||
shopInfo = {
|
||||
welcomeText = 110,
|
||||
shopPack = 3002
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue