PDA

View Full Version : [Release] Lua Teleporter



Onlykl
03-07-09, 05:35 AM
function matrix_main_menu(pUnit, player)
pUnit:GossipCreateMenu(3544, player, 0)
pUnit:GossipMenuAddItem(9, "Mall Non-Pvp", 14, 0)
pUnit:GossipMenuAddItem(5, "Horde Location", 16, 0)
pUnit:GossipMenuAddItem(5, "Alliance Location", 15, 0)
pUnit:GossipMenuAddItem(0, "Outland Locations", 302, 0)
pUnit:GossipMenuAddItem(7, "Outland Instance", 17, 0)
pUnit:GossipMenuAddItem(5, "Outland Raids", 18, 0)
pUnit:GossipMenuAddItem(7, "Azeroth Instance", 19, 0)
pUnit:GossipMenuAddItem(5, "Azeroth Raids", 20, 0)
pUnit:GossipMenuAddItem(9, "Leveling Road", 26, 0)
pUnit:GossipMenuAddItem(2, "Enter Arena", 212, 0)
pUnit:GossipMenuAddItem(6, "Northerend Location", 141, 0)
pUnit:GossipMenuAddItem(2, "Isle of Quel' Danas", 11, 0)
pUnit:GossipMenuAddItem(8, "Buff Me Up!", 900, 0)
pUnit:GossipMenuAddItem(6, "Weapon skillz", 21, 0)
pUnit:GossipMenuAddItem(5, "Remove Ressurection Sickness", 901, 0)
pUnit:GossipMenuAddItem(5, "!!Made BY Onlykl!!", 999, 0)
pUnit:GossipSendMenu(player)
end

function matrix_on_gossip_talk(pUnit, event, player)
matrix_main_menu(pUnit, player)
end

function matrix_on_gossip_select(pUnit, event, player, id, intid, code, pMisc)
if(intid == 1) then
player:Teleport(0,-13271.959961,149.105515,34.464458)
pUnit:GossipComplete(player)
end

if(intid == 16) then
pUnit:GossipCreateMenu(3543, player, 0)
pUnit:GossipMenuAddItem(1, "Orgrimmar", 38, 0)
pUnit:GossipMenuAddItem(1, "Undercity", 39, 0)
pUnit:GossipMenuAddItem(1, "Thunder Bluff", 40, 0)
pUnit:GossipMenuAddItem(1, "Silvermoon City", 41, 0)
pUnit:GossipMenuAddItem(2, "Go Back", 100, 0)
pUnit:GossipSendMenu(player)
end

if(intid == 14) then
player:Teleport(530,-1887.510010,5359.379883,12.427300)
pUnit:GossipComplete(player)
end

if(intid == 26) then
player:Teleport(1,4617.614258,-3851.083984,944.031799)
pUnit:GossipComplete(player)
end

if(intid == 17) then
pUnit:GossipCreateMenu(3543, player, 0)
pUnit:GossipMenuAddItem(5, "Hellfire Ramparts", 52, 0)
pUnit:GossipMenuAddItem(5, "Blood Furnace", 53, 0)
pUnit:GossipMenuAddItem(5, "Shattered Halls", 54, 0)
pUnit:GossipMenuAddItem(5, "Underbog", 55, 0)
pUnit:GossipMenuAddItem(5, "Slave Pens", 56, 0)
pUnit:GossipMenuAddItem(5, "Mana Tombs", 57, 0)
pUnit:GossipMenuAddItem(5, "Sethekk Halls", 58, 0)
pUnit:GossipMenuAddItem(5, "Shadow Lab", 59, 0)
pUnit:GossipMenuAddItem(5, "Mechanar", 60, 0)
pUnit:GossipMenuAddItem(5, "Arcatraz", 61, 0)
pUnit:GossipMenuAddItem(5, "Caverns of Time", 62, 0)
pUnit:GossipMenuAddItem(5, "Serpentshrine caverns", 63, 0)
pUnit:GossipMenuAddItem(2, "Go Back", 100, 0)
pUnit:GossipSendMenu(player)
end

