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

Magic level restriction if not enough lvl, rep++

Bam

Active Member
Joined
Aug 11, 2007
Messages
1,446
Reaction score
39
Location
Sweden
Ohai there!

Im out after a script that makes it impossible to get a higher magic level if you are at a certain point of lvl.


Lets say your lvl 8, you should only be able to get mlvl 15max.
Then u get lvl 9, and you will only be able to get mlvl 17 max.
For lvl 10 its max 19

And so on and so on.

I'll rep about 3 times for this script :)
 
Try this at player.cpp ::addManaSpent:
Code:
        if(level >= 8)
	{
		int maxMagLevel = ((level - 8) * 2) + 15;
		if(magLevel >= maxMagLevel)
			return false;
	}

Dont blame me if something is wrong, I know nothing about cpp :(
 
Pretty sure that wont work :p

I think it should be possible in scripts since it should just stop the manaspent at a certain point ..
 
Here, fixed:
Code:
	if(level >= 6)
	{
		int maxMagLevel = ((level - 6) * 2) + 11;
		if(magLevel >= maxMagLevel)
		{
			//sendCancel("Cant level more :(");
			amount = 0;
		}
	}
or like this heh:
Code:
	if(level >= 6)
	{
		int maxMagLevel = ((level - 6) * 2) + 11;
		if(magLevel >= maxMagLevel)
                    return;
	}
w0mcgg.jpg
 
Last edited:
It's copy/paste/compile? What C++/C skills are required on your part? :huh:

Where to put it, relace it with what etc. But i'm compiling it now, so we'll see what happends :-) Usually people say like

REPLACE
Code:
bla bla bla

WITH
Code:
bla bla blai

That's why im unsure about my skills :>


Edit: compiled withouot problems! thanks alot for the help :)
 
Back
Top