JO
pedido

Pedido Quest de 5 Itens pegar apenas um!

Por Jobbysantos1999, 06 de jul. de 2013 em Scripts

script
8
1.4k
06 de julho de 2013 às 18:35

Bom, eu to começando um VenoreWar pra postar aqui mesmo so que eu quero um script que tenha 5 Baús e pegue apenas um estilo a Inquisition Quest

 

Quem me ajudar do REP+!!

 

Vlw é isso!!

EnselfE
06 de julho de 2013 às 19:39
function onUse(cid, item)

local item = 2160

if getPlayerStorageValue(cid, 212345) > 1 then
doPlayerSendTextMessage(cid, 22, "It's empty")
return true
end

if getPlayerStorageValue(cid, 212345) > 1 then
doPlayerAddItem(cid, item, 1)
doPlayerSendTextMessage(cid, 26, "Congratulations")
doPlayerSetStorageValue(cid, 212345,1)
return true
end

É so colocar as storage iguais que ai vai identificar se ele ja clico no baú.

 

com esse script voce cria 5 baús dai é so mudar o item ;)

Editado Julho 6 por Enself

SkymagnumS
06 de julho de 2013 às 19:44

 

function onUse(cid, item, fromPosition, itemEx, toPosition)
 
    local AIDS = {
        [1278] = {2160, 5},
        [38291] = {3213, 80},
        [28193] = {1839, 30},
        [8113] = {1279, 5},
        [2893] = {1839, 2}
    }
 
    if(AIDS[item.actionid]) then
        if(getPlayerStorageValue(cid, 327891) == -1) then
            doPlayerAddItem(cid, AIDS[item.actionid][1], AIDS[item.actionid][2])
            doPlayerSendTextMessage(cid, 27, "You win your items.")
            doSendMagicEffect(fromPosition, 30)
            doSendMagicEffect(toPosition, 28)
            setPlayerStorageValue(cid, 327891, 1)
        else
            doPlayerSendTextMessage(cid, 27, "You already complete this quest.")
        end
    end
 
    return true
end
06 de julho de 2013 às 19:48
function onUse(cid, item, fromPosition, itemEx, toPosition)
 
    local AIDS = {
        [1278] = {2160, 5},
        [38291] = {3213, 80},
        [28193] = {1839, 30},
        [8113] = {1279, 5},
        [2893] = {1839, 2}
    }
 
    if(AIDS[item.actionid]) then
        if(getPlayerStorageValue(cid, 327891) == -1) then
            doPlayerAddItem(cid, AIDS[item.actionid][1], AIDS[item.actionid][2])
            doPlayerSendTextMessage(cid, 27, "You win your items.")
            doSendMagicEffect(fromPosition, 30)
            doSendMagicEffect(toPosition, 28)
            setPlayerStorageValue(cid, 327891, 1)
        else
            doPlayerSendTextMessage(cid, 27, "You already complete this quest.")
        end
    end
 
    return true
end

 

Nunca vi desses antes como configura?

SkymagnumS
06 de julho de 2013 às 19:55


local AIDS = {

[ACTION ID DO BAU] = {ITEM ID, QUANTIDADE},

Editado Julho 6 por Skymagnum

06 de julho de 2013 às 20:24

Me manda o de colocar no Action.XML ?


Vlw, vou te reputar amanhã ja reputei muito hoje....

 

RESOLVIDO!!

SkymagnumS
06 de julho de 2013 às 20:25

 

<action actionid="1278;38291;28193;8113;2893" event="script" value="quest.lua"/>

 

As actions que estão ali deve ser as mesma que estão nos scripts.

07 de julho de 2013 às 09:55

Vlw! Consegui pode fechar o tópico!! REP+ Quando puder!!