DukeeH
Active Member
- Joined
- Dec 6, 2010
- Messages
- 550
- Solutions
- 3
- Reaction score
- 39
How to make this script faster? (it is too slow the first login of new characters)
Thanks.
DukeeH,
LUA:
function onLogin(cid)
local playerVoc = getPlayerVocation(cid)
local reqTries = getPlayerRequiredSkillTries
local skillStor = 56364
local gotSkills = getPlayerStorageValue(cid, 56364)
if playerVoc == 5 and gotSkills == -1 then
doPlayerAddMagLevel(cid, 55)
setPlayerStorageValue(cid, skillStor, 1)
elseif playerVoc == 6 and gotSkills == -1 then
doPlayerAddMagLevel(cid, 55)
setPlayerStorageValue(cid, skillStor, 1)
elseif playerVoc == 7 and gotSkills == -1 then
doPlayerAddSkillTry(cid, SKILL_DISTANCE, reqTries(cid, SKILL_DISTANCE, 70))
doPlayerAddSkillTry(cid, SKILL_SHIELD, reqTries(cid, SKILL_SHIELD, 70))
doPlayerAddMagLevel(cid, 18)
setPlayerStorageValue(cid, skillStor, 1)
elseif playerVoc == 8 and gotSkills == -1 then
doPlayerAddSkillTry(cid, SKILL_AXE, reqTries(cid, SKILL_AXE, 70))
doPlayerAddSkillTry(cid, SKILL_SWORD, reqTries(cid, SKILL_SWORD, 70))
doPlayerAddSkillTry(cid, SKILL_CLUB, reqTries(cid, SKILL_CLUB, 70))
doPlayerAddSkillTry(cid, SKILL_SHIELD, reqTries(cid, SKILL_SHIELD, 70))
doPlayerAddMagLevel(cid, 12)
setPlayerStorageValue(cid, skillStor, 1)
end
return TRUE
end
Thanks.
DukeeH,
Last edited:

