• 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!

RevScripts Start skills + no skill loss option

Joriku

Working in the mines, need something?
Joined
Jul 16, 2016
Messages
1,076
Solutions
15
Reaction score
370
Location
Sweden
YouTube
Joriku
Hi,
Anyone that can help me setup a script for revscript that makes the experience/skills at a start of X than you can't go under it?

What I have so far (Got nothing for skills atm):
Level:
Lua:
local creatureevent = CreatureEvent("onLogin")-- header

function creatureevent.onLogin(cid, player)
     local player = Player(cid)
     if player:getLevel() < 120 then
         player:addExperience(getExpForLevel(120) - player:getExperience(), true)
    end
    return true
end

creatureevent:register() -- footer/end
 
Lua:
local creatureevent = CreatureEvent("onLogin")-- header

function creatureevent.onLogin(player)
    if player:getLevel() < 120 then
        player:addLevel(120)
    end
    if player:getBaseMagicLevel() < 5 then
        player:addMagicLevel(5)
    end
    if player:getSkillLevel(SKILL_DISTANCE) < 50 then
        player:addSkill(SKILL_DISTANCE, 50)
    end
    for i = 1, 5 do
        if not player:hasBlessing(i) then
            player:addBlessing(i, 1)
        end
    end
    return true
end

creatureevent:register() -- footer/end
 
Last edited by a moderator:
Lua:
local creatureevent = CreatureEvent("onLogin")-- header

function creatureevent.onLogin(player)
    if player:getLevel() < 120 then
        player:addLevel(120)
    end
    if player:getBaseMagicLevel() < 5 then
        player:addMagicLevel(5)
    end
    if player:getSkillLevel(SKILL_DISTANCE) < 50 then
        player:addSkill(SKILL_DISTANCE, 50)
    end
    for i = 1, 5 do
        if not player:hasBlessing(i) then
            player:addBlessing(i, 1)
        end
    end
    return true
end

creatureevent:register() -- footer/end
What Is causing (a nill value)?
Is it that the function Is missing?
eaa9f2f112e16197136189759df30bdb.png
 
Starting skills can by achieve through triggers in database on create characters
So this way you avoid the annoying messages by adding 100+ skills at once
 
Starting skills can by achieve through triggers in database on create characters
So this way you avoid the annoying messages by adding 100+ skills at once
The thing with this Is that I want it to not be able to go under X skills because It's an war ot.
If an for example mage has minimum of magic 60, it can't go below 60 and is auto-added back if below 60.
 
Probably easier to just not save the player, that way every time the player logs in, they are reset to default.
 
Probably easier to just not save the player, that way every time the player logs in, they are reset to default.
Woun't work when I use skill system,
Any Ideas on how to disable the skill losses so only experience are lost?
 
Back
Top