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

Lua Script Failed

Status
Not open for further replies.

Vrotz

Member
Joined
Apr 7, 2011
Messages
1,071
Reaction score
7
Location
Brazil
I changed my Console for a Tfs 0.4 here of the forum and this script not this more functioning like before.
Why?

Tags:

Code:
<event type="login" name="StartSkills" event="script" value="startskills.lua"/>
OK
Code:
     registerCreatureEvent(cid, "StartSkills")
OK


Code:
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
doPlayerAddMagLevel(cid, 40)
setPlayerStorageValue(cid, skillStor, 1)

elseif playerVoc == 2 and gotSkills == -1 then
doPlayerAddMagLevel(cid, 40)
setPlayerStorageValue(cid, skillStor, 1)

elseif playerVoc == 3 and gotSkills == -1 then
doPlayerAddSkillTry(cid, SKILL_DISTANCE, reqTries(cid, SKILL_DISTANCE, 85))
doPlayerAddSkillTry(cid, SKILL_SHIELD, reqTries(cid, SKILL_SHIELD, 77))
doPlayerAddMagLevel(cid, 20)
setPlayerStorageValue(cid, skillStor, 1)

elseif playerVoc == 4 and gotSkills == -1 then
doPlayerAddSkillTry(cid, SKILL_SWORD, reqTries(cid, SKILL_SWORD, 87))
doPlayerAddSkillTry(cid, SKILL_AXE, reqTries(cid, SKILL_AXE, 87))
doPlayerAddSkillTry(cid, SKILL_SHIELD, reqTries(cid, SKILL_SHIELD, 87))
doPlayerAddMagLevel(cid, 11)
setPlayerStorageValue(cid, skillStor, 1)

end
return TRUE
end
 
Status
Not open for further replies.
Back
Top