Hi is was wondering if there is any .lua command that does so allys only can teleport to ally major cities and hord only to hord major cities...
Thx![]()
Hi is was wondering if there is any .lua command that does so allys only can teleport to ally major cities and hord only to hord major cities...
Thx![]()
Lines of Coding: |||||||||| Goal 1000
Current: 677 Achived Goals: 500 Lines
you could try to make it with an If method with:
:GetFaction() : Returns the faction for the selected unit or target, else returns the faction of the unit itself if no target is selected.
or
:GetStanding(FactionID) : Returns the reputation value of the player to the unit.
to see if it is a horde or alliance and apply those to the portal...
i wouldn't know if Sun++ or BLUA or any LUA projects have special commands for what you request, but i doubt about it...
It should be possible with an If method with the above commands...
example
to give a small example...Code:if (player:GetStanding(76) >= 1000) then //76 = orgrimmar faction pUnit:TeleportUnit(mapID, X, Y, Z) // teleport coords for horde else pUnit:TeleportUnit(mapID, X, Y,Z) //teleport coords for ally end
this checks if the reputation with faction: Orgrimmar is higher or equal to 1000... if so the player is probably Horde... (but you could add UC, TB and other Horde factions to make sure it is a horde player)
you would have to work it out though
Meh time for a comeback in the emulation developing scene... after my exams i will get into it again![]()
okthx
+Rep
Lines of Coding: |||||||||| Goal 1000
Current: 677 Achived Goals: 500 Lines
I just saw a couple things that would generate errors on his script, so this is a fixed one. I didn't do much just change the command and added some crap.Code:if (player:GetStanding(76) >= 1000) then //76 = orgrimmar faction Unit:Teleport(Map, X, Y, Z) // teleport coords for horde else Unit:Teleport(Map, X, Y,Z) //teleport coords for ally end end
Yes, but I've learned that if ye don't show them the proper way to do something, like script, they learn the improper way (wrong commands, functions, etc.) and then, later on, you gotta re-teach them, and that is annoying, especially if your like me and hate teaching. PERIOD.