Cleaned up the new scripting code. Added a helper function to do the yielding automatically. Modified all the scripts to use the new system and added a few new ones.

This commit is contained in:
Filip Maj 2016-06-19 18:52:34 -04:00
parent 51bbf4ae2e
commit 8743042950
28 changed files with 316 additions and 167 deletions

View file

@ -1,13 +1,13 @@
require ("global")
function onEventStarted(player, npc)
defaultFst = GetStaticActor("DftFst");
player:RunEventFunction("delegateEvent", player, defaultFst, "defaultTalkWithInn_Desk", nil, nil, nil);
choice = callClientFunction(player, "delegateEvent", player, defaultFst, "defaultTalkWithInn_Desk", nil, nil, nil);
end
function onEventUpdate(player, npc, blah, menuSelect)
if (menuSelect == 1) then
if (choice == 1) then
GetWorldManager():DoZoneChange(player, 13);
elseif (choice == 2) then
--Do Set Homepoint
end
player:EndEvent();