Jump to content
  • 0

buildin_delitem: failed to delete 1 item


Question

Recommended Posts

  • 0
Posted
-	script	Items_Conf	-1,{

OnInit:

	callsub Ids, 60656, 1, 1004, 1, 60657, 1, 1004, 1, 60658, 1, 1004,  0 ;
	callsub Ids, 60635, 1, 111, 1, 60636, 1, 111, 1, 60637, 1, 111,  0 ;
/*
	ID[...], evolution mode[...], mob id[...], neccessary to get 1%[...].
	If  you want any monster, use 111.

Evolution modes:

	1 = Every X numer of mobs (1%).
	2 = Experience (1%).
*/

/*
	0 = Won't be evolved automatically.
	1 = Will be evolved automatically
*/
	.auto = 1;

/*
	Color of the announces.
*/
	setarray .c$[0],	"4db557",	// % of evolution.
				"d43438",	// Wings evolving.
				"4da5b5";	// Wings evolved.

/* slots to check.
	EQI_ACC_L (0)             - Accessory 1
	EQI_ACC_R (1)             - Accessory 2
	EQI_SHOES (2)             - Footgear (shoes, boots)
	EQI_GARMENT (3)           - Garment (mufflers, hoods, manteaux)
	EQI_HEAD_LOW (4)          - Lower Headgear (beards, some masks)
	EQI_HEAD_MID (5)          - Middle Headgear (masks, glasses)
	EQI_HEAD_TOP (6)          - Upper Headgear
	EQI_ARMOR (7)             - Armor (jackets, robes)
	EQI_HAND_L (8)            - Left hand (weapons, shields)
	EQI_HAND_R (9)            - Right hand (weapons)
	EQI_COSTUME_HEAD_TOP (10) - Upper Costume Headgear
	EQI_COSTUME_HEAD_MID (11) - Middle Costume Headgear
	EQI_COSTUME_HEAD_LOW (12) - Lower Costume Headgear
	EQI_COSTUME_GARMENT (13)  - Costume Garment
	EQI_AMMO (14)    		  - Arrow/Ammunition
	EQI_SHADOW_ARMOR (15)     - Shadow Armor
	EQI_SHADOW_WEAPON (16)    - Shadow Weapon
	EQI_SHADOW_SHIELD (17)    - Shadow Shield
	EQI_SHADOW_SHOES (18)     - Shadow Shoes
	EQI_SHADOW_ACC_R (19)     - Shadow Accessory 2
	EQI_SHADOW_ACC_L (20)     - Shadow Accessory 1
*/

	setarray .slots[0], 	EQI_HEAD_LOW, 
				EQI_HEAD_MID,
				EQI_HEAD_TOP;

	//=============================================

	.w1 = 0;

	end ;

Ids:

	.@index = .w1;
	.w1++;
	for ( .@args = getargcount ( ); .@a < .@args ; .@a+=4 )
	{
		.@i = ++.w2[.@index];
		setd ".a1"+ .w1 +"_"+ .@i, getarg ( .@a );	// id.
		setd ".a2"+ .w1 +"_"+ .@i, getarg ( .@a + 1 );	// mode.
		setd ".a3"+ .w1 +"_"+ .@i, getarg ( .@a + 2 );	// mob id.
		setd ".a4"+ .w1 +"_"+ .@i, getarg ( .@a + 3 );	// amount.
	}
	return ;

OnNPCKillEvent:

	// Cache. That old loop on every mob killed...
	if ( @wing[0] && isequipped ( @wing[0] ) )
	{
		.@c  = 1;
		.@e  = @wing[0];
		.@w  = @wing[1];
		.@id = @wing[2];
		.@a  = @wing[3];
	}
	else
	{
		for ( .@size = getarraysize ( .slots ); .@a < .@size && !.@c ; .@a++ )
		{
			.@e = getequipid ( .slots[.@a] );
			if ( .@e < 0 )
				continue ;
			.@id = 0;
			.@w = 1;
			while ( .@id++ <= .w2[.@w - 1] && !.@c )
			{
				if ( .@id > .w2[.@w - 1] )
				{
					.@id = 1;
					.@w++;
				}
				if ( .@e == getd ( ".a1"+ .@w +"_"+ .@id ) && getd ( ".a1"+ .@w +"_"+ ( .@id + 1 ) ) )
					if ( getd ( ".a4"+ .@w +"_"+ .@id ) > 0 && ( killedrid == getd ( ".a3"+ .@w +"_"+ .@id ) || getd ( ".a3"+ .@w +"_"+ .@id ) < 1001 ) )
					{
						.@c = 1;
						setarray @wing[0], .@e, .@w, .@id, .@e, .@a;
					}
			}
		}
	}

	if ( .@c )
	{
		if ( getd ( ".a2"+ .@w +"_"+ .@id ) == 1 )
		{
			.@amount = getd ( "mobs_"+ .@e );
			setd "mobs_"+ .@e, .@amount + 1;
			if ( getd ( "mobs_"+ .@e ) < getd ( ".a4"+ .@w +"_"+ .@id ) ) end ;
			setd "evo"+ .@e, getd ( "evo"+ .@e ) + 1;
			setd "mobs_"+ .@e, 0;
		}
		else if ( getd ( ".a2"+ .@w +"_"+ .@id ) == 2 )
		{
			.@amount = getd ( "exp_"+ .@e );
			setd "exp_"+ .@e, .@amount + strmobinfo ( 6, killedrid );
			if ( getd ( "exp_"+ .@e ) < getd ( ".a4"+ .@w +"_"+ .@id ) ) end ;
			setd "evo"+ .@e, getd ( "evo"+ .@e ) + 1;
			setd "exp_"+ .@e, 0;
		}
		else
			debugmes "Script Items_Evo, error: wrong mode.";
		announce getitemname ( .@e ) +" is now "+ getd ( "evo"+ .@e ) +"% from evolving...", bc_self, "0x"+ .c$[0] ;
		specialeffect2 58 ;
		sleep2 200 ;
		specialeffect2 383 ;
		if ( getd ( "evo"+ .@e ) >= 100 && .auto )
		{
			specialeffect2 263 ;
			sleep2 500 ;
			specialeffect2 377 ;
			sleep2 300 ;
			specialeffect2 542 ;
			sleep2 300 ;
			announce getitemname ( .@e ) +" is evolving..." , bc_self, "0x"+ .c$[1] ;
			.@i = 3;
			while ( .@i-- )
			{
				specialeffect2 521 ;
				sleep2 900 ;
			}
			specialeffect2 463 ;
			sleep2 200;
			specialeffect2 665 ;
			sleep2 500 ;
			setarray .@card[1], getequipcardid ( .slots[.@a], 0 ), getequipcardid ( .slots[.@a], 1 ), getequipcardid ( .slots[.@a], 2 ), getequipcardid ( .slots[.@a], 3 );
			.@refine = getequiprefinerycnt ( .slots[.@a] );
			unequip .@a;
			delitem .@e, 1 ;
			getitem2 getd ( ".a1"+ .@w +"_"+ ( .@id + 1 ) ) , 1, 1, .@refine, 0, .@card[1], .@card[2], .@card[3], .@card[4] ;
			equip getd ( ".a1"+  .@w +"_"+ ( .@id + 1 ) ) ;
			setd "evo"+ .@e, 0;
			deletearray @wing ;
			announce "Congratulations, your wings have evolved to "+ getitemname ( getd ( ".a1"+ .@w +"_"+ ( .@id + 1 ) ) ) +"." , bc_self , "0x"+ .c$[2] ;
		}
	}
	end ;
}

 

  • 0
Posted

Sorry. And hello Giant Whisper.

