• 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 delivery storage Assassin outifit

gmstrikker

Well-Known Member
Joined
Jul 30, 2014
Messages
458
Solutions
1
Reaction score
50
Put that power will only use assassin outifit whoever has the storage quest = "40001", now really needed some help

The guy spoke hi, assassin outifit, yes

But the npc only indulged in storage for him if he had up these items:


  • 1 Flask de Warrior Sweat. [5885]

    I found this one on the internet, but this one is just time to make an item
[/LIST]
Code:
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
local outfitt = 40001
local iteem = 2160
local quatidade = 1
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
local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT
if(msgcontains(msg, 'outfit')) then
selfSay('MSG1') -- Edite Sua Menssagem para quando o player falar *OUTFIT*
talkState[talkUser] = 1
elseif(msgcontains(msg, 'yes') and talkState[talkUser] == 1) then
if (getPlayerStorageValue(cid,outfitt) > 0) then
selfSay('MSG2') -- Eite a menssagem , que se o player tentar trocar de novo , o NPC avisar que ele já fez essa missao
else
if(doPlayerRemoveItem(cid,iteem,quantidade)) then 
setPlayerStorageValue(cid,outfitt,1)
selfSay('MSG3') -- Edite a menssagem de agradescimento
else
selfSay('MSG4') -- Edite a menssagem que o player nao tem x item
end
end
return true
end
end
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())
 

Similar threads

Back
Top