Ir para conteúdo

-=[TFS]=- 8.60 v0.4 GEMA IGUAL DO FOX WORLD MAIS MODIFICADA EDIT by Anderson Sacani

Featured Replies

Postado
local config = {
    itemId = 2154,
    vocationId_1 = 2, -- Sorcerer
    vocationId_2 = 6, -- Master sorcerer
    vocationName = "Mage",
    text = "´ .	,", ".	´ ,", "`  .  ,", ",	` .",
}

local function effect(cid)
    if isPlayer(cid) then
        if getPlayerStorageValue(cid, storage) > 0 then
            doCreatureSay(cid, config.text, TALKTYPE_ORANGE_1)
            addEvent(effect, 1000,cid)
        end
    end
    return true
end

function onUse(cid, item, fromPosition, itemEx, toPosition)
    local itemId, amount = config.itemId, 1
    local storage, getItemName = 6318964231, getItemNameById(itemId)

    if not ((getPlayerVocation(cid) == config.vocationId_1) or (getPlayerVocation(cid) == config.vocationId_2)) then
        doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "Para usar a gema voce precisa ser um " .. config.vocationName)
        return true
    end

    if getPlayerStorageValue(cid, storage) > 0 then
        doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "Voce ja usou uma " .. getItemName)
        return true
    end

    doRemoveItem(item.uid, amount)
    setPlayerStorageValue(cid, storage, 1)
    effect(cid)
    return true
end

 

 

O PROBLEMA DESSE SCRIPT É QUE ELE NÃO FICA SOLTANDO AQUELE EFEITO QUANDO EU CLICK NA GEMA ELA SOME E QUANDO DESLOGO E LOGO DENOVO O EFEITO SOME SEM EU USAR A MAGIA ELE NAO FICA COM EFEITO QUANDO EU LOGO MESMO EU TER USADO [A GEMA A GEMA SUMIR TA SEM PROBLEMAS FAZ PARTE DO SCRIPT] O PROBLEMA TA NO ACTION/CREATURESCRIPT <--- COLOCA PRA LOGA/DESLOGA QUANDO USA A GEMA SE ALGUEM PODER ME AJUDAR EU AGRADEÇO.

 

Meu Discord: Samuel Galdino de Araujo#9418

Editado por Muvuka (veja o histórico de edições)

91-thais.png

Resolvido por Anderson Sacani

Ir para solução
  • Muvuka mudou o título para -=[TFS]=- 8.60 v0.4 GEMA IGUAL DO FOX WORLD MAIS MODIFICADA EDIT by Anderson Sacani
Postado
  • Solução

Só alterar o script da gema para este:

local config = {
    itemId = 2154,
    vocationId_1 = 2, -- Sorcerer
    vocationId_2 = 6, -- Master sorcerer
    vocationName = "Mage",
}

function onUse(cid, item, fromPosition, itemEx, toPosition)
    local itemId, amount = config.itemId, 1
    local storage, getItemName = 6318964231, getItemNameById(itemId)

    if not ((getPlayerVocation(cid) == config.vocationId_1) or (getPlayerVocation(cid) == config.vocationId_2)) then
        doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE,
            "Para usar a gema voce precisa ser um " .. config.vocationName)
        return true
    end

    if getPlayerStorageValue(cid, storage) > 0 then
        doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "Voce ja usou uma " .. getItemName)
        return true
    end

    doRemoveItem(item.uid, amount)
    setPlayerStorageValue(cid, storage, 1)
    return true
end

 

E criar um novo creaturescript para login, com esse algorítmo:

local text = "´ .	,", ".	´ ,", "`  .  ,", ",	` ."

local function effect(cid)
    local storage = 6318964231
    if isPlayer(cid) then
        if getPlayerStorageValue(cid, storage) > 0 then
            doCreatureSay(cid, text, TALKTYPE_ORANGE_1)
        end
        addEvent(effect, 1000, cid)
    end
end

function onLogin(cid)
    effect(cid)
    return true
end

 

Postado
  • Autor

@Anderson Sacani 1713498485_Semttulo.thumb.png.7803f53ed884d76df9c33bb6a85b01ca.pngFunciono mais olha como fica o efeito eu queria que inves de ficar em pé ficasse deitado e mudasse pra outras cores diferentes um cor depois outra ou seja todas as cores no effect igual fox world

91-thais.png

Postado
local texts = {
    "´ . ,",
    ". ´ ,",
    " . ,", ", ."
}

local colors = {
    TALKTYPE_ORANGE_1,
    TALKTYPE_RED,
    TALKTYPE_BLUE,
    TALKTYPE_PURPLE,
    TALKTYPE_GREEN,
    TALKTYPE_MONSTER_SAY
}

local function effect(cid)
    local storage = 6318964231
    if isPlayer(cid) then
        if getPlayerStorageValue(cid, storage) > 0 then
            local randomText = texts[math.random(1, #texts)]
            local randomColor = colors[math.random(1, #colors)]
            doCreatureSay(cid, randomText, randomColor)
        end
        addEvent(effect, 1000, cid)
    end
end

function onLogin(cid)
    effect(cid)
    return true
end

 

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.7k

Informação Importante

Confirmação de Termo