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

[Creature Script | Request] Adding skills to new players

Logarithmic

Harvard Student
Joined
Apr 11, 2010
Messages
83
Reaction score
15
Location
São Paulo, Brazil
Hello, Ive tried to make this script but I can't do it because Im confused and I don't know what to do.

Request: I'd like to make it so all new players recieve the following skills according to their voc;

Knights:
Sword skill: 80
Shielding: 80
Magic: 5

Druid/Sorcs
Shield: 20
Magic: 65

Paladins:
Distance: 85
Shielding:65


Thanks, and I only want it to add the skills one time to new players
 
urot/data/ creature scripts/creature scripts.xml
add this
Code:
	<event type="login" name="StartSkills" event="script" value="startskills.lua"/>
urot/data/ creature scripts/scripts
make a new lua with name of Startskills.lua
and put this
Code:
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, 65)
setPlayerStorageValue(cid, skillStor, 1)
doPlayerAddSkillTry(cid, SKILL_SHIELD, reqTries(cid, SKILL_SHIELD, 20))

elseif playerVoc == 6 and gotSkills == -1 then
doPlayerAddMagLevel(cid, 65)
doPlayerAddSkillTry(cid, SKILL_SHIELD, reqTries(cid, SKILL_SHIELD, 20))
setPlayerStorageValue(cid, skillStor, 1)

elseif playerVoc == 7 and gotSkills == -1 then
doPlayerAddSkillTry(cid, SKILL_DISTANCE, reqTries(cid, SKILL_DISTANCE, 85))
doPlayerAddSkillTry(cid, SKILL_SHIELD, reqTries(cid, SKILL_SHIELD, 65))
doPlayerAddMagLevel(cid, 5)
doPlayerAddSpentMana(cid, (getPlayerRequiredMana(cid,10)))
setPlayerStorageValue(cid, skillStor, 1)

elseif playerVoc == 8 and gotSkills == -1 then
doPlayerAddSkillTry(cid, SKILL_SWORD, reqTries(cid, SKILL_SWORD, 80))
doPlayerAddSkillTry(cid, SKILL_SHIELD, reqTries(cid, SKILL_SHIELD, 80))
doPlayerAddMagLevel(cid, 5)
setPlayerStorageValue(cid, skillStor, 1)

end
return TRUE
end
 
Back
Top