Inteligentny
Im not.
- Joined
- Aug 2, 2008
- Messages
- 485
- Reaction score
- 0
Is there any possibilty to add to npc something like "voices" in monsters?
function onThink()
talk = math.random(1,100)
if talk == 1 then
doCreatureSay(getNpcCid(), "Best wands and rods in city!", TALKTYPE_YELL)
end
if talk == 50 then
doCreatureSay(getNpcCid(), "Cheapest magic equipment only here!", TALKTYPE_YELL)
end
end
[27/01/2009 15:07:26] data/npc/scripts/rooktext.lua:15: attempt to index global 'npcHandler' (a nil value)
[27/01/2009 15:07:26] stack traceback:
[27/01/2009 15:07:26] data/npc/scripts/rooktext.lua:15: in function <data/npc/scripts/rooktext.lua:1>
function onThink() npcHandler:onThink() end
function onThink()
talk = math.random(1,100)
if talk == 1 then
doCreatureSay(getNpcCid(), "Best wands and rods in city!", TALKTYPE_YELL)
end
if talk == 50 then
doCreatureSay(getNpcCid(), "Cheapest magic equipment only here!", TALKTYPE_YELL)
end
npcHandler:onThink()
end
On top of the NPC you have:
Code:function onThink() npcHandler:onThink() end
No I have not npcHandlernThink() in first line 0.o :/