-	script	Items_Conf	-1,{

OnInit:

	callsub Ids, 60656, 1, 1004, 1, 60657, 1, 1004, 1, 60658, 1, 1004,  0 ;
	callsub Ids, 60635, 1, 111, 1, 60636, 1, 111, 1, 60637, 1, 111,  0 ;
/*
	ID[...], evolution mode[...], mob id[...], neccessary to get 1%[...].
	If  you want any monster, use 111.

Evolution modes:

	1 = Every X numer of mobs (1%).
	2 = Experience (1%).
*/

/*
	0 = Won't be evolved automatically.
	1 = Will be evolved automatically
*/
	.auto = 1;

/*
	Color of the announces.
*/
	setarray .c$[0],	"4db557",	// % of evolution.
				"d43438",	// Wings evolving.
				"4da5b5";	// Wings evolved.

/* slots to check.
	EQI_ACC_L (0)             - Accessory 1
	EQI_ACC_R (1)             - Accessory 2
	EQI_SHOES (2)             - Footgear (shoes, boots)
	EQI_GARMENT (3)           - Garment (mufflers, hoods, manteaux)
	EQI_HEAD_LOW (4)          - Lower Headgear (beards, some masks)
	EQI_HEAD_MID (5)          - Middle Headgear (masks, glasses)
	EQI_HEAD_TOP (6)          - Upper Headgear
	EQI_ARMOR (7)             - Armor (jackets, robes)
	EQI_HAND_L (8)            - Left hand (weapons, shields)
	EQI_HAND_R (9)            - Right hand (weapons)
	EQI_COSTUME_HEAD_TOP (10) - Upper Costume Headgear
	EQI_COSTUME_HEAD_MID (11) - Middle Costume Headgear
	EQI_COSTUME_HEAD_LOW (12) - Lower Costume Headgear
	EQI_COSTUME_GARMENT (13)  - Costume Garment
	EQI_AMMO (14)    		  - Arrow/Ammunition
	EQI_SHADOW_ARMOR (15)     - Shadow Armor
	EQI_SHADOW_WEAPON (16)    - Shadow Weapon
	EQI_SHADOW_SHIELD (17)    - Shadow Shield
	EQI_SHADOW_SHOES (18)     - Shadow Shoes
	EQI_SHADOW_ACC_R (19)     - Shadow Accessory 2
	EQI_SHADOW_ACC_L (20)     - Shadow Accessory 1
*/

	setarray .slots[0], 	EQI_HEAD_LOW, 
				EQI_HEAD_MID,
				EQI_HEAD_TOP;

	//=============================================

	.w1 = 0;

	end ;

Ids:

	.@index = .w1;
	.w1++;
	for ( .@args = getargcount ( ); .@a < .@args ; .@a+=4 )
	{
		.@i = ++.w2[.@index];
		setd ".a1"+ .w1 +"_"+ .@i, getarg ( .@a );	// id.
		setd ".a2"+ .w1 +"_"+ .@i, getarg ( .@a + 1 );	// mode.
		setd ".a3"+ .w1 +"_"+ .@i, getarg ( .@a + 2 );	// mob id.
		setd ".a4"+ .w1 +"_"+ .@i, getarg ( .@a + 3 );	// amount.
	}
	return ;

OnNPCKillEvent:

	// Cache. That old loop on every mob killed...
	if ( @wing[0] && isequipped ( @wing[0] ) )
	{
		.@c  = 1;
		.@e  = @wing[0];	
		.@w  = @wing[1];
		.@id = @wing[2];
		.@a  = @wing[3];
	}
	else
	{
		for ( .@size = getarraysize ( .slots ); .@a < .@size && !.@c ; .@a++ )
		{
			.@e = getequipid ( .slots[.@a] );
			if ( .@e < 0 )
				continue ;
			.@id = 0;
			.@w = 1;
			while ( .@id++ <= .w2[.@w - 1] && !.@c )
			{
				if ( .@id > .w2[.@w - 1] )
				{
					.@id = 1;
					.@w++;
				}
				if ( .@e == getd ( ".a1"+ .@w +"_"+ .@id ) && getd ( ".a1"+ .@w +"_"+ ( .@id + 1 ) ) )
					if ( getd ( ".a4"+ .@w +"_"+ .@id ) > 0 && ( killedrid == getd ( ".a3"+ .@w +"_"+ .@id ) || getd ( ".a3"+ .@w +"_"+ .@id ) < 1001 ) )
					{
						.@c = 1;
						setarray @wing[0], .@e, .@w, .@id, .@a;
					}
			}
		}
	}

	if ( .@c )
	{
		if ( getd ( ".a2"+ .@w +"_"+ .@id ) == 1 )
		{
			.@amount = getd ( "mobs_"+ .@e );
			setd "mobs_"+ .@e, .@amount + 1;
			if ( getd ( "mobs_"+ .@e ) < getd ( ".a4"+ .@w +"_"+ .@id ) ) end ;
			setd "evo"+ .@e, getd ( "evo"+ .@e ) + 1;
			setd "mobs_"+ .@e, 0;
		}
		else if ( getd ( ".a2"+ .@w +"_"+ .@id ) == 2 )
		{
			.@amount = getd ( "exp_"+ .@e );
			setd "exp_"+ .@e, .@amount + strmobinfo ( 6, killedrid );
			if ( getd ( "exp_"+ .@e ) < getd ( ".a4"+ .@w +"_"+ .@id ) ) end ;
			setd "evo"+ .@e, getd ( "evo"+ .@e ) + 1;
			setd "exp_"+ .@e, 0;
		}
		else
			debugmes "Script Items_Evo, error: wrong mode.";
		announce getitemname ( .@e ) +" is now "+ getd ( "evo"+ .@e ) +"% from evolving...", bc_self, "0x"+ .c$[0] ;
		specialeffect2 58 ;
		sleep2 200 ;
		specialeffect2 383 ;
		if ( getd ( "evo"+ .@e ) >= 100 && .auto )
		{
			specialeffect2 263 ;
			sleep2 500 ;
			specialeffect2 377 ;
			sleep2 300 ;
			specialeffect2 542 ;
			sleep2 300 ;
			announce getitemname ( .@e ) +" is evolving..." , bc_self, "0x"+ .c$[1] ;
			.@i = 3;
			while ( .@i-- )
			{
				specialeffect2 521 ;
				sleep2 900 ;
			}
			specialeffect2 463 ;
			sleep2 200;
			specialeffect2 665 ;
			sleep2 500 ;
			setarray .@card[1], getequipcardid ( .slots[.@a], 0 ), getequipcardid ( .slots[.@a], 1 ), getequipcardid ( .slots[.@a], 2 ), getequipcardid ( .slots[.@a], 3 );
			.@refine = getequiprefinerycnt ( .slots[.@a] );
			unequip .@a;
			delitem .@e, 1 ;
			getitem2 getd ( ".a1"+ .@w +"_"+ ( .@id + 1 ) ) , 1, 1, .@refine, 0, .@card[1], .@card[2], .@card[3], .@card[4] ;
			equip getd ( ".a1"+  .@w +"_"+ ( .@id + 1 ) ) ;
			setd "evo"+ .@e, 0;
			deletearray @wing ;
			announce "Congratulations, your wings have evolved to "+ getitemname ( getd ( ".a1"+ .@w +"_"+ ( .@id + 1 ) ) ) +"." , bc_self , "0x"+ .c$[2] ;
		}
	}
	end ;
}

 

  • 0
Posted
-	script	Items_Conf	-1,{

OnInit:

	callsub Ids, 60656, 1, 1004, 1, 60657, 1, 1004, 1, 60658, 1, 1004,  0 ;
	callsub Ids, 60635, 1, 111, 1, 60636, 1, 111, 1, 60637, 1, 111,  0 ;
/*
	ID[...], evolution mode[...], mob id[...], neccessary to get 1%[...].
	If  you want any monster, use 111.

Evolution modes:

	1 = Every X numer of mobs (1%).
	2 = Experience (1%).
*/

/*
	0 = Won't be evolved automatically.
	1 = Will be evolved automatically
*/
	.auto = 1;

/*
	Color of the announces.
*/
	setarray .c$[0],	"4db557",	// % of evolution.
				"d43438",	// Wings evolving.
				"4da5b5";	// Wings evolved.

/* slots to check.
	EQI_ACC_L (0)             - Accessory 1
	EQI_ACC_R (1)             - Accessory 2
	EQI_SHOES (2)             - Footgear (shoes, boots)
	EQI_GARMENT (3)           - Garment (mufflers, hoods, manteaux)
	EQI_HEAD_LOW (4)          - Lower Headgear (beards, some masks)
	EQI_HEAD_MID (5)          - Middle Headgear (masks, glasses)
	EQI_HEAD_TOP (6)          - Upper Headgear
	EQI_ARMOR (7)             - Armor (jackets, robes)
	EQI_HAND_L (8)            - Left hand (weapons, shields)
	EQI_HAND_R (9)            - Right hand (weapons)
	EQI_COSTUME_HEAD_TOP (10) - Upper Costume Headgear
	EQI_COSTUME_HEAD_MID (11) - Middle Costume Headgear
	EQI_COSTUME_HEAD_LOW (12) - Lower Costume Headgear
	EQI_COSTUME_GARMENT (13)  - Costume Garment
	EQI_AMMO (14)    		  - Arrow/Ammunition
	EQI_SHADOW_ARMOR (15)     - Shadow Armor
	EQI_SHADOW_WEAPON (16)    - Shadow Weapon
	EQI_SHADOW_SHIELD (17)    - Shadow Shield
	EQI_SHADOW_SHOES (18)     - Shadow Shoes
	EQI_SHADOW_ACC_R (19)     - Shadow Accessory 2
	EQI_SHADOW_ACC_L (20)     - Shadow Accessory 1
*/

	setarray .slots[0], 	EQI_HEAD_LOW, 
				EQI_HEAD_MID,
				EQI_HEAD_TOP;

	//=============================================

	.w1 = 0;

	end ;

Ids:

	.@index = .w1;
	.w1++;
	for ( .@args = getargcount ( ); .@a < .@args ; .@a+=4 )
	{
		.@i = ++.w2[.@index];
		setd ".a1"+ .w1 +"_"+ .@i, getarg ( .@a );	// id.
		setd ".a2"+ .w1 +"_"+ .@i, getarg ( .@a + 1 );	// mode.
		setd ".a3"+ .w1 +"_"+ .@i, getarg ( .@a + 2 );	// mob id.
		setd ".a4"+ .w1 +"_"+ .@i, getarg ( .@a + 3 );	// amount.
	}
	return ;

OnNPCKillEvent:

	// Cache. That old loop on every mob killed...
	if ( @wing[0] && isequipped ( @wing[0] ) )
	{
		.@c  = 1;
		.@e  = @wing[0];	
		.@w  = @wing[1];
		.@id = @wing[2];
		.@a  = @wing[3];
	}
	else
	{
		for ( .@size = getarraysize ( .slots ); .@a < .@size && !.@c ; .@a++ )
		{
			.@e = getequipid ( .slots[.@a] );
			if ( .@e < 0 )
				continue ;
			.@id = 0;
			.@w = 1;
			while ( .@id++ <= .w2[.@w - 1] && !.@c )
			{
				if ( .@id > .w2[.@w - 1] )
				{
					.@id = 1;
					.@w++;
				}
				if ( .@e == getd ( ".a1"+ .@w +"_"+ .@id ) && getd ( ".a1"+ .@w +"_"+ ( .@id + 1 ) ) )
					if ( getd ( ".a4"+ .@w +"_"+ .@id ) > 0 && ( killedrid == getd ( ".a3"+ .@w +"_"+ .@id ) || getd ( ".a3"+ .@w +"_"+ .@id ) < 1001 ) )
					{
						.@c = 1;
						setarray @wing[0], .@e, .@w, .@id, .@a;
					}
			}
		}
	}

	if ( .@c )
	{
		if ( getd ( ".a2"+ .@w +"_"+ .@id ) == 1 )
		{
			.@amount = getd ( "mobs_"+ .@e );
			setd "mobs_"+ .@e, .@amount + 1;
			if ( getd ( "mobs_"+ .@e ) < getd ( ".a4"+ .@w +"_"+ .@id ) ) end ;
			setd "evo"+ .@e, getd ( "evo"+ .@e ) + 1;
			setd "mobs_"+ .@e, 0;
		}
		else if ( getd ( ".a2"+ .@w +"_"+ .@id ) == 2 )
		{
			.@amount = getd ( "exp_"+ .@e );
			setd "exp_"+ .@e, .@amount + strmobinfo ( 6, killedrid );
			if ( getd ( "exp_"+ .@e ) < getd ( ".a4"+ .@w +"_"+ .@id ) ) end ;
			setd "evo"+ .@e, getd ( "evo"+ .@e ) + 1;
			setd "exp_"+ .@e, 0;
		}
		else
			debugmes "Script Items_Evo, error: wrong mode.";
		announce getitemname ( .@e ) +" is now "+ getd ( "evo"+ .@e ) +"% from evolving...", bc_self, "0x"+ .c$[0] ;
		specialeffect2 58 ;
		sleep2 200 ;
		specialeffect2 383 ;
		if ( getd ( "evo"+ .@e ) >= 100 && .auto )
		{
			specialeffect2 263 ;
			sleep2 500 ;
			specialeffect2 377 ;
			sleep2 300 ;
			specialeffect2 542 ;
			sleep2 300 ;
			announce getitemname ( .@e ) +" is evolving..." , bc_self, "0x"+ .c$[1] ;
			.@i = 3;
			while ( .@i-- )
			{
				specialeffect2 521 ;
				sleep2 900 ;
			}
			specialeffect2 463 ;
			sleep2 200;
			specialeffect2 665 ;
			sleep2 500 ;
			setarray .@card[1], getequipcardid ( .slots[.@a], 0 ), getequipcardid ( .slots[.@a], 1 ), getequipcardid ( .slots[.@a], 2 ), getequipcardid ( .slots[.@a], 3 );
			.@refine = getequiprefinerycnt ( .slots[.@a] );
			unequip .slots[.@a];
			delitem .@e, 1 ;
			getitem2 getd ( ".a1"+ .@w +"_"+ ( .@id + 1 ) ) , 1, 1, .@refine, 0, .@card[1], .@card[2], .@card[3], .@card[4] ;
			equip getd ( ".a1"+  .@w +"_"+ ( .@id + 1 ) ) ;
			setd "evo"+ .@e, 0;
			deletearray @wing ;
			announce "Congratulations, your wings have evolved to "+ getitemname ( getd ( ".a1"+ .@w +"_"+ ( .@id + 1 ) ) ) +"." , bc_self , "0x"+ .c$[2] ;
		}
	}
	end ;
}

 

  • 0
