Akuji
New Member
- Joined
- Feb 9, 2008
- Messages
- 13
- Reaction score
- 0
Hey
First of all i am using the Dragonball OT 8.0 Sql (TDB v.0.5)
I have a big problem with a boat npc from my 8.0 OT
today i tryed more then 30 boat npc scripts (all from here and otfans.net) but none of the works correctly
the most npc's only take the money and don't teleport me (the teleport position is correct)
If i say yes to the npc comes this error in my console
"data/npc/scripts/akuji.luanCreatureSay attempt to index a number value"
This is my script:
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)
-- OTServ event handling functions start
function onCreatureAppear(cid) npcHandlernCreatureAppear(cid) end
function onCreatureDisappear(cid) npcHandlernCreatureDisappear(cid) end
function onCreatureSay(cid, type, msg) npcHandlernCreatureSay(cid, type, msg) end
function onThink() npcHandlernThink() end
-- OTServ event handling functions end
function creatureSayCallback(cid, type, msg)
-- Place all your code in here. Remember that hi, bye and all that stuff is already handled by the npcsystem, so you do not have to take care of that yourself.
if(npcHandler.focus ~= cid) then
return false
end
if msgcontains(msg, 'hell') then
if pay(cid,50) then
travel(cid, 1020, 1122, 7)
selfSay('Let\'s go!')
focus = 0
talk_start = 0
else
selfSay('Sorry, you don\'t have enough money.')
end
elseif msgcontains(msg, 'no') and (talk_state >= 1 and talk_state <= 34) then
selfSay('Ok than.')
talk_state = 0
end
-- Place all your code in here. Remember that hi, bye and all that stuff is already handled by the npcsystem, so you do not have to take care of that yourself.
return true
end
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())
Hope somebody can help me^_^
--------------
Akuji
First of all i am using the Dragonball OT 8.0 Sql (TDB v.0.5)
I have a big problem with a boat npc from my 8.0 OT
today i tryed more then 30 boat npc scripts (all from here and otfans.net) but none of the works correctly
the most npc's only take the money and don't teleport me (the teleport position is correct)
If i say yes to the npc comes this error in my console
"data/npc/scripts/akuji.luanCreatureSay attempt to index a number value"
This is my script:
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)
-- OTServ event handling functions start
function onCreatureAppear(cid) npcHandlernCreatureAppear(cid) end
function onCreatureDisappear(cid) npcHandlernCreatureDisappear(cid) end
function onCreatureSay(cid, type, msg) npcHandlernCreatureSay(cid, type, msg) end
function onThink() npcHandlernThink() end
-- OTServ event handling functions end
function creatureSayCallback(cid, type, msg)
-- Place all your code in here. Remember that hi, bye and all that stuff is already handled by the npcsystem, so you do not have to take care of that yourself.
if(npcHandler.focus ~= cid) then
return false
end
if msgcontains(msg, 'hell') then
if pay(cid,50) then
travel(cid, 1020, 1122, 7)
selfSay('Let\'s go!')
focus = 0
talk_start = 0
else
selfSay('Sorry, you don\'t have enough money.')
end
elseif msgcontains(msg, 'no') and (talk_state >= 1 and talk_state <= 34) then
selfSay('Ok than.')
talk_state = 0
end
-- Place all your code in here. Remember that hi, bye and all that stuff is already handled by the npcsystem, so you do not have to take care of that yourself.
return true
end
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())
Hope somebody can help me^_^
--------------
Akuji