Uh everything works fine ! (/ty Gastric
+REP ! ). But what about this idea ?
Clickin' on a Gameobject (portal) it would be nice that the object would teleport the selected targetplayer (also if far far away XD) onto the "portal-clicker".
I mean, in RPG: I play my Paladin "Elgardion". Elgardion, in a mysterious forest, finds a strange portal and click it while selecting his friend "Andros" in his party. Andros get summoned ON Elgardion just like a Warlock can do with a RoS. The "portal" (we could easily change the displayID) would be called "Stone of the Thought"
(you "think" about someone and he appears to you, hehe).
Shortly: i'm in a party with a friend. He's far away from me. I enter the forest, click the "portal" by targeting my friend in the party and he get summoned on me.
Is this possibile in LUA ? Is there a function or somewhat that sets the targetplayer's coordinates to the "summoner" ones ? I searched around with no luck... T_T I'd like something that would act just like the .summon command
I tried somewhere like that:
Code:
function ThoughtStone(pGameObject, event, pMisc)
local plr = ?
-- Yes, "?" because i really dunno what to write here...I need something like local plr = pMisc:GetSelectedPlayer()
-- (i don't know the right syntax yet :D) in order to get the Selected Player and set it to "plr"
if(plr ~= nil) then -- Idea to further develop here: IsPlayer()
local x = plr:GetX()
local y = plr:GetY()
local z = plr:GetZ()
pMisc:Teleport(0, x, y, z)
-- is there a way to get the player's map position ? (i used "0" as long as i don't know how to do that yet)
-- Again, i'd need something like local map = plr:GetMapID() (this is pseudocode, obviously)
-- in order to change to pMisc:Teleport(map, x, y, z)
else
end
end
RegisterGameObjectEvent(300000, 2, "ThoughtStone")
Here is the idea. But I need a little help with the needed LUA functions 
Any help is appreciated, and +rep to anyone (if i can ^_^) that will help. If we do it, it would be nice to include that in the LUA guides around there. That would help a lot many other noobs like myself 
In a few words, i'd like that: I click the GO and the player that i have selected in my party is summoned to me