if (intid == 302) then
pUnit:GossipCreateMenu(3543, player, 0)
pUnit:GossipMenuAddItem(2, "Shattrath", 135, 0)
pUnit:GossipMenuAddItem(2, "Blade's Edge Mountains", 530, 0)
pUnit:GossipMenuAddItem(2, "Hellfire Peninsula/The Dark Portal", 500, 0)
pUnit:GossipMenuAddItem(2, "Nagrand", 520, 0)
pUnit:GossipMenuAddItem(2, "Netherstorm", 54, 0)
pUnit:GossipMenuAddItem(2, "Shadowmoon Valley", 550, 0)
pUnit:GossipMenuAddItem(2, "Terokkar Forest", 510, 0)
pUnit:GossipMenuAddItem(2, "Zangarmarsh", 560, 0)
pUnit:GossipSendMenu(player)
end

if(intid == 18) then
pUnit:GossipCreateMenu(3543, player, 0)
pUnit:GossipMenuAddItem(5, "Black Temple", 73, 0)
pUnit:GossipMenuAddItem(5, "Tempest Keep", 74, 0)
pUnit:GossipMenuAddItem(5, "Maghteridons Lair", 75, 0)
pUnit:GossipMenuAddItem(2, "Go Back", 100, 0)
pUnit:GossipSendMenu(player)
end

if(intid == 19) then
pUnit:GossipCreateMenu(3543, player, 0)
pUnit:GossipMenuAddItem(5, "Shadowfang Keep", 42, 0)
pUnit:GossipMenuAddItem(5, "Scarlet Monastery", 43, 0)
pUnit:GossipMenuAddItem(5, "Zul'Farrak", 44, 0)
pUnit:GossipMenuAddItem(5, "Scholomance", 45, 0)
pUnit:GossipMenuAddItem(5, "The Deadmines", 46, 0)
pUnit:GossipMenuAddItem(5, "Uldaman", 47, 0)
pUnit:GossipMenuAddItem(5, "Sunken temple", 48, 0)
pUnit:GossipMenuAddItem(5, "Lower Blackrock Depths", 49, 0)
pUnit:GossipMenuAddItem(5, "Dire Maul", 50, 0)
pUnit:GossipMenuAddItem(5, "Upper Blackrock Depths", 51, 0)
pUnit:GossipMenuAddItem(2, "Go Back", 100, 0)
pUnit:GossipSendMenu(player)
end

if(intid == 20) then
pUnit:GossipCreateMenu(3543, player, 0)
pUnit:GossipMenuAddItem(5, "Onyxias Lair", 64, 0)
pUnit:GossipMenuAddItem(5, "Molten Core", 65, 0)
pUnit:GossipMenuAddItem(5, "Blackwing Lair", 66, 0)
pUnit:GossipMenuAddItem(5, "Zul'Gurub", 67, 0)
pUnit:GossipMenuAddItem(5, "Karazhan", 68, 0)
pUnit:GossipMenuAddItem(5, "Ruins of Ahn'Qiraj 20", 69, 0)
pUnit:GossipMenuAddItem(5, "Temple of Ahn'Qiraj 40", 70, 0)
pUnit:GossipMenuAddItem(5, "Naxxramas", 71, 0)
pUnit:GossipMenuAddItem(5, "Zul'Aman", 72, 0)
pUnit:GossipMenuAddItem(2, "Go Back", 100, 0)
pUnit:GossipSendMenu(player)
end

if(intid == 15) then
pUnit:GossipCreateMenu(3543, player, 0)
pUnit:GossipMenuAddItem(1, "Stormwind", 34, 0)
pUnit:GossipMenuAddItem(1, "Ironforge", 35, 0)
pUnit:GossipMenuAddItem(1, "Darnassus", 36, 0)
pUnit:GossipMenuAddItem(1, "The Exodar", 37, 0)
pUnit:GossipMenuAddItem(2, "Go Back", 100, 0)
pUnit:GossipSendMenu(player)
end

if(intid == 21) then
pUnit:GossipCreateMenu(3543, player, 0)
pUnit:GossipMenuAddItem(0, "Weapon Skills", 25, 0)
pUnit:GossipMenuAddItem(5, "Go Back", 100, 0)
pUnit:GossipSendMenu(player)
end

