trouble with a spawn script

Discussions of the design and development of in-game content.

Moderator: Team Members

Post Reply
User avatar
Ememjr
Team Member
Posts: 975
Joined: Wed Mar 15, 2017 9:41 am
EQ2Emu Server: Perseverance

trouble with a spawn script

Post by Ememjr » Fri Nov 10, 2017 11:54 am

i have a spawn script below, that i want to give an item to the player but it appears casted on is not working

the spawn is a weapon rack, i added an enity command Search Weapon Rack to the entity commands table
i added the entity command to the npc object primary entity

i have added the spawn script to the spawn_scripts table

when i search the rack i see the casting bar but it does not appear that the cast_on function is being called

i have no clue where to look for the issue, i turned on luadebug start but get no errors





Code: Select all

--[[
    Script Name    : SpawnScripts/IsleRefuge1/WeaponRack.lua
    Script Author  : EmemJr
    Script Date    : 2017.11.05
    Script Purpose : give out arche type bag of goodies
                   :
--]]



function spawn(NPC)

end

function respawn(NPC)
	spawn(NPC)
end

function casted_on(NPC, Spawn, Message)
	Say(Spawn, "This is me talking")
	SummonItem(Spawn, 707, 1)
end

User avatar
Ememjr
Team Member
Posts: 975
Joined: Wed Mar 15, 2017 9:41 am
EQ2Emu Server: Perseverance

Re: trouble with a spawn script

Post by Ememjr » Fri Nov 10, 2017 12:30 pm

ok so after racking my brain for hours i found that the entity table command field had to be in lower case in order for the casted_on in the script to fire

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests