adding more level help

Read log files for errors! If this fails, come here for help

Moderator: Forum Moderator

Post Reply
whosyourdaddy
Spell Breaker
Posts: 398
Joined: Sun Apr 27, 2008 10:11 pm

adding more level help

Post by whosyourdaddy » Sun Jun 15, 2008 1:43 am

i went into the const file and changed

Code: Select all

#define MAX_LEVELS					10
#define MAX_SKILLS				36
#define MAX_RACE_SKILLS         3
#define MAX_SKILL_LEVEL			3

to

Code: Select all

#define MAX_LEVELS					13
#define MAX_SKILLS				48
#define MAX_RACE_SKILLS         4
#define MAX_SKILL_LEVEL			4

and i also added more options like for example this

Code: Select all

// Constants for Abilities
new const Float:p_vampiric[4] =			{0.10,0.20,0.30,0.40}		// Vampiric Aura			(skill 1)
but my the dedicated server im testing it on doesnt work and it crashes before it even loads, does any1 know what im doing wrong?

i tried keeping it at 10 levels but changing everything else and it wont crash so it seems by changing max_level it crashes but the menu will show option 4 and wont let me click on it any idea on why that happens 2

i went through other peoples post and couldnt find a solution

if there is more than this file that i need to edit can any1 tell me which files please and thank you

whosyourdaddy
Spell Breaker
Posts: 398
Joined: Sun Apr 27, 2008 10:11 pm

Post by whosyourdaddy » Sun Jun 15, 2008 6:28 pm

well i went trough every files doing a search for level and if it had anythin with 10 i change it to the max level that i wanted but now for the skills, it brings up the menu but it wont update the skills, for example option one would be the skill name and then level 4 but when i click on it nothing any idea how i can fix that?
Image

DarkGod
Peon
Posts: 12
Joined: Tue May 27, 2008 6:44 am

Post by DarkGod » Sun Jun 15, 2008 9:21 pm

why would you change MAX_SKILLS ? :?

whosyourdaddy
Spell Breaker
Posts: 398
Joined: Sun Apr 27, 2008 10:11 pm

Post by whosyourdaddy » Sun Jun 15, 2008 11:11 pm

dont know but i got everything working now and server doesnt crash or have bugs as far as i can tell, been playing for 10 hours with it and got no bug posts or server crashes on forums. i added it to level 13 and skills go up to level 4 now

User avatar
Geesu
<b>King of the world!</b>
Posts: 3159
Joined: Tue Jul 05, 2005 9:24 pm
Contact:

Post by Geesu » Mon Jun 16, 2008 8:40 am

This won't work.........

Skills go up to level 4 = shit ton of run time errors in your log files... and skills that are level 4 won't work at all
No Support via PM

whosyourdaddy
Spell Breaker
Posts: 398
Joined: Sun Apr 27, 2008 10:11 pm

Post by whosyourdaddy » Mon Jun 16, 2008 3:55 pm

actually im getting no run time erros and the level 4 skills are working
Image

User avatar
Geesu
<b>King of the world!</b>
Posts: 3159
Joined: Tue Jul 05, 2005 9:24 pm
Contact:

Post by Geesu » Mon Jun 16, 2008 4:05 pm

prob. b/c they're level 3 skills, not level 4 skills...

so maybe it's working, but you're not gaining anything after u hit level 10
No Support via PM

whosyourdaddy
Spell Breaker
Posts: 398
Joined: Sun Apr 27, 2008 10:11 pm

Post by whosyourdaddy » Mon Jun 16, 2008 4:08 pm

actually the levels go up to 13 and i checked it on my human instead of 145 hp i can get 160 hp with skills only
Image

User avatar
Geesu
<b>King of the world!</b>
Posts: 3159
Joined: Tue Jul 05, 2005 9:24 pm
Contact:

Post by Geesu » Tue Jun 17, 2008 3:02 pm

ok you got me.... devotion works... these won't:

Code: Select all

// Constants for Abilities
new const Float:p_vampiric[3] =			{0.10,0.20,0.30}		// Vampiric Aura			(skill 1)
new Float:p_unholy[3] =					{265.0,285.0,300.0}		// Unholy Aura				(skill 2)
new Float:p_unholy_dod[3] =				{33.3,66.6,100.0}		// Unholy Aura				(skill 2)
new const Float:p_levitation[3] =		{0.8,0.6,0.4}			// Levitation				(skill 3)

new const p_invisibility[3] =			{200,175,135}			// Invisibility				(skill 1)
new const Float:p_bash[3] =				{0.10,0.20,0.30}		// Bash						(skill 3)

new const Float:p_critical[3] =			{0.25,0.50,0.75}		// Critical Strike			(skill 1)
new const Float:p_grenade[3] =			{2.0,3.0,4.0}			// Critical Grenade			(skill 2)
new const Float:p_ankh[3] =				{0.333,0.666,1.0}		// Equipment reincarnation	(skill 3)

new const Float:p_evasion[3] =			{0.1,0.175,0.25}		// Evasion					(skill 1)
new const Float:p_thorns[3] =			{0.05,0.1,0.15}			// Thorns Aura				(skill 2)
new const Float:p_trueshot[3] =			{0.1,0.2,0.35}			// Trueshot Aura			(skill 3)


new const Float:p_phoenix[3] =			{0.333,0.666,1.0}		// Phoenix					(skill 1)
new const p_phoenix_dod[3] =			{300,600,900}			// Phoenix - DOD			(skill 1)
new const Float:p_banish[3] =			{0.05,0.10,0.15}		// Banish					(skill 2)
new const Float:p_mana[3] =				{0.02,0.04,0.08}		// Siphon Mana				(skill 3)
new const Float:p_resistant[11] =		{0.02, 0.04, 0.08, 0.12, 0.16, 0.20, 0.24, 0.28, 0.32, 0.36, 0.40}	// Resistant Skin		(Skill 4)

new const Float:p_heal[3] =				{6.0,4.0,2.0}			// Healing Wave				(skill 1)
new const Float:p_hex[3] =				{0.05,0.10,0.15}		// Hex						(skill 2)
new const p_serpent[3] =				{1,2,3}					// Serpent Ward				(skill 3)
new const Float:p_concoction[11] =		{0.01, 0.02, 0.03, 0.04, 0.05, 0.06, 0.07, 0.08, 0.09, 0.10, 0.15}	// Unstable Concoction	(Skill 4)

new const Float:p_fan[3] =				{0.05,0.10,0.15}		// Fan of Knives			(skill 1)
new const Float:p_blink[3] =			{0.333,0.666,1.0}		// Blink					(skill 2)
new const Float:p_shadow[3] =			{0.05,0.10,0.15}		// Shadow Strike			(skill 3)
new const Float:p_harden[11] =			{0.03, 0.05, 0.10, 0.15, 0.20, 0.25, 0.30, 0.35, 0.40, 0.45, 0.50}	// Hardened Skin		(Skill 4)

new const Float:p_impale[3] =			{0.05,0.1,0.15}		    // Impale					(skill 1)
new const Float:p_spiked[3] =			{0.05,0.1,0.15}			// Spiked Carapace			(skill 2)
new const Float:p_carrion[3] =			{0.05,0.10,0.15}		// Carrion Beetle			(skill 3)
new const Float:p_orb[11] =				{0.01, 0.02, 0.03, 0.04, 0.05, 0.06, 0.07, 0.08, 0.09, 0.10, 0.15}	// Orb of Annihilation	(Skill 4)
Notice the size of the array is either 10 (based on levels) - or 3 (based on skill level)

/end argument
No Support via PM

whosyourdaddy
Spell Breaker
Posts: 398
Joined: Sun Apr 27, 2008 10:11 pm

Post by whosyourdaddy » Tue Jun 17, 2008 5:24 pm

this is the only error im getting

Code: Select all

L 06/17/2008 - 16:25:37: We should never be here!!! (6)
and these are my floats

Code: Select all

// Constants for Abilities
new const Float:p_vampiric[4] =			{0.10,0.20,0.30,0.40}		// Vampiric Aura			(skill 1)
new Float:p_unholy[4] =					{265.0,285.0,300.0,320.0}		// Unholy Aura				(skill 2)
new Float:p_unholy_dod[4] =				{33.3,66.6,100.0,133.3}		// Unholy Aura				(skill 2)
new const Float:p_levitation[4] =		{0.8,0.6,0.4,0.3}			// Levitation				(skill 3)

new const p_invisibility[4] =			{200,175,135,120}			// Invisibility				(skill 1)
new const p_devotion =					15						// Devotion Aura			(skill 2)
new const Float:p_bash[4] =				{0.10,0.20,0.30,0.40}		// Bash						(skill 3)

new const Float:p_critical[4] =			{0.25,0.50,0.75,0.85}		// Critical Strike			(skill 1)
new const Float:p_grenade[4] =			{2.0,3.0,4.0,5.0}			// Critical Grenade			(skill 2)
new const Float:p_ankh[4] =				{0.333,0.666,0.788,1.0}		// Equipment reincarnation	(skill 3)

new const Float:p_evasion[4] =			{0.1,0.175,0.25,0.275}		// Evasion					(skill 1)
new const Float:p_thorns[4] =			{0.05,0.1,0.15,0.2}			// Thorns Aura				(skill 2)
new const Float:p_trueshot[4] =			{0.1,0.2,0.35,0.45}			// Trueshot Aura			(skill 3)


new const Float:p_phoenix[4] =			{0.333,0.666,0.788,1.0}		// Phoenix					(skill 1)
new const p_phoenix_dod[4] =			{300,600,900,1200}			// Phoenix - DOD			(skill 1)
new const Float:p_banish[4] =			{0.05,0.10,0.15,0.20}		// Banish					(skill 2)
new const Float:p_mana[4] =				{0.02,0.04,0.08,0.12}		// Siphon Mana				(skill 3)
new const Float:p_resistant[14] =		{0.02, 0.04, 0.08, 0.12, 0.16, 0.20, 0.24, 0.28, 0.32, 0.34, 0.36,0.38,0.40,0.42}	// Resistant Skin	
new const Float:p_heal[4] =				{6.0,4.0,2.0,1.5}			// Healing Wave				(skill 1)
new const Float:p_hex[4] =				{0.05,0.10,0.15,0.20}		// Hex						(skill 2)
new const p_serpent[4] =				{1,2,3,4}					// Serpent Ward				(skill 3)
new const Float:p_concoction[14] =		{0.01, 0.02, 0.03, 0.04, 0.05, 0.06, 0.07, 0.08, 0.09, 0.10, 0.11,0.12,0.13,0.14}	// Unstable Concoction	(Skill 4)

new const Float:p_fan[4] =				{0.05,0.10,0.15,0.20}		// Fan of Knives			(skill 1)
new const Float:p_blink[4] =			{0.333,0.666,0.8,1.0}		// Blink					(skill 2)
new const Float:p_shadow[4] =			{0.05,0.10,0.15,0.20}		// Shadow Strike			(skill 3)
new const Float:p_harden[14] =			{0.03, 0.05, 0.10, 0.15, 0.20, 0.25, 0.30, 0.35, 0.37, 0.40, 0.43,0.46,0.50,0.55}	// Hardened Skin		(Skill 4)

new const Float:p_impale[4] =			{0.05,0.1,0.15,0.2}		    // Impale					(skill 1)
new const Float:p_spiked[4] =			{0.05,0.1,0.15,0.2}			// Spiked Carapace			(skill 2)
new const Float:p_carrion[4] =			{0.05,0.10,0.15,0.2}		// Carrion Beetle			(skill 3)
new const Float:p_orb[14] =				{0.01, 0.02, 0.03, 0.04, 0.05, 0.06, 0.07, 0.08, 0.09, 0.10, 0.11,0.12,0.13,0.15}	// Orb of Annihilation	(Skill 4)
found the errror line in the ultimate file but i dont know whats wrong if u can help me

Code: Select all


ULT_RemoveCharge( id, iFuncID )
{

	if ( ITEM_Has( id, ITEM_NECKLACE ) > ITEM_NONE )
	{
		ITEM_RemoveCharge( id, ITEM_NECKLACE );
	}
	else if ( p_data_b[id][PB_WARDENBLINK] )
	{}
	else
	{
		WC3_Log( true, "We should never be here!!! (%d)", iFuncID );
	}

	client_print( id, print_chat, "%s You have blocked an enemy's ultimate!", g_MODclient );

	// Play ultimate blocked sound
	emit_sound( id, CHAN_STATIC, g_szSounds[SOUND_SPELLSHIELD], 1.0, ATTN_NORM, 0, PITCH_NORM );
}

User avatar
Geesu
<b>King of the world!</b>
Posts: 3159
Joined: Tue Jul 05, 2005 9:24 pm
Contact:

Post by Geesu » Tue Jun 17, 2008 8:02 pm

no idea tbh - well done on increasing tho
No Support via PM

whosyourdaddy
Spell Breaker
Posts: 398
Joined: Sun Apr 27, 2008 10:11 pm

Post by whosyourdaddy » Tue Jun 17, 2008 10:09 pm

found my problem for some reason i had

Code: Select all

#define MAX_SKILLS            36
but i changed it to 48 again. i would also like to thank you for all your help in all my posts
Image

whosyourdaddy
Spell Breaker
Posts: 398
Joined: Sun Apr 27, 2008 10:11 pm

Post by whosyourdaddy » Wed Jun 18, 2008 3:01 pm

well mabye u can help me with this error

Code: Select all

L 06/18/2008 - 15:37:01: [0] Invalid skill: -1 [4]
found the scirpting part in the skills_manager and its comes from this line

Code: Select all

// Returns the user's level for a certain skill
SM_GetSkillLevel( id, skill_id, debug_id = -1 )
{
	if ( !SM_IsValidSkill( skill_id ) )
	{
		WC3_Log( false, "[0] Invalid skill: %d [%d]", skill_id, debug_id );

		log_error( AMX_ERR_NATIVE, "[0] Invalid skill: %d [%d]", skill_id, debug_id );

		return 0;
	}

	// User doesn't have this skill
	if ( !g_bPlayerSkills[id][skill_id] )
	{
		return -1;
	}

	// If it's a passive skill, we'll just return the player's current level
	if ( g_SkillType[skill_id] == SKILL_TYPE_PASSIVE )
	{
		return p_data[id][P_LEVEL];
	}

	return g_PlayerSkillLevel[id][skill_id];
}
seems like one of my level 4 skills isnt working if u can be kind enough to look through them heres an update of all my skills now

Code: Select all

#define MAX_SKILLS				48
#define MAX_RACE_SKILLS         3
#define MAX_SKILL_LEVEL			4
#define MAX_ULTIMATE_LEVEL		1


new g_SkillOwner[MAX_SKILLS	];	// For each skill, says who the owning race is
new g_SkillType[MAX_SKILLS	];	// For each skill, says what type of skill it is (trainable/ultimate/passive)
new g_SkillOrder[MAX_SKILLS	];	// For each skill, lists what order it should appear in /level and /selectskill (and how it should save)

// Used to store what level each skill is for the players
new g_PlayerSkillLevel[33][MAX_SKILLS];			// Stores what level each skill is
new bool:g_bPlayerSkills[33][MAX_SKILLS];		// Stores what skills the player has available (set on race selection)

// Constants for Abilities
new const Float:p_vampiric[4] =			{0.10,0.20,0.30,0.40}		// Vampiric Aura			(skill 1)
new Float:p_unholy[4] =					{265.0,285.0,300.0,320.0}		// Unholy Aura				(skill 2)
new Float:p_unholy_dod[4] =				{33.3,66.6,100.0,133.3}		// Unholy Aura				(skill 2)
new const Float:p_levitation[4] =		{0.8,0.6,0.4,0.3}			// Levitation				(skill 3)

