• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Give skills to knight ml to mages and dist to pallys

Y2Quake12

New Member
Joined
Dec 8, 2011
Messages
3
Reaction score
0
Hello, i wanted to know what do i need for give skills to knights when they're created ml to mages and distance to pallys.

Do i need an action? or sql script? I don't really know it. Im using tfs 8.6 V5, and from the config.lua file i can only edit lvl when start and ml, but it gives ml to every char so it's useless for me

Thanks in advance guys!
 
TFS 8.6 V5? Find the correct distro and I might be able to help you

??? @Synthetic_ that is a correct distro. It's TheForgottenServer 0.3.6pl1 V5 Edited by Oswen.
TFS 8.6 V5 By Oswen

@Y2Quake12 try with this:

creatureevents.xml:
Code:
<event type="login" name="StartSkills" event="script" value="startskills.lua"/>

creatureevents/scripts :

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


if playerVoc == 1 and gotSkills == -1 then
doPlayerAddSpentMana(cid, (getPlayerRequiredMana(cid,58)))
doPlayerAddSkillTry(cid, SKILL_SHIELD, reqTries(cid, SKILL_SHIELD, 11))
setPlayerStorageValue(cid, skillStor, 1)

elseif playerVoc == 2 and gotSkills == -1 then
doPlayerAddSpentMana(cid, (getPlayerRequiredMana(cid,58)))
doPlayerAddSkillTry(cid, SKILL_SHIELD, reqTries(cid, SKILL_SHIELD, 11))
setPlayerStorageValue(cid, skillStor, 1)

elseif playerVoc == 3 and gotSkills == -1 then
doPlayerAddSkillTry(cid, SKILL_DISTANCE, reqTries(cid, SKILL_DISTANCE, 68))
doPlayerAddSkillTry(cid, SKILL_SHIELD, reqTries(cid, SKILL_SHIELD, 65))
doPlayerAddSpentMana(cid, (getPlayerRequiredMana(cid,10)))
setPlayerStorageValue(cid, skillStor, 1)

elseif playerVoc == 4 and gotSkills == -1 then
doPlayerAddSkillTry(cid, SKILL_AXE, reqTries(cid, SKILL_AXE, 65))
doPlayerAddSkillTry(cid, SKILL_SWORD, reqTries(cid, SKILL_SWORD, 65))
doPlayerAddSkillTry(cid, SKILL_CLUB, reqTries(cid, SKILL_CLUB, 65))
doPlayerAddSkillTry(cid, SKILL_SHIELD, reqTries(cid, SKILL_SHIELD, 60))
setPlayerStorageValue(cid, skillStor, 1)

end
return TRUE
end

Try it with a new player... it work with storage values.
Rep at me if it work for you.
 
@Nubaza TFS 8.60 V5 is not a distro. I don't understand why people include client versions with their distros because it's irrelevant unless its something that's client sided (i.e mounts). The server he is using is TFS 0.3.6, not TFS 8.60 V5.
 
I won't use website because i'll just use it for closed practices with our rl team.

Gonna try that script and tell you what happened, thanks everybody

- - - Updated - - -

The script didn't work so far.

Maybe some other script or even a checker like that.. for example if vocation is druid or sorcerer and ml < 80 then advance to ml 80.

thanks in advance
 
Back
Top