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

Solved TFS 0.3.6pl1 - New chars starting with wrong magic level!! - Oops, my fault.

Status
Not open for further replies.

engle777

New Member
Joined
Aug 4, 2008
Messages
20
Reaction score
0
Hey everyone ... just lettin you know right now that I'm not stupid. I can clearly see where inside of config.lua that you set the starting magic level.

So heres what my config looks like:
Code:
	-- Account manager
	accountManager = true
	namelockManager = true
	newPlayerChooseVoc = true
	newPlayerSpawnPosX = 1965
	newPlayerSpawnPosY = 1794
	newPlayerSpawnPosZ = 7
	newPlayerTownId = 6
	newPlayerLevel = 35
	newPlayerMagicLevel = 0
	generateAccountNumber = false

My problem is that when a new character starting as a mage (sorcerer/druid) logs in, they have magic level 3 when i clearly put magic level 0 for all vocations...

now the wierd part is that the knights and paladins start with magic level 0 just fine...but the mages are not. this is a problem because when they advance in magic level ... it says "You advanced to magic level 1." but in the skills window, it says the character has magic lvl 4.

I tried putting a startskills script in just for the heck of it to start at magic lvl 0.

i used startskills.lua and put it in creaturescripts. i changed creaturescripts.xml and also login.lua

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

startskills.lua
Code:
function onLogin(cid)
local playerVoc = getPlayerVocation(cid)
local reqTries = getPlayerRequiredSkillTries
local skillStor = 56364
local gotSkills = getPlayerStorageValue(cid, 56364)


if playerVoc == 1 or playerVoc == 2 or playerVoc == 5 or playerVoc == 6 and gotSkills == -1 then
doPlayerAddSpentMana(cid, (getPlayerRequiredMana(cid,0)))
doPlayerAddMagLevel(cid, 0)
setPlayerStorageValue(cid, skillStor, 1)

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

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

end
return TRUE
end

Please let me know if you need any other information to help solve my issue!!

Thanks..!
engle
 
Last edited:
BAHAHAHAHA!! DAMN YOU'RE GOOD I DIDNT THINK OF THAT !! omg maybe im stupid after all! .... ;< cyaa

Edit:
It's late and i've been playing around with my ot all day xD hahaha!!

thx again... xd
 
Status
Not open for further replies.
Back
Top