if(intid == 212) then
pUnit:GossipCreateMenu(3543, player, 0)
pUnit:GossipMenuAddItem(2, "Arena Floor", 9, 0)
pUnit:GossipMenuAddItem(2, "Gurubashi Arena", 1, 0)
pUnit:GossipMenuAddItem(2, "Go Back", 100, 0)
pUnit:GossipSendMenu(player)
end

if(intid == 76) then
pUnit:GossipCreateMenu(3543, player, 0)
pUnit:GossipMenuAddItem(1, "Bows", 84, 0)
pUnit:GossipMenuAddItem(1, "Crossbows", 85, 0)
pUnit:GossipMenuAddItem(1, "Guns", 86, 0)
pUnit:GossipMenuAddItem(1, "Thrown", 87, 0)
pUnit:GossipMenuAddItem(1, "Wands", 88, 0)
pUnit:GossipMenuAddItem(2, "Go Back", 100, 0)
pUnit:GossipSendMenu(player)
end

if(intid == 77) then
pUnit:GossipCreateMenu(3543, player, 0)
pUnit:GossipMenuAddItem(1, "One-Handed Axes", 89, 0)
pUnit:GossipMenuAddItem(1, "One-Handed Maces", 90, 0)
pUnit:GossipMenuAddItem(1, "One-Handed Swords", 91, 0)
pUnit:GossipMenuAddItem(1, "Daggers", 92, 0)
pUnit:GossipMenuAddItem(1, "Fist Weapons", 93, 0)
pUnit:GossipMenuAddItem(2, "Go Back", 100, 0)
pUnit:GossipSendMenu(player)
end

if(intid == 78) then
pUnit:GossipCreateMenu(3543, player, 0)
pUnit:GossipMenuAddItem(1, "Two-Handed Axes", 94, 0)
pUnit:GossipMenuAddItem(1, "Two-Handed Maces", 95, 0)
pUnit:GossipMenuAddItem(1, "Two-Handed Swords", 96, 0)
pUnit:GossipMenuAddItem(1, "Staves", 97, 0)
pUnit:GossipMenuAddItem(1, "Polearms", 98, 0)
pUnit:GossipMenuAddItem(2, "Go Back", 100, 0)
pUnit:GossipSendMenu(player)
end

if(intid == 100) then
pUnit:GossipCreateMenu(3544, player, 0)
pUnit:GossipMenuAddItem(9, "Mall Non-Pvp", 14, 0)
pUnit:GossipMenuAddItem(5, "Horde Location", 16, 0)
pUnit:GossipMenuAddItem(5, "Alliance Location", 15, 0)
pUnit:GossipMenuAddItem(0, "Outland Locations", 302, 0)
pUnit:GossipMenuAddItem(7, "Outland Instance", 17, 0)
pUnit:GossipMenuAddItem(5, "Outland Raids", 18, 0)
pUnit:GossipMenuAddItem(7, "Azeroth Instance", 19, 0)
pUnit:GossipMenuAddItem(5, "Azeroth Raids", 20, 0)
pUnit:GossipMenuAddItem(9, "Leveling Road", 26, 0)
pUnit:GossipMenuAddItem(2, "Enter Arena", 212, 0)
pUnit:GossipMenuAddItem(6, "Northerend Location", 141, 0)
pUnit:GossipMenuAddItem(2, "Isle of Quel' Danas", 11, 0)
pUnit:GossipMenuAddItem(8, "Buff Me Up!", 900, 0)
pUnit:GossipMenuAddItem(6, "Weapon skillz", 21, 0)
pUnit:GossipMenuAddItem(5, "Remove Ressurection Sickness", 901, 0)
pUnit:GossipMenuAddItem(5, "!!Made BY Onlykl!!", 999, 0)
pUnit:GossipSendMenu(player)
end

if(intid == 25) then
pUnit:GossipCreateMenu(3543, player, 0)
pUnit:GossipMenuAddItem(0, "Ranged Weapons", 76, 0)
pUnit:GossipMenuAddItem(0, "One-Handed Weapons", 77, 0)
pUnit:GossipMenuAddItem(0, "Two-Handed Weapons", 78, 0)
pUnit:GossipMenuAddItem(2, "Go Back", 100, 0)
pUnit:GossipSendMenu(player)
end

if(intid == 3) then
player:Teleport(0,1820.300537,239.093185,60.585197 )
pUnit:GossipComplete(player)
end

if(intid == 4) then
player:Teleport(1,-1277,118,131)
pUnit:GossipComplete(player)
end

if(intid == 5) then
player:Teleport(0,-9166.856445,467.493500,103.974922)
pUnit:GossipComplete(player)
end

if(intid == 34) then
player:Teleport(0, -9165.678711,470.176544, 103.978409)
end
if(intid == 35) then
player:Teleport(0, -4977.095215, -888.452942, 501.621216)
end
if(intid == 36) then
player:Teleport(1, 9943.809570, 2275.350098, 1341.390015)
end
if(intid == 37) then
player:Teleport(530, -3792.557861, -11691.3, -105.241)
end

if(intid == 38) then
player:Teleport(1, 1371.068970, -4370.801758, 26.052483)
end
if(intid == 39) then
player:Teleport(0, 2050.203125, 285.650604, 56.994549)
end
if(intid == 40) then
player:Teleport(1, -1304.569946, 205.285004, 68.681396)
end
if(intid == 41) then
player:Teleport(530, 9400.486328, -7278.376953, 14.206780)
end

if(intid == 52) then
player:Teleport(530, -360.670990, 3071.899902, -15.097700)
end
if(intid == 53) then
player:Teleport(530, -303.506012, 3164.820068, 31.742500)
end
if(intid == 54) then
player:Teleport(530, -311.083527, 3083.291748, -3.745923)
end
if(intid == 55) then
player:Teleport(530, 777.088989, 6763.450195, -72.062561)
end
if(intid == 56) then
player:Teleport(530, 719.507996, 6999.339844, -73.074303)
end
if(intid == 57) then
player:Teleport(530, -3079.810059, 4943.040039, -101.046997)
end
if(intid == 58) then
player:Teleport(530, -3362.219971, 4660.410156, -101.049004)
end
if(intid == 59) then
player:Teleport(530, -3645.060059, 4943.620117, -101.047997)
end
if(intid == 60) then
player:Teleport(530, 2862.409912, 1546.089966, 252.158691)
end
if(intid == 61) then
player:Teleport(530, 3311.598145, 1332.745117, 505.557251)
end
if(intid == 62) then
player:Teleport(1, -8519.718750, -4297.542480, -208.441376)
end
if(intid == 63) then
player:Teleport(530, 830.542908, 6865.445801, -63.785503)
end

if(intid == 42) then
player:Teleport(0, -234.495087, 1561.946411, 76.892143)
end
if(intid == 43) then
player:Teleport(0, 2870.442627, -819.985229, 160.331085)
end
if(intid == 44) then
player:Teleport(1, -6797.278809, -2903.917969, 9.953360)
end
if(intid == 45) then
player:Teleport(0, 1267.468628, -2556.651367, 94.127983)
end
if(intid == 46) then
player:Teleport(0, -11079.8, 1506.98, 42.9594)
end
if(intid == 47) then
player:Teleport(70, -228.193, 46.1602, -45.0186)
end
if(intid == 48) then
player:Teleport(0, -10349.1, -3849.67, -24.6078)
end
if(intid == 49) then
player:Teleport(230, 596.432, -188.498, -49)
end
if(intid == 50) then
player:Teleport(429, 254.588, -24.7395, -1.56062)
end
if(intid == 51) then
player:Teleport(229, 73.5083, -215.044, 53.3869)
end

