ola a todos, como o titulo diz eu preciso de um npc que me deixe continuar somente se eu tiver outra missão completa.
por exemplo que eu posso fazer esta missão somente se eu tiver a outra missão:
if(msgcontains(msg, "i bring a wounded soldier") and getPlayerStorageValue(cid, 204) < 1) then
npcHandler:say("Damn, what happened?.... And what happened to the rest of the group?.", cid)
npcHandler.topic[cid] = 1
elseif(msgcontains(msg, "Some dead and some captured")) then
if(npcHandler.topic[cid] == 1) then
npcHandler:say("This is serious, we will attend to the soldier while you talk to the commander and explain what happened.", cid)
npcHandler.topic[cid] = 0
if(getPlayerStorageValue(cid, 204) < 1) then
setPlayerStorageValue(cid, 204, 1)
Player(cid):setStorageValue(12116, Player(cid):getStorageValue(12116) + 1) -- The Inquisition Questlog- "Mission 3: Desperate Moments"
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_HOLYAREA)
tendo esta missão completa pode pedir a acima:
elseif(msgcontains(msg, "ready")) then
if(player:getStorageValue(200) == 5) then
npcHandler:say("Are you ready for the last mission?, if so ask me for the next {mission}. ", cid)
npcHandler.topic[cid] = 0
player:setStorageValue(200, 6)
player:setStorageValue(12115, 2) -- The Inquisition Questlog- "Mission 3: Desperate Moments"
player:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE)
elseif(player:getStorageValue(200) == 7) then
npcHandler:say("Let's do it ", cid)
npcHandler.topic[cid] = 0
player:setStorageValue(200, 10)
player:setStorageValue(12115, 3) -- The Inquisition Questlog- "Mission 3: Desperate Moments"
for x = 1, 1 do
m = doSummonCreature("Helpless Orc", getThingPos(cid))
doConvinceCreature(cid, m)
player:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE)
end