FE

Removedor De Frag

Por felipedorgas, 11 de ago. de 2010 em Scripts

script
18
3k
11 de agosto de 2010 às 20:45

bom, tenhu o script, +ele n ta funcionando,

 

eu queria que ele remove-se todos os frags, e skull tbm (red e black), menos a white

 

e que o item sumi-se qndo ele usa-se, e se ele usa-se sem ter frag, n sumi-se

 

function onUse(cid, item, frompos, item2, topos)
local removesCharges = "no" -- does it remove charges from rune?

local nonremskulls = -- These are the skulls it cant remove. If player has any of these, the rune wont work.
{
red = SKULL_RED,
green = SKULL_GREEN,
black = SKULL_BLACK
}

if isInArray(nonremskulls, getPlayerSkullType(cid)) then
	doPlayerSendCancel(cid,"You can't remove this type of skull.")
	doSendMagicEffect(getPlayerPosition(cid),2)
else
	db.executeQuery("UPDATE `killers` SET `unjustified` = 0 WHERE `id` IN (SELECT `kill_id` FROM `player_killers` WHERE `player_id` = " .. getPlayerGUID(cid) .. ")")
	doCreatureSetSkullType(cid,0)
	doPlayerSendTextMessage(cid,27,"Your frags have been removed.")
	doSendMagicEffect(getPlayerPosition(cid),CONST_ME_MAGIC_RED)
return TRUE
end

if(removesCharges == "no") then
	if(item.type > 1) then
		doChangeTypeItem(item.uid, item.type-1)
	else
		doRemoveItem(item.uid,1)
	return TRUE
end
end
end

 

 

e tbm queria esclareçer uma duvida sobre o

 

doPlayerRemoveItem

 

por exemplo, como fasso pro npc pegar um item, ou outro item?

 

exemplo: o npc tem q pegar uma blue robe ou uma blue legs pra dar

uma golden armor.

 

oq presciso fazer?

 

if(getPlayerItemCount(cid, 2160) >= 1) then

doPlayerRemoveItem(cid, 2160, 1)

 

 

obrigado

Editado Agosto 11 por felipedorgas

DevilMoonD
11 de agosto de 2010 às 21:15

Use Este Sistema do Doidin!

Data>Actions>Scripts crie uma pasta.lua chamada limpador e coloque isso

 

-- [( Script created by Doidin for XTibia.com )] --

function onUse(cid, item, fromPosition, item2, toPosisition)
local rskulls = {green = SKULL_GREEN, red = SKULL_RED, black = SKULL_BLACK}
if isInArray(rskulls, getPlayerSkullType(cid)) then
doPlayerSendCancel(cid,"You don't remover your frags and skulls.")
doSendMagicEffect(getPlayerPosition(cid), 2)
else
db.executeQuery("UPDATE `killers` SET `unjustified` = 0 WHERE `id` IN (SELECT `kill_id` FROM `player_killers` WHERE `player_id` = " .. getPlayerGUID(cid) .. ")")
doCreatureSetSkullType(cid, 0)
doCreatureSay(cid, "Your frags and skulls is cleaned!", 19)
doSendMagicEffect(getPlayerPosition(cid), 26)
doRemoveItem(item.uid, 1)
return TRUE
end
end

 

A Tag , nao Sei que item Voce quer ! Entao Acho que Tu Consegue Fazer , se nao consiguir fale q eu mando!

Editado Agosto 11 por DevilMoon

VodkartV
11 de agosto de 2010 às 21:31

é do npc eu prefiro assim:

 

if(getPlayerItemCount(cid, 2160) >= 1) then
if(getPlayerItemCount(cid, 2121) >= 5) then
doPlayerAddItem(cid,ID DO ITEM,QUANTIDADE) 
doPlayerRemoveItem(cid, 2160, 1)
doPlayerRemoveItem(cid, 2121, 5)
else
doPlayerSendCancel(cid, 'Você não tem o item ' .. getItemNameById(2121) ..  ' para trocar.')
end
else
doPlayerSendCancel(cid, 'Você não tem  ' .. getItemNameById(2160) ..  ' para trocar.')
end

11 de agosto de 2010 às 22:16

devilmoon,

 

tenho a tag sim, e funcionou, mais sera que vc ou o vodkart consegue faze pra quem não tiver frag,

e dar use, pra não perde o item? obrigado

 

Vodkart,

 

tentei com 3 itens (o npc pode pega 3 tipos de itens)

+ deu erro no log, tenta ver oq fiz de errado:

 

if(getPlayerItemCount(cid, 7634) >= 5) then 
if(getPlayerItemCount(cid, 7635) >= 5) then
if(getPlayerItemCount(cid, 7636) >= 5) then  
doPlayerAddItem(cid,5958,1)  
if(getPlayerItemCount(cid, 7634)
if(getPlayerItemCount(cid, 7635) 
if(getPlayerItemCount(cid, 7636)
else 
doPlayerSendCancel(cid, 'Você não tem o item ' .. getItemNameById(7634) ..  ' para trocar.') 
end 
else 
doPlayerSendCancel(cid, 'Você não tem  ' .. getItemNameById(7635) ..  ' para trocar.') 
end
else 
doPlayerSendCancel(cid, 'Você não tem  ' .. getItemNameById(7636) ..  ' para trocar.') 
end

 

se n fosse pedi mto, sera q vc podia faze um script de npc,

que vc tem q da um item pra ele, e se tiver sorte ele te da um premio,

ja vi vc fazendo script com essa função de sorteio,

se vc puder, eu agredeço mto.

Editado Agosto 11 por felipedorgas

VodkartV
11 de agosto de 2010 às 22:50

não testei

 

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 percent = 50 -- porcentagem de ganha o premio
local t = math.random(1, 100)  -- n mecha

if(msgcontains(msg, 'mission') or msgcontains(msg, 'MISSION')) then 
selfSay('olá você trouxe os items que eu pedi? {yes} ', cid) 
talkState[talkUser] = 1 
elseif msgcontains(msg, 'yes') and talkState[talkUser] == 1 then 
if(getPlayerItemCount(cid, 7634) >= 5) then  
if(getPlayerItemCount(cid, 7635) >= 5) then 
if(getPlayerItemCount(cid, 7636) >= 5) then
doPlayerRemoveItem(cid, 7634, 5) 
doPlayerRemoveItem(cid, 7635, 5)
doPlayerRemoveItem(cid, 7636, 5)  
if t >= 1 and t <= percent then
doPlayerAddItem(cid,5958,1)
selfSay('obrigado receba seu item !', cid) 
talkState[talkUser] = 0 
else 
selfSay('Você não teve sorte,não ganhou o premio', cid) 
talkState[talkUser] = 0 
end
else
selfSay('Você não tem o item ' .. getItemNameById(7636) ..  ' para trocar', cid) 
talkState[talkUser] = 0 
end
else
selfSay('Você não tem o item ' .. getItemNameById(7635) ..  ' para trocar', cid) 
talkState[talkUser] = 0 
end
else
selfSay('Você não tem o item ' .. getItemNameById(7634) ..  ' para trocar', cid) 
talkState[talkUser] = 0 
end
elseif msg == "no" and talkState[talkUser] == 1 then 
selfSay("Then not", cid) 
talkState[talkUser] = 0 
npcHandler:releaseFocus(cid) 
end 
return TRUE 
end 


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

Editado Agosto 11 por Vodkart

11 de agosto de 2010 às 23:34

então, ele ta pedindo todos os itens, tem q ser só o que o player tem na bp

 

tem q ser tpw assim:

 

doPlayerRemoveItem(cid, 7634, 5)

or

doPlayerRemoveItem(cid, 7635, 5)

or

doPlayerRemoveItem(cid, 7636, 5)

 

ja tentei bota "or" + n funfa SAOSKOASKSOAS :P:

 

obrigado desde de já.

joaohdJ
12 de agosto de 2010 às 07:35

Nussa, não achei jeito melhor de fazer (pelo menos não nas condições em q me encontro, sonolento):

 

if (not getPlayerItemCount(cid, 7634) >= 1) and (not getPlayerItemCount(cid, 7635) >= 1 then
doPlayerSendCancel(cid, "Você não tem nenhum dos itens.")
elseif (not getPlayerItemCount(cid, 7634) >= 1) and (getPlayerItemCount(cid, 7635) >= 1) then
doPlayerRemoveItem(cid, 7635, 1)
doPlayerSendCancel(cid, "Você tem um dos itens pedidos e este foi removido.")
elseif (getPlayerItemCount(cid, 7634) >= 1) and (not getPlayerItemCount(cid, 7635) >= 1) then
doPlayerRemoveItem(cid, 7634, 1)
doPlayerSendCancel(cid, "Você tem um dos itens pedidos e este foi removido.")
elseif (getPlayerItemCount(cid, 7634) >= 1) and (getPlayerItemCount(cid, 7635) >= 1) then
doPlayerRemoveItem(cid, math.random(7634,7635), 1)
doPlayerSendCancel(cid, "Você tinha ambos os itens e um deles foi removido.")

 

 

Tenta ae.

 

 

flw

12 de agosto de 2010 às 09:26

tentei juntar os 2 scripts mais deu erro no executavel,

alguem pode faze esse pequeno favor? :winksmiley02:

 

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 percent = 50 -- porcentagem de ganha o premio 
local t = math.random(1, 100)  -- n mecha 

if(msgcontains(msg, 'mission') or msgcontains(msg, 'MISSION')) then  
selfSay('olá você trouxe os items que eu pedi? {yes} ', cid)  
talkState[talkUser] = 1  
elseif msgcontains(msg, 'yes') and talkState[talkUser] == 1 then  
if (not getPlayerItemCount(cid, 7634) >= 1) and (not getPlayerItemCount(cid, 7635) >= 1 then 
       doPlayerSendCancel(cid, "Você não tem nenhum dos itens.") 
elseif (not getPlayerItemCount(cid, 7634) >= 1) and (getPlayerItemCount(cid, 7635) >= 1) then 
       doPlayerRemoveItem(cid, 7635, 1) 
       doPlayerSendCancel(cid, "Você tem um dos itens pedidos e este foi removido.") 
elseif (getPlayerItemCount(cid, 7634) >= 1) and (not getPlayerItemCount(cid, 7635) >= 1) then 
       doPlayerRemoveItem(cid, 7634, 1) 
       doPlayerSendCancel(cid, "Você tem um dos itens pedidos e este foi removido.") 
elseif (getPlayerItemCount(cid, 7634) >= 1) and (getPlayerItemCount(cid, 7635) >= 1) then 
       doPlayerRemoveItem(cid, math.random(7634,7635), 1) 
       doPlayerSendCancel(cid, "Você tinha ambos os itens e um deles foi removido.")   
if t >= 1 and t <= percent then 
doPlayerAddItem(cid,5958,1) 
selfSay('obrigado receba seu item !', cid)  
talkState[talkUser] = 0  
else  
selfSay('Você não teve sorte,não ganhou o premio', cid)  
talkState[talkUser] = 0  
end 
else  
talkState[talkUser] = 0  
end 
elseif msg == "no" and talkState[talkUser] == 1 then  
selfSay("Then not", cid)  
talkState[talkUser] = 0  
npcHandler:releaseFocus(cid)  
end  
return TRUE  
end  


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

VodkartV
12 de agosto de 2010 às 12:02

fiz um usando for

 

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 percent = 1 -- porcentagem de ganha o premio 
local t = math.random(1, 100)  -- n mecha 
local items = {7634, 7635, 7636} 


if(msgcontains(msg, 'mission') or msgcontains(msg, 'MISSION')) then  
selfSay('olá você trouxe os items que eu pedi? {yes} ', cid)  
talkState[talkUser] = 1 
elseif msgcontains(msg, 'yes') and talkState[talkUser] == 1 then  
for n = 1, #items do
if (doPlayerRemoveItem(cid,items[n],5) == TRUE) then
if t >= 1 and t <= percent then 
doPlayerAddItem(cid,5958,1)
selfSay('obrigado receba seu item !', cid) 
else  
selfSay('Você não teve sorte,não ganhou o premio', cid)  
talkState[talkUser] = 0  
end
else
selfSay('Você nao tem os items', cid)  
talkState[talkUser] = 0
end
end
elseif msg == "no" and talkState[talkUser] == 1 then  
selfSay("Then not", cid)  
talkState[talkUser] = 0  
npcHandler:releaseFocus(cid)
end
return TRUE  
end  


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

12 de agosto de 2010 às 14:22

ae deu!! só que apareçe mensagem 3vezes, tem como deixa só 1vez?

 

14:15 Sandra: Você não teve sorte,não ganhou o premio

14:15 Sandra: Você nao tem os items

14:15 Sandra: Você nao tem os items

 

queria pedi outro favor,

 

nesse script da demon oak,

 

quando o player completa a quest storage(35700) e fala demon oak ele tem q perde o item 8293,

só se ele tiver a storage 35700, pra n corre o risco dele perde o axe sem ter feito a quest

 

 

        if msgcontains(msg, 'hallowed axe') then
               npcHandler:say('Do you want to buy a Hallowed Axe from me?', cid)
               talk_state = 1
       elseif msgcontains(msg, 'yes') and talk_state == 1 then
               local price = 100000
           if getPlayerItemCount(cid, 2386) >= 1 and getPlayerMoney(cid) >= price then
               if doPlayerRemoveMoney(cid, price) == true then
                   npcHandler:say('Here you are. You can now defeat the demon oak with this axe.', cid)
                   doPlayerRemoveItem(cid, 2386, 1)
                   doPlayerAddItem(cid, 8293, 1)
                   talk_state = 0
               end
           else
               npcHandler:say('I need an axe and ' .. price .. ' gold coins to make you a {hallowed axe}.', cid)
               talk_state = 0
           end
       elseif msgcontains(msg, 'demon oak') then
               npcHandler:say('Did you defeat the demon oak?', cid)
               talk_state = 2
       elseif msgcontains(msg, 'yes') and talk_state == 2 then
           if getPlayerStorageValue(cid, 35700) == 1 then
               npcHandler:say('Good job! Go take your recompense.', cid)
               doPlayerSetStorageValue(cid, 35700, 2)
               talk_state = 0
           else
               npcHandler:say('Go defeat the demon oak first.', cid)
               talk_state = 0
           end

 

joaohdJ
12 de agosto de 2010 às 14:31

O primeiro:

 

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 percent = 50 -- porcentagem de ganha o premio 
local t = math.random(1, 100)  -- n mecha 

if(msgcontains(msg, 'mission') or msgcontains(msg, 'MISSION')) then  
selfSay('olá você trouxe os items que eu pedi? {yes} ', cid)  
talkState[talkUser] = 1 

elseif msgcontains(msg, 'yes') and talkState[talkUser] == 1 then  
if (not getPlayerItemCount(cid, 7634) >= 1) and (not getPlayerItemCount(cid, 7635) >= 1) then 
       selfSay("Você não tem nenhum dos itens.", cid) 
elseif (not getPlayerItemCount(cid, 7634) >= 1) and (getPlayerItemCount(cid, 7635) >= 1) then 
       doPlayerRemoveItem(cid, 7635, 1) 
       selfSay("Você tem um dos itens pedidos e este foi removido.", cid) 
elseif (getPlayerItemCount(cid, 7634) >= 1) and (not getPlayerItemCount(cid, 7635) >= 1) then 
       doPlayerRemoveItem(cid, 7634, 1) 
       selfSay("Você tem um dos itens pedidos e este foi removido.", cid) 
elseif (getPlayerItemCount(cid, 7634) >= 1) and (getPlayerItemCount(cid, 7635) >= 1) then 
       doPlayerRemoveItem(cid, math.random(7634,7635), 1) 
       selfSay("Você tinha ambos os itens e um deles foi removido.", cid)
end           
if t >= 1 and t <= percent then 
       doPlayerAddItem(cid,5958,1) 
       selfSay('obrigado receba seu item !', cid)  
       talkState[talkUser] = 0  
else  
       selfSay('Você não teve sorte,não ganhou o premio', cid)  
       talkState[talkUser] = 0  
end 

elseif msg == "no" and talkState[talkUser] == 1 then  
selfSay("Then not", cid)  
talkState[talkUser] = 0  
npcHandler:releaseFocus(cid)  
end  
return TRUE  
end  


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

 

 

Demon oak:

 

    if msgcontains(msg, 'hallowed axe') then
               npcHandler:say('Do you want to buy a Hallowed Axe from me?', cid)
               talk_state = 1
       elseif msgcontains(msg, 'yes') and talk_state == 1 then
               local price = 100000
           if getPlayerItemCount(cid, 2386) >= 1 and getPlayerMoney(cid) >= price then
               if doPlayerRemoveMoney(cid, price) == true then
                   npcHandler:say('Here you are. You can now defeat the demon oak with this axe.', cid)
                   doPlayerRemoveItem(cid, 2386, 1)
                   doPlayerAddItem(cid, 8293, 1)
                   talk_state = 0
               end
           else
               npcHandler:say('I need an axe and ' .. price .. ' gold coins to make you a {hallowed axe}.', cid)
               talk_state = 0
           end
       elseif msgcontains(msg, 'demon oak') then
               npcHandler:say('Did you defeat the demon oak?', cid)
               talk_state = 2
       elseif msgcontains(msg, 'yes') and talk_state == 2 then
           if getPlayerStorageValue(cid, 35700) == 1 then
              if doPlayerRemoveItem(cid, 8293) then
                 npcHandler:say('Good job! Go take your recompense.', cid)
                 doPlayerSetStorageValue(cid, 35700, 2)
                 talk_state = 0
              else
                  npcHandler:say("Come back with an hallowed axe.", cid)
                  talk_state = 0
              end       
           else
               npcHandler:say('Go defeat the demon oak first.', cid)
               talk_state = 0
           end

 

 

flw

Editado Agosto 12 por apocarai

12 de agosto de 2010 às 14:48

o ot abriu sem fala erro, + qndo fui fala com o npc, apareçeu erro . ;x

 

algo assim : .lua:26: in function 'callback'

Editado Agosto 12 por felipedorgas

VodkartV
12 de agosto de 2010 às 15:16
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 percent = 50 -- porcentagem de ganha o premio  
local t = math.random(1, 100)  -- n mecha   

if(msgcontains(msg, 'mission') or msgcontains(msg, 'MISSION')) then   
selfSay('olá você trouxe os items que eu pedi? {yes} ', cid)   
talkState[talkUser] = 1  
elseif msgcontains(msg, 'yes') and talkState[talkUser] == 1 then   
if doPlayerRemoveItem(cid,7634,5) or doPlayerRemoveItem(cid,7635,5) or doPlayerRemoveItem(cid,7636,5)  == TRUE then 
if t >= 1 and t <= percent then  
doPlayerAddItem(cid,5958,1) 
selfSay('obrigado receba seu item !', cid)  
else   
selfSay('Você não teve sorte,não ganhou o premio', cid)   
talkState[talkUser] = 0   
end 
else 
selfSay('Você nao tem os items', cid)   
talkState[talkUser] = 0 
end 
elseif msg == "no" and talkState[talkUser] == 1 then   
selfSay("Then not", cid)   
talkState[talkUser] = 0   
npcHandler:releaseFocus(cid) 
end 
return TRUE   
end   


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

12 de agosto de 2010 às 16:28

o npc do premio deu certo, agr queria sabe como eu deixo + dificil, aumento ou diminuo os numeros abaixo?

 

local percent = 50 -- porcentagem de ganha o premio

local t = math.random(1, 100) -- n mecha

 

o npc da demon oak, pede pra mim devolve o axe, msm eu tando com ele, e o ID da certo.

 

 

 

obrigado

joaohdJ
12 de agosto de 2010 às 16:33

Erro meu:

 

    if msgcontains(msg, 'hallowed axe') then
               npcHandler:say('Do you want to buy a Hallowed Axe from me?', cid)
               talk_state = 1
       elseif msgcontains(msg, 'yes') and talk_state == 1 then
               local price = 100000
           if getPlayerItemCount(cid, 2386) >= 1 and getPlayerMoney(cid) >= price then
               if doPlayerRemoveMoney(cid, price) == true then
                   npcHandler:say('Here you are. You can now defeat the demon oak with this axe.', cid)
                   doPlayerRemoveItem(cid, 2386, 1)
                   doPlayerAddItem(cid, 8293, 1)
                   talk_state = 0
               end
           else
               npcHandler:say('I need an axe and ' .. price .. ' gold coins to make you a {hallowed axe}.', cid)
               talk_state = 0
           end
       elseif msgcontains(msg, 'demon oak') then
               npcHandler:say('Did you defeat the demon oak?', cid)
               talk_state = 2
       elseif msgcontains(msg, 'yes') and talk_state == 2 then
           if getPlayerStorageValue(cid, 35700) == 1 then
              if doPlayerRemoveItem(cid, 8293, 1) then
                 npcHandler:say('Good job! Go take your recompense.', cid)
                 doPlayerSetStorageValue(cid, 35700, 2)
                 talk_state = 0
              else
                  npcHandler:say("Come back with an hallowed axe.", cid)
                  talk_state = 0
              end       
           else
               npcHandler:say('Go defeat the demon oak first.', cid)
               talk_state = 0
           end

 

 

flw