• 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

Klonera

Once upon a time.
Joined
Jul 16, 2016
Messages
788
Solutions
7
Reaction score
190
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
 

Evil Puncker

prolonged absenteeism
TFS Developer
Joined
May 30, 2009
Messages
7,902
Solutions
197
Reaction score
3,714
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:
OP
Klonera

Klonera

Once upon a time.
Joined
Jul 16, 2016
Messages
788
Solutions
7
Reaction score
190
Location
Sweden
YouTube
Joriku
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
 

Xikini

I whore myself out for likes
Support Team
Joined
Nov 17, 2010
Messages
5,522
Solutions
378
Reaction score
3,638

Deatthraz

Advanced OT User
Joined
May 1, 2013
Messages
450
Solutions
27
Reaction score
204
Location
Mexico
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
 
OP
Klonera

Klonera

Once upon a time.
Joined
Jul 16, 2016
Messages
788
Solutions
7
Reaction score
190
Location
Sweden
YouTube
Joriku
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.
 

Xikini

I whore myself out for likes
Support Team
Joined
Nov 17, 2010
Messages
5,522
Solutions
378
Reaction score
3,638
Probably easier to just not save the player, that way every time the player logs in, they are reset to default.
 
OP
Klonera

Klonera

Once upon a time.
Joined
Jul 16, 2016
Messages
788
Solutions
7
Reaction score
190
Location
Sweden
YouTube
Joriku
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?
 
Top