new const p_invisibility[4] =			{200,175,135,120}			// Invisibility				(skill 1)
new const p_devotion =					15						// Devotion Aura			(skill 2)
new const Float:p_bash[4] =				{0.10,0.20,0.30,0.40}		// Bash						(skill 3)

new const Float:p_critical[4] =			{0.25,0.50,0.75,0.85}		// Critical Strike			(skill 1)
new const Float:p_grenade[4] =			{2.0,3.0,4.0,5.0}			// Critical Grenade			(skill 2)
new const Float:p_ankh[4] =				{0.333,0.666,0.788,1.0}		// Equipment reincarnation	(skill 3)

new const Float:p_evasion[4] =			{0.1,0.175,0.25,0.28}		// Evasion					(skill 1)
new const Float:p_thorns[4] =			{0.05,0.1,0.15,0.2}			// Thorns Aura				(skill 2)
new const Float:p_trueshot[4] =			{0.1,0.2,0.35,0.45}			// Trueshot Aura			(skill 3)


new const Float:p_phoenix[4] =			{0.333,0.666,0.788,1.0}		// Phoenix					(skill 1)
new const p_phoenix_dod[4] =			{300,600,900,1200}			// Phoenix - DOD			(skill 1)
new const Float:p_banish[4] =			{0.05,0.10,0.15,0.20}		// Banish					(skill 2)
new const Float:p_mana[4] =				{0.02,0.04,0.08,0.12}		// Siphon Mana				(skill 3)
new const Float:p_resistant[14] =		{0.02, 0.04, 0.08, 0.12, 0.16, 0.20, 0.24, 0.28, 0.32, 0.34, 0.36, 0.38, 0.40, 0.42}	// Resistant Skin	
new const Float:p_heal[4] =				{6.0,4.0,2.0,1.0}			// Healing Wave				(skill 1)
new const Float:p_hex[4] =				{0.05,0.10,0.15,0.20}		// Hex						(skill 2)
new const p_serpent[4] =				{1,2,3,4}					// Serpent Ward				(skill 3)
new const Float:p_concoction[14] =		{0.01, 0.02, 0.03, 0.04, 0.05, 0.06, 0.07, 0.08, 0.09, 0.10, 0.11, 0.12, 0.13, 0.14}	// Unstable Concoction	(Skill 4)

new const Float:p_fan[4] =				{0.05,0.10,0.15,0.20}		// Fan of Knives			(skill 1)
new const Float:p_blink[4] =			{0.333,0.666,0.8,1.0}		// Blink					(skill 2)
new const Float:p_shadow[4] =			{0.05,0.10,0.15,0.20}		// Shadow Strike			(skill 3)
new const Float:p_harden[14] =			{0.03, 0.05, 0.10, 0.15, 0.20, 0.25, 0.30, 0.35, 0.37, 0.40, 0.43, 0.46, 0.50, 0.55}	// Hardened Skin		(Skill 4)

new const Float:p_impale[4] =			{0.05,0.1,0.15,0.2}		    // Impale					(skill 1)
new const Float:p_spiked[4] =			{0.05,0.1,0.15,0.2}			// Spiked Carapace			(skill 2)
new const Float:p_carrion[4] =			{0.05,0.10,0.15,0.2}		// Carrion Beetle			(skill 3)
new const Float:p_orb[14] =				{0.01, 0.02, 0.03, 0.04, 0.05, 0.06, 0.07, 0.08, 0.09, 0.10, 0.11, 0.12, 0.13, 0.14}	// Orb of Annihilation	(Skill 4)
mabye if its possible to do something like get race info and edit it to also give the race that the level skill 4 isnt working with. my guess is the warden tho, i think theres something else i need to change in one of the other logs for it, think you know what it is?

also on these

Code: Select all

new g_SkillOwner[MAX_SKILLS	];	// For each skill, says who the owning race is
new g_SkillType[MAX_SKILLS	];	// For each skill, says what type of skill it is (trainable/ultimate/passive)
new g_SkillOrder[MAX_SKILLS	];	// For each skill, lists what order it should appear in /level and /selectskill (and how it should save)
is there suppose to be a space after every max_skills