if(intid == 141) then
pUnit:GossipCreateMenu(3543, player, 0)
pUnit:GossipMenuAddItem(2, "Borean Tundra [68-72]", 888, 0)
pUnit:GossipMenuAddItem(2, "Howling Fjord [68-72]", 150, 0)
pUnit:GossipMenuAddItem(2, "Dragonblight [71-74]", 200, 0)
pUnit:GossipMenuAddItem(2, "Grizzly Hills [73-75]", 250, 0)
pUnit:GossipMenuAddItem(2, "Crystalsong Forest [74-76]", 300, 0)
pUnit:GossipMenuAddItem(2, "Zul'Drak [74-77]", 350, 0)
pUnit:GossipMenuAddItem(2, "Sholazar Basin [75-78]", 400, 0)
pUnit:GossipMenuAddItem(2, "The Storm Peaks [76-80]", 450, 0)
pUnit:GossipMenuAddItem(2, "Icecrown [77-80]", 500, 0)
pUnit:GossipMenuAddItem(2, "Wintergrasp [PVP]", 550, 0)
pUnit:GossipMenuAddItem(2, "Go Back", 100, 0)
pUnit:GossipSendMenu(player)
end


if(intid == 6) then
player:Teleport(0,-9175.966797,337.554688,83.550049)
pUnit:GossipComplete(player)
end

if(intid == 73) then
player:Teleport(530, -3609.739990, 328.252014, 37.307701)
end
if(intid == 74) then
player:Teleport(530, 3087.310059, 1373.790039, 184.643005)
end
if(intid == 75) then
player:Teleport(530, -313.678986, 3088.350098, -116.501999)
end

if(intid == 64) then
player:Teleport(1, -4746, -3749, -4)
end
if(intid == 65) then
player:Teleport(409, 1089.6, -470.19, -106.41)
end
if(intid == 66) then
player:Teleport(469, -7665.55, -1102.49, 400.679)
end
if(intid == 67) then
player:Teleport(0, -11919.073242, -1202.459374, 92.298744)
end
if(intid == 68) then
player:Teleport(532, -11087.3, -1977.47, 49.6135)
end
if(intid == 69) then
player:Teleport(1, -8394.730469, 1485.658447, 21.038563)
end
if(intid == 70) then
player:Teleport(1, -8247.316406, 1970.156860, 129.071472)
end
if(intid == 71) then
player:Teleport(533, 3006.06, -3436.72, 293.891)
end
if(intid == 72) then
player:Teleport(530, 6850, -7950, 170)
end

if(intid == 122) then
player:Teleport(530, -248.160004, 922.348999, 84.379799)
end
if(intid == 123) then
player:Teleport(530, -225.863632, 5405.927246, 22.346397)
end
if(intid == 124) then
player:Teleport(530, -468.232330, 8418.666016, 28.031298)
end
if(intid == 125) then
player:Teleport(530, 3396.123779, 4182.208008, 137.097992)
end
if(intid == 126) then
player:Teleport(530, -1202.426636, 5313.692871, 33.774723)
end
if(intid == 127) then
player:Teleport(530, -2859.522461, 3182.34773, 10.008426)
end
if(intid == 128) then
player:Teleport(530, 1471.672852, 6828.047852, 107.759239)
end

if (intid == 135) then
player:Teleport(530, -1887.510010, 5359.379883, -12.427300) -- Shattrath
end

if (intid == 888) then
player:Teleport(571, 3452, 3836, 29)
end
if (intid == 150) then
player:Teleport(571, 592, -5095, 6)
end
if (intid == 200) then
player:Teleport(571, 3577, 656, 77)
end
if (intid == 250) then
player:Teleport(571, 2767, -2889, 64)
end
if (intid == 300) then
player:Teleport(571, 5398, -743, 163)
end
if (intid == 350) then
player:Teleport(571, 5449, -1442, 248)
end
if (intit == 400) then
player:Teleport(571, 6516, 4824, -55)
end
if (intid == 450) then
player:Teleport(571, 7343, -927, 910)
end
if (intid == 500) then
player:Teleport(571, 6434, 1151, 283)
end
if (intid == 550) then
player:Teleport(571, 4717, 2420, 3462)
end

if(intid == 7) then
player:Teleport(0,-4981.25, -881.542, 502.66)
pUnit:GossipComplete(player)
end

