• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Lua help change script for Revscript plss

dfs1

Member
Joined
Aug 27, 2011
Messages
82
Solutions
1
Reaction score
8
I need help please, I'm going crazy, I tried to edit them myself but I didn't succeed.
(I have used a translator)

First Skills and items

Lua:
local firstStorage = 56364
local firstSkills = {
    [1] = {
        {    amount = 96       }
    },
    [2] = {
        {   amount = 96        }
    },
    [3] = {
        {   skillid = SKILL_DISTANCE,   skillLevel = 109200        },
        {   skillid = SKILL_SHIELD,     skillLevel = 339200           },
        {   amount  = 20    }
    },
    [4] = {
        {   skillid = SKILL_CLUB,        skillLevel = 519200            },
        {   skillid = SKILL_SWORD,        skillLevel = 519200       },
        {   skillid = SKILL_AXE,        skillLevel = 519200            },
        {   skillid = SKILL_SHIELD,        skillLevel = 1019200        },
        {   amount = 8                                        }
    },
    [5] = {
        {   amount = 96        }
    },
    [6] = {
        {   amount = 96        }
    },
    [7] = {
        {   skillid = SKILL_DISTANCE,   skillLevel = 109200        },
        {   skillid = SKILL_SHIELD,     skillLevel = 339200      },
        {   amount  = 20    }
    },
    [8] = {
        {   skillid = SKILL_CLUB,       skillLevel = 519200        },
        {   skillid = SKILL_SWORD,     skillLevel = 519200        },
        {   skillid = SKILL_AXE,       skillLevel = 519200        },
        {   skillid = SKILL_SHIELD,     skillLevel = 1019200        },
        {   amount = 8        }
    }
}
 
function onLogin(player)
    local player = Player(player)
    local playerVoc = firstSkills[player:getVocation():getId()]
    if (not playerVoc) then
        return true
    end
    if (player:getStorageValue(firstStorage) == -1) then
        for i = 1, #playerVoc do
            if (playerVoc[i].skillid) then
                
                player:addSkillTries(playerVoc[i].skillid, playerVoc[i].skillLevel)
            end
 
            if (playerVoc[i].amount) then
                local magicNeed = ( playerVoc[i].amount - player:getMagicLevel() )
                player:addManaSpent(player:getVocation():getRequiredManaSpent(player:getBaseMagicLevel() + magicNeed) - player:getManaSpent())
            end
        end
        player:setStorageValue(firstStorage, 1)
    end
    return true
end
 
Last edited:
Back
Top