PDA

View Full Version : [Realese] Lua Flyer and Lander make your players fly!



shadowslayer133
20-01-09, 11:36 AM
Hey I created a script where you can fly and also land. This is useful when you put him in an arena and seal off the arena :)

function On_gossip(unit, event, player)
Unit:GossipCreateMenu(50, player, 0)
unit:GossipMenuAddItem(0, "Fly", 3, 0)
unit:GossipMenuAddItem(0, "Land", 4, 0)
unit:GossipSendMenu(player)
end
function Gossip_Submenus(unit, event, player, id, intid, code)
if(intid == 3) then Player:SetFlying()
end if(intid == 4) then
Player:Land()
end
end
RegisterUnitGossipEvent(75331, 1, "On_Gossip")
RegisterUnitGossipEvent(75331, 2, "Gossip_Submenus") Next all you have to do is create a creature with the Entry ID of 75331 or change it in the Script.I highlighted in red what you could change.

~Little Tutorial of how to use LUA scripts:
1. Copy 'n Paste whats in the code onto a notepad.
2. Save it as Fly and land.lua
3. Move the file to C:/Your Server/Scripts/
4. Make sure in you C:/Your Server/Script_Bin/ you have Lua Scripting.cpp
5. Make a creature with an Entry ID of 75331
6. Restart your server and spawn him
7. Enjoy :)

runiker
20-01-09, 01:24 PM
Great idea and great script never thought of this. Just an idea if you were to put it into a server i would make it remove a hearthstone apon fly and add a 3rd option that is "leave" that would give back the stone as well as make them land and teleport them to a safe zone. But i +rep for the thought behind this.

QQrofl
27-01-09, 02:22 AM
Looks cool to use, but have to watch where you spawn the npc. :)

shadowslayer133
31-01-09, 08:25 AM
What I did in my server was i looked through my GO's and found one called "ForceField" a couple of them didn't work but i eventually found one that did. Then i put the forcefield around Gurubashi arena and BAM! perfect for my npc!