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

26 lines
493 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;
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