if (intid == 500) then
player:Teleport(530, -248.431702, 939.013367, 84.379822) -- Hellfire Peninsula/ The Dark Portal
end
if (intid == 510) then
player:Teleport(530, -1176.588989, 5336.273926, 29.897034) -- Terokkar Forest
end
if (intid == 520) then
player:Teleport(530, -526, 8440, 47.426472) -- Nagrand
end
if (intid == 530) then
player:Teleport(530, 1114.010254, 7090.967285, 122.127274) -- Blade's Edge Mountains
end
if (intid == 540) then
player:Teleport(530, 2315.689209, 2535.836670, 119.271622) -- Netherstorm
end
if (intid == 550) then
player:Teleport(530, -2847.810791, 3190.677246, 8.136728) -- Shadowmoon Valley
end
if (intid == 560) then
player:Teleport(530, 30.284981, 6983.303711, 148.666779) -- Zangarmarsh
end

if(intid == 8) then
player:Teleport(530,6850, -7950, 170)
pUnit:GossipComplete(player)
end

if (intid == 66) then
player:Teleport(169, 3059, 3177, 30)
player:GossipComplete()
end


if(intid == 23) then
player:SendInnkeeperBind(pCreature)
pUnit:GossipComplete(player)
end

if(intid == 9) then
player:Teleport(530,-2011.498413, 6601.716797, 12.434589)
pUnit:GossipComplete(player)
end

if(intid == 11) then
player:Teleport(530, 12956.072266, -6943.814453, 9.968110)
pUnit:GossipComplete(player)
end

if(intid == 12) then
player:Teleport(0, -13243.240234, 197.949799, 32.112690)
pUnit:GossipComplete(player)
end

if(intid == 900) then
player:LearnSpell(33081)
player:LearnSpell(33082)
player:LearnSpell(33077)
player:LearnSpell(33079)
player:LearnSpell(33080)
player:LearnSpell(33078)
pUnit:GossipComplete(player)
end

if(intid == 901) then
player:LearnSpell(15007)
player:UnlearnSpell(15007)
end

end

RegisterUnitGossipEvent(NPCID, 1, "matrix_on_gossip_talk")
RegisterUnitGossipEvent(NPCID, 2, "matrix_on_gossip_select")
Don't forget to change NPCID put it in your lua folder on server restart it... You need to make NPC ;) remeber to put flag 1...

Apple
03-07-09, 05:37 AM
nice work +Rep

Onlykl
03-07-09, 05:39 AM
Thanks mate :) soon contributer yey :)

xtremus
03-07-09, 09:59 AM
Nice teleporter.

i appreciate if you could do a costum heartstone to teleport everywhere =)

Onlykl
03-07-09, 10:03 AM
i can but its stupid... and many of them already made that...

makis7
07-07-09, 10:22 AM
THis have diferent menu for allys and hordes?

Onlykl
07-07-09, 10:29 AM
yes :)

Blacklisted
07-07-09, 11:29 AM
I belive a pocket teleporter is C++ not Lua. Check the C++ section. There's one in there. I guess ill be nice and +rep you ;D.

Onlykl
07-07-09, 11:57 AM
it can be made in LUA too :P Do you want to i make it color full? :) i mean for this teleporter

Reilkia
21-08-09, 06:57 PM
Please check out my post:
http://www.mmopro.net/forums/questions/1861-lua-scripts-wont-work-d.html#post7933
it'd seem like you'd be able to help
The SAME THING that I described there is happening with yours.

Onlykl
22-08-09, 09:32 AM
Answered you there!

Milation
09-09-09, 08:25 AM
Nice one dude, +rep.

Lbniese
25-09-09, 09:37 AM
Nice, Rep+

Onlykl
03-10-09, 07:49 AM
Thanks you..

Lbniese
03-10-09, 03:47 PM
No problem ;)... what are you else working on atm?

Dimman
03-10-09, 04:19 PM
costum heartstone to teleport everywhere =)

custom*

Lbniese
04-10-09, 01:18 AM
custom*
Lol evil you.

Virus
25-10-09, 08:53 PM
This is probably a really dumb question... but, what is NPCID and what do i put there
other than that +rep :)

Dimman
26-10-09, 02:07 AM
This is probably a really dumb question... but, what is NPCID and what do i put there
other than that +rep :)



You put the ID (entry) of the NPC you want to be your teleporter


You can make a new npc or use an old. Its better to make a new

enegue
26-10-09, 05:24 AM
Isn't that common sense? :O