• 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 Adding a fifth vocation, with requirements.

cake

Banned User
Joined
Jul 24, 2010
Messages
838
Reaction score
58
Location
good or bad,
Hiya,

I'm sorry for asking another question, I'll make it short:
I want to add a new vocation, called 'Hero (male)/Heroine (female)'
It requires that you have killed creature X.
Once that is done, you will automaticly be changed to Hero/Heroine.

But to make it so those who was Elder Druids can only use druid spells, aswell as those who were Elite Knights can only use their spells, do I believe I need to make 4 different Hero/Heroine files.

Once you're a Hero/Heroine, your regeneration is 1.5 faster (1.0 being the old one), also you will be gained +2% passive resistance to everything.


Is it possible?
Also note, I don't just want the script done by one of you guys, even though it's very nice of you. If you could tell me how to make it, or explain it a little, would it be great, as I would love to do this myself!

:)
 
OK; so I played around a little & copied a few strings from the vocations.xml:

Code:
    <vocation id="1" name="Sorcerer" description="a sorcerer" needpremium="0" gaincap="10" gainhp="5" gainmana="30" gainhpticks="6" gainhpamount="5" gainmanaticks="3" gainmanaamount="5" manamultiplier="1.1" attackspeed="2000" soulmax="100" gainsoulticks="120" fromvoc="1">
        <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>

Now I changed that to:

Code:
    <vocation id="13" name="Hero" description="a Hero" needpremium="0" gaincap="10" gainhp="5" gainmana="30" gainhpticks="6" gainhpamount="5" gainmanaticks="3" gainmanaamount="5" manamultiplier="1.1" attackspeed="2000" soulmax="100" gainsoulticks="120" >
        <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>

Note that this is for the male sorceror.

That would make the name 'Hero' & show it as 'an Hero', but how do I edit regeneration & resistances?
 
Ok let me explain you a little bit
vocations.xml

Code:
<vocation id="9" name="Epic Master Sorcerer" description="an epic master sorcerer" needpremium="0" gaincap="10" gainhp="5" gainmana="30" gainhpticks="1" gainhpamount="50" gainmanaticks="1" gainmanaamount="50" 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"/>

Try putting the ID so nothing is mixed
Example (1 sorc, 2 druid, 3 paladin, 4 knight) that way when you get promoted is (5 MS, 6 ED, 7 RP, 8 EK) if you gonna name em all hero then do it that way and you know which is sorc,etc.
Anyway to know from what voc they came and specify what voc they will be afterwards you must change this
Code:
fromvoc="5"
You should specify from what voc ID they come, (in this case from master sorcerer)

gainhp="5" --- How many hp won per level
gainmana="30" -- How many mana won pe level
gainhpticks="1" --How many seconds to get 'x(gainhpamount)' ammount of hp.
gainhpamount="50" -- How many HP amount per 'x(gainhpticks)' seconds
gainmanaticks="1" -- How many seconds to get 'x(gainmanaamount)' ammount of mana.
gainmanaamount="50" -- How many mana amount per 'x(gainmanaticks)' seconds

Well I think it was the best explanation I could give you
If i helped please REP me + :).
 
Ok let me explain you a little bit
vocations.xml

Code:
<vocation id="9" name="Epic Master Sorcerer" description="an epic master sorcerer" needpremium="0" gaincap="10" gainhp="5" gainmana="30" gainhpticks="1" gainhpamount="50" gainmanaticks="1" gainmanaamount="50" 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"/>

Try putting the ID so nothing is mixed
Example (1 sorc, 2 druid, 3 paladin, 4 knight) that way when you get promoted is (5 MS, 6 ED, 7 RP, 8 EK) if you gonna name em all hero then do it that way and you know which is sorc,etc.
Anyway to know from what voc they came and specify what voc they will be afterwards you must change this
Code:
fromvoc="5"
You should specify from what voc ID they come, (in this case from master sorcerer)

gainhp="5" --- How many hp won per level
gainmana="30" -- How many mana won pe level
gainhpticks="1" --How many seconds to get 'x(gainhpamount)' ammount of hp.
gainhpamount="50" -- How many HP amount per 'x(gainhpticks)' seconds
gainmanaticks="1" -- How many seconds to get 'x(gainmanaamount)' ammount of mana.
gainmanaamount="50" -- How many mana amount per 'x(gainmanaticks)' seconds

Well I think it was the best explanation I could give you
If i helped please REP me + :).

Thanks! Helped a lot!

"You must spread some Reputation around before giving it to santigggg again."
:(

You got any clue on how to make it happen automaticly once you kill the required creature?
 
You should just hire a scripter for your server. Also this section isn't for requests

I wasn't requesting, as I stated in the start of my topic I was seeking help for making it, such as explanation. santigggg did a great job helping me, without scripting it for me at all.
I have no idea what the codes/strings/scripts for passive resistance is, that's why I'm asking.
 
You should just hire a scripter for your server. Also this section isn't for requests

She isnt requestiong, she is just asking for help.

Also note, I don't just want the script done by one of you guys, even though it's very nice of you. If you could tell me how to make it, or explain it a little, would it be great, as I would love to do this myself!

That's what she said.
 
In order to make Hero/Heroine vocations, witch is based on your currently vocation, + sex gender. Then you will need to make 8 new vocations with pretty much the same name.
 
In order to make Hero/Heroine vocations, witch is based on your currently vocation, + sex gender. Then you will need to make 8 new vocations with pretty much the same name.

Yes I thought about that, however my biggest problem is making it automatic after you kill creature X
 
Make an onkill script. If voc 1 or 5 then if male then promote to vocation 9(sorc hero) else promote vocation 13(sorc heroine).
 
When killing the monster, checks if their vocation is 1 or 5, if it is then checks if they're male, if so promotes to vocation 9, if female then promotes to 13
 
Back
Top