1
Fork 0
mirror of https://bitbucket.org/Ioncannon/project-meteor-server.git synced 2025-04-22 12:47:46 +00:00

Added script for ItemStorage npc. Added scripts for both types of inn exit doors. Added BountyPresenter script (YoshiP).

This commit is contained in:
Filip Maj 2017-06-19 22:23:27 -04:00
parent c1d67538f3
commit 7f6b291366
14 changed files with 116 additions and 18 deletions

View file

@ -28,7 +28,11 @@ function onEventStarted(player, npc, triggerName)
goto TOP_MENU; goto TOP_MENU;
end end
callClientFunction(player, "selectStoreItem", nil, categoryChoice); itemId = callClientFunction(player, "selectStoreItem", nil, categoryChoice);
if (itemId ~= nil) then
player:GetInventory(INVENTORY_NORMAL):RemoveItem(itemId, 1);
end
elseif (storageChoice == 2) then elseif (storageChoice == 2) then
categoryChoice = callClientFunction(player, "selectCategory"); categoryChoice = callClientFunction(player, "selectCategory");
@ -37,7 +41,11 @@ function onEventStarted(player, npc, triggerName)
goto TOP_MENU; goto TOP_MENU;
end end
callClientFunction(player, "selectReceiveItem", nil, categoryChoice); itemId = callClientFunction(player, "selectReceiveItem", nil, categoryChoice);
if (itemId ~= nil) then
player:GetInventory(INVENTORY_NORMAL):AddItem(itemId, 1);
end
end end

View file

@ -0,0 +1,26 @@
--[[
PopulaceBountyPresenter Script
Functions:
eventLowerLevel(player) -
eventAlreadyPresent(player) -
eventBeforePresent(player) -
eventAfterPresent(player) -
eventJail(player, bool) -
--]]
require ("global")
function init(npc)
return false, false, 0, 0;
end
function onEventStarted(player, npc, triggerName)
callClientFunction(player, "eventLowerLevel", player);
player:EndEvent();
end

View file

@ -95,11 +95,11 @@ function onEventStarted(player, actor, triggerName, isTeleport)
if (isInn) then if (isInn) then
--Return to Inn --Return to Inn
if (player:GetHomePointInn() == 1) then if (player:GetHomePointInn() == 1) then
GetWorldManager():DoZoneChange(player, 12); GetWorldManager():DoZoneChange(player, 244, nil, 0, 15, -160.048, 0, -165.737, 0);
elseif (player:GetHomePointInn() == 2) then elseif (player:GetHomePointInn() == 2) then
GetWorldManager():DoZoneChange(player, 13); GetWorldManager():DoZoneChange(player, 244, nil, 0, 15, 160.048, 0, 154.263, 0);
elseif (player:GetHomePointInn() == 3) then elseif (player:GetHomePointInn() == 3) then
GetWorldManager():DoZoneChange(player, 11); GetWorldManager():DoZoneChange(player, 244, nil, 0, 15, 0.048, 0, -5.737, 0);
end end
elseif (choice == 1 and isInn == nil) then elseif (choice == 1 and isInn == nil) then
--Return to Homepoint --Return to Homepoint

View file

@ -39,13 +39,7 @@ function onTrigger(player, argc, p1, p2, p3, p4, privateArea, name, lastName)
local worldManager = GetWorldManager(); local worldManager = GetWorldManager();
-- treat this as a predefined warp list if argc >= 3 then
if argc == 1 then
zone = tonumber(p1) or player_zone;
player:SendMessage(messageID, sender, string.format("warping to zone:%u", zone));
worldManager:DoZoneChange(player, zone);
elseif argc >= 3 then
if argc == 3 then if argc == 3 then
local x = tonumber(applyPositionOffset(p1, player_x)) or player_x; local x = tonumber(applyPositionOffset(p1, player_x)) or player_x;

View file

@ -29,7 +29,7 @@ function onEventStarted(player, npc)
choice = callClientFunction(player, "delegateEvent", player, defaultFst, "defaultTalkWithInn_Desk", nil, nil, nil); choice = callClientFunction(player, "delegateEvent", player, defaultFst, "defaultTalkWithInn_Desk", nil, nil, nil);
if (choice == 1) then if (choice == 1) then
GetWorldManager():DoZoneChange(player, 13); GetWorldManager():DoZoneChange(player, 244, nil, 0, 15, 160.048, 0, 154.263, 0);
elseif (choice == 2) then elseif (choice == 2) then
if (player:GetHomePointInn() ~= 2) then if (player:GetHomePointInn() ~= 2) then
player:SetHomePointInn(2); player:SetHomePointInn(2);

View file

