Fe | Helicopter Script
Helicopter License (Item) – A mount that allows the player to fly at high speed, bypass terrain, and optionally teleport to saved locations (like a personal chopper).
INSERT INTO `item_proto` (`id`, `name`, `type`, `typeid`, `icon`, `desc`, `price_sell`, `price_buy`, `sex`, `job`, `level`, `attack`, `defence`, `range`, `slot`, `max_stack`, `apply`, `value`, `duration`) VALUES (750001, 'Helicopter License', 16, 1, 'heli_icon.bmp', 'Allows you to summon a personal helicopter. Right-click to ride.', 100000, 500000, 2, 0, 20, 0, 0, 0, 0, 1, 0, 0, 0); Adjust id to an unused value in your server. typeid 1 = mount. 2. Lua Script – NPC “Helicopter Pilot” (for teleport & fuel) Save as script_helicopter.lua in your scripts/npc/ folder.
if choice == 1 then TeleportMenu() elseif choice == 2 then SaveLocation() elseif choice == 3 then BuyFuel() elseif choice == 4 then RepairHeli() else Say("Fly safe, pilot!") end end FE Helicopter Script
if choice == 1 and loc1 then TeleportTo(loc1) elseif choice == 2 and loc2 then TeleportTo(loc2) elseif choice == 3 and loc3 then TeleportTo(loc3) else Say("No location saved there!") end end
local menu = string.format("Saved locations:\n1. %s\n2. %s\n3. %s\n\nEnter number:", loc1 or "Empty", loc2 or "Empty", loc3 or "Empty") local choice = Ask(menu, 3) Helicopter License (Item) – A mount that allows
function UseFuel() local fuel = CountItem(750002) if fuel > 0 then RemoveItem(750002, 1) SetPlayerVar("HELI_FUEL_TICK", "1") SetTimer("FuelExpire", 600000) -- 10 min in ms end end
function OnTimer(timerID) if timerID == "FuelExpire" then SetPlayerVar("HELI_FUEL_TICK", "0") Notice("Your helicopter fuel has run out. Land safely.") end end Add this to your resource/mount.lua or similar mount definition file. typeid 1 = mount
function BuyFuel() if CountItem(750002) < 1 then if GetPlayerGold() >= 50000 then TakeGold(50000) GiveItem(750002, 1) Say("Here's a Fuel Barrel. Lasts 10 flight minutes.") else Say("Need 50,000 penya.") end else Say("You already have fuel.") end end
local slot = Ask("Save to slot (1,2,3):", 3) if slot == 1 then SetPlayerVar("HELI_SAVE_1", locData) SetPlayerVar("HELI_NAME_1", map) elseif slot == 2 then SetPlayerVar("HELI_SAVE_2", locData) SetPlayerVar("HELI_NAME_2", map) elseif slot == 3 then SetPlayerVar("HELI_SAVE_3", locData) SetPlayerVar("HELI_NAME_3", map) end Say("Location saved to slot "..slot) end