1
Fork 0
mirror of https://bitbucket.org/Ioncannon/project-meteor-server.git synced 2025-04-22 04:37:47 +00:00
project-meteor-server/data/scripts/commands/TradeOfferCommand.lua

27 lines
525 B
Lua
Raw Normal View History

2017-09-17 15:04:29 -04:00
--[[
TradeOfferCommand Script
Handles what happens when you invite to trade
--]]
function onEventStarted(player, actor, triggerName, name, arg1, arg2, arg3, actorId)
local otherActor = nil;
--ActorID Search
if (actorId ~= nil) then
2017-09-17 15:04:29 -04:00
otherActor = player:GetZone():FindActorInArea(actorId);
--Name Search
elseif (name ~= nil) then
otherActor = player:GetZone():FindPCInZone(name);
2017-09-17 15:04:29 -04:00
end
if (otherActor ~= nil) then
GetWorldManager():CreateTradeGroup(player, otherActor);
else
end
player:EndEvent();
2017-09-17 15:04:29 -04:00
end