Posted

Changed the loops.

-	script	Items_Conf	-1,{

OnInit:

	callsub Ids, 60656, 1, 1004, 1, 60657, 1, 1004, 1, 60658, 1, 1004,  0 ;
	callsub Ids, 60635, 1, 111, 1, 60636, 1, 111, 1, 60637, 1, 111,  0 ;
/*
	ID[...], evolution mode[...], mob id[...], neccessary to get 1%[...].
	If  you want any monster, use 111.

Evolution modes:

	1 = Every X numer of mobs (1%).
	2 = Experience (1%).
*/

/*
	0 = Won't be evolved automatically.
	1 = Will be evolved automatically
*/
	.auto = 1;

/*
	Color of the announces.
*/
	setarray .c$[0],	"4db557",	// % of evolution.
				"d43438",	// Wings evolving.
				"4da5b5";	// Wings evolved.

/* slots to check.
	EQI_ACC_L (0)             - Accessory 1
	EQI_ACC_R (1)             - Accessory 2
	EQI_SHOES (2)             - Footgear (shoes, boots)
	EQI_GARMENT (3)           - Garment (mufflers, hoods, manteaux)
	EQI_HEAD_LOW (4)          - Lower Headgear (beards, some masks)
	EQI_HEAD_MID (5)          - Middle Headgear (masks, glasses)
	EQI_HEAD_TOP (6)          - Upper Headgear
	EQI_ARMOR (7)             - Armor (jackets, robes)
	EQI_HAND_L (8)            - Left hand (weapons, shields)
	EQI_HAND_R (9)            - Right hand (weapons)
	EQI_COSTUME_HEAD_TOP (10) - Upper Costume Headgear
	EQI_COSTUME_HEAD_MID (11) - Middle Costume Headgear
	EQI_COSTUME_HEAD_LOW (12) - Lower Costume Headgear
	EQI_COSTUME_GARMENT (13)  - Costume Garment
	EQI_AMMO (14)    		  - Arrow/Ammunition
	EQI_SHADOW_ARMOR (15)     - Shadow Armor
	EQI_SHADOW_WEAPON (16)    - Shadow Weapon
	EQI_SHADOW_SHIELD (17)    - Shadow Shield
	EQI_SHADOW_SHOES (18)     - Shadow Shoes
	EQI_SHADOW_ACC_R (19)     - Shadow Accessory 2
	EQI_SHADOW_ACC_L (20)     - Shadow Accessory 1
*/

	setarray .slots[0], 	EQI_HEAD_LOW, 
				EQI_HEAD_MID,
				EQI_HEAD_TOP;

	//=============================================

	end ;

Ids:

	for ( .@args = getargcount ( ); .@a < .@args ; .@a+=4 
	{
		.@i = .w2[.w1]++;
		setd ".a1"+ .w1 +"_"+ .@i, getarg ( .@a );	// id.
		setd ".a2"+ .w1 +"_"+ .@i, getarg ( .@a + 1 );	// mode.
		setd ".a3"+ .w1 +"_"+ .@i, getarg ( .@a + 2 );	// mob id.
		setd ".a4"+ .w1 +"_"+ .@i, getarg ( .@a + 3 );	// amount.
	}
	.w1++;
	return ;

OnNPCKillEvent:

	// Cache. That old loop on every mob killed...
	if ( @wing[0] && isequipped ( @wing[0] ) )
	{
		.@c  = 1;
		.@e  = @wing[0];	
		.@i  = @wing[1];
		.@j = @wing[2];
		.@a  = @wing[3];
	}
	else
	{
		for ( .@size = getarraysize ( .slots ); .@a < .@size && !.@c ; .@a++ )
		{
			.@e = getequipid ( .slots[.@a] );
			if ( .@e < 0 )
				continue ;
			.@i = 0;
			while ( .@i < .w1 && !.@c )
			{
				.@j = 0;
				while ( .@j < .w2[.@i] && !.@c )
				{
					if ( .@e == getd ( ".a1"+ .@i +"_"+ .@j ) && getd ( ".a1"+ .@i +"_"+ ( .@j + 1 ) ) )
					{
						if ( getd ( ".a4"+ .@i +"_"+ .@j ) > 0 && ( killedrid == getd ( ".a3"+ .@i +"_"+ .@j ) || getd ( ".a3"+ .@i +"_"+ .@j ) < 1001 ) )
						{
							.@c = 1;
							setarray @wing[0], .@e, .@i, .@j, .@a;
						}
					}
					.@j++;
				}
				.@i++;
			}
		}
	}

	if ( .@c )
	{
		if ( getd ( ".a2"+ .@i +"_"+ .@j ) == 1 )
		{
			.@amount = getd ( "mobs_"+ .@e );
			setd "mobs_"+ .@e, .@amount + 1;
			if ( getd ( "mobs_"+ .@e ) < getd ( ".a4"+ .@i +"_"+ .@j ) ) end ;
			setd "evo"+ .@e, getd ( "evo"+ .@e ) + 1;
			setd "mobs_"+ .@e, 0;
		}
		else if ( getd ( ".a2"+ .@i +"_"+ .@j ) == 2 )
		{
			.@amount = getd ( "exp_"+ .@e );
			setd "exp_"+ .@e, .@amount + strmobinfo ( 6, killedrid );
			if ( getd ( "exp_"+ .@e ) < getd ( ".a4"+ .@i +"_"+ .@j ) ) end ;
			setd "evo"+ .@e, getd ( "evo"+ .@e ) + 1;
			setd "exp_"+ .@e, 0;
		}
		else
			debugmes "Script Items_Evo, error: wrong mode.";
		announce getitemname ( .@e ) +" is now "+ getd ( "evo"+ .@e ) +"% from evolving...", bc_self, "0x"+ .c$[0] ;
		specialeffect2 58 ;
		sleep2 200 ;
		specialeffect2 383 ;
		if ( getd ( "evo"+ .@e ) >= 100 && .auto )
		{
			specialeffect2 263 ;
			sleep2 500 ;
			specialeffect2 377 ;
			sleep2 300 ;
			specialeffect2 542 ;
			sleep2 300 ;
			announce getitemname ( .@e ) +" is evolving..." , bc_self, "0x"+ .c$[1] ;
			.@i = 3;
			while ( .@i-- )
			{
				specialeffect2 521 ;
				sleep2 900 ;
			}
			specialeffect2 463 ;
			sleep2 200;
			specialeffect2 665 ;
			sleep2 500 ;
			setarray .@card[1], getequipcardid ( .slots[.@a], 0 ), getequipcardid ( .slots[.@a], 1 ), getequipcardid ( .slots[.@a], 2 ), getequipcardid ( .slots[.@a], 3 );
			.@refine = getequiprefinerycnt ( .slots[.@a] );
			unequip .slots[.@a];
			delitem .@e, 1 ;
			getitem2 getd ( ".a1"+ .@i +"_"+ ( .@j + 1 ) ) , 1, 1, .@refine, 0, .@card[1], .@card[2], .@card[3], .@card[4] ;
			equip getd ( ".a1"+  .@i +"_"+ ( .@j + 1 ) ) ;
			setd "evo"+ .@e, 0;
			deletearray @wing ;
			announce "Congratulations, your wings have evolved to "+ getitemname ( getd ( ".a1"+ .@i +"_"+ ( .@j + 1 ) ) ) +"." , bc_self , "0x"+ .c$[2] ;
		}
	}
	end ;
}
  • 0
Posted

This is weird. I commented those lines. Tell me what happens.

-	script	Items_Conf	-1,{

OnInit:

	callsub Ids, 60656, 1, 1004, 1, 60657, 1, 1004, 1, 60658, 1, 1004,  0 ;
	callsub Ids, 60635, 1, 111, 1, 60636, 1, 111, 1, 60637, 1, 111,  0 ;
/*
	ID[...], evolution mode[...], mob id[...], neccessary to get 1%[...].
	If  you want any monster, use 111.

Evolution modes:

	1 = Every X numer of mobs (1%).
	2 = Experience (1%).
*/

/*
	0 = Won't be evolved automatically.
	1 = Will be evolved automatically
*/
	.auto = 1;

/*
	Color of the announces.
*/
	setarray .c$[0],	"4db557",	// % of evolution.
				"d43438",	// Wings evolving.
				"4da5b5";	// Wings evolved.

/* slots to check.
	EQI_ACC_L (0)             - Accessory 1
	EQI_ACC_R (1)             - Accessory 2
	EQI_SHOES (2)             - Footgear (shoes, boots)
	EQI_GARMENT (3)           - Garment (mufflers, hoods, manteaux)
	EQI_HEAD_LOW (4)          - Lower Headgear (beards, some masks)
	EQI_HEAD_MID (5)          - Middle Headgear (masks, glasses)
	EQI_HEAD_TOP (6)          - Upper Headgear
	EQI_ARMOR (7)             - Armor (jackets, robes)
	EQI_HAND_L (8)            - Left hand (weapons, shields)
	EQI_HAND_R (9)            - Right hand (weapons)
	EQI_COSTUME_HEAD_TOP (10) - Upper Costume Headgear
	EQI_COSTUME_HEAD_MID (11) - Middle Costume Headgear
	EQI_COSTUME_HEAD_LOW (12) - Lower Costume Headgear
	EQI_COSTUME_GARMENT (13)  - Costume Garment
	EQI_AMMO (14)    		  - Arrow/Ammunition
	EQI_SHADOW_ARMOR (15)     - Shadow Armor
	EQI_SHADOW_WEAPON (16)    - Shadow Weapon
	EQI_SHADOW_SHIELD (17)    - Shadow Shield
	EQI_SHADOW_SHOES (18)     - Shadow Shoes
	EQI_SHADOW_ACC_R (19)     - Shadow Accessory 2
	EQI_SHADOW_ACC_L (20)     - Shadow Accessory 1
*/

	setarray .slots[0], 	EQI_HEAD_LOW, 
				EQI_HEAD_MID,
				EQI_HEAD_TOP;

	//=============================================

	end ;

Ids:

	for ( .@args = getargcount ( ); .@a < .@args ; .@a+=4 
	{
		.@i = .w2[.w1]++;
		setd ".a1"+ .w1 +"_"+ .@i, getarg ( .@a );	// id.
		setd ".a2"+ .w1 +"_"+ .@i, getarg ( .@a + 1 );	// mode.
		setd ".a3"+ .w1 +"_"+ .@i, getarg ( .@a + 2 );	// mob id.
		setd ".a4"+ .w1 +"_"+ .@i, getarg ( .@a + 3 );	// amount.
	}
	.w1++;
	return ;

OnNPCKillEvent:

	// Cache. That old loop on every mob killed...
	if ( @wing[0] && isequipped ( @wing[0] ) )
	{
		.@c  = 1;
		.@e  = @wing[0];	
		.@i  = @wing[1];
		.@j  = @wing[2];
		.@a  = @wing[3];
	}
	else
	{
		.@size = getarraysize ( .slots )
		while ( .@a < .@size && !.@c )
		{
			.@e = getequipid ( .slots[.@a] );
			if ( .@e < 0 )
				continue ;
			.@i = 0;
			while ( .@i < .w1 && !.@c )
			{
				.@j = 0;
				while ( .@j < .w2[.@i] && !.@c )
				{
					if ( .@e == getd ( ".a1"+ .@i +"_"+ .@j ) && getd ( ".a1"+ .@i +"_"+ ( .@j + 1 ) ) )
					{
						if ( getd ( ".a4"+ .@i +"_"+ .@j ) > 0 && ( killedrid == getd ( ".a3"+ .@i +"_"+ .@j ) || getd ( ".a3"+ .@i +"_"+ .@j ) < 1001 ) )
						{
							.@c = 1;
							setarray @wing[0], .@e, .@i, .@j, .@a;
						}
					}
					if ( !.@c )
						.@j++;
				}
				if ( !.@c )
					.@i++;
			}
			if ( !.@c )
				.@a++;
		}
	}

	if ( .@c )
	{
		if ( getd ( ".a2"+ .@i +"_"+ .@j ) == 1 )
		{
			.@amount = getd ( "mobs_"+ .@e );
			setd "mobs_"+ .@e, .@amount + 1;
			if ( getd ( "mobs_"+ .@e ) < getd ( ".a4"+ .@i +"_"+ .@j ) ) end ;
			setd "evo"+ .@e, getd ( "evo"+ .@e ) + 1;
			setd "mobs_"+ .@e, 0;
		}
		else if ( getd ( ".a2"+ .@i +"_"+ .@j ) == 2 )
		{
			.@amount = getd ( "exp_"+ .@e );
			setd "exp_"+ .@e, .@amount + strmobinfo ( 6, killedrid );
			if ( getd ( "exp_"+ .@e ) < getd ( ".a4"+ .@i +"_"+ .@j ) ) end ;
			setd "evo"+ .@e, getd ( "evo"+ .@e ) + 1;
			setd "exp_"+ .@e, 0;
		}
		else
			debugmes "Script Items_Evo, error: wrong mode.";
		announce getitemname ( .@e ) +" is now "+ getd ( "evo"+ .@e ) +"% from evolving...", bc_self, "0x"+ .c$[0] ;
		specialeffect2 58 ;
		sleep2 200 ;
		specialeffect2 383 ;
		if ( getd ( "evo"+ .@e ) >= 100 && .auto )
		{
			specialeffect2 263 ;
			sleep2 500 ;
			specialeffect2 377 ;
			sleep2 300 ;
			specialeffect2 542 ;
			sleep2 300 ;
			announce getitemname ( .@e ) +" is evolving..." , bc_self, "0x"+ .c$[1] ;
			.@i = 3;
			while ( .@i-- )
			{
				specialeffect2 521 ;
				sleep2 900 ;
			}
			specialeffect2 463 ;
			sleep2 200;
			specialeffect2 665 ;
			sleep2 500 ;
			setarray .@card[1], getequipcardid ( .slots[.@a], 0 ), getequipcardid ( .slots[.@a], 1 ), getequipcardid ( .slots[.@a], 2 ), getequipcardid ( .slots[.@a], 3 );
			.@refine = getequiprefinerycnt ( .slots[.@a] );
			//unequip .slots[.@a];
			//delitem .@e, 1 ;
			getitem2 getd ( ".a1"+ .@i +"_"+ ( .@j + 1 ) ) , 1, 1, .@refine, 0, .@card[1], .@card[2], .@card[3], .@card[4] ;
			equip getd ( ".a1"+  .@i +"_"+ ( .@j + 1 ) ) ;
			setd "evo"+ .@e, 0;
			deletearray @wing ;
			announce "Congratulations, your wings have evolved to "+ getitemname ( getd ( ".a1"+ .@i +"_"+ ( .@j + 1 ) ) ) +"." , bc_self , "0x"+ .c$[2] ;
		}
	}
	end ;
}

Also, what kind of items are that? Do they have special flags or are bound ones?

  • 0
Posted

Okay I know how to fix that one.

-	script	Items_Conf	-1,{

OnInit:

	callsub Ids, 60656, 1, 1004, 1, 60657, 1, 1004, 1, 60658, 1, 1004,  0 ;
	callsub Ids, 60635, 1, 111, 1, 60636, 1, 111, 1, 60637, 1, 111,  0 ;
/*
	ID[...], evolution mode[...], mob id[...], neccessary to get 1%[...].
	If  you want any monster, use 111.

Evolution modes:

	1 = Every X numer of mobs (1%).
	2 = Experience (1%).
*/

/*
	0 = Won't be evolved automatically.
	1 = Will be evolved automatically
*/
	.auto = 1;

/*
	Color of the announces.
*/
	setarray .c$[0],	"4db557",	// % of evolution.
				"d43438",	// Wings evolving.
				"4da5b5";	// Wings evolved.

/* slots to check.
	EQI_ACC_L (0)             - Accessory 1
	EQI_ACC_R (1)             - Accessory 2
	EQI_SHOES (2)             - Footgear (shoes, boots)
	EQI_GARMENT (3)           - Garment (mufflers, hoods, manteaux)
	EQI_HEAD_LOW (4)          - Lower Headgear (beards, some masks)
	EQI_HEAD_MID (5)          - Middle Headgear (masks, glasses)
	EQI_HEAD_TOP (6)          - Upper Headgear
	EQI_ARMOR (7)             - Armor (jackets, robes)
	EQI_HAND_L (8)            - Left hand (weapons, shields)
	EQI_HAND_R (9)            - Right hand (weapons)
	EQI_COSTUME_HEAD_TOP (10) - Upper Costume Headgear
	EQI_COSTUME_HEAD_MID (11) - Middle Costume Headgear
	EQI_COSTUME_HEAD_LOW (12) - Lower Costume Headgear
	EQI_COSTUME_GARMENT (13)  - Costume Garment
	EQI_AMMO (14)    		  - Arrow/Ammunition
	EQI_SHADOW_ARMOR (15)     - Shadow Armor
	EQI_SHADOW_WEAPON (16)    - Shadow Weapon
	EQI_SHADOW_SHIELD (17)    - Shadow Shield
	EQI_SHADOW_SHOES (18)     - Shadow Shoes
	EQI_SHADOW_ACC_R (19)     - Shadow Accessory 2
	EQI_SHADOW_ACC_L (20)     - Shadow Accessory 1
*/

	setarray .slots[0], 	EQI_HEAD_LOW, 
				EQI_HEAD_MID,
				EQI_HEAD_TOP;

	//=============================================

	end ;

Ids:

	for ( .@args = getargcount ( ); .@a < .@args ; .@a+=4 )
	{
		.@i = .w2[.w1]++;
		setd ".a1"+ .w1 +"_"+ .@i, getarg ( .@a );	// id.
		if ( getarg ( .@a + 4, 0 ) != 0 ) {
			setd ".a2"+ .w1 +"_"+ .@i, getarg ( .@a + 1 );	// mode.
			setd ".a3"+ .w1 +"_"+ .@i, getarg ( .@a + 2 );	// mob id.
			setd ".a4"+ .w1 +"_"+ .@i, getarg ( .@a + 3 );	// amount.
		}
	}
	.w1++;
	return ;

OnNPCKillEvent:

	// Cache. That old loop on every mob killed...
	if ( @wing[0] && isequipped ( @wing[0] ) )
	{
		.@c  = 1;
		.@e  = @wing[0];	
		.@i  = @wing[1];
		.@j  = @wing[2];
		.@a  = @wing[3];
	}
	else
	{
		.@size = getarraysize ( .slots )
		while ( .@a < .@size && !.@c )
		{
			.@e = getequipid ( .slots[.@a] );
			if ( .@e < 0 )
				continue ;
			.@i = 0;
			while ( .@i < .w1 && !.@c )
			{
				.@j = 0;
				while ( .@j < .w2[.@i] && !.@c )
				{
					if ( .@e == getd ( ".a1"+ .@i +"_"+ .@j ) && getd ( ".a1"+ .@i +"_"+ ( .@j + 1 ) ) )
					{
						if ( getd ( ".a4"+ .@i +"_"+ .@j ) > 0 && ( killedrid == getd ( ".a3"+ .@i +"_"+ .@j ) || getd ( ".a3"+ .@i +"_"+ .@j ) < 1001 ) )
						{
							.@c = 1;
							setarray @wing[0], .@e, .@i, .@j, .@a;
						}
					}
					if ( !.@c )
						.@j++;
				}
				if ( !.@c )
					.@i++;
			}
			if ( !.@c )
				.@a++;
		}
	}

	if ( .@c )
	{
		if ( getd ( ".a2"+ .@i +"_"+ .@j ) == 1 )
		{
			.@amount = getd ( "mobs_"+ .@e );
			setd "mobs_"+ .@e, .@amount + 1;
			if ( getd ( "mobs_"+ .@e ) < getd ( ".a4"+ .@i +"_"+ .@j ) ) end ;
			setd "evo"+ .@e, getd ( "evo"+ .@e ) + 1;
			setd "mobs_"+ .@e, 0;
		}
		else if ( getd ( ".a2"+ .@i +"_"+ .@j ) == 2 )
		{
			.@amount = getd ( "exp_"+ .@e );
			setd "exp_"+ .@e, .@amount + strmobinfo ( 6, killedrid );
			if ( getd ( "exp_"+ .@e ) < getd ( ".a4"+ .@i +"_"+ .@j ) ) end ;
			setd "evo"+ .@e, getd ( "evo"+ .@e ) + 1;
			setd "exp_"+ .@e, 0;
		}
		else
			debugmes "Script Items_Evo, error: wrong mode.";
		announce getitemname ( .@e ) +" is now "+ getd ( "evo"+ .@e ) +"% from evolving...", bc_self, "0x"+ .c$[0] ;
		specialeffect2 58 ;
		sleep2 200 ;
		specialeffect2 383 ;
		if ( getd ( "evo"+ .@e ) >= 100 && .auto )
		{
			specialeffect2 263 ;
			sleep2 500 ;
			specialeffect2 377 ;
			sleep2 300 ;
			specialeffect2 542 ;
			sleep2 300 ;
			announce getitemname ( .@e ) +" is evolving..." , bc_self, "0x"+ .c$[1] ;
			.@i = 3;
			while ( .@i-- )
			{
				specialeffect2 521 ;
				sleep2 900 ;
			}
			specialeffect2 463 ;
			sleep2 200;
			specialeffect2 665 ;
			sleep2 500 ;
			setarray .@card[1], getequipcardid ( .slots[.@a], 0 ), getequipcardid ( .slots[.@a], 1 ), getequipcardid ( .slots[.@a], 2 ), getequipcardid ( .slots[.@a], 3 );
			.@refine = getequiprefinerycnt ( .slots[.@a] );
			//unequip .slots[.@a];
			//delitem .@e, 1 ;
			getitem2 getd ( ".a1"+ .@i +"_"+ ( .@j + 1 ) ) , 1, 1, .@refine, 0, .@card[1], .@card[2], .@card[3], .@card[4] ;
			equip getd ( ".a1"+  .@i +"_"+ ( .@j + 1 ) ) ;
			setd "evo"+ .@e, 0;
			deletearray @wing ;
			announce "Congratulations, your wings have evolved to "+ getitemname ( getd ( ".a1"+ .@i +"_"+ ( .@j + 1 ) ) ) +"." , bc_self , "0x"+ .c$[2] ;
		}
	}
	end ;
}

 

  • 0
Posted
-	script	Items_Conf	-1,{

OnInit:

	callsub Ids, 60656, 1, 1004, 1, 60657, 1, 1004, 1, 60658, 1, 1004,  0 ;
	callsub Ids, 60635, 1, 111, 1, 60636, 1, 111, 1, 60637, 1, 111,  0 ;
/*
	ID[...], evolution mode[...], mob id[...], neccessary to get 1%[...].
	If  you want any monster, use 111.

Evolution modes:

	1 = Every X numer of mobs (1%).
	2 = Experience (1%).
*/

/*
	0 = Won't be evolved automatically.
	1 = Will be evolved automatically
*/
	.auto = 1;

/*
	Color of the announces.
*/
	setarray .c$[0],	"4db557",	// % of evolution.
				"d43438",	// Wings evolving.
				"4da5b5";	// Wings evolved.

/* slots to check.
	EQI_ACC_L (0)             - Accessory 1
	EQI_ACC_R (1)             - Accessory 2
	EQI_SHOES (2)             - Footgear (shoes, boots)
	EQI_GARMENT (3)           - Garment (mufflers, hoods, manteaux)
	EQI_HEAD_LOW (4)          - Lower Headgear (beards, some masks)
	EQI_HEAD_MID (5)          - Middle Headgear (masks, glasses)
	EQI_HEAD_TOP (6)          - Upper Headgear
	EQI_ARMOR (7)             - Armor (jackets, robes)
	EQI_HAND_L (8)            - Left hand (weapons, shields)
	EQI_HAND_R (9)            - Right hand (weapons)
	EQI_COSTUME_HEAD_TOP (10) - Upper Costume Headgear
	EQI_COSTUME_HEAD_MID (11) - Middle Costume Headgear
	EQI_COSTUME_HEAD_LOW (12) - Lower Costume Headgear
	EQI_COSTUME_GARMENT (13)  - Costume Garment
	EQI_AMMO (14)    		  - Arrow/Ammunition
	EQI_SHADOW_ARMOR (15)     - Shadow Armor
	EQI_SHADOW_WEAPON (16)    - Shadow Weapon
	EQI_SHADOW_SHIELD (17)    - Shadow Shield
	EQI_SHADOW_SHOES (18)     - Shadow Shoes
	EQI_SHADOW_ACC_R (19)     - Shadow Accessory 2
	EQI_SHADOW_ACC_L (20)     - Shadow Accessory 1
*/

	setarray .slots[0], 	EQI_HEAD_LOW, 
				EQI_HEAD_MID,
				EQI_HEAD_TOP;

	//=============================================

	end ;

Ids:

	for ( .@args = getargcount ( ); .@a < .@args ; .@a+=4 )
	{
		.@i = .w2[.w1]++;
		setd ".a1"+ .w1 +"_"+ .@i, getarg ( .@a );	// id.
		if ( getarg ( .@a + 4, 0 ) != 0 ) {
			setd ".a2"+ .w1 +"_"+ .@i, getarg ( .@a + 1 );	// mode.
			setd ".a3"+ .w1 +"_"+ .@i, getarg ( .@a + 2 );	// mob id.
			setd ".a4"+ .w1 +"_"+ .@i, getarg ( .@a + 3 );	// amount.
		}
	}
	.w1++;
	return ;

OnNPCKillEvent:

	// Cache. That old loop on every mob killed...
	if ( @wing[0] && isequipped ( @wing[0] ) )
	{
		.@c  = 1;
		.@e  = @wing[0];	
		.@i  = @wing[1];
		.@j  = @wing[2];
		.@a  = @wing[3];
	}
	else
	{
		.@size = getarraysize ( .slots );
		while ( .@a < .@size && !.@c )
		{
			.@e = getequipid ( .slots[.@a] );
			if ( .@e < 0 )
				continue ;
			.@i = 0;
			while ( .@i < .w1 && !.@c )
			{
				.@j = 0;
				while ( .@j < .w2[.@i] && !.@c )
				{
					if ( .@e == getd ( ".a1"+ .@i +"_"+ .@j ) && getd ( ".a1"+ .@i +"_"+ ( .@j + 1 ) ) )
					{
						if ( getd ( ".a4"+ .@i +"_"+ .@j ) > 0 && ( killedrid == getd ( ".a3"+ .@i +"_"+ .@j ) || getd ( ".a3"+ .@i +"_"+ .@j ) < 1001 ) )
						{
							.@c = 1;
							setarray @wing[0], .@e, .@i, .@j, .@a;
						}
					}
					if ( !.@c )
						.@j++;
				}
				if ( !.@c )
					.@i++;
			}
			if ( !.@c )
				.@a++;
		}
	}

	if ( .@c )
	{
		if ( getd ( ".a2"+ .@i +"_"+ .@j ) == 1 )
		{
			.@amount = getd ( "mobs_"+ .@e );
			setd "mobs_"+ .@e, .@amount + 1;
			if ( getd ( "mobs_"+ .@e ) < getd ( ".a4"+ .@i +"_"+ .@j ) ) end ;
			setd "evo"+ .@e, getd ( "evo"+ .@e ) + 1;
			setd "mobs_"+ .@e, 0;
		}
		else if ( getd ( ".a2"+ .@i +"_"+ .@j ) == 2 )
		{
			.@amount = getd ( "exp_"+ .@e );
			setd "exp_"+ .@e, .@amount + strmobinfo ( 6, killedrid );
			if ( getd ( "exp_"+ .@e ) < getd ( ".a4"+ .@i +"_"+ .@j ) ) end ;
			setd "evo"+ .@e, getd ( "evo"+ .@e ) + 1;
			setd "exp_"+ .@e, 0;
		}
		else
			debugmes "Script Items_Evo, error: wrong mode.";
		announce getitemname ( .@e ) +" is now "+ getd ( "evo"+ .@e ) +"% from evolving...", bc_self, "0x"+ .c$[0] ;
		specialeffect2 58 ;
		sleep2 200 ;
		specialeffect2 383 ;
		if ( getd ( "evo"+ .@e ) >= 100 && .auto )
		{
			specialeffect2 263 ;
			sleep2 500 ;
			specialeffect2 377 ;
			sleep2 300 ;
			specialeffect2 542 ;
			sleep2 300 ;
			announce getitemname ( .@e ) +" is evolving..." , bc_self, "0x"+ .c$[1] ;
			.@i = 3;
			while ( .@i-- )
			{
				specialeffect2 521 ;
				sleep2 900 ;
			}
			specialeffect2 463 ;
			sleep2 200;
			specialeffect2 665 ;
			sleep2 500 ;
			setarray .@card[1], getequipcardid ( .slots[.@a], 0 ), getequipcardid ( .slots[.@a], 1 ), getequipcardid ( .slots[.@a], 2 ), getequipcardid ( .slots[.@a], 3 );
			.@refine = getequiprefinerycnt ( .slots[.@a] );
			//unequip .slots[.@a];
			//delitem .@e, 1 ;
			getitem2 getd ( ".a1"+ .@i +"_"+ ( .@j + 1 ) ) , 1, 1, .@refine, 0, .@card[1], .@card[2], .@card[3], .@card[4] ;
			equip getd ( ".a1"+  .@i +"_"+ ( .@j + 1 ) ) ;
			setd "evo"+ .@e, 0;
			deletearray @wing ;
			announce "Congratulations, your wings have evolved to "+ getitemname ( getd ( ".a1"+ .@i +"_"+ ( .@j + 1 ) ) ) +"." , bc_self , "0x"+ .c$[2] ;
		}
	}
	end ;
}

 

  • 0
Posted

Sorry about that.

-	script	Items_Conf	-1,{

OnInit:

	callsub Ids, 60656, 1, 1004, 1, 60657, 1, 1004, 1, 60658, 1, 1004,  0 ;
	callsub Ids, 60635, 1, 111, 1, 60636, 1, 111, 1, 60637, 1, 111,  0 ;
/*
	ID[...], evolution mode[...], mob id[...], neccessary to get 1%[...].
	If  you want any monster, use 111.

Evolution modes:

	1 = Every X numer of mobs (1%).
	2 = Experience (1%).
*/

/*
	0 = Won't be evolved automatically.
	1 = Will be evolved automatically
*/
	.auto = 1;

/*
	Color of the announces.
*/
	setarray .c$[0],	"4db557",	// % of evolution.
				"d43438",	// Wings evolving.
				"4da5b5";	// Wings evolved.

/* slots to check.
	EQI_ACC_L (0)             - Accessory 1
	EQI_ACC_R (1)             - Accessory 2
	EQI_SHOES (2)             - Footgear (shoes, boots)
	EQI_GARMENT (3)           - Garment (mufflers, hoods, manteaux)
	EQI_HEAD_LOW (4)          - Lower Headgear (beards, some masks)
	EQI_HEAD_MID (5)          - Middle Headgear (masks, glasses)
	EQI_HEAD_TOP (6)          - Upper Headgear
	EQI_ARMOR (7)             - Armor (jackets, robes)
	EQI_HAND_L (8)            - Left hand (weapons, shields)
	EQI_HAND_R (9)            - Right hand (weapons)
	EQI_COSTUME_HEAD_TOP (10) - Upper Costume Headgear
	EQI_COSTUME_HEAD_MID (11) - Middle Costume Headgear
	EQI_COSTUME_HEAD_LOW (12) - Lower Costume Headgear
	EQI_COSTUME_GARMENT (13)  - Costume Garment
	EQI_AMMO (14)    		  - Arrow/Ammunition
	EQI_SHADOW_ARMOR (15)     - Shadow Armor
	EQI_SHADOW_WEAPON (16)    - Shadow Weapon
	EQI_SHADOW_SHIELD (17)    - Shadow Shield
	EQI_SHADOW_SHOES (18)     - Shadow Shoes
	EQI_SHADOW_ACC_R (19)     - Shadow Accessory 2
	EQI_SHADOW_ACC_L (20)     - Shadow Accessory 1
*/

	setarray .slots[0], 	EQI_HEAD_LOW, 
				EQI_HEAD_MID,
				EQI_HEAD_TOP;

	//=============================================

	end ;

Ids:

	for ( .@args = getargcount ( ); .@a < .@args ; .@a+=4 )
	{
		.@i = .w2[.w1]++;
		setd ".a1"+ .w1 +"_"+ .@i, getarg ( .@a );	// id.
		if ( getarg ( .@a + 4, 0 ) != 0 ) {
			setd ".a2"+ .w1 +"_"+ .@i, getarg ( .@a + 1 );	// mode.
			setd ".a3"+ .w1 +"_"+ .@i, getarg ( .@a + 2 );	// mob id.
			setd ".a4"+ .w1 +"_"+ .@i, getarg ( .@a + 3 );	// amount.
		}
	}
	.w1++;
	return ;

OnNPCKillEvent:

	// Cache. That old loop on every mob killed...
	if ( @wing[0] && isequipped ( @wing[0] ) )
	{
		.@c  = 1;
		.@e  = @wing[0];	
		.@i  = @wing[1] - 1;
		.@j  = @wing[2] - 1;
		.@a  = @wing[3];
	}
	else
	{
		.@size = getarraysize ( .slots )
		while ( .@a < .@size && !.@c )
		{
			.@e = getequipid ( .slots[.@a] );
			.@a++;
			if ( .@e < 0 )
				continue ;
			.@i = 0;
			while ( .@i < .w1 && !.@c )
			{
				.@j = 0;
				while ( .@j < .w2[.@i] && !.@c )
				{
					if ( .@e == getd ( ".a1"+ .@i +"_"+ .@j ) && getd ( ".a1"+ .@i +"_"+ ( .@j + 1 ) ) )
					{
						if ( getd ( ".a4"+ .@i +"_"+ .@j ) > 0 && ( killedrid == getd ( ".a3"+ .@i +"_"+ .@j ) || getd ( ".a3"+ .@i +"_"+ .@j ) < 1001 ) )
						{
							.@c = 1;
							setarray @wing[0], .@e, .@i + 1, .@j + 1, .@a;
						}
					}
					if ( !.@c )
						.@j++;
				}
				if ( !.@c )
					.@i++;
			}
		}
	}

	if ( .@c )
	{
		if ( getd ( ".a2"+ .@i +"_"+ .@j ) == 1 )
		{
			.@amount = getd ( "mobs_"+ .@e );
			setd "mobs_"+ .@e, .@amount + 1;
			if ( getd ( "mobs_"+ .@e ) < getd ( ".a4"+ .@i +"_"+ .@j ) ) end ;
			setd "evo"+ .@e, getd ( "evo"+ .@e ) + 1;
			setd "mobs_"+ .@e, 0;
		}
		else if ( getd ( ".a2"+ .@i +"_"+ .@j ) == 2 )
		{
			.@amount = getd ( "exp_"+ .@e );
			setd "exp_"+ .@e, .@amount + strmobinfo ( 6, killedrid );
			if ( getd ( "exp_"+ .@e ) < getd ( ".a4"+ .@i +"_"+ .@j ) ) end ;
			setd "evo"+ .@e, getd ( "evo"+ .@e ) + 1;
			setd "exp_"+ .@e, 0;
		}
		else
			debugmes "Script Items_Evo, error: wrong mode.";
		announce getitemname ( .@e ) +" is now "+ getd ( "evo"+ .@e ) +"% from evolving...", bc_self, "0x"+ .c$[0] ;
		specialeffect2 58 ;
		sleep2 200 ;
		specialeffect2 383 ;
		if ( getd ( "evo"+ .@e ) >= 100 && .auto )
		{
			specialeffect2 263 ;
			sleep2 500 ;
			specialeffect2 377 ;
			sleep2 300 ;
			specialeffect2 542 ;
			sleep2 300 ;
			announce getitemname ( .@e ) +" is evolving..." , bc_self, "0x"+ .c$[1] ;
			.@i = 3;
			while ( .@i-- )
			{
				specialeffect2 521 ;
				sleep2 900 ;
			}
			specialeffect2 463 ;
			sleep2 200;
			specialeffect2 665 ;
			sleep2 500 ;
			.@a--;
			setarray .@card[1], getequipcardid ( .slots[.@a], 0 ), getequipcardid ( .slots[.@a], 1 ), getequipcardid ( .slots[.@a], 2 ), getequipcardid ( .slots[.@a], 3 );
			.@refine = getequiprefinerycnt ( .slots[.@a] );
			//unequip .slots[.@a];
			//delitem .@e, 1 ;
			getitem2 getd ( ".a1"+ .@i +"_"+ ( .@j + 1 ) ) , 1, 1, .@refine, 0, .@card[1], .@card[2], .@card[3], .@card[4] ;
			equip getd ( ".a1"+  .@i +"_"+ ( .@j + 1 ) ) ;
			setd "evo"+ .@e, 0;
			deletearray @wing ;
			announce "Congratulations, your wings have evolved to "+ getitemname ( getd ( ".a1"+ .@i +"_"+ ( .@j + 1 ) ) ) +"." , bc_self , "0x"+ .c$[2] ;
		}
	}
	end ;
}

 

  • 0
Posted
5 hours ago, Giant Whisper said:

good day n0tttt, this comes out now

20181202045736.JPG

This part

.@size = getarraysize ( .slots )

should be like this

.@size = getarraysize ( .slots );

 

  • 0
Posted
-	script	Items_Conf	-1,{

OnInit:

	callsub Ids, 60656, 1, 1004, 1, 60657, 1, 1004, 1, 60658, 1, 1004,  0 ;
	callsub Ids, 60635, 1, 111, 1, 60636, 1, 111, 1, 60637, 1, 111,  0 ;
/*
	ID[...], evolution mode[...], mob id[...], neccessary to get 1%[...].
	If  you want any monster, use 111.

Evolution modes:

	1 = Every X numer of mobs (1%).
	2 = Experience (1%).
*/

/*
	0 = Won't be evolved automatically.
	1 = Will be evolved automatically
*/
	.auto = 1;

/*
	Color of the announces.
*/
	setarray .c$[0],	"4db557",	// % of evolution.
				"d43438",	// Wings evolving.
				"4da5b5";	// Wings evolved.

/* slots to check.
	EQI_ACC_L (0)             - Accessory 1
	EQI_ACC_R (1)             - Accessory 2
	EQI_SHOES (2)             - Footgear (shoes, boots)
	EQI_GARMENT (3)           - Garment (mufflers, hoods, manteaux)
	EQI_HEAD_LOW (4)          - Lower Headgear (beards, some masks)
	EQI_HEAD_MID (5)          - Middle Headgear (masks, glasses)
	EQI_HEAD_TOP (6)          - Upper Headgear
	EQI_ARMOR (7)             - Armor (jackets, robes)
	EQI_HAND_L (8)            - Left hand (weapons, shields)
	EQI_HAND_R (9)            - Right hand (weapons)
	EQI_COSTUME_HEAD_TOP (10) - Upper Costume Headgear
	EQI_COSTUME_HEAD_MID (11) - Middle Costume Headgear
	EQI_COSTUME_HEAD_LOW (12) - Lower Costume Headgear
	EQI_COSTUME_GARMENT (13)  - Costume Garment
	EQI_AMMO (14)    		  - Arrow/Ammunition
	EQI_SHADOW_ARMOR (15)     - Shadow Armor
	EQI_SHADOW_WEAPON (16)    - Shadow Weapon
	EQI_SHADOW_SHIELD (17)    - Shadow Shield
	EQI_SHADOW_SHOES (18)     - Shadow Shoes
	EQI_SHADOW_ACC_R (19)     - Shadow Accessory 2
	EQI_SHADOW_ACC_L (20)     - Shadow Accessory 1
*/

	setarray .slots[0], 	EQI_HEAD_LOW, 
				EQI_HEAD_MID,
				EQI_HEAD_TOP;

	//=============================================

	end ;

Ids:

	for ( .@args = getargcount ( ); .@a < .@args ; .@a+=4 )
	{
		.@i = .w2[.w1]++;
		setd ".a1"+ .w1 +"_"+ .@i, getarg ( .@a );	// id.
		if ( getarg ( .@a + 4, 0 ) != 0 ) {
			setd ".a2"+ .w1 +"_"+ .@i, getarg ( .@a + 1 );	// mode.
			setd ".a3"+ .w1 +"_"+ .@i, getarg ( .@a + 2 );	// mob id.
			setd ".a4"+ .w1 +"_"+ .@i, getarg ( .@a + 3 );	// amount.
		}
	}
	.w1++;
	return ;

OnNPCKillEvent:

	// Cache. That old loop on every mob killed...
	if ( @wing[0] && isequipped ( @wing[0] ) )
	{
		.@c  = 1;
		.@e  = @wing[0];	
		.@i  = @wing[1] - 1;
		.@j  = @wing[2] - 1;
		.@a  = @wing[3];
	}
	else
	{
		.@size = getarraysize ( .slots );
		while ( .@a < .@size && !.@c )
		{
			.@e = getequipid ( .slots[.@a] );
			.@a++;
			if ( .@e < 0 )
				continue ;
			.@i = 0;
			while ( .@i < .w1 && !.@c )
			{
				.@j = 0;
				while ( .@j < .w2[.@i] && !.@c )
				{
					if ( .@e == getd ( ".a1"+ .@i +"_"+ .@j ) && getd ( ".a1"+ .@i +"_"+ ( .@j + 1 ) ) )
					{
						if ( getd ( ".a4"+ .@i +"_"+ .@j ) > 0 && ( killedrid == getd ( ".a3"+ .@i +"_"+ .@j ) || getd ( ".a3"+ .@i +"_"+ .@j ) < 1001 ) )
						{
							.@c = 1;
							setarray @wing[0], .@e, .@i + 1, .@j + 1, .@a;
						}
					}
					if ( !.@c )
						.@j++;
				}
				if ( !.@c )
					.@i++;
			}
		}
	}

	if ( .@c )
	{
		if ( getd ( ".a2"+ .@i +"_"+ .@j ) == 1 )
		{
			.@amount = getd ( "mobs_"+ .@e );
			setd "mobs_"+ .@e, .@amount + 1;
			if ( getd ( "mobs_"+ .@e ) < getd ( ".a4"+ .@i +"_"+ .@j ) ) end ;
			setd "evo"+ .@e, getd ( "evo"+ .@e ) + 1;
			setd "mobs_"+ .@e, 0;
		}
		else if ( getd ( ".a2"+ .@i +"_"+ .@j ) == 2 )
		{
			.@amount = getd ( "exp_"+ .@e );
			setd "exp_"+ .@e, .@amount + strmobinfo ( 6, killedrid );
			if ( getd ( "exp_"+ .@e ) < getd ( ".a4"+ .@i +"_"+ .@j ) ) end ;
			setd "evo"+ .@e, getd ( "evo"+ .@e ) + 1;
			setd "exp_"+ .@e, 0;
		}
		else
			debugmes "Script Items_Evo, error: wrong mode.";
		announce getitemname ( .@e ) +" is now "+ getd ( "evo"+ .@e ) +"% from evolving...", bc_self, "0x"+ .c$[0] ;
		specialeffect2 58 ;
		sleep2 200 ;
		specialeffect2 383 ;
		if ( getd ( "evo"+ .@e ) >= 100 && .auto )
		{
			specialeffect2 263 ;
			sleep2 500 ;
			specialeffect2 377 ;
			sleep2 300 ;
			specialeffect2 542 ;
			sleep2 300 ;
			announce getitemname ( .@e ) +" is evolving..." , bc_self, "0x"+ .c$[1] ;
			.@k = 3;
			while ( .@k-- )
			{
				specialeffect2 521 ;
				sleep2 900 ;
			}
			specialeffect2 463 ;
			sleep2 200;
			specialeffect2 665 ;
			sleep2 500 ;
			.@a--;
			setarray .@card[1], getequipcardid ( .slots[.@a], 0 ), getequipcardid ( .slots[.@a], 1 ), getequipcardid ( .slots[.@a], 2 ), getequipcardid ( .slots[.@a], 3 );
			.@refine = getequiprefinerycnt ( .slots[.@a] );
			//unequip .slots[.@a];
			//delitem .@e, 1 ;
			getitem2 getd ( ".a1"+ .@i +"_"+ ( .@j + 1 ) ) , 1, 1, .@refine, 0, .@card[1], .@card[2], .@card[3], .@card[4] ;
			equip getd ( ".a1"+  .@i +"_"+ ( .@j + 1 ) ) ;
			setd "evo"+ .@e, 0;
			deletearray @wing ;
			announce "Congratulations, your wings have evolved to "+ getitemname ( getd ( ".a1"+ .@i +"_"+ ( .@j + 1 ) ) ) +"." , bc_self , "0x"+ .c$[2] ;
		}
	}
	end ;
}

 

  • 0
Posted
-	script	Items_Conf	-1,{

OnInit:

	callsub Ids, 60656, 1, 1004, 1, 60657, 1, 1004, 1, 60658, 1, 1004,  0 ;
	callsub Ids, 60635, 1, 111, 1, 60636, 1, 111, 1, 60637, 1, 111,  0 ;
/*
	ID[...], evolution mode[...], mob id[...], neccessary to get 1%[...].
	If  you want any monster, use 111.

Evolution modes:

	1 = Every X numer of mobs (1%).
	2 = Experience (1%).
*/

/*
	0 = Won't be evolved automatically.
	1 = Will be evolved automatically
*/
	.auto = 1;

/*
	Color of the announces.
*/
	setarray .c$[0],	"4db557",	// % of evolution.
				"d43438",	// Wings evolving.
				"4da5b5";	// Wings evolved.

/* slots to check.
	EQI_ACC_L (0)             - Accessory 1
	EQI_ACC_R (1)             - Accessory 2
	EQI_SHOES (2)             - Footgear (shoes, boots)
	EQI_GARMENT (3)           - Garment (mufflers, hoods, manteaux)
	EQI_HEAD_LOW (4)          - Lower Headgear (beards, some masks)
	EQI_HEAD_MID (5)          - Middle Headgear (masks, glasses)
	EQI_HEAD_TOP (6)          - Upper Headgear
	EQI_ARMOR (7)             - Armor (jackets, robes)
	EQI_HAND_L (8)            - Left hand (weapons, shields)
	EQI_HAND_R (9)            - Right hand (weapons)
	EQI_COSTUME_HEAD_TOP (10) - Upper Costume Headgear
	EQI_COSTUME_HEAD_MID (11) - Middle Costume Headgear
	EQI_COSTUME_HEAD_LOW (12) - Lower Costume Headgear
	EQI_COSTUME_GARMENT (13)  - Costume Garment
	EQI_AMMO (14)    		  - Arrow/Ammunition
	EQI_SHADOW_ARMOR (15)     - Shadow Armor
	EQI_SHADOW_WEAPON (16)    - Shadow Weapon
	EQI_SHADOW_SHIELD (17)    - Shadow Shield
	EQI_SHADOW_SHOES (18)     - Shadow Shoes
	EQI_SHADOW_ACC_R (19)     - Shadow Accessory 2
	EQI_SHADOW_ACC_L (20)     - Shadow Accessory 1
*/

	setarray .slots[0], 	EQI_HEAD_LOW, 
				EQI_HEAD_MID,
				EQI_HEAD_TOP;

	//=============================================

	end ;

Ids:

	for ( .@args = getargcount ( ); .@a < .@args ; .@a+=4 )
	{
		.@i = .w2[.w1]++;
		setd ".a1"+ .w1 +"_"+ .@i, getarg ( .@a );	// id.
		if ( getarg ( .@a + 4, 0 ) != 0 ) {
			setd ".a2"+ .w1 +"_"+ .@i, getarg ( .@a + 1 );	// mode.
			setd ".a3"+ .w1 +"_"+ .@i, getarg ( .@a + 2 );	// mob id.
			setd ".a4"+ .w1 +"_"+ .@i, getarg ( .@a + 3 );	// amount.
		}
	}
	.w1++;
	return ;

OnNPCKillEvent:

	if ( @evolving ) end ;
	// Cache. That old loop on every mob killed...
	if ( @wing[0] && isequipped ( @wing[0] ) )
	{
		.@c  = 1;
		.@e  = @wing[0];
		.@i  = @wing[1] - 1;
		.@j  = @wing[2] - 1;
		.@a  = @wing[3];
	}
	else
	{
		.@size = getarraysize ( .slots );
		while ( .@a < .@size && !.@c )
		{
			.@e = getequipid ( .slots[.@a] );
			.@a++;
			if ( .@e < 0 )
				continue ;
			.@i = 0;
			while ( .@i < .w1 && !.@c )
			{
				.@j = 0;
				while ( .@j < .w2[.@i] && !.@c )
				{
					if ( .@e == getd ( ".a1"+ .@i +"_"+ .@j ) && getd ( ".a1"+ .@i +"_"+ ( .@j + 1 ) ) )
					{
						if ( getd ( ".a4"+ .@i +"_"+ .@j ) > 0 && ( killedrid == getd ( ".a3"+ .@i +"_"+ .@j ) || getd ( ".a3"+ .@i +"_"+ .@j ) < 1001 ) )
						{
							.@c = 1;
							setarray @wing[0], .@e, .@i + 1, .@j + 1, .@a;
						}
					}
					if ( !.@c )
						.@j++;
				}
				if ( !.@c )
					.@i++;
			}
		}
	}

	if ( .@c )
	{
		if ( getd ( ".a2"+ .@i +"_"+ .@j ) == 1 )
		{
			.@amount = getd ( "mobs_"+ .@e );
			setd "mobs_"+ .@e, .@amount + 1;
			if ( getd ( "mobs_"+ .@e ) < getd ( ".a4"+ .@i +"_"+ .@j ) ) end ;
			setd "evo"+ .@e, getd ( "evo"+ .@e ) + 1;
			setd "mobs_"+ .@e, 0;
		}
		else if ( getd ( ".a2"+ .@i +"_"+ .@j ) == 2 )
		{
			.@amount = getd ( "exp_"+ .@e );
			setd "exp_"+ .@e, .@amount + strmobinfo ( 6, killedrid );
			if ( getd ( "exp_"+ .@e ) < getd ( ".a4"+ .@i +"_"+ .@j ) ) end ;
			setd "evo"+ .@e, getd ( "evo"+ .@e ) + 1;
			setd "exp_"+ .@e, 0;
		}
		else
			debugmes "Script Items_Evo, error: wrong mode.";
		announce getitemname ( .@e ) +" is now "+ getd ( "evo"+ .@e ) +"% from evolving...", bc_self, "0x"+ .c$[0] ;
		specialeffect2 58 ;
		sleep2 200 ;
		specialeffect2 383 ;
		if ( getd ( "evo"+ .@e ) >= 100 && .auto )
		{
			@evolving = 1;
			specialeffect2 263 ;
			sleep2 500 ;
			specialeffect2 377 ;
			sleep2 300 ;
			specialeffect2 542 ;
			sleep2 300 ;
			announce getitemname ( .@e ) +" is evolving..." , bc_self, "0x"+ .c$[1] ;
			.@k = 3;
			while ( .@k-- )
			{
				specialeffect2 521 ;
				sleep2 900 ;
			}
			specialeffect2 463 ;
			sleep2 200;
			specialeffect2 665 ;
			sleep2 500 ;
			.@a--;
			setarray .@card[1], getequipcardid ( .slots[.@a], 0 ), getequipcardid ( .slots[.@a], 1 ), getequipcardid ( .slots[.@a], 2 ), getequipcardid ( .slots[.@a], 3 );
			.@refine = getequiprefinerycnt ( .slots[.@a] );
			unequip .slots[.@a];
			delitem .@e, 1 ;
			getitem2 getd ( ".a1"+ .@i +"_"+ ( .@j + 1 ) ) , 1, 1, .@refine, 0, .@card[1], .@card[2], .@card[3], .@card[4] ;
			equip getd ( ".a1"+  .@i +"_"+ ( .@j + 1 ) ) ;
			setd "evo"+ .@e, 0;
			deletearray @wing ;
			announce "Congratulations, your wings have evolved to "+ getitemname ( getd ( ".a1"+ .@i +"_"+ ( .@j + 1 ) ) ) +"." , bc_self , "0x"+ .c$[2] ;
			@evolving = 0;
		}
	}
	end ;
}

 

  • 0
Posted

I didn't understand very well, but with this change, it's impossible for it to reach >100%.

-	script	Items_Conf	-1,{

OnInit:

	callsub Ids, 60656, 1, 1004, 1, 60657, 1, 1004, 1, 60658, 1, 1004,  0 ;
	callsub Ids, 60635, 1, 111, 1, 60636, 1, 111, 1, 60637, 1, 111,  0 ;
/*
	ID[...], evolution mode[...], mob id[...], neccessary to get 1%[...].
	If  you want any monster, use 111.

Evolution modes:

	1 = Every X numer of mobs (1%).
	2 = Experience (1%).
*/

/*
	0 = Won't be evolved automatically.
	1 = Will be evolved automatically
*/
	.auto = 1;

/*
	Color of the announces.
*/
	setarray .c$[0],	"4db557",	// % of evolution.
				"d43438",	// Wings evolving.
				"4da5b5";	// Wings evolved.

/* slots to check.
	EQI_ACC_L (0)             - Accessory 1
	EQI_ACC_R (1)             - Accessory 2
	EQI_SHOES (2)             - Footgear (shoes, boots)
	EQI_GARMENT (3)           - Garment (mufflers, hoods, manteaux)
	EQI_HEAD_LOW (4)          - Lower Headgear (beards, some masks)
	EQI_HEAD_MID (5)          - Middle Headgear (masks, glasses)
	EQI_HEAD_TOP (6)          - Upper Headgear
	EQI_ARMOR (7)             - Armor (jackets, robes)
	EQI_HAND_L (8)            - Left hand (weapons, shields)
	EQI_HAND_R (9)            - Right hand (weapons)
	EQI_COSTUME_HEAD_TOP (10) - Upper Costume Headgear
	EQI_COSTUME_HEAD_MID (11) - Middle Costume Headgear
	EQI_COSTUME_HEAD_LOW (12) - Lower Costume Headgear
	EQI_COSTUME_GARMENT (13)  - Costume Garment
	EQI_AMMO (14)    		  - Arrow/Ammunition
	EQI_SHADOW_ARMOR (15)     - Shadow Armor
	EQI_SHADOW_WEAPON (16)    - Shadow Weapon
	EQI_SHADOW_SHIELD (17)    - Shadow Shield
	EQI_SHADOW_SHOES (18)     - Shadow Shoes
	EQI_SHADOW_ACC_R (19)     - Shadow Accessory 2
	EQI_SHADOW_ACC_L (20)     - Shadow Accessory 1
*/

	setarray .slots[0], 	EQI_HEAD_LOW, 
				EQI_HEAD_MID,
				EQI_HEAD_TOP;

	//=============================================

	end ;

Ids:

	for ( .@args = getargcount ( ); .@a < .@args ; .@a+=4 )
	{
		.@i = .w2[.w1]++;
		setd ".a1"+ .w1 +"_"+ .@i, getarg ( .@a );	// id.
		if ( getarg ( .@a + 4, 0 ) != 0 ) {
			setd ".a2"+ .w1 +"_"+ .@i, getarg ( .@a + 1 );	// mode.
			setd ".a3"+ .w1 +"_"+ .@i, getarg ( .@a + 2 );	// mob id.
			setd ".a4"+ .w1 +"_"+ .@i, getarg ( .@a + 3 );	// amount.
		}
	}
	.w1++;
	return ;

OnNPCKillEvent:

	if ( @evolving ) end ;
	// Cache. That old loop on every mob killed...
	if ( @wing[0] && isequipped ( @wing[0] ) )
	{
		.@c  = 1;
		.@e  = @wing[0];
		.@i  = @wing[1] - 1;
		.@j  = @wing[2] - 1;
		.@a  = @wing[3];
	}
	else
	{
		.@size = getarraysize ( .slots );
		while ( .@a < .@size && !.@c )
		{
			.@e = getequipid ( .slots[.@a] );
			.@a++;
			if ( .@e < 0 )
				continue ;
			.@i = 0;
			while ( .@i < .w1 && !.@c )
			{
				.@j = 0;
				while ( .@j < .w2[.@i] && !.@c )
				{
					if ( .@e == getd ( ".a1"+ .@i +"_"+ .@j ) && getd ( ".a1"+ .@i +"_"+ ( .@j + 1 ) ) )
					{
						if ( getd ( ".a4"+ .@i +"_"+ .@j ) > 0 && ( killedrid == getd ( ".a3"+ .@i +"_"+ .@j ) || getd ( ".a3"+ .@i +"_"+ .@j ) < 1001 ) )
						{
							.@c = 1;
							setarray @wing[0], .@e, .@i + 1, .@j + 1, .@a;
						}
					}
					if ( !.@c )
						.@j++;
				}
				if ( !.@c )
					.@i++;
			}
		}
	}

	if ( .@c )
	{
		if ( getd ( ".a2"+ .@i +"_"+ .@j ) == 1 )
		{
			.@amount = getd ( "mobs_"+ .@e );
			setd "mobs_"+ .@e, .@amount + 1;
			if ( getd ( "mobs_"+ .@e ) < getd ( ".a4"+ .@i +"_"+ .@j ) ) end ;
			setd "evo"+ .@e, getd ( "evo"+ .@e ) + 1;
			setd "mobs_"+ .@e, 0;
		}
		else if ( getd ( ".a2"+ .@i +"_"+ .@j ) == 2 )
		{
			.@amount = getd ( "exp_"+ .@e );
			setd "exp_"+ .@e, .@amount + strmobinfo ( 6, killedrid );
			if ( getd ( "exp_"+ .@e ) < getd ( ".a4"+ .@i +"_"+ .@j ) ) end ;
			setd "evo"+ .@e, getd ( "evo"+ .@e ) + 1;
			setd "exp_"+ .@e, 0;
		}
		else
			debugmes "Script Items_Evo, error: wrong mode.";
		announce getitemname ( .@e ) +" is now "+ getd ( "evo"+ .@e ) +"% from evolving...", bc_self, "0x"+ .c$[0] ;
		specialeffect2 58 ;
		sleep2 200 ;
		specialeffect2 383 ;
		if ( getd ( "evo"+ .@e ) == 100 && .auto )
		{
			@evolving = 1;
			specialeffect2 263 ;
			sleep2 500 ;
			specialeffect2 377 ;
			sleep2 300 ;
			specialeffect2 542 ;
			sleep2 300 ;
			announce getitemname ( .@e ) +" is evolving..." , bc_self, "0x"+ .c$[1] ;
			.@k = 3;
			while ( .@k-- )
			{
				specialeffect2 521 ;
				sleep2 900 ;
			}
			specialeffect2 463 ;
			sleep2 200;
			specialeffect2 665 ;
			sleep2 500 ;
			.@a--;
			setarray .@card[1], getequipcardid ( .slots[.@a], 0 ), getequipcardid ( .slots[.@a], 1 ), getequipcardid ( .slots[.@a], 2 ), getequipcardid ( .slots[.@a], 3 );
			.@refine = getequiprefinerycnt ( .slots[.@a] );
			unequip .slots[.@a];
			delitem .@e, 1 ;
			getitem2 getd ( ".a1"+ .@i +"_"+ ( .@j + 1 ) ) , 1, 1, .@refine, 0, .@card[1], .@card[2], .@card[3], .@card[4] ;
			equip getd ( ".a1"+  .@i +"_"+ ( .@j + 1 ) ) ;
			setd "evo"+ .@e, 0;
			deletearray @wing ;
			announce "Congratulations, your wings have evolved to "+ getitemname ( getd ( ".a1"+ .@i +"_"+ ( .@j + 1 ) ) ) +"." , bc_self , "0x"+ .c$[2] ;
			@evolving = 0;
		}
	}
	end ;
}

Or do you mean something else?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...