Intao vodkart eu eu manjo um pouco de scripts e consegui faze o sam, e deu certo:
---------------------------------------------------------------------------------------------
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)
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 SamBackpack(cid, message, keywords, parameters, node)
if(not npcHandler:isFocused(cid)) then
return false
end
if getPlayerStorageValue(cid,60133) == -1 then
if getPlayerItemCount(cid,3960) >= 1 then
if doPlayerRemoveItem(cid,3960,1) then
npcHandler:say('Thank you very much! This brings back good old memories! Please, as a reward, travel to Kazordoon and ask my old friend Kroox to provide you a special dwarven armor.', cid)
setPlayerStorageValue(cid,60133, 1)
npcHandler:say('I will mail him about you immediately. Just tell him, his old buddy sam is sending you.', cid)
else
npcHandler:say('Are trying to fool me that memories are not all pleasant.')
end
else
npcHandler:say('You already give me backpack.')
end
end
end
node3 = keywordHandler:addKeyword({'old backpack'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I dont belive. Do you have mine old backpack with you?'})
node3:addChildKeyword({'yes'}, SamBackpack, {})
node3:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Alright then. Come back when you got all neccessary items.', reset = true})
npcHandler:addModule(FocusModule:new())
MAS O KROXX EU NAO CONSIGO, DA UM ERRO, VE SE CONSEGUE CONCERTA PRA MIM?!!TA ASSIM:
---------------------------------------------------------------------------------------------
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)
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 KrooxArmor(cid, message, keywords, parameters, node)
if(not npcHandler:isFocused(cid)) then
return false
end
if getPlayerStorageValue(cid,60133) == 1 and getPlayerStorageValue(cid,60134) == -1 then
npcHandler:say('Oh, so its you, he wrote me about? Sadly I have no dwarven armor in stock. But I give you the permission to retrive one from the mines.', cid)
setPlayerStorageValue(cid,60134, 1)
npcHandler:say('The problem is, some giant spiders made the tunnels where the storage is their new home. Good luck.', cid)
else
npcHandler:say('Are trying to fool me that memories are not all pleasant.')
end
else
npcHandler:say('i you thank, too.')
end
end
end
node3 = keywordHandler:addKeyword({'sam send me'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'You spoke with my friend sam?'})
node3:addChildKeyword({'yes'}, KrooxArmor, {})
node3:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Alright then. Come back when you have spoken to sam.', reset = true})
npcHandler:addModule(FocusModule:new())
Te Agradeço ja. vlw ;D