Ir para conteúdo
  • Cadastre-se

(Resolvido)[PEDIDO] Desert quest (10 reps)


Ir para solução Resolvido por zipter98,

Posts Recomendados

Toda vez q eu procuro um script de desert, parece q é mt ultrapassado, nunca funciona, alguem que usa source 0.4, sabe um compativel? Dou 10 reps :(

 

 

 

posição do kina

Position: [X: 1547] [Y: 1681] [Z: 10].

posição da sword
01:30 You see a sword (Atk:14, Def:12 +1).
ItemID: [2376].
Position: [X: 1547] [Y: 1682] [Z: 10].

posição do druid
01:30 You see a stone tile.
ItemID: [426].
Position: [X: 1544] [Y: 1678] [Z: 10].

posição da apple
01:30 You see a red apple.
ItemID: [2674].
Position: [X: 1542] [Y: 1678] [Z: 10].


posição do sorcerer
01:30 You see a stone tile.
ItemID: [426].
Position: [X: 1550] [Y: 1678] [Z: 10].

pos do spellbook
01:30 You see a spellbook (Def:14).
ItemID: [2175].
Position: [X: 1552] [Y: 1678] [Z: 10].

pos do pally
It seems to be a switch.
ItemID: [426].
Position: [X: 1547] [Y: 1675] [Z: 10].

posição do crossbow
01:31 You see a crossbow (Range:5).
ItemID: [2455].
Position: [X: 1547] [Y: 1673] [Z: 10].

alavanca pos
01:31 You see a switch.
ItemID: [1945], UniqueID: [1912].
Position: [X: 1547] [Y: 1676] [Z: 10].




pos onde eles serão teleportados

01:33 You see a time tile.
ItemID: [471].
Position: [X: 1588] [Y: 1635] [Z: 8].
01:33 You see a time tile.
ItemID: [472].
Position: [X: 1589] [Y: 1635] [Z: 8].
01:33 You see a time tile.
ItemID: [473].
Position: [X: 1589] [Y: 1636] [Z: 8].
01:33 You see a time tile.
ItemID: [474].
Position: [X: 1588] [Y: 1636] [Z: 8].
Link para o post
Compartilhar em outros sites
  • Solução
local config = {
    items = {
        {position = {x = x, y = y, z = z}, itemid = xxx},                                    --{position = posição_do_item, itemid = id_do_item},
        {position = {x = x, y = y, z = z}, itemid = xxx},
        {position = {x = x, y = y, z = z}, itemid = xxx},
        --etc
    },
    players = {
        {position = {x = x, y = y, z = z}, toPos = {x = x, y = y, z = z}, vocation = {xxx, xxx, ...}},   --{position = posição_do_jogador, toPos = posição_final, vocation = ID_das_vocações},
        {position = {x = x, y = y, z = z}, toPos = {x = x, y = y, z = z}, vocation = {xxx, xxx, ...}},
        {position = {x = x, y = y, z = z}, toPos = {x = x, y = y, z = z}, vocation = {xxx, xxx, ...}},
        --etc
    }
}
 
function onUse(cid)
    local items, quest_players = {}, {}
    for _, item in pairs(config.items) do
        local position_item = getTileItemById(item.position, item.itemid).uid
        if position_item > 0 then
            table.insert(items, position_item)
        else
            return doPlayerSendCancel(cid, "There's missing some item(s).")
        end
    end
    for _, player in pairs(config.players) do
        local pid = getTopCreature(player.position).uid
        if isPlayer(pid) and isInArray(player.vocation, getPlayerVocation(pid)) then
            table.insert(quest_players, pid)
        else
            return doPlayerSendCancel(cid, "There's some player(s) missing or there's some wrong vocation(s).")
        end
    end
    for i = 1, #items do
        doRemoveItem(items[i])
    end
    for i = 1, #quest_players do
        doPlayerSendTextMessage(quest_players[i], MESSAGE_INFO_DESCR, "Good luck at the quest!")
        doTeleportThing(quest_players[i], config.players[i].toPos)
    end
    return true
end
Editado por zipter98 (veja o histórico de edições)

não respondo pms solicitando suporte em programação/scripting

Link para o post
Compartilhar em outros sites
local config = {
    items = {
        {position = {x = x, y = y, z = z}, itemid = xxx},                                    --{position = posição_do_item, itemid = id_do_item},
        {position = {x = x, y = y, z = z}, itemid = xxx},
        {position = {x = x, y = y, z = z}, itemid = xxx},
        --etc
    },
    players = {
        {position = {x = x, y = y, z = z}, toPos = {x = x, y = y, z = z}, vocation = xxx},   --{position = posição_do_jogador, toPos = posição_final, vocation = ID_da_vocação},
        {position = {x = x, y = y, z = z}, toPos = {x = x, y = y, z = z}, vocation = xxx},
        {position = {x = x, y = y, z = z}, toPos = {x = x, y = y, z = z}, vocation = xxx},
        --etc
    }
}
 
function onUse(cid)
    local items, quest_players = {}, {}
    for _, item in pairs(config.items) do
        local position_item = getTileItemById(item.position, item.itemid).uid
        if position_item > 0 then
            table.insert(items, position_item)
        else
            return doPlayerSendCancel(cid, "There's missing some item(s).")
        end
    end
    for _, player in pairs(config.players) do
        local pid = getTopCreature(player.position).uid
        if isPlayer(pid) and getPlayerVocation(pid) == player.vocation then
            table.insert(quest_players, pid)
        else
            return doPlayerSendCancel(cid, "There's some player(s) missing or there's some wrong vocation(s).")
        end
    end
    for i = 1, #items do
        doRemoveItem(items[i])
    end
    for i = 1, #quest_players do
        doPlayerSendTextMessage(quest_players[i], MESSAGE_INFO_DESCR, "Good luck at the quest!")
        doTeleportThing(quest_players[i], config.players[i].toPos)
    end
    return true
end

 

 

Tava editando o meu aqui e me liguei, se um dos caras for sorcerer, mas com promote (ou qlqr outra vocação com promote) vai bugar...

local config = {
    items = {
        {position = {x = 1550, y = 1678, z = 10}, itemid = 2175},
        {position = {x = 1542, y = 1678, z = 10}, itemid = 2674},
        {position = {x = 1547, y = 1673, z = 10}, itemid = 2455},
        {position = {x = 1547, y = 1682, z = 10}, itemid = 2376},
        --etc
    },
    players = {
        {position = {x = 1552, y = 1678, z = 10}, toPos = {x = 1588, y = 1635, z = 8}, vocation = 1},
        {position = {x = 1544, y = 1678, z = 10}, toPos = {x = 1589, y = 1635, z = 8}, vocation = 2},
        {position = {x = 1547, y = 1675, z = 10}, toPos = {x = 1589, y = 1636, z = 8}, vocation = 3},
        {position = {x = 1547, y = 1681, z = 10}, toPos = {x = 1588, y = 1636, z = 8}, vocation = 4},
        --etc
    }
}
 
function onUse(cid)
    local items, quest_players = {}, {}
    for _, item in pairs(config.items) do
        local position_item = getTileItemById(item.position, item.itemid).uid
        if position_item > 0 then
            table.insert(items, position_item)
        else
            return doPlayerSendCancel(cid, "There's missing some item(s).")
        end
    end
    for _, player in pairs(config.players) do
        local pid = getTopCreature(player.position).uid
        if isPlayer(pid) and getPlayerVocation(pid) == player.vocation then
            table.insert(quest_players, pid)
        else
            return doPlayerSendCancel(cid, "There's some player(s) missing or there's some wrong vocation(s).")
        end
    end
    for i = 1, #items do
        doRemoveItem(items[i])
    end
    for i = 1, #quest_players do
        doPlayerSendTextMessage(quest_players[i], MESSAGE_INFO_DESCR, "Good luck at the quest!")
        doTeleportThing(quest_players[i], config.players[i].toPos)
    end
    return true
end

 

Sorcerer = 1,5,9

Druid = 2,6,10

Paladin = 3,7,11

Knight = 4,8,12

Link para o post
Compartilhar em outros sites
local config = {
    items = {
        {position = {x = x, y = y, z = z}, itemid = xxx},                                    --{position = posição_do_item, itemid = id_do_item},
        {position = {x = x, y = y, z = z}, itemid = xxx},
        {position = {x = x, y = y, z = z}, itemid = xxx},
        --etc
    },
    players = {
        {position = {x = x, y = y, z = z}, toPos = {x = x, y = y, z = z}, vocation = {xxx, xxx, ...}},   --{position = posição_do_jogador, toPos = posição_final, vocation = ID_das_vocações},
        {position = {x = x, y = y, z = z}, toPos = {x = x, y = y, z = z}, vocation = {xxx, xxx, ...}},
        {position = {x = x, y = y, z = z}, toPos = {x = x, y = y, z = z}, vocation = {xxx, xxx, ...}},
        --etc
    }
}
 
function onUse(cid)
    local items, quest_players = {}, {}
    for _, item in pairs(config.items) do
        local position_item = getTileItemById(item.position, item.itemid).uid
        if position_item > 0 then
            table.insert(items, position_item)
        else
            return doPlayerSendCancel(cid, "There's missing some item(s).")
        end
    end
    for _, player in pairs(config.players) do
        local pid = getTopCreature(player.position).uid
        if isPlayer(pid) and isInArray(player.vocation, getPlayerVocation(pid)) then
            table.insert(quest_players, pid)
        else
            return doPlayerSendCancel(cid, "There's some player(s) missing or there's some wrong vocation(s).")
        end
    end
    for i = 1, #items do
        doRemoveItem(items[i])
    end
    for i = 1, #quest_players do
        doPlayerSendTextMessage(quest_players[i], MESSAGE_INFO_DESCR, "Good luck at the quest!")
        doTeleportThing(quest_players[i], config.players[i].toPos)
    end
    return true
end

 

Obrigado! Agora deve funcionar!!!

Link para o post
Compartilhar em outros sites

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

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emojis são permitidos.

×   Seu link foi automaticamente incorporado.   Mostrar como link

×   Seu conteúdo anterior foi restaurado.   Limpar o editor

×   Não é possível colar imagens diretamente. Carregar ou inserir imagens do URL.

  • Quem Está Navegando   0 membros estão online

    Nenhum usuário registrado visualizando esta página.

×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo