mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-06-09 14:04:41 +02:00
Updated Map Server namespace. Moved all other data folders (www and sql) to data folder. Renamed boot name to Project Meteor.
This commit is contained in:
parent
18ef69f3d1
commit
91549bff7a
1823 changed files with 102704 additions and 901 deletions
54
Data/scripts/base/chara/npc/object/ObjectItemStorage.lua
Normal file
54
Data/scripts/base/chara/npc/object/ObjectItemStorage.lua
Normal file
|
@ -0,0 +1,54 @@
|
|||
--[[
|
||||
|
||||
ObjectItemStorage Script
|
||||
|
||||
Functions:
|
||||
|
||||
storageMenu() - Shows store/retrieve/help menu.
|
||||
selectCategory() - Shows the category menu
|
||||
selectStoreItem(nil, categoryId) - Shows store item menu
|
||||
selectReceiveItem(nil, categoryId) - Shows retrieve item menu
|
||||
--]]
|
||||
|
||||
require ("global")
|
||||
|
||||
function init(npc)
|
||||
return false, false, 0, 0;
|
||||
end
|
||||
|
||||
function onEventStarted(player, npc, triggerName)
|
||||
|
||||
::TOP_MENU::
|
||||
storageChoice = callClientFunction(player, "storageMenu");
|
||||
|
||||
if (storageChoice == 1) then
|
||||
categoryChoice = callClientFunction(player, "selectCategory");
|
||||
|
||||
if (categoryChoice == 5) then
|
||||
goto TOP_MENU;
|
||||
end
|
||||
|
||||
itemId = callClientFunction(player, "selectStoreItem", nil, categoryChoice);
|
||||
|
||||
if (itemId ~= nil) then
|
||||
player:GetItemPackage(INVENTORY_NORMAL):RemoveItem(itemId, 1);
|
||||
end
|
||||
|
||||
elseif (storageChoice == 2) then
|
||||
categoryChoice = callClientFunction(player, "selectCategory");
|
||||
|
||||
if (categoryChoice == 5) then
|
||||
goto TOP_MENU;
|
||||
end
|
||||
|
||||
itemId = callClientFunction(player, "selectReceiveItem", nil, categoryChoice);
|
||||
|
||||
if (itemId ~= nil) then
|
||||
player:GetItemPackage(INVENTORY_NORMAL):AddItem(itemId, 1);
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
player:EndEvent();
|
||||
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue