2019-06-19 01:10:15 -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
|
2022-02-05 18:00:09 -05:00
|
|
|
otherActor = player.CurrentArea):FindActorInArea(actorId);
|
2019-06-19 01:10:15 -04:00
|
|
|
--Name Search
|
|
|
|
elseif (name ~= nil) then
|
2022-02-05 18:00:09 -05:00
|
|
|
otherActor = player.CurrentArea:FindPCInZone(name);
|
2019-06-19 01:10:15 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
if (otherActor ~= nil) then
|
|
|
|
GetWorldManager():CreateTradeGroup(player, otherActor);
|
|
|
|
else
|
|
|
|
end
|
|
|
|
|
|
|
|
player:EndEvent();
|
|
|
|
end
|