Jump to content
  • 0

Help Fix [Error]:


Elysium

Question


  • Group:  Members
  • Topic Count:  41
  • Topics Per Day:  0.01
  • Content Count:  164
  • Reputation:   17
  • Joined:  03/15/12
  • Last Seen:  

Hello, how can i fix this one?

 

Image:

post-3121-0-96299600-1365080382_thumb.png

 

/*
   ||======================================================||
   ||======================================================||
   ||                       NPC:                           ||
   ||======================================================||
   ||                  Evolution Wings                     ||
   ||======================================================||
   ||                    Version 1.3                       ||
   ||======================================================||
   ||                   Made by Streiker                   ||
   ||======================================================||
   ||                      Updates:                        ||
   ||                    (5 latests)                       ||
   || Version 1.1:                                         ||
   ||             Fixed: The npc didn't work.              ||
   ||             Added new configs.                       ||
   ||             Changed the exp rates system.            ||
   ||                                                      ||
   || Version 1.1.1:                                       ||
   ||              Fixed: Mistakes.                        ||
   ||                                                      ||
   || Version 1.2:                                         ||
   ||             Added rahuldev345 suggestion (spec. mobs)||
   ||             Added AnnieRuru suggestion (refine)      ||
   ||                                                      ||
   || Version 1.3:                                         ||
   ||            Added new mode, new confs, new vars.      ||
   ||======================================================||
   ||                     Description:                     ||
   ||                                                      ||
   || Make easily "evolution wings" with this.             ||
   ||======================================================||
   ||               Additional Comments:                   ||
   ||                                                      ||
   || At the moment none.                                  ||
   ||======================================================||
   ||======================================================||
*/
-    script    Wings_Conf    -1,{
OnInit:
    /* Evolution modes:
    1 = Every X numer of mobs (1%).
    2 = Experience (1%).
    3 = Every X number of mobs (100%).
    */
    set .modo, 1;
    set .rates, 100;    // % (Only for Mode 2).
    /* ID[...], evolution mode[...], mob id[...], neccesary to advance 1%[...].
    (Configured for the 1st mode).
    If  you want any monster, use 111.
    // Use callsub for add more wings. */
    callsub Ids, 2573, 1, 1002, 20, 19002, 1, 111, 25, 19003, 1, 111, 30, 19004, 1, 111, 0 ;
/*
    0 = Won't evolved automatically.
    1 = Will be evolved automatically
*/
    set .auto, 1;
    // Delay of evolution (miliseconds).
    set .time, 3000;
    // Announces color.
    setarray .c$[0],"4db557",    // % of evolution.
            "d43438",    // Wings evolving.
            "4da5b5";    // Wings evolved.
    end ;
Ids:
    set .w1, .w1 + 1;
    for ( set .@a, 0; getarg ( .@a, 0 ) != 0 ; set .@a, .@a + 4 ) {
        set .w2[.w1 - 1], .w2[.w1 - 1] + 1;
        setd ".a1"+ .w1 +"_"+ .w2[.w1 - 1], getarg ( .@a );      // id.
        setd ".a2"+ .w1 +"_"+ .w2[.w1 - 1], getarg ( .@a + 1 );    // mode.
        setd ".a3"+ .w1 +"_"+ .w2[.w1 - 1], getarg ( .@a + 2 );    // mob id.
        setd ".a4"+ .w1 +"_"+ .w2[.w1 - 1], getarg ( .@a + 3 );    // amount.
    }
    return ;
OnNPCKillEvent:
    setarray .@slots[0], 1, 9, 10;    // put here your slots.
    for ( set .@a, 0; .@a < 3 ; set .@a, .@a + 1 ) {
        set .@e, getequipid ( .@slots[.@a] );
        for ( set .@a, 0; .@a < .w2[.@w] ; set .@a, .@a + 1 ) {
            set .@id, .@id + 1;
            if ( .@id == .w2[.@w] ) {
                set .@id, 0;
                set .@w, .@w + 1;
                set .@a, 0;
            }
            if (
                .@e == getd ( ".a1"+ ( .@w + 1 ) +"_"+ .@id )
                                    &&
                getd ( ".a4"+ ( .@w + 1 ) +"_"+ .@id )
                                    &&
                    (
                        killedrid == getd ( ".a3"+ ( .@w + 1 ) +"_"+ .@id )
                                            ||
                        getd ( ".a3"+ ( .@w + 1 ) +"_"+ .@id ) < 1001
                    )
            ) {
                set .@c, 1;
                break ;
            }
            sleep2 ( ! ( .@a % 100 ) ) ;
        }
    }
    if ( ! ( .@c ) ) end ;
    set .@e2, getd ( "evo"+ .@e );
    if ( getd ( ".a2"+ ( .@w + 1 ) +"_"+ .@id ) == 1 ) {
        setd "$Mobs_"+ getcharid ( 0 ) +"_"+ .@e, getd("$Mobs_"+ getcharid( 0 ) +"_"+ .@e ) + 1;
        if ( ( getd ( "$Mobs_"+getcharid ( 0 ) ) % getd ( ".a4"+ ( .@w + 1 ) +"_"+ .@id ) ) ) end ;
        setd "evo"+ .@e, getd ( "evo"+ .@e ) + 1;
        setd "$Mobs_"+ getcharid ( 0 ) +"_"+ .@e, 0;
    }
    else if ( getd ( ".a2"+ ( .@w + 1 ) +"_"+ .@id ) == 2 ) {
        setd "$Exp_"+ getcharid ( 0 ) +"_"+ .@e, getd ("$Exp_"+ getcharid ( 0 ) +"_"+ .@e ) + ( strmobinfo ( 6, killedrid ) * .rates / 100 );
        if ( getd ( "$Exp_"+getcharid ( 0 ) +"_"+ .@e ) < getd ( ".a4"+ ( .@w + 1 ) +"_"+ .@id ) ) end ;
        setd "evo"+ .@e, getd ( "evo"+ .@e ) + 1;
        setd "$Exp_"+ getcharid ( 0 ), 0;
    }
    else if ( getd ( ".a2"+ ( .@w + 1 ) +"_"+ .@id ) == 3 ) {
        setd "$Mobs_"+ getcharid ( 0 ), getd ("$Mobs_"+ getcharid( 0 ) +"_"+ .@e ) + 1;
        if ( ( getd ( "$Mobs_"+ getcharid ( 0 ) +"_"+ .@e ) % getd ( ".a4"+ ( .@w + 1 ) +"_"+ .@id ) ) ) end ;
        setd "evo"+ .@e, getd ( "evo"+ .@e ) + 100;
        setd "$Mobs_"+ getcharid ( 0 ) +"_"+ .@e, 0;
    }
    else debugmes "Script Wings_Evo, error: wrong mode configuration.";
    if ( .@e2 != getd ( "evo"+ .@e ) ) {
        announce getd ( "evo"+ .@e ) +"% "+ getitemname ( .@e ) , 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 ) +" evolving..." , bc_self, "0x"+ .c$[1] ;
        if ( .time ) sleep2 .time ;
        specialeffect2 463 ;
        sleep2 200;
        specialeffect2 665 ;
        sleep2 500 ;
        //specialeffect2 437 ;
        setarray .@card[1], getequipcardid ( .slot, 0 ), getequipcardid ( .slot, 1 ), getequipcardid ( .slot, 2 ), getequipcardid ( .slot, 3 );
        set .@refine, getequiprefinerycnt ( .slot );
        delitem .@e, 1 ;
        getitem2 getd ( ".a1"+ ( .@w + 1 ) +"_"+ ( .@id + 1 ) ) , 1, 1, .@refine, 0, .@card[1], .@card[2], .@card[3], .@card[4] ;
        equip getd ( ".a1"+  ( .@w + 1 ) +"_"+ ( .@id + 1 ) ) ;
        setd "evo"+ .@e, 0;
        announce "Congratulations, your wings have evolved to "+ getitemname ( getd ( ".a1"+ ( .@w + 1 ) +"_"+ ( .@id + 1 ) ) ) +"." , bc_self , "0x"+ .c$[2] ;
    }
    end;

}

 

