Way20
Well-Known Member
- Joined
- Sep 29, 2014
- Messages
- 205
- Solutions
- 3
- Reaction score
- 79
I'm making a 7.72 war server, I fixed everything that I need but every first skills script that I tried to use on OTHire didn't worked. I'm using ZnoteAAC too, but unlike gesior it doesnt have sample characters that come with level, skills, etc right from DB.
I tried this one first.
but OTHire doesn't have the functions doPlayerAddMagLevel and getPlayerRequiredSkillTries, then I tried to do this:
With this one, the char doesn't even login.
Anyone have any ideia on how I could do it?
I tried this one first.
Code:
function onLogin(cid)
local reqTries = getPlayerRequiredSkillTries
local skillStor = 56367
local gotSkills = getPlayerStorageValue(cid, 56364)
if isPlayer(cid) and getPlayerVocation(cid) >= 1 and gotSkills == -1 then
doPlayerAddSpentMana(cid, (getPlayerRequiredMana(cid,60)))
setPlayerStorageValue(cid, skillStor, 1)
elseif isPlayer(cid) and getPlayerVocation(cid) >= 1 and gotSkills == -1 then
doPlayerAddSpentMana(cid, (getPlayerRequiredMana(cid,60)))
setPlayerStorageValue(cid, skillStor, 1)
elseif isPlayer(cid) and getPlayerVocation(cid) >= 1 and gotSkills == -1 then
doPlayerAddSkillTry(cid, SKILL_DISTANCE, reqTries(cid, SKILL_DISTANCE, 71))
doPlayerAddSkillTry(cid, SKILL_SHIELD, reqTries(cid, SKILL_SHIELD, 60))
doPlayerAddSpentMana(cid, (getPlayerRequiredMana(cid,15)))
setPlayerStorageValue(cid, skillStor, 1)
elseif isPlayer(cid) and getPlayerVocation(cid) >= 1 and gotSkills == -1 then
doPlayerAddSkillTry(cid, SKILL_AXE, reqTries(cid, SKILL_AXE, 71))
doPlayerAddSkillTry(cid, SKILL_SWORD, reqTries(cid, SKILL_SWORD, 71))
doPlayerAddSkillTry(cid, SKILL_CLUB, reqTries(cid, SKILL_CLUB, 71))
doPlayerAddSkillTry(cid, SKILL_SHIELD, reqTries(cid, SKILL_SHIELD, 60))
doPlayerAddMagLevel(cid, 9)
setPlayerStorageValue(cid, skillStor, 1)
end
return TRUE
end
but OTHire doesn't have the functions doPlayerAddMagLevel and getPlayerRequiredSkillTries, then I tried to do this:
Code:
function onLogin(cid)
local magLevel = getPlayerMagLevel(cid)
local axeSkill = getPlayerSkill(cid, 3)
local distSkill = getPlayerSkill(cid, 4)
local shieldSkill = getPlayerSkill(cid, 5)
if (playerVoc == 4) or (playerVoc == 8) then
while axeSkill < 70 do
doPlayerAddSkillTry(cid, 3, 100, 100)
end
while shieldSkill < 70 do
doPlayerAddSkillTry(cid, 5, 100, 100)
end
while magLevel < 6 do
doPlayerAddManaSpent(cid, 100, 100)
end
elseif (playerVoc == 3) or (playerVoc == 7) then
while distSkill < 70 do
doPlayerAddSkillTry(cid, 3, 100, 100)
end
while shieldSkill < 70 do
doPlayerAddSkillTry(cid, 5, 100, 100)
end
while magLevel < 15 do
doPlayerAddManaSpent(cid, 100, 100)
end
else
while magLevel < 40 do
doPlayerAddManaSpent(cid, 100, 100)
end
end
end
Anyone have any ideia on how I could do it?
Last edited: