1
Fork 0
mirror of https://bitbucket.org/Ioncannon/project-meteor-server.git synced 2025-04-20 19:57:46 +00:00
project-meteor-server/data/scripts/commands/TradeOfferCommand.lua
2017-09-17 15:04:29 -04:00

26 lines
No EOL
493 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;
if (name ~= nil) then
otherActor = player:GetZone():FindPCInZone(name);
elseif (actorId ~= nil) then
otherActor = player:GetZone():FindActorInArea(actorId);
end
if (otherActor ~= nil) then
GetWorldManager():CreateTradeGroup(player, otherActor);
else
end
player:EndEvent();
end