User avatar
Geesu
<b>King of the world!</b>
Posts: 3159
Joined: Tue Jul 05, 2005 9:24 pm
Contact:

Post by Geesu » Thu Jun 19, 2008 3:45 pm

that debug id is to help you determine what function called SM_GetSkillLevel

Search for SM_GetSkillLevel that passes a 4 as the last argument and you will find your trouble function
No Support via PM

whosyourdaddy
Spell Breaker
Posts: 398
Joined: Sun Apr 27, 2008 10:11 pm

Post by whosyourdaddy » Thu Jun 19, 2008 4:02 pm

how do i search the sm_GetSkillLevel ?
Image

User avatar
Geesu
<b>King of the world!</b>
Posts: 3159
Joined: Tue Jul 05, 2005 9:24 pm
Contact:

Post by Geesu » Thu Jun 19, 2008 10:47 pm

just search through all the .inl files and it will list where the functions are called :P

I would recommend using "windows grep" - wingrep.com... It's tight... then just search the entire war3ft folder for that function name - then you can find which file calls it with 4 as a parameter
No Support via PM

whosyourdaddy
Spell Breaker
Posts: 398
Joined: Sun Apr 27, 2008 10:11 pm

Post by whosyourdaddy » Fri Jun 20, 2008 2:22 am

can you give me an example of how one of the functions will look like
Image

User avatar
Geesu
<b>King of the world!</b>
Posts: 3159
Joined: Tue Jul 05, 2005 9:24 pm
Contact:

Post by Geesu » Fri Jun 20, 2008 8:34 am

Just search for SM_GetSkillLevel
No Support via PM

whosyourdaddy
Spell Breaker
Posts: 398
Joined: Sun Apr 27, 2008 10:11 pm

Post by whosyourdaddy » Fri Jun 20, 2008 3:03 pm

thanks found the problem

Code: Select all

if ( p_data[id][P_LEVEL] <= 3 * iSkillLevel )
had to change the 3 to a 4, i appreciate the help alot
Image

whosyourdaddy
Spell Breaker
Posts: 398
Joined: Sun Apr 27, 2008 10:11 pm

Post by whosyourdaddy » Fri Jun 20, 2008 5:37 pm

any help on this error

Code: Select all

L 06/17/2008 - 16:25:37: We should never be here!!! (6)
and these are my floats

found the errror line in the ultimate file but i dont know whats wrong if u can help me

Code: Select all


ULT_RemoveCharge( id, iFuncID )
{

	if ( ITEM_Has( id, ITEM_NECKLACE ) > ITEM_NONE )
	{
		ITEM_RemoveCharge( id, ITEM_NECKLACE );
	}
	else if ( p_data_b[id][PB_WARDENBLINK] )
	{}
	else
	{
		WC3_Log( true, "We should never be here!!! (%d)", iFuncID );
	}

	client_print( id, print_chat, "%s You have blocked an enemy's ultimate!", g_MODclient );

	// Play ultimate blocked sound
	emit_sound( id, CHAN_STATIC, g_szSounds[SOUND_SPELLSHIELD], 1.0, ATTN_NORM, 0, PITCH_NORM );
}
[/quote]

whosyourdaddy
Spell Breaker
Posts: 398
Joined: Sun Apr 27, 2008 10:11 pm

Post by whosyourdaddy » Sun Jun 22, 2008 12:40 pm

whosyourdaddy wrote:thanks found the problem

Code: Select all

if ( p_data[id][P_LEVEL] <= 3 * iSkillLevel )
had to change the 3 to a 4, i appreciate the help alot
well if i have it at 4 then i get no errors but if i have it at 3, players wont be able to use there 4th skill point until they level to level 5. here is teh whole line mabye u can help me out and tell me waht to change cause i cant find out what

Code: Select all

#define MAX_SKILLS				48
#define MAX_RACE_SKILLS         3
#define MAX_SKILL_LEVEL			4
#define MAX_ULTIMATE_LEVEL		1

Code: Select all

iSkillLevel = SM_GetSkillLevel( id, iSkillID, 4 );

		LANG_GetSkillName( iSkillID , id, szSkillName, 63, 1 );
		
		// Add the trainable skills to the menu
		if ( SM_GetSkillType( iSkillID ) == SKILL_TYPE_TRAINABLE )
		{

			// Only add it to the menu if they don't have level 3 already!
			if ( iSkillLevel < MAX_SKILL_LEVEL )
			{

				// User isn't high enough of a level to select this skill yet
				if ( p_data[id][P_LEVEL] <= 3 * iSkillLevel )
				{
					pos += formatex( szMsg[pos], 512-pos, "\d" );
				}

				// Then the user can choose it!
				else
				{
					iKeys |= (1<<iSkillCounter);
				}

				pos += formatex( szMsg[pos], 512-pos, "^n%d. %s %L %d\w", iSkillCounter+1, szSkillName, id, "WORD_LEVEL", iSkillLevel + 1 );
			}
		}
		
		// Add the ultimate to the menu
		else if ( SM_GetSkillType( iSkillID ) == SKILL_TYPE_ULTIMATE )
		{

			if ( iSkillLevel < MAX_ULTIMATE_LEVEL )
			{
				// User can't choose ultimate yet :/
				if ( p_data[id][P_LEVEL] <= 5 )
				{
					pos += formatex( szMsg[pos], 512-pos, "\d" );
				}

				// Then the user is level 6 or above and can select their ultimate!
				else
				{
					iKeys |= (1<<iSkillCounter);
				}

				pos += formatex( szMsg[pos], 512-pos, "^n%d. %L: %s\w", iSkillCounter+1, id, "WORD_ULTIMATE", szSkillName );
			}
		}

		iSkillCounter++;
		iSkillID = SM_GetSkillByPos( id, iSkillCounter );
	}

	// Add the cancel button to the menu
	pos += formatex( szMsg[pos], 512-pos, "^n^n0. %L", id, "WORD_CANCEL" );

	// Show the menu!
	show_menu( id, iKeys, szMsg, -1 );

	return;
}

public _MENU_SelectSkill( id, iKey )
{

	if ( !WC3_Check() || iKey == 9 )
	{
		return PLUGIN_HANDLED;
	}

	// Determine which key was just selected
	new iSkillID = SM_GetSkillByPos( id, iKey );

	// Set up the skill!
	SM_SetSkill( id, iSkillID );
	
	new iSkillsUsed = SM_TotalSkillPointsUsed( id );
	
	// Then they have another skill to select!!
	if ( iSkillsUsed < p_data[id][P_LEVEL] )
	{
		MENU_SelectSkill( id );
	}

	// No more, lets show them their latest level/XP
	else
	{
		WC3_ShowBar( id );
	}

	return PLUGIN_HANDLED;
}

whosyourdaddy
Spell Breaker
Posts: 398
Joined: Sun Apr 27, 2008 10:11 pm

Re:

Post by whosyourdaddy » Sat Jul 05, 2008 2:43 am

any help on this error

Code: Select all

L 06/17/2008 - 16:25:37: We should never be here!!! (6)
and these are my floats

found the errror line in the ultimate file but i dont know whats wrong if u can help me

Code: Select all


ULT_RemoveCharge( id, iFuncID )
{

	if ( ITEM_Has( id, ITEM_NECKLACE ) > ITEM_NONE )
	{
		ITEM_RemoveCharge( id, ITEM_NECKLACE );
	}
	else if ( p_data_b[id][PB_WARDENBLINK] )
	{}
	else
	{
		WC3_Log( true, "We should never be here!!! (%d)", iFuncID );
	}

	client_print( id, print_chat, "%s You have blocked an enemy's ultimate!", g_MODclient );

	// Play ultimate blocked sound
	emit_sound( id, CHAN_STATIC, g_szSounds[SOUND_SPELLSHIELD], 1.0, ATTN_NORM, 0, PITCH_NORM );
}
heres func 6

