I have a test server npc that is giving EXPERIENCE. But if you say anything, it keeps giving you experience, to infinity. I wanted to put him up to 350 Can anybody help me?
I would like some help in the action of excretion of the silencer in the roshamuul piles, if anyone is ready. I have nothing.
thanks and happy new year!
Code:
--EXODUM OTS
--BY SZAFI (Old Sessam)
--http://tibia.net.pl/members/156613-Old-Sessam
--http://otland.net/members/szafi.32524/
--skype: sessam5
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)
local talkState = {}
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 creatureSayCallback(cid, type, msg)
if(not npcHandler:isFocused(cid)) then
return false
end
--DAWANIE 10 CRYSTAL COINS
local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid
if msgcontains(msg, "money") then
selfSay("Do you want 100 crystal coins?", cid)
talkState[talkUser] = 1
elseif msgcontains(msg, "yes") and talkState[talkUser] == 1 then
selfSay("Here you are.", cid)
doPlayerAddItem(cid, 2160, 100)
talkState[talkUser] = 0
if(not npcHandler:isFocused(cid)) then
return false
end
--DAWANIE 254237300 EXPA
elseif msgcontains(msg, "experience") then
selfSay("Do you want experience?", cid)
talkState[talkUser] = 2
elseif msgcontains(msg, "yes") and talkState[talkUser] == 2 and getPlayerStorageValue(cid, 15211) == 1 then
selfSay("Sorry. Experience I can add only one time per character.", cid)
elseif
getPlayerStorageValue(cid, 15211) == -1 then
selfSay("Here you are.", cid)
doPlayerAddExp(cid, 702432300)
doCreatureSetStorage(cid, 15211, 1)
talkState[talkUser] = 0
if(not npcHandler:isFocused(cid)) then
return false
end
end
end
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())
I would like some help in the action of excretion of the silencer in the roshamuul piles, if anyone is ready. I have nothing.
thanks and happy new year!