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
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. FE Helicopter Script
function RepairHeli() SetPlayerVar("HELI_COOLDOWN", 0) Say("Helicopter repaired. Cooldown removed.") end if choice == 1 and loc1 then TeleportTo(loc1)
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 Cooldown removed
-- NPC ID: 80001 (Helicopter Pilot) -- Location: Flarine, near hangar function OnTalk( npc ) local dialog = " [Helicopter Pilot]\n Welcome, pilot! I manage your personal helicopter.\n What would you like to do?\n --- 1. Teleport to saved location\n 2. Save current location\n 3. Buy Fuel Barrel (10 min flight)\n 4. Repair helicopter (remove cooldown)\n 5. Exit\n " local choice = Ask( dialog, 5 )
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
function TeleportMenu() local loc1 = GetPlayerVar("HELI_SAVE_1") local loc2 = GetPlayerVar("HELI_SAVE_2") local loc3 = GetPlayerVar("HELI_SAVE_3")