mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-06-09 05:54:50 +02:00
Fixed a bunch of bugs Jorge found. Readded tutorial quests back.
This commit is contained in:
parent
c240096eb8
commit
bbbab356af
10 changed files with 104 additions and 23 deletions
|
@ -40,7 +40,7 @@ function onTrigger(player, argc, command, var1, var2, var3)
|
|||
|
||||
elseif command == "remove" or command == "delete" or command == "-" then
|
||||
if tonumber(var1) and player:HasQuest(tonumber(var1)) == true then
|
||||
player:RemoveQuestByQuestId(tonumber(var1));
|
||||
player:RemoveQuest(tonumber(var1));
|
||||
message = ("removing quest "..var1);
|
||||
else
|
||||
if player:HasQuest(var1) == true then
|
||||
|
@ -53,7 +53,7 @@ function onTrigger(player, argc, command, var1, var2, var3)
|
|||
q4 = bit32.band(q3, 0xA0F00000);
|
||||
printf(q4);
|
||||
|
||||
--player:RemoveQuest(quest.Name);
|
||||
player:RemoveQuest(quest.Name);
|
||||
end
|
||||
else
|
||||
message = ("remove error: either incorrect ID or quest "..var1.." isn't active on character");
|
||||
|
@ -137,7 +137,7 @@ function onTrigger(player, argc, command, var1, var2, var3)
|
|||
player:GetQuest(questvar):GetData():ClearFlag(flagvar);
|
||||
end
|
||||
player:GetQuest(questvar):UpdateENPCs();
|
||||
player:GetQuest(questvar):SaveData();
|
||||
player:GetQuest(questvar):GetData():Save();
|
||||
if boolvar == true then
|
||||
message = ("changing flag "..tonumber(var2).." to true on quest "..questvar);
|
||||
else
|
||||
|
@ -156,7 +156,7 @@ function onTrigger(player, argc, command, var1, var2, var3)
|
|||
|
||||
player:GetQuest(questvar):GetData():SetCounter(index, tonumber(var3));
|
||||
player:GetQuest(questvar):UpdateENPCs();
|
||||
player:GetQuest(questvar):SaveData();
|
||||
player:GetQuest(questvar):GetData():Save();
|
||||
message = ("changing counter "..tonumber(var2).." to "..var3);
|
||||
else
|
||||
message = ("error: command "..command.." not recognized");
|
||||
|
|
|
@ -153,16 +153,11 @@ ETYPE_PUSH = 2;
|
|||
ETYPE_EMOTE = 3;
|
||||
ETYPE_NOTICE = 5;
|
||||
|
||||
-- QUEST INSTANCE
|
||||
ENPC_PROP_QFLAG = 0;
|
||||
ENPC_PROP_CAN_TALK = 1;
|
||||
ENPC_PROP_CAN_PUSH = 2;
|
||||
ENPC_PROP_CAN_EMOTE = 3;
|
||||
ENPC_PROP_CAN_NOTICE = 4;
|
||||
|
||||
-- QUEST FLAGS
|
||||
QFLAG_NONE = 0;
|
||||
QFLAG_PLATE = 2;
|
||||
QFLAG_MAP = 3;
|
||||
QFLAG_REWARD = 4;
|
||||
|
||||
-- MUSIC
|
||||
MUSIC_IMMEDIATE = 1;
|
||||
|
|
|
@ -62,7 +62,7 @@ function onStateChange(player, quest, sequence)
|
|||
quest:SetENpc(MESTONNAUX, (not data:GetFlag(FLAG_TALKED_MESTONNAUX) and QFLAG_PLATE or QFLAG_NONE));
|
||||
quest:SetENpc(LEFWYNE, (not data:GetFlag(FLAG_TALKED_LEFWYNE) and QFLAG_PLATE or QFLAG_NONE));
|
||||
elseif (sequence == SEQ_001) then
|
||||
quest:SetENpc(KINNISON, QFLAG_PLATE);
|
||||
quest:SetENpc(KINNISON, QFLAG_REWARD);
|
||||
end
|
||||
end
|
||||
|
||||
|
|
29
Data/scripts/quests/trl1/Trl0g1.lua
Normal file
29
Data/scripts/quests/trl1/Trl0g1.lua
Normal file
|
@ -0,0 +1,29 @@
|
|||
require ("global")
|
||||
|
||||
--[[
|
||||
|
||||
Quest Script
|
||||
|
||||
Name: Getting Started (Mother Miounne)
|
||||
Code: Trl0g1
|
||||
Id: 110141
|
||||
|
||||
Enables the "Getting Started" option on Miounne.
|
||||
* NOTE: This quest is active for all players at all times.
|
||||
]]
|
||||
|
||||
function onTalk(player, quest, npc, eventName)
|
||||
local choice = callClientFunction(player, "delegateEvent", player, quest, "processEventMiounneStart");
|
||||
|
||||
if (choice == 1) then
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processEvent225");
|
||||
elseif (choice == 2) then
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processEvent230");
|
||||
end
|
||||
|
||||
player:EndEvent();
|
||||
end
|
||||
|
||||
function IsQuestENPC(player, quest, npc)
|
||||
return npc:GetActorClassId()] == 1000230;
|
||||
end
|
29
Data/scripts/quests/trl1/Trl0l1.lua
Normal file
29
Data/scripts/quests/trl1/Trl0l1.lua
Normal file
|
@ -0,0 +1,29 @@
|
|||
require ("global")
|
||||
|
||||
--[[
|
||||
|
||||
Quest Script
|
||||
|
||||
Name: Getting Started (Baderon)
|
||||
Code: Trl0l1
|
||||
Id: 110140
|
||||
|
||||
Enables the "Getting Started" option on Baderon.
|
||||
* NOTE: This quest is active for all players at all times.
|
||||
]]
|
||||
|
||||
function onTalk(player, quest, npc, eventName)
|
||||
local choice = callClientFunction(player, "delegateEvent", player, quest, "processEventBaderonStart");
|
||||
|
||||
if (choice == 1) then
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processEvent640");
|
||||
elseif (choice == 2) then
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processEvent650");
|
||||
end
|
||||
|
||||
player:EndEvent();
|
||||
end
|
||||
|
||||
function IsQuestENPC(player, quest, npc)
|
||||
return npc:GetActorClassId()] == 1000137;
|
||||
end
|
29
Data/scripts/quests/trl1/Trl0u1.lua
Normal file
29
Data/scripts/quests/trl1/Trl0u1.lua
Normal file
|
@ -0,0 +1,29 @@
|
|||
require ("global")
|
||||
|
||||
--[[
|
||||
|
||||
Quest Script
|
||||
|
||||
Name: Getting Started (Momodi)
|
||||
Code: Trl0u1
|
||||
Id: 110142
|
||||
|
||||
Enables the "Getting Started" option on Momodi.
|
||||
* NOTE: This quest is active for all players at all times.
|
||||
]]
|
||||
|
||||
function onTalk(player, quest, npc, eventName)
|
||||
local choice = callClientFunction(player, "delegateEvent", player, quest, "processEventMomodiStart");
|
||||
|
||||
if (choice == 1) then
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processEvent235");
|
||||
elseif (choice == 2) then
|
||||
callClientFunction(player, "delegateEvent", player, quest, "processEvent240");
|
||||
end
|
||||
|
||||
player:EndEvent();
|
||||
end
|
||||
|
||||
function IsQuestENPC(player, quest, npc)
|
||||
return npc:GetActorClassId() == 1000841;
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue