• 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!

Lua npc testserver and silencer excretion

skovroski

New Member
Joined
Dec 23, 2019
Messages
29
Reaction score
3
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?

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!
 
Solution
E
try this one:
try this one:
 
Solution
try this one:
Thanks broo! u have the another script for silencer?
 
what should it do?

Need actions to use silencer excretion in altar, and sumoon the Guzzlemaw.
this is for mawhawk raid.



Silencer_bosta.png
120px-Altar_limpo.png
Altar_usado.png
 
Back
Top