mirror of
				https://bitbucket.org/Ioncannon/project-meteor-server.git
				synced 2025-05-20 08:26:59 -04: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:
		| @@ -8,46 +8,20 @@ eventConfirm() | ||||
| eventCountDown() | ||||
| eventLogoutFade() | ||||
|  | ||||
| Menu Ids: | ||||
|  | ||||
| Menu: 		0	 | ||||
| Countdown: 	1 | ||||
|  | ||||
| --]] | ||||
|  | ||||
| function onEventStarted(player, command) | ||||
| 	--player:SetCurrentMenuId(0); | ||||
| 	--player:RunEventFunction("delegateCommand", command, "eventConfirm"); | ||||
| 	player:Logout(); | ||||
| end | ||||
| require ("global") | ||||
|  | ||||
| function onEventUpdate(player, command, triggerName, step, arg1, arg2) | ||||
| function onEventStarted(player, command, triggerName) | ||||
|  | ||||
| 	currentMenuId = player:GetCurrentMenuId(); | ||||
| 	choice = callClientFunction(player, "delegateCommand", command, "eventConfirm");	 | ||||
|  | ||||
| 	--Menu Dialog	 | ||||
| 	if (currentMenuId == 0) then | ||||
| 		if (arg1 == 1) then --Exit	 | ||||
| 			player:QuitGame(); | ||||
| 			player:EndCommand();	 | ||||
| 		elseif (arg1 == 2) then --Character Screen | ||||
| 			player:Logout(); | ||||
| 			player:EndCommand(); | ||||
| 			--player:SetCurrentMenuId(1); | ||||
| 			--player:RunEventFunction("delegateCommand", command, "eventCountDown"); | ||||
| 		elseif (arg1 == 3) then --Cancel | ||||
| 			player:EndCommand(); | ||||
| 		end | ||||
| 	--Countdown Dialog | ||||
| 	elseif (currentMenuId == 1) then | ||||
| 	 | ||||
| 		if (arg2 == 1) then --Logout Complete | ||||
| 			player:Logout(); | ||||
| 			player:EndCommand();			 | ||||
| 		elseif (arg2 == 2) then --Cancel Pressed | ||||
| 			player:EndCommand(); | ||||
| 		end | ||||
| 		 | ||||
| 	if (choice == 1) then | ||||
| 		player:QuitGame(); | ||||
| 	elseif (choice == 2) then | ||||
| 		player:Logout(); | ||||
| 	end | ||||
| 	 | ||||
| end | ||||
| 	player:EndEvent(); | ||||
| 	 | ||||
| end | ||||
|   | ||||
		Reference in New Issue
	
	Block a user