Bom vamos lá primeiro crie um script chamado quest.lua nele coloque :
ISSO NA PASTA NPC
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
npcHandler:setMessage(MESSAGE_GREET, "Can You Help Me??")
function creatureSayCallback(cid, type, msg)
if(not npcHandler:isFocused(cid)) then
return false
end
local talkUser = NPCHANDLER_CONVbehavior == CONVERSATION_DEFAULT and 0 or cid
-- Conversa Jogador/NPC
if(msgcontains(msg, 'yes')) and getPlayerItemCount(cid,5879)>=30 then
doPlayerRemoveItem(cid,5879,30)
doPlayerAddItem(cid,2504,1)
selfSay('Thank You!',cid)
talkState[talkUser] = 1
else
selfSay('You dont have items!',cid)
talkState[talkUser] = 1
end
return TRUE
end
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())
Agora crie um npc.xml chamado quest e nele coloque:
<?xml version="1.0" encoding="UTF-8"?> <npc name="Quest Guy" script="data/npc/scripts/quest.lua" walkinterval="2000" floorchange="0"> <health now="100" max="100"/> <look type="128" head="85" body="126" legs="113" feet="0" addons="3" corpse="2212"/> <parameters> </parameters> </npc>
AJUDEI??REP+ POR FAVOR



info
Grupo: Campones
Registrado: 30/07/11
Posts: 4
Reputação: 0
Alguem poderia me fazer um scrip de NPC/Quest, com as seguintes falas:
Player:Hi
NPC: Can you help me?
Player: Yes/No
NPC(Se falou Yes):Do you have 30 Giants Spider Silks?
Player: Yes/No
NPC(Se o Player tiver os 30 itens): Thank you.
E dai quando o Jogador entregasse as 30 GSS ele ganhasse uma Dwarven Legs
ID da GSS: 5879
ID da Dwarven Legs: 2504
Agradeço desde já, e caso me ajudem dou REP+