Ir para conteúdo

Featured Replies

Postado
  • Autor

tecnicamente parece certo, pois o npc da bless da a  bless e da o storage (0) então ele tecnicamente ele resetaria o storage correto? pra poder o npc 1 vender a storage de novo pra ter acesso ao outro npc d bless

 

  • Respostas 14
  • Visualizações 470
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

Posted Images

Postado
  • Autor

@iHolloway 15:55 Oloko [150]: phoenix
15:55 Kawill: The Spark of the Phoenix is given by name and by the great pyromancer in the nearby fire temple. Do you wish to receive my part of the Spark if the Phoenix?
15:55 Oloko [150]: yes

agora o kawill n da a benção no caso a storage

 

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

local storages = 8888888
function phoenix(cid, message, keywords, parameters, node)
    if(not npcHandler:isFocused(cid)) then
        return false
    end
        if getPlayerStorageValue(cid,storages) == 0 then
            npcHandler:say('So receive the blessing of the life-giving earth, pilgrim!', cid)
            doSendMagicEffect(getCreaturePos(cid), 12)
            setPlayerStorageValue(cid,storages, 1)
        end
    if getPlayerStorageValue(cid,storages) >= 1 then
    npcHandler:say('You already have this blessing.', cid)
    end
 end
keywordHandler:addKeyword({'bless'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Here you may receive the blessing {Spark of The Phoenix}'})

local node1 = keywordHandler:addKeyword({'phoenix'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'The Spark of the Phoenix is given by name and by the great pyromancer in the nearby fire temple. Do you wish to receive my part of the Spark if the Phoenix?'})
    node1:addChildKeyword({'yes'}, phoenix, {npcHandler = npcHandler, onlyFocus = true, reset = true})
    node1:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Alright then.', reset = true})
    
    
npcHandler:addModule(FocusModule:new())

Postado
Agora, bpm91 disse:

@iHolloway 15:55 Oloko [150]: phoenix
15:55 Kawill: The Spark of the Phoenix is given by name and by the great pyromancer in the nearby fire temple. Do you wish to receive my part of the Spark if the Phoenix?
15:55 Oloko [150]: yes

agora o kawill n da a benção no caso a storage

 

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

local storages = 8888888
function phoenix(cid, message, keywords, parameters, node)
    if(not npcHandler:isFocused(cid)) then
        return false
    end
        if getPlayerStorageValue(cid,storages) == 0 then
            npcHandler:say('So receive the blessing of the life-giving earth, pilgrim!', cid)
            doSendMagicEffect(getCreaturePos(cid), 12)
            setPlayerStorageValue(cid,storages, 1)
        end
    if getPlayerStorageValue(cid,storages) >= 1 then
    npcHandler:say('You already have this blessing.', cid)
    end
 end
keywordHandler:addKeyword({'bless'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Here you may receive the blessing {Spark of The Phoenix}'})

local node1 = keywordHandler:addKeyword({'phoenix'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'The Spark of the Phoenix is given by name and by the great pyromancer in the nearby fire temple. Do you wish to receive my part of the Spark if the Phoenix?'})
    node1:addChildKeyword({'yes'}, phoenix, {npcHandler = npcHandler, onlyFocus = true, reset = true})
    node1:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Alright then.', reset = true})
    
    
npcHandler:addModule(FocusModule:new())

 

Me chama no PM, o tópico ta ficando muito grande.

Postado
  • Autor

Bom galera, tentei fazer um parametro pro npc reconhecer a storage do primeiro npc, vender a bless, remover a storage pra poder ter acesso ao primeiro npc novamente, porém nao deu certo. se alguem tiver um paramentro q de certo por favor me ajudem.

esse é o meu paramentro, mas n da certo, creio eu por causa do keyworld.

 

function phoenix(cid, message, keywords, parameters, node)
    if(not npcHandler:isFocused(cid)) then
        return false
    end
    
    local player_gold     = getPlayerItemCount(cid,2148)
    local player_plat     = getPlayerItemCount(cid,2152)*100
    local player_crys     = getPlayerItemCount(cid,2160)*10000
    local player_money     = player_gold + player_plat + player_crys
    
    if player_money >= 10000 then
    if doPlayerRemoveMoney(cid,10000) and getPlayerStorageValue(cid,8888888) <= 1 and getPlayerBlessing(cid, 2) then
        npcHandler:say('Here is your blessing!', cid)
        setPlayerStorageValue(cid,8888888,-1)
        doSendMagicEffect(getCreaturePos(cid), 12)
        doPlayerAddBlessing(cid, 2)
        end
        else
            npcHandler:say('Alright then.', cid)
    end
    
    if getPlayerStorageValue (cid,8888888) == -1 then
    npcHandler:say('You have already blessed you with this blessing.', cid)
    end
end
        

local node1 = keywordHandler:addKeyword({'phoenix'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Here you may receive the blessing {Spark of Phoenix}. But we must ask of you to sacrifice 10000 gold coins. Are you still interested?.'})
    node1:addChildKeyword({'yes'}, phoenix, {})
    node1:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Alright then.', reset = true})
    
    
    npcHandler:addModule(FocusModule:new())

Participe da conversa

Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.

Visitante
Responder

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Conteúdo Similar

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.6k

Informação Importante

Confirmação de Termo