mirror of
				https://bitbucket.org/Ioncannon/project-meteor-server.git
				synced 2025-05-20 08:26:59 -04:00 
			
		
		
		
	Commited changed scripts.
This commit is contained in:
		| @@ -11,6 +11,8 @@ eventPushStepPrvMarket(?, ?, ?) - | |||||||
|  |  | ||||||
| require ("global") | require ("global") | ||||||
|  |  | ||||||
|  | local MARKETWARD_ENTRANCE = {-201.0, 0.0, -160.0, 1.5}; | ||||||
|  |  | ||||||
| function init(npc) | function init(npc) | ||||||
| 	return false, false, 0, 0; | 	return false, false, 0, 0; | ||||||
| end | end | ||||||
|   | |||||||
| @@ -21,6 +21,7 @@ function onEventStarted(player, actor, triggerName, rewardItem, seekItemOrCost, | |||||||
| 	 | 	 | ||||||
| 	--Abort if no actor | 	--Abort if no actor | ||||||
| 	if (bazaarActor == nil) then | 	if (bazaarActor == nil) then | ||||||
|  | 		player:SendGameMessage(player, worldMaster, 25111, 0x20); | ||||||
| 		player:EndEvent(); | 		player:EndEvent(); | ||||||
| 		return; | 		return; | ||||||
| 	end | 	end | ||||||
| @@ -30,17 +31,18 @@ function onEventStarted(player, actor, triggerName, rewardItem, seekItemOrCost, | |||||||
| 		if (player:GetCurrentGil() >= seekItemOrCost) then | 		if (player:GetCurrentGil() >= seekItemOrCost) then | ||||||
| 			if (GetWorldManager():BazaarBuyOperation(bazaarActor, player, bazaarActor:GetItem(rewardItem), rewardAmount, seekItemOrCost)) then			 | 			if (GetWorldManager():BazaarBuyOperation(bazaarActor, player, bazaarActor:GetItem(rewardItem), rewardAmount, seekItemOrCost)) then			 | ||||||
| 			else | 			else | ||||||
|  | 				player:SendGameMessage(player, worldMaster, 25111, 0x20); | ||||||
| 			end | 			end | ||||||
| 		else | 		else | ||||||
| 			--Show no gil error | 			player:SendGameMessage(player, worldMaster, 40252, 0x20); | ||||||
| 		end	 | 		end	 | ||||||
| 	else --Else we are fufilling a sought out item (ExecuteBazaarSell) | 	else --Else we are fufilling a sought out item (ExecuteBazaarSell) | ||||||
| 		local rewardItem = player:GetItem(rewardItem); | 		local rewardItem = bazaarActor:GetItem(rewardItem); | ||||||
| 		local seekItem = player:GetItem(seekItemOrCost); | 		local seekItem = player:GetItem(seekItemOrCost); | ||||||
| 		 |  | ||||||
| 		if (rewardItem ~= nil and seekItem ~= nil) then | 		if (rewardItem ~= nil and seekItem ~= nil) then | ||||||
| 			if (GetWorldManager():BazaarSellOperation(bazaarActor, player, rewardItem, rewardAmount, seekItem, seekAmount)) then			 | 			if (GetWorldManager():BazaarSellOperation(bazaarActor, player, rewardItem, rewardAmount, seekItem, seekAmount)) then			 | ||||||
| 			else | 			else | ||||||
|  | 				player:SendGameMessage(player, worldMaster, 25111, 0x20); | ||||||
| 			end | 			end | ||||||
| 		else | 		else | ||||||
| 		end | 		end | ||||||
|   | |||||||
| @@ -4,6 +4,13 @@ BazaarUndealCommand Script | |||||||
|  |  | ||||||
| Handles canceling bazaar items | Handles canceling bazaar items | ||||||
|  |  | ||||||
|  | 25107 - Your bazaar is either full or already contains that unique item. | ||||||
|  | 25111 - Unable to complete transaction. | ||||||
|  | 25112 - You are unable to remove the item from your bazaar. You cannot hold any more items. | ||||||
|  | 25113 - Offered and sought items cannot be identical. | ||||||
|  | 25114 - Items in less than mint condition cannot be offered. | ||||||
|  | 25115 - Items in less than mint condition cannot be placed in your bazaar. | ||||||
|  |  | ||||||
| --]] | --]] | ||||||
|  |  | ||||||
| function onEventStarted(player, actor, triggerName, rewardItem, arg1, bazaarType, arg2, bazaarActor, rewardAmount, seekAmount, arg3, arg4, type9ItemIds) | function onEventStarted(player, actor, triggerName, rewardItem, arg1, bazaarType, arg2, bazaarActor, rewardAmount, seekAmount, arg3, arg4, type9ItemIds) | ||||||
|   | |||||||
| @@ -24,6 +24,12 @@ function doItemTrade(player, retainer) | |||||||
| 	while (true) do | 	while (true) do | ||||||
| 		resultCode, type7Param, un1, quantity, itemId, quality = callClientFunction(player, "eventTalkRetainerItemTrade", 2);		 | 		resultCode, type7Param, un1, quantity, itemId, quality = callClientFunction(player, "eventTalkRetainerItemTrade", 2);		 | ||||||
| 		 | 		 | ||||||
|  | 		player:SendMessage(0x20, "", "" .. tostring(resultCode)); | ||||||
|  | 		player:SendMessage(0x20, "", "" .. tostring(un1)); | ||||||
|  | 		player:SendMessage(0x20, "", "" .. tostring(quantity)); | ||||||
|  | 		player:SendMessage(0x20, "", "" .. tostring(itemId)); | ||||||
|  | 		player:SendMessage(0x20, "", "" .. tostring(quality)); | ||||||
|  | 	 | ||||||
| 		--Retreieve | 		--Retreieve | ||||||
| 		if (resultCode == 31) then		 | 		if (resultCode == 31) then		 | ||||||
| 			retainer:GetInventory(type7Param.inventoryType):RemoveItemAtSlot(type7Param.slot, quantity); | 			retainer:GetInventory(type7Param.inventoryType):RemoveItemAtSlot(type7Param.slot, quantity); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user