@ -0,0 +1,12 @@
require ("global")
function onEventStarted(player, npc)
defaultFst = GetStaticActor("DftFst");
choice = callClientFunction(player, "delegateEvent", player, defaultFst, "defaultTalkWithInn_ExitDoor");
if (choice == 1) then
GetWorldManager():DoZoneChange(player, 155, nil, 0, 15, 59.252, 4, -1219.342, 0.852);
end
player:endEvent();
end

View file

@ -0,0 +1,12 @@
require ("global")
function onEventStarted(player, npc)
defaultSea = GetStaticActor("DftSea");
choice = callClientFunction(player, "delegateEvent", player, defaultSea, "defaultTalkWithInn_ExitDoor");
if (choice == 1) then
GetWorldManager():DoZoneChange(player, 133, nil, 0, 15, -444.266, 39.518, 191, 1.9);
end
player:endEvent();
end

View file

@ -0,0 +1,12 @@
require ("global")
function onEventStarted(player, npc)
defaultWil = GetStaticActor("DftWil");
choice = callClientFunction(player, "delegateEvent", player, defaultWil, "defaultTalkWithInn_ExitDoor");
if (choice == 1) then
GetWorldManager():DoZoneChange(player, 209, nil, 0, 15, -110.157, 202, 171.345, 0);
end
player:endEvent();
end

View file

@ -0,0 +1,12 @@
require ("global")
function onEventStarted(player, npc)
defaultFst = GetStaticActor("DftFst");
choice = callClientFunction(player, "delegateEvent", player, defaultFst, "defaultTalkWithInn_ExitDoor");
if (choice == 1) then
GetWorldManager():DoZoneChange(player, 155, nil, 0, 15, 59.252, 4, -1219.342, 0.852);
end
player:endEvent();
end

View file

@ -0,0 +1,12 @@
require ("global")
function onEventStarted(player, npc)
defaultSea = GetStaticActor("DftSea");
choice = callClientFunction(player, "delegateEvent", player, defaultSea, "defaultTalkWithInn_ExitDoor");
if (choice == 1) then
GetWorldManager():DoZoneChange(player, 133, nil, 0, 15, -444.266, 39.518, 191, 1.9);
end
player:endEvent();
end

View file

@ -0,0 +1,12 @@
require ("global")
function onEventStarted(player, npc)
defaultWil = GetStaticActor("DftWil");
choice = callClientFunction(player, "delegateEvent", player, defaultWil, "defaultTalkWithInn_ExitDoor");
if (choice == 1) then
GetWorldManager():DoZoneChange(player, 209, nil, 0, 15, -110.157, 202, 171.345, 0);
end
player:endEvent();
end

View file

@ -5,7 +5,7 @@ function onEventStarted(player, npc)
choice = callClientFunction(player, "delegateEvent", player, defaultSea, "defaultTalkWithInn_Desk", nil, nil, nil); choice = callClientFunction(player, "delegateEvent", player, defaultSea, "defaultTalkWithInn_Desk", nil, nil, nil);
if (choice == 1) then if (choice == 1) then
GetWorldManager():DoZoneChange(player, 13); GetWorldManager():DoZoneChange(player, 244, nil, 0, 15, -160.048, 0, -165.737, 0);
elseif (choice == 2) then elseif (choice == 2) then
if (player:GetHomePointInn() ~= 1) then if (player:GetHomePointInn() ~= 1) then
player:SetHomePointInn(1); player:SetHomePointInn(1);

View file

@ -36,9 +36,7 @@ function onEventStarted(player, npc, triggerName)
player:AddDirector(director); player:AddDirector(director);
player:SetLoginDirector(director); player:SetLoginDirector(director);
GetWorldManager():DoZoneChange(player, 17); GetWorldManager():DoZoneChange(player, 184, nil, 0, 16, -24.34, 192, 34.22, 0.78);
end end

View file

@ -5,7 +5,7 @@ function onEventStarted(player, npc)
choice = callClientFunction(player, "delegateEvent", player, defaultWil, "defaultTalkWithInn_Desk_2", nil, nil, nil); choice = callClientFunction(player, "delegateEvent", player, defaultWil, "defaultTalkWithInn_Desk_2", nil, nil, nil);
if (choice == 1) then if (choice == 1) then
GetWorldManager():DoZoneChange(player, 11); GetWorldManager():DoZoneChange(player, 244, nil, 0, 15, 0.048, 0, -5.737, 0);
elseif (choice == 2) then elseif (choice == 2) then
if (player:GetHomePointInn() ~= 3) then if (player:GetHomePointInn() ~= 3) then
player:SetHomePointInn(3); player:SetHomePointInn(3);