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:
The guy spoke hi, assassin outifit, yes
But the npc only indulged in storage for him if he had up these items:
- 30 Bonelord Eyes. [id: 5898]
- 10 Red Dragon Scales. [id: 5882]
- 30 Lizard Scales. [5881]
- 20 Fish Fins. [5895]
- 20 Vampire Dust.[5905]
- 10 Demon Dust. [5906]
- 1 Flask de Warrior Sweat. [5885]
I found this one on the internet, but this one is just time to make an item
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())