SHOW:
|
|
- or go back to the newest paste.
| 1 | - | function NatoSwiftmend (pUnit, event, player, pMisc) |
| 1 | + | local function NatoSwiftmend (pUnit, event, player) |
| 2 | - | if (player:IsInCombat() == true) then |
| 2 | + | -- The combat check could be before teleporting instead. This way you could use the NPC, but not teleport. |
| 3 | - | player:SendAreaTriggerMessage("You cannot access Nato Swiftmend while you're in combat!")
|
| 3 | + | -- Atm you can co to the NPC and if you get attacked you can still teleport. |
| 4 | - | else |
| 4 | + | if (player:IsInCombat()) then |
| 5 | - | pUnit:GossipCreateMenu(50, player, 0) |
| 5 | + | player:SendAreaTriggerMessage("You cannot access Nato Swiftmend while you're in combat!")
|
| 6 | - | local race=player:GetPlayerRace() |
| 6 | + | return |
| 7 | - | if race==2 or race==5 or race==6 or race==8 or race==10 then |
| 7 | + | end |
| 8 | - | pUnit:GossipMenuAddItem(3, "Mall", 1, 0) |
| 8 | + | pUnit:GossipCreateMenu(50, player, 0) |
| 9 | - | pUnit:GossipMenuAddItem(9, "Cross Faction Battle", 2, 0) |
| 9 | + | local race=player:GetPlayerRace() |
| 10 | - | pUnit:GossipMenuAddItem(10, "Solo Content", 3, 0) |
| 10 | + | if race==2 or race==5 or race==6 or race==8 or race==10 then |
| 11 | - | pUnit:GossipMenuAddItem(5, "Nevermind", 5, 0) |
| 11 | + | pUnit:GossipMenuAddItem(3, "Mall", 1, 0) |
| 12 | pUnit:GossipMenuAddItem(9, "Cross Faction Battle", 2, 0) | |
| 13 | - | local race=player:GetPlayerRace() |
| 13 | + | pUnit:GossipMenuAddItem(10, "Solo Content", 3, 0) |
| 14 | - | if race==1 or race==3 or race==4 or race==7 or race==11 then |
| 14 | + | pUnit:GossipMenuAddItem(5, "Nevermind", 0, 0) |
| 15 | - | pUnit:GossipMenuAddItem(3, "Mall", 1, 0) |
| 15 | + | else |
| 16 | - | pUnit:GossipMenuAddItem(9, "Cross Faction Battle", 4, 0) |
| 16 | + | pUnit:GossipMenuAddItem(3, "Mall", 1, 0) |
| 17 | - | pUnit:GossipMenuAddItem(10, "Solo Content", 3, 0) |
| 17 | + | pUnit:GossipMenuAddItem(9, "Cross Faction Battle", 4, 0) |
| 18 | - | pUnit:GossipMenuAddItem(5, "Nevermind", 5, 0) |
| 18 | + | pUnit:GossipMenuAddItem(10, "Solo Content", 3, 0) |
| 19 | - | pUnit:GossipSendMenu(player) |
| 19 | + | pUnit:GossipMenuAddItem(5, "Nevermind", 0, 0) |
| 20 | end | |
| 21 | pUnit:GossipSendMenu(player) | |
| 22 | - | function NatoSwiftmend2(pUnit, event, player, id, intid, code) |
| 22 | + | |
| 23 | - | if(intid == 1) then |
| 23 | + | |
| 24 | - | player:Teleport(1, -10710.852539, 2482.370850, 7.922390) |
| 24 | + | local function NatoSwiftmend2(pUnit, event, player, id, intid, code) |
| 25 | if(intid == 1) then | |
| 26 | player:Teleport(1, -10710.852539, 2482.370850, 7.922390) | |
| 27 | - | if(intid == 2) then |
| 27 | + | elseif(intid == 2) then |
| 28 | - | player:Teleport(0, 1804.678345, 186.426788, 70.398277) |
| 28 | + | player:Teleport(0, 1804.678345, 186.426788, 70.398277) |
| 29 | elseif(intid == 3) then | |
| 30 | player:Teleport(0, 0, 0, 0) -- Unfinished | |
| 31 | - | if(intid == 3) then |
| 31 | + | elseif(intid == 4) then |
| 32 | - | player:Teleport(0, 0, 0, 0) -- Unfinished |
| 32 | + | player:Teleport(0, 1805.745361, 291.897797, 70.3992628) |
| 33 | end | |
| 34 | player:GossipComplete() | |
| 35 | - | if(intid == 4) then |
| 35 | + | |
| 36 | - | player:Teleport(0, 1805.745361, 291.897797, 70.3992628) |
| 36 | + | |
| 37 | -- Dont use quotes in registers | |
| 38 | RegisterUnitGossipEvent(80000, 1, NatoSwiftmend) | |
| 39 | - | if(intid == 5) then |
| 39 | + | RegisterUnitGossipEvent(80000, 2, NatoSwiftmend2) |