• 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 HELP TO CREATE NEW VOCATION IN TFS 0.4.0a1

mdourado

New Member
Joined
Apr 26, 2009
Messages
11
Reaction score
0
I need help to create a new independent vocation.
I'm using TFS 0.4.0a1
See, I added the following lines in vocations.xml:

Code:
	<vocation id="9" name="New" description="an vocation for test" needpremium="0" gaincap="10" gainhp="5" gainmana="30" gainhpticks="12" gainhpamount="1" gainmanaticks="1" gainmanaamount="2" manamultiplier="1.1" attackspeed="2000" soulmax="200" gainsoulticks="15" fromvoc="5" lessloss="50">
		<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/>
		<skill fist="1.5" club="2.0" sword="2.0" axe="2.0" distance="2.0" shielding="1.5" fishing="1.1" experience="1.0"/>
	</vocation>


And / lib/031-vocations.lua the following lines:
Code:
function isNew(cid)
	return isInArray({9}, getPlayerVocation(cid))
end

When I change the ID of calling the player, when I login for the first
time until the call appears certain, however when I login again
char back as Master Sorcerer login now and the next round as
sorceress.

That is, it changes the vocation alone.

Can anyone help? : O


P.S.: I used Google Translation
 
I am not a donor, the distribution is available at various support sites
the OTServer in Brazil, only search on Google and you'll find several
results.

Support is only for donors?
What I questioned work in 0.3.6?

I've seen some threads asking the same bug in previous versions,
thus solving the earlier versions should also work here.

Can you help?
 
In Vocations lib
function isSorcerer(cid)
return isInArray({1, 5, 9}, getPlayerVocation(cid))
end

function isDruid(cid)
return isInArray({2, 6, 10}, getPlayerVocation(cid))
end

function isPaladin(cid)
return isInArray({3, 7, 11}, getPlayerVocation(cid))
end

function isKnight(cid)
return isInArray({4, 8, 12}, getPlayerVocation(cid))
end

function isRookie(cid)
return isInArray({0}, getPlayerVocation(cid))
end
 
Back
Top