mirror of
				https://bitbucket.org/Ioncannon/project-meteor-server.git
				synced 2025-05-20 08:26:59 -04:00 
			
		
		
		
	Added new scripts, implemented some old ones.
This commit is contained in:
		| @@ -4,7 +4,7 @@ MarketEntrance Script | ||||
|  | ||||
| Functions: | ||||
|  | ||||
| eventPushChoiceAreaOrQuest(0xc13, 0xc1a, 0xdba,0, false, 0) -  | ||||
| eventPushChoiceAreaOrQuest(gcLeaderPlaceName[Fronds, etc], showMarketWards/Houses (must be 0xc1a), gcHQPlaceName, anotherPlaceName, showItemSearchCounter, stopSearchingItemId) -  | ||||
| eventPushStepPrvMarket(?, ?, ?) - | ||||
|  | ||||
| --]] | ||||
| @@ -16,7 +16,6 @@ function init(npc) | ||||
| end | ||||
|  | ||||
| function onEventStarted(player, npc, triggerName)	 | ||||
| 	callClientFunction(player, "eventPushChoiceAreaOrQuest", 0xc13, 0xc1a, 0xdba,0, false, 0); | ||||
| 		 | ||||
| 	callClientFunction(player, "eventPushChoiceAreaOrQuest", 0xc13, 0xc1a, 0xdba, 0, true, 1); | ||||
| 	player:EndEvent();	 | ||||
| end | ||||
| @@ -0,0 +1,26 @@ | ||||
| --[[ | ||||
|  | ||||
| PopulaceBranchVendor Script | ||||
|  | ||||
| Functions: | ||||
|  | ||||
| eventTalkWelcome(player) - Starts talk turn and  | ||||
| eventSearchItemAsk(nil, stopSearchingItemId) -  | ||||
| eventTalkStepBreak() - Finishes the talk turn. | ||||
|  | ||||
| --]] | ||||
|  | ||||
| require ("global") | ||||
|  | ||||
| function init(npc) | ||||
| 	return false, false, 0, 0;	 | ||||
| end | ||||
|  | ||||
| function onEventStarted(player, npc, triggerName) | ||||
| 	 | ||||
| 	callClientFunction(player, "eventTalkWelcome", player);	 | ||||
| 	callClientFunction(player, "eventSearchItemAsk", nil, 0);	 | ||||
| 	callClientFunction(player, "eventTalkStepBreak", player);	 | ||||
| 	player:EndEvent(); | ||||
| 	 | ||||
| end | ||||
| @@ -4,8 +4,8 @@ PopulaceItemRepairer Script | ||||
|  | ||||
| Functions: | ||||
|  | ||||
| talkWelcome(player, bool, number, bool) - Opens the main menu | ||||
| selectItem(nil, pageNumber, ?, condition1, condition2, condition3, condition4, condition5) - "Ain't running a charity here", message said when you have insufficent funds | ||||
| talkWelcome(player, sayWelcomeText, currentLevel?, changes 1500243 from "welcome" to "well met") - Opens the main menu | ||||
| selectItem(nil, pageNumber, ?, condition1, condition2, condition3, condition4, condition5) - Select item slot. | ||||
| confirmRepairItem(player, price, itemId, hq grade) - Shows the confirm box for item repair. | ||||
| confirmUseFacility(player, price) - Shows confirm box for using facility. Default price is 11k? | ||||
| finishTalkTurn() - Call at end to stop npc from staring at the player (eeeek) | ||||
| @@ -18,12 +18,29 @@ function init(npc) | ||||
| 	return false, false, 0, 0;	 | ||||
| end | ||||
|  | ||||
| function onEventStarted(player, npc, triggerName) | ||||
| function onEventStarted(player, npc, triggerName)	 | ||||
| 	 | ||||
| 	result = callClientFunction(player, "talkWelcome", player, false, 20, false); | ||||
| 	result = callClientFunction(player, "talkWelcome", player, true, 20, false); | ||||
| 	 | ||||
| 	if (result == 1) then	 | ||||
| 		callClientFunction(player, "selectItem", nil, 1, 4, 2, 3, 4, 5, 6, 7); | ||||
| 		local currentPage = 1; | ||||
| 		local slotToRepair = nil; | ||||
| 		 | ||||
| 		while (true) do | ||||
| 			slot, page, listIndx = callClientFunction(player, "selectItem", nil, currentPage, 4, 2, 55, 55, 55, 55); | ||||
| 			 | ||||
| 			if (slot == nil and page ~= nil) then | ||||
| 				currentPage = page;				 | ||||
| 			else | ||||
| 				slotToRepair = slot; | ||||
| 				break; | ||||
| 			end			 | ||||
| 		end | ||||
| 		 | ||||
| 		if (slotToRepair ~= nil) then | ||||
| 			callClientFunction(player, "confirmRepairItem", player, 100, 8032827, 0); | ||||
| 		end | ||||
| 		 | ||||
| 	elseif (result == 2) then	 | ||||
| 		callClientFunction(player, "confirmUseFacility", player); | ||||
| 	end | ||||
|   | ||||
		Reference in New Issue
	
	Block a user