Ir para conteúdo

Preciso De Um Script.


nikoboko

Posts Recomendados

Pessoal to precisando de um script de missao, o da quest do global da backpack do sam, tipo vc precisa entregar a ele a backpack,

ae ele te da storage pra fala com kroox em kazzordon ae vc vai la, fala com ele e ele te da storage pra abrir a porta da quest..

É ISSO, agradeço desde já.

Link para o comentário
Compartilhar em outros sites

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

Link para o comentário
Compartilhar em outros sites


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 

local talkUser = NPCHANDLER_CONVbehavior == CONVERSATION_DEFAULT and 0 or cid 


local storage,storage1 = 60133,60134

if(msgcontains(msg, 'sam send me') or msgcontains(msg, 'SAM SEND ME')) then
if getPlayerStorageValue(cid,storage) >= 1 and getPlayerStorageValue(cid,storage1) <= 0 then 
selfSay('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,storage1, 1)
selfSay('The problem is, some giant spiders made the tunnels where the storage is their new home. Goo!', cid) 
talkState[talkUser] = 0 
else 
selfSay('Are trying to fool me that memories are not all pleasant', cid) 
talkState[talkUser] = 0 
end
elseif msg == "no" and talkState[talkUser] >= 1 then 
selfSay("I you thank, too", cid) 
talkState[talkUser] = 0 
npcHandler:releaseFocus(cid) 
end 
return TRUE 
end 


npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) 
npcHandler:addModule(FocusModule:new())

Link para o comentário
Compartilhar em outros sites

×
×
  • Criar Novo...