RevScript Info spells custom

Shuyin

Miembro
LV
23
 
Awards
17
Informacion para las spells custom en comando

!spells

Nota: Cada vocation le saldra la informacion de sus spells custom.


Ver archivo adjunto Tibia - Deixis 2023-12-13 21-35-43.mp4
Código Lua:
local newspellsinfo = TalkAction("!spells")

-- Define the information for spells (name, cooldown, level required, mana cost, vocation)
local spellInfo = {
    Knight = {
        ["exori attraction"] = {
            cooldown = 5,
            levelRequired = 300,
            manaCost = 300
        },
        ["exori follow ico"] = {
            cooldown = 5,
            levelRequired = 250,
            manaCost = 300
        },
        ["exori blaze"] = {
            cooldown = 5,
            levelRequired = 300,
            manaCost = 300
        }
    },
    Sorcerer = {
        ["ethereal velocity"] = {
            cooldown = 5,
            levelRequired = 200,
            manaCost = 650
        },
        ["exori follow death"] = {
            cooldown = 5,
            levelRequired = 250,
            manaCost = 700
        },
        ["exevo Necroshock"] = {
            cooldown = 5,
            levelRequired = 300,
            manaCost = 700
        }
    },
    Druid = {
        ["ethereal velocity"] = {
            cooldown = 5,
            levelRequired = 200,
            manaCost = 650
        },
        ["exevo Frostquake"] = {
            cooldown = 5,
            levelRequired = 300,
            manaCost = 700
        },
        ["Radiant Strike"] = {
            cooldown = 5,
            levelRequired = 150,
            manaCost = 800
        },
        ["exori follow ice"] = {
            cooldown = 5,
            levelRequired = 250,
            manaCost = 700
        },
        ["exevo tame"] = {
            cooldown = 5,
            levelRequired = 300,
            manaCost = 800
        }
    },
    Paladin = {
        ["exevo divine burst"] = {
            cooldown = 5,
            levelRequired = 300,
            manaCost = 400
        },
        ["exevo follow holy"] = {
            cooldown = 5,
            levelRequired = 250,
            manaCost = 400
        },
        ["exevo gran san"] = {
            cooldown = 5,
            levelRequired = 300,
            manaCost = 400
        }
    }
    -- Add more spells as needed
}

-- Define promotions and their respective base vocations
local promotions = {
    ["Elite Knight"] = "Knight",
    ["Master Sorcerer"] = "Sorcerer",
    ["Elder Druid"] = "Druid",
    ["Royal Paladin"] = "Paladin"
}

-- Function to show the information of spells for a specific vocation or promotion
function showSpellInfo(player, vocation)
    local message = "Information about " .. vocation .. " spells:\n\n"

    for spellName, spellData in pairs(spellInfo[vocation]) do
        message = message .. "Spell: " .. spellName ..
                            "\nCooldown: " .. spellData.cooldown .. " seconds" ..
                            "\nRequired Level: " .. spellData.levelRequired ..
                            "\nMana Cost: " .. spellData.manaCost .. "\n\n"
    end

    player:showTextDialog(43927, message)
end

-- Function to handle the onSay command
function newspellsinfo.onSay(player, words, param)
    local vocation = player:getVocation():getName()
    
    -- Check if the player's vocation is in promotions
    local baseVocation = promotions[vocation] or vocation
    
    if spellInfo[baseVocation] then
        showSpellInfo(player, baseVocation)
    else
        player:sendTextMessage(MESSAGE_INFO_DESCR, "No spells found for your vocation.")
    end

    return false
end

newspellsinfo:register()
 

Alex

Miembro del equipo
Webdesigner
LV
58
 
Awards
38
Disculpa, funciona para TFS 1.4? (Exodus)
Muy probable que si , el tfs 1.4 exodus accepta revscript y script xml , quizás alguna función sea distinta o algún texto de llamada pero debería de funcionar si no es el caso déjanos saber el error y te ayudaremos
 

acxel12

Miembro
LV
13
 
Awards
14
Informacion para las spells custom en comando

!spells

Nota: Cada vocation le saldra la informacion de sus spells custom.


Ver archivo adjunto 4486
Código Lua:
local newspellsinfo = TalkAction("!spells")

-- Define the information for spells (name, cooldown, level required, mana cost, vocation)
local spellInfo = {
    Knight = {
        ["exori attraction"] = {
            cooldown = 5,
            levelRequired = 300,
            manaCost = 300
        },
        ["exori follow ico"] = {
            cooldown = 5,
            levelRequired = 250,
            manaCost = 300
        },
        ["exori blaze"] = {
            cooldown = 5,
            levelRequired = 300,
            manaCost = 300
        }
    },
    Sorcerer = {
        ["ethereal velocity"] = {
            cooldown = 5,
            levelRequired = 200,
            manaCost = 650
        },
        ["exori follow death"] = {
            cooldown = 5,
            levelRequired = 250,
            manaCost = 700
        },
        ["exevo Necroshock"] = {
            cooldown = 5,
            levelRequired = 300,
            manaCost = 700
        }
    },
    Druid = {
        ["ethereal velocity"] = {
            cooldown = 5,
            levelRequired = 200,
            manaCost = 650
        },
        ["exevo Frostquake"] = {
            cooldown = 5,
            levelRequired = 300,
            manaCost = 700
        },
        ["Radiant Strike"] = {
            cooldown = 5,
            levelRequired = 150,
            manaCost = 800
        },
        ["exori follow ice"] = {
            cooldown = 5,
            levelRequired = 250,
            manaCost = 700
        },
        ["exevo tame"] = {
            cooldown = 5,
            levelRequired = 300,
            manaCost = 800
        }
    },
    Paladin = {
        ["exevo divine burst"] = {
            cooldown = 5,
            levelRequired = 300,
            manaCost = 400
        },
        ["exevo follow holy"] = {
            cooldown = 5,
            levelRequired = 250,
            manaCost = 400
        },
        ["exevo gran san"] = {
            cooldown = 5,
            levelRequired = 300,
            manaCost = 400
        }
    }
    -- Add more spells as needed
}

-- Define promotions and their respective base vocations
local promotions = {
    ["Elite Knight"] = "Knight",
    ["Master Sorcerer"] = "Sorcerer",
    ["Elder Druid"] = "Druid",
    ["Royal Paladin"] = "Paladin"
}

-- Function to show the information of spells for a specific vocation or promotion
function showSpellInfo(player, vocation)
    local message = "Information about " .. vocation .. " spells:\n\n"

    for spellName, spellData in pairs(spellInfo[vocation]) do
        message = message .. "Spell: " .. spellName ..
                            "\nCooldown: " .. spellData.cooldown .. " seconds" ..
                            "\nRequired Level: " .. spellData.levelRequired ..
                            "\nMana Cost: " .. spellData.manaCost .. "\n\n"
    end

    player:showTextDialog(43927, message)
end

-- Function to handle the onSay command
function newspellsinfo.onSay(player, words, param)
    local vocation = player:getVocation():getName()
  
    -- Check if the player's vocation is in promotions
    local baseVocation = promotions[vocation] or vocation
  
    if spellInfo[baseVocation] then
        showSpellInfo(player, baseVocation)
    else
        player:sendTextMessage(MESSAGE_INFO_DESCR, "No spells found for your vocation.")
    end

    return false
end

newspellsinfo:register()
A que crees que se deba este error?Sin título.png
 

Alex

Miembro del equipo
Webdesigner
LV
58
 
Awards
38
Arriba