Code: Select all

// This function will handle ultimate icons - basically shows if appropriate or hides if appropriate
ULT_IconHandler( id )
{
	// WC3 isn't running... shux
	if ( !WC3_Check() )
	{
		return;
	}
	
	new bool:bShowIcon = true;

	// User has no ultimate!
	new iUltimateID = SM_GetSkillOfType( id, SKILL_TYPE_ULTIMATE );
	if ( iUltimateID > -1 && SM_GetSkillLevel( id, iUltimateID, 6 ) <= 0 )
	{
		bShowIcon = false;
	}

	// In global delay - can't show icon!
	else if ( g_iUltimateDelay > 0 )
	{
		bShowIcon = false;
	}

	// User's delay is longer!
	else if ( p_data[id][P_ULTIMATEDELAY] > 0 )
	{
		bShowIcon = false;
	}

	// User is dead - don't show icon!
	else if ( !is_user_alive( id ) )
	{
		bShowIcon = false;
	}

	// User isn't connected! - don't show icon!
	else if ( !p_data_b[id][PB_ISCONNECTED] )
	{
		bShowIcon = false;
	}


	// We need to hide the user's icon!
	if ( !bShowIcon )
	{
		// In theory I could remember what was displayed when - but easy way out is this
		ULT_ClearIcons( id );
	}

	// Show the user's icon!
	else
	{
		// Play the ultimate ready sound
		client_cmd( id, "speak %s", g_szSounds[SOUND_ULTIMATEREADY] )
		
		// Give the user a graphical message that their ultimate is ready
		WC3_StatusText( id, TXT_ULTIMATE, "%L", id, "ULTIMATE_READY" );
		
		// Show their ultimate icon
		ULT_Icon( id, ICON_SHOW );
	}
}
well i noticed sometimes it wont block an ultimate even if they have a necklace. i was wondering if this could happen because i need to change something more for the wardenblink necklace or mabye if its happening becuase i got max skill levels to lvl 4 which makes wardenblink conflict with this. usually happens when some1 uses crypt lord ultimate it sometimes passes through the necklace
Image

whosyourdaddy
Spell Breaker
Posts: 398
Joined: Sun Apr 27, 2008 10:11 pm

Re: adding more level help

Post by whosyourdaddy » Tue Jul 08, 2008 10:51 pm

if im making max skills = 4 then do i change this 3 to 4 also?

Code: Select all

if ( greindex && iSkillLevel > 0 )
	{
		
		// Then Critical Grenades are allowed
		if ( OR_CriticalGrenadeAllowed( index ) )
		{

			// Then draw it!
			if ( SHARED_IsGrenade( wId ) )
			{
				new iWidth = 3 * iSkillLevel;

				Create_TE_BEAMFOLLOW( greindex, g_iSprites[SPR_TRAIL], 20, iWidth, 255, 32, 32, 196 );
			}
		}
	}
Image

whosyourdaddy
Spell Breaker
Posts: 398
Joined: Sun Apr 27, 2008 10:11 pm

Re: adding more level help

Post by whosyourdaddy » Wed Jul 09, 2008 1:47 am

whats this used for

Code: Select all

#define MAX_PLAYER_SKILLS			6
do i need to higher it if my skill level max is 4?
Image

User avatar
Striker
Footman
Posts: 106
Joined: Thu Jul 07, 2005 2:40 pm
Location: Duisburg, Germany
Contact:

Re: adding more level help

Post by Striker » Tue Jan 06, 2009 4:23 pm

wow... didn't notice this thread until now.

Did you solve all your problems ?
It would be nice when it's possible to get the sourcecode... would like to play with it :)

whosyourdaddy
Spell Breaker
Posts: 398
Joined: Sun Apr 27, 2008 10:11 pm

Re: adding more level help

Post by whosyourdaddy » Wed Jan 07, 2009 1:10 am

lol yes i solved the problem, also added a 4th skill to all races and made 2 extra races
Image

Post Reply