Originally Posted by
bendaferi
made a test.lua:
function teszt_OnEmote(pPlayer, event, pUnit, emoteId)
if (emoteId == 2) then -- bow
pPlayer:CastSpell(34349) -- simple arcane explosion
end
end
RegisterServerHook(8, "teszt_OnEmote")
Now my world.exe says script/teszt.lua:5: attempt to index local 'pPlayer' <a number value>
I guess it doesn't know who the pPlayer is? :O
Anyway I'll try to find another ID for the /chicken
---------- Post added at 02:17 PM ---------- Previous post was at 01:59 PM ----------
Ok somehow got it work. However functions like pPlayer:SpawnCreature(......) or RegisterTimedEvent(......) aren't working at all...