mirror of
				https://bitbucket.org/Ioncannon/project-meteor-server.git
				synced 2025-05-20 08:26:59 -04:00 
			
		
		
		
	Added script for ItemStorage npc. Added scripts for both types of inn exit doors. Added BountyPresenter script (YoshiP).
This commit is contained in:
		| @@ -28,7 +28,11 @@ function onEventStarted(player, npc, triggerName) | ||||
| 			goto TOP_MENU; | ||||
| 		end | ||||
| 		 | ||||
| 		callClientFunction(player, "selectStoreItem", nil, categoryChoice); | ||||
| 		itemId = callClientFunction(player, "selectStoreItem", nil, categoryChoice); | ||||
| 			 | ||||
| 		if (itemId ~= nil) then | ||||
| 			player:GetInventory(INVENTORY_NORMAL):RemoveItem(itemId, 1); | ||||
| 		end | ||||
| 		 | ||||
| 	elseif (storageChoice == 2) then | ||||
| 		categoryChoice = callClientFunction(player, "selectCategory"); | ||||
| @@ -37,7 +41,11 @@ function onEventStarted(player, npc, triggerName) | ||||
| 			goto TOP_MENU; | ||||
| 		end | ||||
| 	 | ||||
| 		callClientFunction(player, "selectReceiveItem", nil, categoryChoice); | ||||
| 		itemId = callClientFunction(player, "selectReceiveItem", nil, categoryChoice); | ||||
| 		 | ||||
| 		if (itemId ~= nil) then | ||||
| 			player:GetInventory(INVENTORY_NORMAL):AddItem(itemId, 1); | ||||
| 		end | ||||
| 	 | ||||
| 	end | ||||
| 	 | ||||
|   | ||||
| @@ -0,0 +1,26 @@ | ||||
| --[[ | ||||
|  | ||||
| PopulaceBountyPresenter Script | ||||
|  | ||||
| Functions: | ||||
|  | ||||
| eventLowerLevel(player) - | ||||
| eventAlreadyPresent(player) -  | ||||
| eventBeforePresent(player) - | ||||
| eventAfterPresent(player) - | ||||
| eventJail(player, bool) - | ||||
|  | ||||
| --]] | ||||
|  | ||||
| require ("global") | ||||
|  | ||||
| function init(npc) | ||||
| 	return false, false, 0, 0;	 | ||||
| end | ||||
|  | ||||
| function onEventStarted(player, npc, triggerName) | ||||
| 	 | ||||
| 	callClientFunction(player, "eventLowerLevel", player);	 | ||||
| 	player:EndEvent(); | ||||
| 	 | ||||
| end | ||||
| @@ -95,11 +95,11 @@ function onEventStarted(player, actor, triggerName, isTeleport) | ||||
| 			if (isInn) then | ||||
| 				--Return to Inn		 | ||||
| 				if (player:GetHomePointInn() == 1) then | ||||
| 					GetWorldManager():DoZoneChange(player, 12); | ||||
| 					GetWorldManager():DoZoneChange(player, 244, nil, 0, 15, -160.048, 0, -165.737, 0); | ||||
| 				elseif (player:GetHomePointInn() == 2) then | ||||
| 					GetWorldManager():DoZoneChange(player, 13); | ||||
| 					GetWorldManager():DoZoneChange(player, 244, nil, 0, 15, 160.048, 0, 154.263, 0); | ||||
| 				elseif (player:GetHomePointInn() == 3) then | ||||
| 					GetWorldManager():DoZoneChange(player, 11); | ||||
| 					GetWorldManager():DoZoneChange(player, 244, nil, 0, 15, 0.048, 0, -5.737, 0); | ||||
| 				end			 | ||||
| 			elseif (choice == 1 and isInn == nil) then			 | ||||
| 				--Return to Homepoint | ||||
|   | ||||
| @@ -39,13 +39,7 @@ function onTrigger(player, argc, p1, p2, p3, p4, privateArea, name, lastName) | ||||
|      | ||||
|     local worldManager = GetWorldManager(); | ||||
|      | ||||
|     -- treat this as a predefined warp list | ||||
|     if argc == 1 then | ||||
|         zone = tonumber(p1) or player_zone; | ||||
|         player:SendMessage(messageID, sender,  string.format("warping to zone:%u", zone)); | ||||
|         worldManager:DoZoneChange(player, zone); | ||||
|      | ||||
|     elseif argc >= 3 then | ||||
|     if argc >= 3 then | ||||
|          | ||||
|         if argc == 3 then | ||||
|             local x = tonumber(applyPositionOffset(p1, player_x)) or player_x; | ||||
|   | ||||
| @@ -29,7 +29,7 @@ function onEventStarted(player, npc) | ||||
| 		choice = callClientFunction(player, "delegateEvent", player, defaultFst, "defaultTalkWithInn_Desk", nil, nil, nil); | ||||
| 		 | ||||
| 		if (choice == 1) then | ||||
| 			GetWorldManager():DoZoneChange(player, 13); | ||||
| 			GetWorldManager():DoZoneChange(player, 244, nil, 0, 15, 160.048, 0, 154.263, 0); | ||||
| 		elseif (choice == 2) then			 | ||||
| 			if (player:GetHomePointInn() ~= 2) then | ||||
| 				player:SetHomePointInn(2); | ||||
|   | ||||
| @@ -0,0 +1,12 @@ | ||||
| require ("global") | ||||
|  | ||||
| function onEventStarted(player, npc) | ||||
| 	defaultFst = GetStaticActor("DftFst"); | ||||
| 	choice = callClientFunction(player, "delegateEvent", player, defaultFst, "defaultTalkWithInn_ExitDoor"); | ||||
| 		 | ||||
| 	if (choice == 1) then		 | ||||
| 		GetWorldManager():DoZoneChange(player, 155, nil, 0, 15, 59.252, 4, -1219.342, 0.852); | ||||
| 	end | ||||
| 	 | ||||
| 	player:endEvent(); | ||||
| end | ||||
| @@ -0,0 +1,12 @@ | ||||
| require ("global") | ||||
|  | ||||
| function onEventStarted(player, npc) | ||||
| 	defaultSea = GetStaticActor("DftSea"); | ||||
| 	choice = callClientFunction(player, "delegateEvent", player, defaultSea, "defaultTalkWithInn_ExitDoor"); | ||||
| 		 | ||||
| 	if (choice == 1) then		 | ||||
| 		GetWorldManager():DoZoneChange(player, 133, nil, 0, 15, -444.266, 39.518, 191, 1.9); | ||||
| 	end | ||||
| 	 | ||||
| 	player:endEvent(); | ||||
| end | ||||
| @@ -0,0 +1,12 @@ | ||||
| require ("global") | ||||
|  | ||||
| function onEventStarted(player, npc) | ||||
| 	defaultWil = GetStaticActor("DftWil"); | ||||
| 	choice = callClientFunction(player, "delegateEvent", player, defaultWil, "defaultTalkWithInn_ExitDoor"); | ||||
| 		 | ||||
| 	if (choice == 1) then		 | ||||
| 		GetWorldManager():DoZoneChange(player, 209, nil, 0, 15, -110.157, 202, 171.345, 0); | ||||
| 	end | ||||
| 	 | ||||
| 	player:endEvent(); | ||||
| end | ||||
| @@ -0,0 +1,12 @@ | ||||
| require ("global") | ||||
|  | ||||
| function onEventStarted(player, npc) | ||||
| 	defaultFst = GetStaticActor("DftFst"); | ||||
| 	choice = callClientFunction(player, "delegateEvent", player, defaultFst, "defaultTalkWithInn_ExitDoor"); | ||||
| 		 | ||||
| 	if (choice == 1) then		 | ||||
| 		GetWorldManager():DoZoneChange(player, 155, nil, 0, 15, 59.252, 4, -1219.342, 0.852); | ||||
| 	end | ||||
| 	 | ||||
| 	player:endEvent(); | ||||
| end | ||||
| @@ -0,0 +1,12 @@ | ||||
| require ("global") | ||||
|  | ||||
| function onEventStarted(player, npc) | ||||
| 	defaultSea = GetStaticActor("DftSea"); | ||||
| 	choice = callClientFunction(player, "delegateEvent", player, defaultSea, "defaultTalkWithInn_ExitDoor"); | ||||
| 		 | ||||
| 	if (choice == 1) then		 | ||||
| 		GetWorldManager():DoZoneChange(player, 133, nil, 0, 15, -444.266, 39.518, 191, 1.9); | ||||
| 	end | ||||
| 	 | ||||
| 	player:endEvent(); | ||||
| end | ||||
| @@ -0,0 +1,12 @@ | ||||
| require ("global") | ||||
|  | ||||
| function onEventStarted(player, npc) | ||||
| 	defaultWil = GetStaticActor("DftWil"); | ||||
| 	choice = callClientFunction(player, "delegateEvent", player, defaultWil, "defaultTalkWithInn_ExitDoor"); | ||||
| 		 | ||||
| 	if (choice == 1) then		 | ||||
| 		GetWorldManager():DoZoneChange(player, 209, nil, 0, 15, -110.157, 202, 171.345, 0); | ||||
| 	end | ||||
| 	 | ||||
| 	player:endEvent(); | ||||
| end | ||||
| @@ -5,7 +5,7 @@ function onEventStarted(player, npc) | ||||
| 	choice = callClientFunction(player, "delegateEvent", player, defaultSea, "defaultTalkWithInn_Desk", nil, nil, nil); | ||||
| 	 | ||||
| 	if (choice == 1) then | ||||
| 		GetWorldManager():DoZoneChange(player, 13); | ||||
| 		GetWorldManager():DoZoneChange(player, 244, nil, 0, 15, -160.048, 0, -165.737, 0); | ||||
| 	elseif (choice == 2) then | ||||
| 		if (player:GetHomePointInn() ~= 1) then | ||||
| 			player:SetHomePointInn(1); | ||||
|   | ||||
| @@ -36,9 +36,7 @@ function onEventStarted(player, npc, triggerName) | ||||
| 		player:AddDirector(director); | ||||
| 		player:SetLoginDirector(director); | ||||
| 		 | ||||
| 		GetWorldManager():DoZoneChange(player, 17); | ||||
| 	 | ||||
| 	 | ||||
| 		GetWorldManager():DoZoneChange(player, 184, nil, 0, 16, -24.34, 192, 34.22, 0.78);	 | ||||
| 	 | ||||
| end | ||||
|  | ||||
|   | ||||
| @@ -5,7 +5,7 @@ function onEventStarted(player, npc) | ||||
| 	choice = callClientFunction(player, "delegateEvent", player, defaultWil, "defaultTalkWithInn_Desk_2", nil, nil, nil); | ||||
| 	 | ||||
| 	if (choice == 1) then | ||||
| 		GetWorldManager():DoZoneChange(player, 11); | ||||
| 		GetWorldManager():DoZoneChange(player, 244, nil, 0, 15, 0.048, 0, -5.737, 0); | ||||
| 	elseif (choice == 2) then | ||||
| 		if (player:GetHomePointInn() ~= 3) then | ||||
| 			player:SetHomePointInn(3); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user