mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-04-21 20:27:47 +00:00
Forgot ObjectItemStorage script.
This commit is contained in:
parent
5e926bf668
commit
c4c43421f3
1 changed files with 36 additions and 1 deletions
|
@ -1,3 +1,15 @@
|
|||
--[[
|
||||
|
||||
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)
|
||||
|
@ -6,6 +18,29 @@ 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
|
||||
|
||||
callClientFunction(player, "selectStoreItem", nil, categoryChoice);
|
||||
|
||||
elseif (storageChoice == 2) then
|
||||
categoryChoice = callClientFunction(player, "selectCategory");
|
||||
|
||||
if (categoryChoice == 5) then
|
||||
goto TOP_MENU;
|
||||
end
|
||||
|
||||
callClientFunction(player, "selectReceiveItem", nil, categoryChoice);
|
||||
|
||||
end
|
||||
|
||||
player:EndEvent();
|
||||
|
||||
end
|
||||
end
|
Loading…
Add table
Reference in a new issue