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

[TFS 0.3.6] Star skills problem

steviemongolin

New Member
Joined
Feb 28, 2016
Messages
21
Reaction score
0
Hello guys, I'm having problems with a starting skill script that I found. I dont know why when ever I create a new character I dont start with the skills that are show below in the script. For example when I create a char with the vocation 4 it's supposed to have skills 80 but instead it starts with 66. I realize too that when I change the skill rate on the config.lua, the starting skill from any new char changes too. I will really appreciate if someone could help me. Thank you :)



Code:
function onLogin(cid)
local playerVoc = getPlayerVocation(cid)
local reqTries = getPlayerRequiredSkillTries
local skillStor = 56367
local gotSkills = getPlayerStorageValue(cid, 56367)


if playerVoc == 1 and gotSkills == -1 then
doPlayerAddSpentMana(cid, (getPlayerRequiredMana(cid,70)))
setPlayerStorageValue(cid, skillStor, 1)

elseif playerVoc == 2 and gotSkills == -1 then
doPlayerAddSpentMana(cid, (getPlayerRequiredMana(cid,70)))
setPlayerStorageValue(cid, skillStor, 1)

elseif playerVoc == 3 and gotSkills == -1 then
doPlayerAddSkillTry(cid, SKILL_DISTANCE, reqTries(cid, SKILL_DISTANCE, 80))
doPlayerAddSkillTry(cid, SKILL_SHIELD, reqTries(cid, SKILL_SHIELD, 50))
doPlayerAddSpentMana(cid, (getPlayerRequiredMana(cid,20)))
setPlayerStorageValue(cid, skillStor, 1)

elseif playerVoc == 4 and gotSkills == -1 then
doPlayerAddSkillTry(cid, SKILL_AXE, reqTries(cid, SKILL_AXE, 10))
doPlayerAddSkillTry(cid, SKILL_SWORD, reqTries(cid, SKILL_SWORD, 80))
doPlayerAddSkillTry(cid, SKILL_CLUB, reqTries(cid, SKILL_CLUB, 10))
doPlayerAddSkillTry(cid, SKILL_SHIELD, reqTries(cid, SKILL_SHIELD, 80))
doPlayerAddSpentMana(cid, (getPlayerRequiredMana(cid,8)))
setPlayerStorageValue(cid, skillStor, 1)

elseif playerVoc == 5 and gotSkills == -1 then
doPlayerAddSkillTry(cid, SKILL_AXE, reqTries(cid, SKILL_AXE, 94))
doPlayerAddSkillTry(cid, SKILL_SWORD, reqTries(cid, SKILL_SWORD, 10))
doPlayerAddSkillTry(cid, SKILL_CLUB, reqTries(cid, SKILL_CLUB, 10))
doPlayerAddSkillTry(cid, SKILL_SHIELD, reqTries(cid, SKILL_SHIELD, 52))
doPlayerAddSpentMana(cid, (getPlayerRequiredMana(cid,8)))
setPlayerStorageValue(cid, skillStor, 1)

elseif playerVoc == 6 and gotSkills == -1 then
doPlayerAddSkillTry(cid, SKILL_DISTANCE, reqTries(cid, SKILL_DISTANCE, 80))
doPlayerAddSkillTry(cid, SKILL_SHIELD, reqTries(cid, SKILL_SHIELD, 50))
doPlayerAddSpentMana(cid, (getPlayerRequiredMana(cid,20)))
setPlayerStorageValue(cid, skillStor, 1)

elseif playerVoc == 7 and gotSkills == -1 then
doPlayerAddSkillTry(cid, SKILL_AXE, reqTries(cid, SKILL_AXE, 10))
doPlayerAddSkillTry(cid, SKILL_SWORD, reqTries(cid, SKILL_SWORD, 80))
doPlayerAddSkillTry(cid, SKILL_CLUB, reqTries(cid, SKILL_CLUB, 10))
doPlayerAddSkillTry(cid, SKILL_SHIELD, reqTries(cid, SKILL_SHIELD, 50))
doPlayerAddSpentMana(cid, (getPlayerRequiredMana(cid,15)))
setPlayerStorageValue(cid, skillStor, 1)

end
return TRUE
end
 
Quoting myself from another thread earlier today.
2.0 is slowest advancement rate.
1.0 is fastest advancement rate.

the slower the rate, the lower the max cap of skill.
the faster the rate, the higher the max cap of skill.
 
Such a vague statement tho, @ topic check your vocations.xml for the skill modifiers of each vocation, and follow @Xikini's suggestion.
I guess I could always test each vocation.. and find out what each advancement gives skills wise.. but it's so much work. :p

@Codex NG
Code:
2.0
Magic  = 22
Fist   = 69
club   = 69
sword  = 69
axe    = 69
dist   = 70
shield = 69

1.9
Magic  = 24
Fist   = 74
club   = 74
sword  = 74
axe    = 74
dist   = 74
shield = 72

1.8
Magic  = 26
Fist   = 79
club   = 79
sword  = 79
axe    = 79
dist   = 80
shield = 78

1.7
Magic  = 28
Fist   = 87
club   = 87
sword  = 87
axe    = 87
dist   = 88
shield = 85

1.6
Magic  = 32
Fist   = 97
club   = 97
sword  = 97
axe    = 97
dist   = 98
shield = 95

1.5
Magic  = 37
Fist   = 110
club   = 110
sword  = 110
axe    = 110
dist   = 112
shield = 109

1.4
Magic  = 44
Fist   = 131
club   = 131
sword  = 131
axe    = 131
dist   = 132
shield = 129

1.3
Magic  = 57
Fist   = 165
club   = 165
sword  = 165
axe    = 165
dist   = 167
shield = 162

1.2
Magic  = 82
Fist   = 232
club   = 232
sword  = 232
axe    = 232
dist   = 235
shield = 229

1.1
Magic  = 156
Fist   = 435
club   = 435
sword  = 435
axe    = 435
dist   = 440
shield = 428

1.0
Magic  = 156
Fist   = 435
club   = 435
sword  = 435
axe    = 435
dist   = 440
shield = 428

-- edit
Thank you to whichever mod merged my post. rofl
 
Last edited:
Back
Top