mirror of
https://github.com/emagi/eq2emu-content
synced 2026-08-12 20:23:03 -04:00
40 lines
No EOL
996 B
Lua
Executable file
40 lines
No EOL
996 B
Lua
Executable file
--[[
|
|
Script Name : SpawnScripts/Commonlands/someveryoldbottles.lua
|
|
Script Author : Premierio015
|
|
Script Date : 2021.05.23 09:05:01
|
|
Script Purpose :
|
|
:
|
|
--]]
|
|
|
|
local TheWheelOfVaniki = 5230
|
|
|
|
function spawn(NPC)
|
|
SetPlayerProximityFunction(NPC, 5, "InRange")
|
|
end
|
|
|
|
function InRange(NPC, Spawn)
|
|
if GetQuestStep(Spawn, TheWheelOfVaniki) == 4 then
|
|
SpawnSet(NPC, "display_hand_icon", 1)
|
|
SpawnSet(NPC, "show_command_icon", 1)
|
|
AddPrimaryEntityCommand(Spawn, NPC, "Grab the bottle", 3, "", "", 100, "")
|
|
end
|
|
end
|
|
|
|
function casted_on(NPC, Spawn, SpellName)
|
|
if SpellName == 'Grab the bottle' then
|
|
if GetQuestStep(Spawn, TheWheelOfVaniki) == 4 then
|
|
SetStepComplete(Spawn, TheWheelOfVaniki, 4)
|
|
end
|
|
AddTimer(NPC, 150, "remove_access", 1)
|
|
end
|
|
end
|
|
|
|
|
|
function remove_access(NPC, Spawn)
|
|
SpawnSet(NPC, "display_hand_icon", 0)
|
|
SpawnSet(NPC, "show_command_icon", 0)
|
|
end
|
|
|
|
function respawn(NPC)
|
|
spawn(NPC)
|
|
end |