mirror of
https://github.com/emagi/eq2emu-content
synced 2026-08-12 20:23:03 -04:00
47 lines
No EOL
1.2 KiB
Lua
Executable file
47 lines
No EOL
1.2 KiB
Lua
Executable file
--[[
|
|
Script Name : SpawnScripts/ThunderingSteppes/tomemasterygiantwidget.lua
|
|
Script Author : Dorbin
|
|
Script Date : 2022.06.07 03:06:28
|
|
Script Purpose :
|
|
:
|
|
--]]
|
|
|
|
local LnLQuest = 5398
|
|
local Book = 8631
|
|
|
|
function spawn(NPC)
|
|
Check(NPC,Spawn)
|
|
SetPlayerProximityFunction(NPC, 10, "InRange", Spawn)
|
|
end
|
|
|
|
function respawn(NPC)
|
|
spawn(NPC)
|
|
end
|
|
|
|
function InRange(NPC, Spawn)
|
|
if HasItem(Spawn,Book,1) or HasCompletedQuest(Spawn,LnLQuest) then
|
|
SetAccessToEntityCommand(Spawn,NPC,"Search Tarp", 0)
|
|
SpawnSet(NPC, "show_command_icon", 0)
|
|
SpawnSet(NPC, "display_hand_icon", 0)
|
|
else
|
|
end
|
|
end
|
|
|
|
function Check(NPC,Spawn)
|
|
if HasItem(Spawn,Book,1) or HasCompletedQuest(Spawn,LnLQuest) then
|
|
SpawnSet(NPC, "show_command_icon", 0)
|
|
SpawnSet(NPC, "display_hand_icon", 0)
|
|
SetAccessToEntityCommand(Spawn,NPC,"Search Tarp", 0)
|
|
else
|
|
SetAccessToEntityCommand(Spawn,NPC,"Search Tarp", 1)
|
|
SpawnSet(NPC, "show_command_icon", 1)
|
|
SpawnSet(NPC, "display_hand_icon", 1)
|
|
end
|
|
end
|
|
|
|
function casted_on(NPC, Spawn, SpellName)
|
|
if SpellName == 'Search Tarp' then
|
|
SummonItem(Spawn,Book,1)
|
|
AddTimer(NPC, 100, "Check", 1, Spawn)
|
|
end
|
|
end |