mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-06-09 14:04:41 +02:00
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:
parent
51bbf4ae2e
commit
8743042950
28 changed files with 316 additions and 167 deletions
|
@ -1,3 +1,4 @@
|
|||
require ("global")
|
||||
|
||||
function init(npc)
|
||||
return false, false, 0, 0;
|
||||
|
@ -5,15 +6,11 @@ end
|
|||
|
||||
function onEventStarted(player, npc, triggerName)
|
||||
defaultFst = GetStaticActor("DftFst");
|
||||
player:RunEventFunction("delegateEvent", player, defaultFst, "defaultTalkWithInn_ExitDoor", nil, nil, nil);
|
||||
end
|
||||
|
||||
function onEventUpdate(player, npc, resultId, isExitYes)
|
||||
|
||||
if (isExitYes ~= nil and isExitYes == 1) then
|
||||
choice = callClientFunction(player, "delegateEvent", player, defaultFst, "defaultTalkWithInn_ExitDoor", nil, nil, nil);
|
||||
|
||||
if (choice == 1) then
|
||||
GetWorldManager():DoZoneChange(player, 1);
|
||||
else
|
||||
player:EndEvent();
|
||||
end
|
||||
|
||||
player:EndEvent();
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue