• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Solved Adura npc error

Szafi

www.rookwar.pl
Joined
Mar 2, 2009
Messages
165
Reaction score
10
Location
Poland
TFS 0.4

What is wrong?

data/npc/scripts/robbert.lua:7: function arguments expected near ':'

Code:
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)

local Topic, Price = {}, {}

function onCreatureAppear(cid)    npcHandler:eek:nCreatureAppear(cid) end
function onCreatureDisappear(cid) npcHandler:eek:nCreatureDisappear(cid) end
function onCreatureSay(cid, type, msg) npcHandler:eek:nCreatureSay(cid, type, msg) end
function onThink() npcHandler:eek:nThink() end

function greetCallback(cid)
if getPlayerSex(cid) == 0 then
npcHandler:setMessage(MESSAGE_GREET, "Oh, hello |PLAYERNAME|, your hair looks great! Who did it for you?")
Topic[cid] = 1
else
npcHandler:setMessage(MESSAGE_GREET, "Oh, hello, handsome! It's a pleasure to meet you |PLAYERNAME|.")
Topic[cid] = nil
end
Price[cid] = nil
return true
end

function creatureSayCallback(cid, type, msg)
if not npcHandler:isFocused(cid) then
return false
elseif Topic[cid] == 1 then
npcHandler:say("I would never have guessed that.", cid)
Topic[cid] = nil
elseif Topic[cid] == 2 then
if doPlayerRemoveMoney(cid, Price[cid]) then
npcHandler:say("Oh, sorry, I was distracted, what did you say?", cid)
else
npcHandler:say("Oh, I just remember I have some work to do, sorry. Bye!", cid)
npcHandler:releaseFocus(cid)
end
Topic[cid] = nil
Price[cid] = nil
elseif Topic[cid] == 3 and doPlayerRemoveItem(cid, 2036, 1) then
npcHandler:say("Take some time to talk to me!", cid)
Topic[cid] = nil
elseif Topic[cid] == 4 and (msgcontains(msg, "spouse") or msgcontains(msg, "girlfriend")) then
npcHandler:say("Well ... I might have known him a little .. but there was nothing serious.", cid)
Topic[cid] = 5
elseif Topic[cid] == 5 and msgcontains(msg, "fruit") then
npcHandler:say("I remember that grapes were his favourites. He was almost addicted to them.", cid)
Topic[cid] = nil
elseif msgcontains(msg, "how") and msgcontains(msg, "are") and msgcontains(msg, "you") then
npcHandler:say("Thank you very much. How kind of you to care about me. I am fine, thank you.", cid)
Topic[cid] = 2
Price[cid] = 5
elseif msgcontains(msg, "sell") then
npcHandler:say("Sorry, I have nothing to sell.", cid)
Topic[cid] = 2
Price[cid] = 5
elseif msgcontains(msg, "job") then
npcHandler:say("I do some work now and then. Nothing unusual, though.", cid)
Topic[cid] = 2
Price[cid] = 5
elseif msgcontains(msg, "news") then
npcHandler:say("You should ask Oswald about news. He loves them.", cid)
elseif msgcontains(msg, "name") then
if getPlayerSex(cid) == 0 then
npcHandler:say("I am Aruda.", cid)
else
npcHandler:say("I am a little sad, that you seem to have forgotten me, handsome. I am Aruda.", cid)
end
Topic[cid] = 2
Price[cid] = 5
elseif msgcontains(msg, "aruda") then
if getPlayerSex(cid) == 0 then
npcHandler:say("Yes, that's me!", cid)
else
npcHandler:say("Oh, I like it, how you say my name.", cid)
end
Topic[cid] = 2
Price[cid] = 5
elseif msgcontains(msg, "time") then
npcHandler:say("Please don't be so rude to look for the time if you are talking to me.", cid)
Topic[cid] = 3
elseif msgcontains(msg, "help") then
npcHandler:say("I am deeply sorry, I can't help you.", cid)
Topic[cid] = 2
Price[cid] = 5
elseif msgcontains(msg, "monster") or msgcontains(msg, "dungeon") then
npcHandler:say("UH! What a terrifying topic. Please let us speak about something more pleasant, I am a weak and small woman after all.", cid)
Topic[cid] = 2
Price[cid] = 5
elseif msgcontains(msg, "sewer") then
npcHandler:say("What gives you the impression, I am the kind of women, you find in sewers?", cid)
Topic[cid] = 2
Price[cid] = 5
elseif msgcontains(msg, "god") then
npcHandler:say("You should ask about that in one of the temples.", cid)
Topic[cid] = 2
Price[cid] = 5
elseif msgcontains(msg, "king") then
npcHandler:say("The king, that lives in this fascinating castle? I think he does look kind of cute in his luxurious robes, doesn't he?", cid)
Topic[cid] = 2
Price[cid] = 10
elseif msgcontains(msg, "sam") then
if getPlayerSex(cid) == 0 then
npcHandler:say("He is soooo strong! What muscles! What a body! Did you ask him for a date?", cid)
else
npcHandler:say("He is soooo strong! What muscles! What a body! On the other hand, compared to you he looks quite puny.", cid)
end
Topic[cid] = 2
Price[cid] = 5
elseif msgcontains(msg, "benjamin") then
npcHandler:say("He is a little simple minded but always nice and well dressed.", cid)
Topic[cid] = 2
Price[cid] = 5
elseif msgcontains(msg, "gorn") then
npcHandler:say("He should really sell some stylish gowns or something like that. We Tibians never get some clothing of the latest fashion. It's a shame.", cid)
Topic[cid] = 2
Price[cid] = 5
elseif msgcontains(msg, "quentin") then
npcHandler:say("I don't understand this lonely monks. I love company too much to become one. He, he, he!", cid)
Topic[cid] = 2
Price[cid] = 5
elseif msgcontains(msg, "bozo") then
npcHandler:say("Oh, isn't he funny? I could listen to him the whole day.", cid)
Topic[cid] = 2
Price[cid] = 5
elseif msgcontains(msg, "oswald") then
npcHandler:say("As far as I know, he is working in the castle.", cid)
Topic[cid] = 2
Price[cid] = 5
elseif msgcontains(msg, "rumour") or msgcontains(msg, "rumor") or msgcontains(msg, "gossip") then
npcHandler:say("I am a little shy and so don't hear many rumors.", cid)
Topic[cid] = 2
Price[cid] = 5
elseif msgcontains(msg, "fuck") then
if getPlayerSex(cid) == 0 then
npcHandler:say("Uhm, let us change the subject, please.", cid)
else
npcHandler:say("Oh, you little devil, stop talking like that! <blush>", cid)
end
Topic[cid] = 2
Price[cid] = 20
elseif msgcontains(msg, "kiss") and getPlayerSex(cid) == 1 then
npcHandler:say("Oh, you little devil, stop talking like that! <blush>", cid)
Topic[cid] = 2
Price[cid] = 20
elseif msgcontains(msg, "weapon") then
npcHandler:say("I know so little about weapons, so tell me something about weapons, please.", cid)
Topic[cid] = 2
Price[cid] = 5
elseif msgcontains(msg, "magic") then
npcHandler:say("I believe that love is stronger then all magic, don't you agree?", cid)
Topic[cid] = 2
Price[cid] = 5
elseif msgcontains(msg, "thief") or msgcontains(msg, "theft") then
npcHandler:say("Oh, sorry, I have to hurry, bye!", cid)
Topic[cid] = nil
Price[cid] = nil
npcHandler:releaseFocus(cid)
elseif msgcontains(msg, "tibia") then
npcHandler:say("I would like to visit the beach more often, but I guess it's too dangerous.", cid)
Topic[cid] = 2
Price[cid] = 5
elseif msgcontains(msg, "castle") then
npcHandler:say("I love this castle! It's so beautiful.", cid)
Topic[cid] = 2
Price[cid] = 5
elseif msgcontains(msg, "muriel") then
npcHandler:say("Powerful sorcerers frighten me a little.", cid)
Topic[cid] = 2
Price[cid] = 5
elseif msgcontains(msg, "elane") then
npcHandler:say("I personally think it's inappropriate for a woman to become a warrior, what do you think about that?", cid)
Topic[cid] = 2
Price[cid] = 5
elseif msgcontains(msg, "marvik") then
npcHandler:say("Druids seldom visit a town, what do you know about druids?", cid)
Topic[cid] = 2
Price[cid] = 5
elseif msgcontains(msg, "gregor") then
npcHandler:say("I like brave fighters like him.", cid)
Topic[cid] = 2
Price[cid] = 5
elseif msgcontains(msg, "noodles") then
npcHandler:say("Oh, he is sooooo cute!", cid)
Topic[cid] = 2
Price[cid] = 5
elseif msgcontains(msg, "dog") or msgcontains(msg, "poodle") then
npcHandler:say("I like dogs, the little ones at least. Do you like dogs, too?", cid)
Topic[cid] = 2
Price[cid] = 5
elseif msgcontains(msg, "excalibug") then
npcHandler:say("Oh, I am just a girl and know nothing about magic swords and such things.", cid)
Topic[cid] = 2
Price[cid] = 10
elseif msgcontains(msg, "partos") then
npcHandler:say("I ... don't know someone named like that.", cid)
Topic[cid] = 4
Price[cid] = nil
elseif msgcontains(msg, "yenny") then
npcHandler:say("Yenny? I know no Yenny, nor have I ever used that name! You have mistook me with someone else.", cid)
Topic[cid] = nil
Price[cid] = nil
npcHandler:releaseFocus(cid)
end
return true
end
 
Last edited:
I fix (0 errors in engine)

Code:
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)

local Topic, Price = {}, {}

function onCreatureAppear(cid)                npcHandler:onCreatureAppear(cid)             end
function onCreatureDisappear(cid)             npcHandler:onCreatureDisappear(cid)         end
function onCreatureSay(cid, type, msg)         npcHandler:onCreatureSay(cid, type, msg)     end
function onThink()                             npcHandler:onThink()                         end

function greetCallback(cid)
if getPlayerSex(cid) == 0 then
npcHandler:setMessage(MESSAGE_GREET, "Oh, hello |PLAYERNAME|, your hair looks great! Who did it for you?")
Topic[cid] = 1
else
npcHandler:setMessage(MESSAGE_GREET, "Oh, hello, handsome! It's a pleasure to meet you |PLAYERNAME|.")
Topic[cid] = nil
end
Price[cid] = nil
return true
end

function creatureSayCallback(cid, type, msg)
if not npcHandler:isFocused(cid) then
return false
elseif Topic[cid] == 1 then
npcHandler:say("I would never have guessed that.", cid)
Topic[cid] = nil
elseif Topic[cid] == 2 then
if doPlayerRemoveMoney(cid, Price[cid]) then
npcHandler:say("Oh, sorry, I was distracted, what did you say?", cid)
else
npcHandler:say("Oh, I just remember I have some work to do, sorry. Bye!", cid)
npcHandler:releaseFocus(cid)
end
Topic[cid] = nil
Price[cid] = nil
elseif Topic[cid] == 3 and doPlayerRemoveItem(cid, 2036, 1) then
npcHandler:say("Take some time to talk to me!", cid)
Topic[cid] = nil
elseif Topic[cid] == 4 and (msgcontains(msg, "spouse") or msgcontains(msg, "girlfriend")) then
npcHandler:say("Well ... I might have known him a little .. but there was nothing serious.", cid)
Topic[cid] = 5
elseif Topic[cid] == 5 and msgcontains(msg, "fruit") then
npcHandler:say("I remember that grapes were his favourites. He was almost addicted to them.", cid)
Topic[cid] = nil
elseif msgcontains(msg, "how") and msgcontains(msg, "are") and msgcontains(msg, "you") then
npcHandler:say("Thank you very much. How kind of you to care about me. I am fine, thank you.", cid)
Topic[cid] = 2
Price[cid] = 5
elseif msgcontains(msg, "sell") then
npcHandler:say("Sorry, I have nothing to sell.", cid)
Topic[cid] = 2
Price[cid] = 5
elseif msgcontains(msg, "job") then
npcHandler:say("I do some work now and then. Nothing unusual, though.", cid)
Topic[cid] = 2
Price[cid] = 5
elseif msgcontains(msg, "news") then
npcHandler:say("You should ask Oswald about news. He loves them.", cid)
elseif msgcontains(msg, "name") then
if getPlayerSex(cid) == 0 then
npcHandler:say("I am Aruda.", cid)
else
npcHandler:say("I am a little sad, that you seem to have forgotten me, handsome. I am Aruda.", cid)
end
Topic[cid] = 2
Price[cid] = 5
elseif msgcontains(msg, "aruda") then
if getPlayerSex(cid) == 0 then
npcHandler:say("Yes, that's me!", cid)
else
npcHandler:say("Oh, I like it, how you say my name.", cid)
end
Topic[cid] = 2
Price[cid] = 5
elseif msgcontains(msg, "time") then
npcHandler:say("Please don't be so rude to look for the time if you are talking to me.", cid)
Topic[cid] = 3
elseif msgcontains(msg, "help") then
npcHandler:say("I am deeply sorry, I can't help you.", cid)
Topic[cid] = 2
Price[cid] = 5
elseif msgcontains(msg, "monster") or msgcontains(msg, "dungeon") then
npcHandler:say("UH! What a terrifying topic. Please let us speak about something more pleasant, I am a weak and small woman after all.", cid)
Topic[cid] = 2
Price[cid] = 5
elseif msgcontains(msg, "sewer") then
npcHandler:say("What gives you the impression, I am the kind of women, you find in sewers?", cid)
Topic[cid] = 2
Price[cid] = 5
elseif msgcontains(msg, "god") then
npcHandler:say("You should ask about that in one of the temples.", cid)
Topic[cid] = 2
Price[cid] = 5
elseif msgcontains(msg, "king") then
npcHandler:say("The king, that lives in this fascinating castle? I think he does look kind of cute in his luxurious robes, doesn't he?", cid)
Topic[cid] = 2
Price[cid] = 10
elseif msgcontains(msg, "sam") then
if getPlayerSex(cid) == 0 then
npcHandler:say("He is soooo strong! What muscles! What a body! Did you ask him for a date?", cid)
else
npcHandler:say("He is soooo strong! What muscles! What a body! On the other hand, compared to you he looks quite puny.", cid)
end
Topic[cid] = 2
Price[cid] = 5
elseif msgcontains(msg, "benjamin") then
npcHandler:say("He is a little simple minded but always nice and well dressed.", cid)
Topic[cid] = 2
Price[cid] = 5
elseif msgcontains(msg, "gorn") then
npcHandler:say("He should really sell some stylish gowns or something like that. We Tibians never get some clothing of the latest fashion. It's a shame.", cid)
Topic[cid] = 2
Price[cid] = 5
elseif msgcontains(msg, "quentin") then
npcHandler:say("I don't understand this lonely monks. I love company too much to become one. He, he, he!", cid)
Topic[cid] = 2
Price[cid] = 5
elseif msgcontains(msg, "bozo") then
npcHandler:say("Oh, isn't he funny? I could listen to him the whole day.", cid)
Topic[cid] = 2
Price[cid] = 5
elseif msgcontains(msg, "oswald") then
npcHandler:say("As far as I know, he is working in the castle.", cid)
Topic[cid] = 2
Price[cid] = 5
elseif msgcontains(msg, "rumour") or msgcontains(msg, "rumor") or msgcontains(msg, "gossip") then
npcHandler:say("I am a little shy and so don't hear many rumors.", cid)
Topic[cid] = 2
Price[cid] = 5
elseif msgcontains(msg, "fuck") then
if getPlayerSex(cid) == 0 then
npcHandler:say("Uhm, let us change the subject, please.", cid)
else
npcHandler:say("Oh, you little devil, stop talking like that! <blush>", cid)
end
Topic[cid] = 2
Price[cid] = 20
elseif msgcontains(msg, "kiss") and getPlayerSex(cid) == 1 then
npcHandler:say("Oh, you little devil, stop talking like that! <blush>", cid)
Topic[cid] = 2
Price[cid] = 20
elseif msgcontains(msg, "weapon") then
npcHandler:say("I know so little about weapons, so tell me something about weapons, please.", cid)
Topic[cid] = 2
Price[cid] = 5
elseif msgcontains(msg, "magic") then
npcHandler:say("I believe that love is stronger then all magic, don't you agree?", cid)
Topic[cid] = 2
Price[cid] = 5
elseif msgcontains(msg, "thief") or msgcontains(msg, "theft") then
npcHandler:say("Oh, sorry, I have to hurry, bye!", cid)
Topic[cid] = nil
Price[cid] = nil
npcHandler:releaseFocus(cid)
elseif msgcontains(msg, "tibia") then
npcHandler:say("I would like to visit the beach more often, but I guess it's too dangerous.", cid)
Topic[cid] = 2
Price[cid] = 5
elseif msgcontains(msg, "castle") then
npcHandler:say("I love this castle! It's so beautiful.", cid)
Topic[cid] = 2
Price[cid] = 5
elseif msgcontains(msg, "muriel") then
npcHandler:say("Powerful sorcerers frighten me a little.", cid)
Topic[cid] = 2
Price[cid] = 5
elseif msgcontains(msg, "elane") then
npcHandler:say("I personally think it's inappropriate for a woman to become a warrior, what do you think about that?", cid)
Topic[cid] = 2
Price[cid] = 5
elseif msgcontains(msg, "marvik") then
npcHandler:say("Druids seldom visit a town, what do you know about druids?", cid)
Topic[cid] = 2
Price[cid] = 5
elseif msgcontains(msg, "gregor") then
npcHandler:say("I like brave fighters like him.", cid)
Topic[cid] = 2
Price[cid] = 5
elseif msgcontains(msg, "noodles") then
npcHandler:say("Oh, he is sooooo cute!", cid)
Topic[cid] = 2
Price[cid] = 5
elseif msgcontains(msg, "dog") or msgcontains(msg, "poodle") then
npcHandler:say("I like dogs, the little ones at least. Do you like dogs, too?", cid)
Topic[cid] = 2
Price[cid] = 5
elseif msgcontains(msg, "excalibug") then
npcHandler:say("Oh, I am just a girl and know nothing about magic swords and such things.", cid)
Topic[cid] = 2
Price[cid] = 10
elseif msgcontains(msg, "partos") then
npcHandler:say("I ... don't know someone named like that.", cid)
Topic[cid] = 4
Price[cid] = nil
elseif msgcontains(msg, "yenny") then
npcHandler:say("Yenny? I know no Yenny, nor have I ever used that name! You have mistook me with someone else.", cid)
Topic[cid] = nil
Price[cid] = nil
npcHandler:releaseFocus(cid)
end
return true
end

Next problem, npc doesn't response "Hi"

PS: Sorry for double, too many characters
 
Missing callbacks and focusmodule (at the bottom).
Code:
npcHandler:setCallback(CALLBACK_GREET, greetCallback)
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())
 
Okey! Thanks. All worked script test on tfs 0.4

Code:
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)

local Topic, Price = {}, {}

function onCreatureAppear(cid)                npcHandler:onCreatureAppear(cid)             end
function onCreatureDisappear(cid)             npcHandler:onCreatureDisappear(cid)         end
function onCreatureSay(cid, type, msg)         npcHandler:onCreatureSay(cid, type, msg)     end
function onThink()                             npcHandler:onThink()                         end

function greetCallback(cid)
if getPlayerSex(cid) == 0 then
npcHandler:setMessage(MESSAGE_GREET, "Oh, hello |PLAYERNAME|, your hair looks great! Who did it for you?")
Topic[cid] = 1
else
npcHandler:setMessage(MESSAGE_GREET, "Oh, hello, handsome! It's a pleasure to meet you |PLAYERNAME|.")
Topic[cid] = nil
end
Price[cid] = nil
return true
end

function creatureSayCallback(cid, type, msg)
if not npcHandler:isFocused(cid) then
return false
elseif Topic[cid] == 1 then
npcHandler:say("I would never have guessed that.", cid)
Topic[cid] = nil
elseif Topic[cid] == 2 then
if doPlayerRemoveMoney(cid, Price[cid]) then
npcHandler:say("Oh, sorry, I was distracted, what did you say?", cid)
else
npcHandler:say("Oh, I just remember I have some work to do, sorry. Bye!", cid)
npcHandler:releaseFocus(cid)
end
Topic[cid] = nil
Price[cid] = nil
elseif Topic[cid] == 3 and doPlayerRemoveItem(cid, 2036, 1) then
npcHandler:say("Take some time to talk to me!", cid)
Topic[cid] = nil
elseif Topic[cid] == 4 and (msgcontains(msg, "spouse") or msgcontains(msg, "girlfriend")) then
npcHandler:say("Well ... I might have known him a little .. but there was nothing serious.", cid)
Topic[cid] = 5
elseif Topic[cid] == 5 and msgcontains(msg, "fruit") then
npcHandler:say("I remember that grapes were his favourites. He was almost addicted to them.", cid)
Topic[cid] = nil
elseif msgcontains(msg, "how") and msgcontains(msg, "are") and msgcontains(msg, "you") then
npcHandler:say("Thank you very much. How kind of you to care about me. I am fine, thank you.", cid)
Topic[cid] = 2
Price[cid] = 5
elseif msgcontains(msg, "sell") then
npcHandler:say("Sorry, I have nothing to sell.", cid)
Topic[cid] = 2
Price[cid] = 5
elseif msgcontains(msg, "job") then
npcHandler:say("I do some work now and then. Nothing unusual, though.", cid)
Topic[cid] = 2
Price[cid] = 5
elseif msgcontains(msg, "news") then
npcHandler:say("You should ask Oswald about news. He loves them.", cid)
elseif msgcontains(msg, "name") then
if getPlayerSex(cid) == 0 then
npcHandler:say("I am Aruda.", cid)
else
npcHandler:say("I am a little sad, that you seem to have forgotten me, handsome. I am Aruda.", cid)
end
Topic[cid] = 2
Price[cid] = 5
elseif msgcontains(msg, "aruda") then
if getPlayerSex(cid) == 0 then
npcHandler:say("Yes, that's me!", cid)
else
npcHandler:say("Oh, I like it, how you say my name.", cid)
end
Topic[cid] = 2
Price[cid] = 5
elseif msgcontains(msg, "time") then
npcHandler:say("Please don't be so rude to look for the time if you are talking to me.", cid)
Topic[cid] = 3
elseif msgcontains(msg, "help") then
npcHandler:say("I am deeply sorry, I can't help you.", cid)
Topic[cid] = 2
Price[cid] = 5
elseif msgcontains(msg, "monster") or msgcontains(msg, "dungeon") then
npcHandler:say("UH! What a terrifying topic. Please let us speak about something more pleasant, I am a weak and small woman after all.", cid)
Topic[cid] = 2
Price[cid] = 5
elseif msgcontains(msg, "sewer") then
npcHandler:say("What gives you the impression, I am the kind of women, you find in sewers?", cid)
Topic[cid] = 2
Price[cid] = 5
elseif msgcontains(msg, "god") then
npcHandler:say("You should ask about that in one of the temples.", cid)
Topic[cid] = 2
Price[cid] = 5
elseif msgcontains(msg, "king") then
npcHandler:say("The king, that lives in this fascinating castle? I think he does look kind of cute in his luxurious robes, doesn't he?", cid)
Topic[cid] = 2
Price[cid] = 10
elseif msgcontains(msg, "sam") then
if getPlayerSex(cid) == 0 then
npcHandler:say("He is soooo strong! What muscles! What a body! Did you ask him for a date?", cid)
else
npcHandler:say("He is soooo strong! What muscles! What a body! On the other hand, compared to you he looks quite puny.", cid)
end
Topic[cid] = 2
Price[cid] = 5
elseif msgcontains(msg, "benjamin") then
npcHandler:say("He is a little simple minded but always nice and well dressed.", cid)
Topic[cid] = 2
Price[cid] = 5
elseif msgcontains(msg, "gorn") then
npcHandler:say("He should really sell some stylish gowns or something like that. We Tibians never get some clothing of the latest fashion. It's a shame.", cid)
Topic[cid] = 2
Price[cid] = 5
elseif msgcontains(msg, "quentin") then
npcHandler:say("I don't understand this lonely monks. I love company too much to become one. He, he, he!", cid)
Topic[cid] = 2
Price[cid] = 5
elseif msgcontains(msg, "bozo") then
npcHandler:say("Oh, isn't he funny? I could listen to him the whole day.", cid)
Topic[cid] = 2
Price[cid] = 5
elseif msgcontains(msg, "oswald") then
npcHandler:say("As far as I know, he is working in the castle.", cid)
Topic[cid] = 2
Price[cid] = 5
elseif msgcontains(msg, "rumour") or msgcontains(msg, "rumor") or msgcontains(msg, "gossip") then
npcHandler:say("I am a little shy and so don't hear many rumors.", cid)
Topic[cid] = 2
Price[cid] = 5
elseif msgcontains(msg, "fuck") then
if getPlayerSex(cid) == 0 then
npcHandler:say("Uhm, let us change the subject, please.", cid)
else
npcHandler:say("Oh, you little devil, stop talking like that! <blush>", cid)
end
Topic[cid] = 2
Price[cid] = 20
elseif msgcontains(msg, "kiss") and getPlayerSex(cid) == 1 then
npcHandler:say("Oh, you little devil, stop talking like that! <blush>", cid)
Topic[cid] = 2
Price[cid] = 20
elseif msgcontains(msg, "weapon") then
npcHandler:say("I know so little about weapons, so tell me something about weapons, please.", cid)
Topic[cid] = 2
Price[cid] = 5
elseif msgcontains(msg, "magic") then
npcHandler:say("I believe that love is stronger then all magic, don't you agree?", cid)
Topic[cid] = 2
Price[cid] = 5
elseif msgcontains(msg, "thief") or msgcontains(msg, "theft") then
npcHandler:say("Oh, sorry, I have to hurry, bye!", cid)
Topic[cid] = nil
Price[cid] = nil
npcHandler:releaseFocus(cid)
elseif msgcontains(msg, "tibia") then
npcHandler:say("I would like to visit the beach more often, but I guess it's too dangerous.", cid)
Topic[cid] = 2
Price[cid] = 5
elseif msgcontains(msg, "castle") then
npcHandler:say("I love this castle! It's so beautiful.", cid)
Topic[cid] = 2
Price[cid] = 5
elseif msgcontains(msg, "muriel") then
npcHandler:say("Powerful sorcerers frighten me a little.", cid)
Topic[cid] = 2
Price[cid] = 5
elseif msgcontains(msg, "elane") then
npcHandler:say("I personally think it's inappropriate for a woman to become a warrior, what do you think about that?", cid)
Topic[cid] = 2
Price[cid] = 5
elseif msgcontains(msg, "marvik") then
npcHandler:say("Druids seldom visit a town, what do you know about druids?", cid)
Topic[cid] = 2
Price[cid] = 5
elseif msgcontains(msg, "gregor") then
npcHandler:say("I like brave fighters like him.", cid)
Topic[cid] = 2
Price[cid] = 5
elseif msgcontains(msg, "noodles") then
npcHandler:say("Oh, he is sooooo cute!", cid)
Topic[cid] = 2
Price[cid] = 5
elseif msgcontains(msg, "dog") or msgcontains(msg, "poodle") then
npcHandler:say("I like dogs, the little ones at least. Do you like dogs, too?", cid)
Topic[cid] = 2
Price[cid] = 5
elseif msgcontains(msg, "excalibug") then
npcHandler:say("Oh, I am just a girl and know nothing about magic swords and such things.", cid)
Topic[cid] = 2
Price[cid] = 10
elseif msgcontains(msg, "partos") then
npcHandler:say("I ... don't know someone named like that.", cid)
Topic[cid] = 4
Price[cid] = nil
elseif msgcontains(msg, "yenny") then
npcHandler:say("Yenny? I know no Yenny, nor have I ever used that name! You have mistook me with someone else.", cid)
Topic[cid] = nil
Price[cid] = nil
npcHandler:releaseFocus(cid)
end
return true
end

npcHandler:setMessage(MESSAGE_WALKAWAY, "I hope to see you soon.")
npcHandler:setMessage(MESSAGE_FAREWELL, "Good bye, |PLAYERNAME|. I really hope we'll talk again soon.")

npcHandler:setCallback(CALLBACK_GREET, greetCallback)
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())
 
Back
Top