Classes and profs

Open discussion forum. For topics that do not fit anywhere else.
Post Reply
Zik
Novice Poster
Posts: 41
Joined: Sun Feb 07, 2010 9:39 am

Classes and profs

Post by Zik »

Hello everybody!

I'm new to POL scripting, but i'm trying to learn.
On my POL97 shard i want to create 6 classes(mage, bard etc) according to max sum of class skills. And after reaching 500 mage's sumskill you can get a profession according to the second maximum sum of class skills. E.g. 520 mage's skills and 240 warrior's skill and 150 ranger's skills will make you a BattleMage(Mage+warrior).
Each class will have their own bonuses and additional bonus from profession.

Can someone give tips on how to do this?
Only tips, i want to make everything on my own, but Pol lacks some basic tutorials.

Great Thx in advance!
Tomi
POL Developer
Posts: 478
Joined: Tue Feb 21, 2006 5:08 pm

Re: Classes and profs

Post by Tomi »

if I were you I should grab a complete scriptset ( there are some on the forums ) and look from there the skillgain and cap systems so you can see somewhat how they should be.... and then try your own
Zik
Novice Poster
Posts: 41
Joined: Sun Feb 07, 2010 9:39 am

Re: Classes and profs

Post by Zik »

Tomi wrote:if I were you I should grab a complete scriptset ( there are some on the forums ) and look from there the skillgain and cap systems so you can see somewhat how they should be.... and then try your own
I have the Distro script package.

So i made just for testing smth like this:

Code: Select all

var ClassSkill := ClassSkillInfo(who);
		case (ClassSkill)
			1: var WarStrengthMod := ( AP_GetStat(mobile, STRENGTH) + 20 );
				AP_SetTrueStat(mobile, STRENGTH) , WarStrengthMod );	
				CLASS_SetMobileClassName(mobile, Warrior);	

			2: var MageIntelligenceMod := ( AP_GetStat(mobile, INTELLIGENCE) + 20 );
				AP_SetTrueStat(mobile, INTELLIGENCE) , MageIntelligenceMod );
				CLASS_SetMobileClassName(mobile, Mage);
		endcase
		
	

	return 1;
endprogram


function ClassSkillInfo(who)
	var WarSkills := ( AP_GetSkill(mobile, ANATOMY) + AP_GetSkill(mobile, FENCING) );
	var MageSkills := ( AP_GetSkill(mobile, MAGERY) + AP_GetSkill(mobile, MEDITATION) );
	if WarSkills > MageSkills
		return 1;
	else 
		return 2;
	endif
endfunction
I've put this into pkg\mobiles\newCharacter/oncreate.src
I have also a start_script command in scripts\misc/oncreate.src for starting the one above.
It SHOULD check 2 warrior skills and 2 mage skills, then add +20 str or int, each LogIn.
Question: is there any "OnLogOut" scripts to remove those mods, to prevent infinite stat gain?

Is it OK doing this via oncreate?

PS. And thx for the tip, i'll look for scriptbases.
Tomi
POL Developer
Posts: 478
Joined: Tue Feb 21, 2006 5:08 pm

Re: Classes and profs

Post by Tomi »

look for logoff.src scripts to do stuff during logout
Post Reply