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

27 lines
No EOL
525 B
Lua

--[[
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
otherActor = player:GetZone():FindActorInArea(actorId);
--Name Search
elseif (name ~= nil) then
otherActor = player:GetZone():FindPCInZone(name);
end
if (otherActor ~= nil) then
GetWorldManager():CreateTradeGroup(player, otherActor);
else
end
player:EndEvent();
end