Edited by Capuche
Add [Code]
Link to comment
Share on other sites

1 answer to this question

Recommended Posts


  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   616
  • Joined:  07/05/12
  • Last Seen:  

/*
   ||======================================================||
   ||======================================================||
   ||					   NPC:						   ||
   ||======================================================||
   ||				  Evolution Wings					 ||
   ||======================================================||
   ||					Version 1.3					   ||
   ||======================================================||
   ||				   Made by Streiker				   ||
   ||======================================================||
   ||					  Updates:						||
   ||					(5 latests)					   ||
   || Version 1.1:										 ||
   ||			 Fixed: The npc didn't work.			  ||
   ||			 Added new configs.					   ||
   ||			 Changed the exp rates system.			||
   ||													  ||
   || Version 1.1.1:									   ||
   ||			  Fixed: Mistakes.						||
   ||													  ||
   || Version 1.2:										 ||
   ||			 Added rahuldev345 suggestion (spec. mobs)||
   ||			 Added AnnieRuru suggestion (refine)	  ||
   ||													  ||
   || Version 1.3:										 ||
   ||			Added new mode, new confs, new vars.	  ||
   ||======================================================||
   ||					 Description:					 ||
   ||													  ||
   || Make easily "evolution wings" with this.			 ||
   ||======================================================||
   ||			   Additional Comments:				   ||
   ||													  ||
   || At the moment none.								  ||
   ||======================================================||
   ||======================================================||
*/
-	script	Wings_Conf	-1,{
OnInit:
	/* Evolution modes:
	1 = Every X numer of mobs (1%).
	2 = Experience (1%).
	3 = Every X number of mobs (100%).
	*/
	set .modo, 1;
	set .rates, 100;	// % (Only for Mode 2).
	/* ID[...], evolution mode[...], mob id[...], neccesary to advance 1%[...].
	(Configured for the 1st mode).
	If  you want any monster, use 111.
	// Use callsub for add more wings. */
	callsub Ids, 2573, 1, 1002, 20, 19002, 1, 111, 25, 19003, 1, 111, 30, 19004, 1, 111, 0 ;
/*
	0 = Won't evolved automatically.
	1 = Will be evolved automatically
*/
	set .auto, 1;
	// Delay of evolution (miliseconds).
	set .time, 3000;
	// Announces color.
	setarray .c$[0],"4db557",	// % of evolution.
			"d43438",	// Wings evolving.
			"4da5b5";	// Wings evolved.
	setarray .slots[0], 1, 9, 10;	// put here your slots.
	set .size_slots, getarraysize( .slots );
	end ;
Ids:
	set .w1, .w1 + 1;
	for ( set .@a, 0; getarg ( .@a, 0 ) != 0 ; set .@a, .@a + 4 ) {
		set .w2[.w1 - 1], .w2[.w1 - 1] + 1;
		setd ".a1"+ .w1 +"_"+ .w2[.w1 - 1], getarg ( .@a );	  // id.
		setd ".a2"+ .w1 +"_"+ .w2[.w1 - 1], getarg ( .@a + 1 );	// mode.
		setd ".a3"+ .w1 +"_"+ .w2[.w1 - 1], getarg ( .@a + 2 );	// mob id.
		setd ".a4"+ .w1 +"_"+ .w2[.w1 - 1], getarg ( .@a + 3 );	// amount.
	}
	return ;
OnNPCKillEvent:
	for ( set .@i, 0; .@i < .size_slots ; set .@i, .@i + 1 ) {
		set .@e, getequipid ( .slots[.@i] );
		if( .@e != -1 ) {
			for ( set .@a, 0; .@a < .w2[.@w] ; set .@a, .@a + 1 ) {
				set .@id, .@id + 1;
				if ( .@id == .w2[.@w] ) {
					set .@id, 0;
					set .@w, .@w + 1;
					set .@a, 0;
				}
				if ( .@e == getd ( ".a1"+ ( .@w + 1 ) +"_"+ .@id ) && getd ( ".a4"+ ( .@w + 1 ) +"_"+ .@id ) &&	( killedrid == getd ( ".a3"+ ( .@w + 1 ) +"_"+ .@id ) || getd ( ".a3"+ ( .@w + 1 ) +"_"+ .@id ) < 1001 )
				) {
					set .@c, 1;
					break ;
				}
				sleep2 ( ! ( .@a % 100 ) ) ;
			}
		}
		if( .@c ) break;
	}
	if ( !.@c ) end ;
	set .@e2, getd ( "evo"+ .@e );
	if ( getd ( ".a2"+ ( .@w + 1 ) +"_"+ .@id ) == 1 ) {
		setd "$Mobs_"+ getcharid ( 0 ) +"_"+ .@e, getd("$Mobs_"+ getcharid( 0 ) +"_"+ .@e ) + 1;
		if ( ( getd ( "$Mobs_"+getcharid ( 0 ) ) % getd ( ".a4"+ ( .@w + 1 ) +"_"+ .@id ) ) ) end ;
		setd "evo"+ .@e, getd ( "evo"+ .@e ) + 1;
		setd "$Mobs_"+ getcharid ( 0 ) +"_"+ .@e, 0;
	}
	else if ( getd ( ".a2"+ ( .@w + 1 ) +"_"+ .@id ) == 2 ) {
		setd "$Exp_"+ getcharid ( 0 ) +"_"+ .@e, getd ("$Exp_"+ getcharid ( 0 ) +"_"+ .@e ) + ( strmobinfo ( 6, killedrid ) * .rates / 100 );
		if ( getd ( "$Exp_"+getcharid ( 0 ) +"_"+ .@e ) < getd ( ".a4"+ ( .@w + 1 ) +"_"+ .@id ) ) end ;
		setd "evo"+ .@e, getd ( "evo"+ .@e ) + 1;
		setd "$Exp_"+ getcharid ( 0 ), 0;
	}
	else if ( getd ( ".a2"+ ( .@w + 1 ) +"_"+ .@id ) == 3 ) {
		setd "$Mobs_"+ getcharid ( 0 ), getd ("$Mobs_"+ getcharid( 0 ) +"_"+ .@e ) + 1;
		if ( ( getd ( "$Mobs_"+ getcharid ( 0 ) +"_"+ .@e ) % getd ( ".a4"+ ( .@w + 1 ) +"_"+ .@id ) ) ) end ;
		setd "evo"+ .@e, getd ( "evo"+ .@e ) + 100;
		setd "$Mobs_"+ getcharid ( 0 ) +"_"+ .@e, 0;
	}
	else debugmes "Script Wings_Evo, error: wrong mode configuration.";
	if ( .@e2 != getd ( "evo"+ .@e ) ) {
		announce getd ( "evo"+ .@e ) +"% "+ getitemname ( .@e ) , 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 ) +" evolving..." , bc_self, "0x"+ .c$[1] ;
		if ( .time ) sleep2 .time ;
		specialeffect2 463 ;
		sleep2 200;
		specialeffect2 665 ;
		sleep2 500 ;
		//specialeffect2 437 ;
		setarray .@card[1], getequipcardid ( .slots[.@i], 0 ), getequipcardid ( .slots[.@i], 1 ), getequipcardid ( .slots[.@i], 2 ), getequipcardid ( .slots[.@i], 3 );
		set .@refine, getequiprefinerycnt ( .slots[.@i] );
		delitem .@e, 1 ;
		getitem2 getd ( ".a1"+ ( .@w + 1 ) +"_"+ ( .@id + 1 ) ) , 1, 1, .@refine, 0, .@card[1], .@card[2], .@card[3], .@card[4] ;
		equip getd ( ".a1"+  ( .@w + 1 ) +"_"+ ( .@id + 1 ) ) ;
		setd "evo"+ .@e, 0;
		announce "Congratulations, your wings have evolved to "+ getitemname ( getd ( ".a1"+ ( .@w + 1 ) +"_"+ ( .@id + 1 ) ) ) +"." , bc_self , "0x"+ .c$[2] ;
	}
	end;

}

Interesting idea

Link to comment
Share on other sites

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.

×
×
  • Create New...