Jump to content

Question

Posted
prontera,155,180,5    script    dksfsdfkb    100,{
    mes "select which skill you want to be copy, your existing one will be overwrite";
    next;
    set .@menu, select(.menu$) -1;
    if ( getskilllv(.skill$[.@menu * 3 +1]) ) {
        mes "you already copied that skill";
        close;
    }
    mes "are you sure you want to copy "+ .skill$[.@menu * 3] +"?";
    mes "you'll need to relogin again";
    next;
    if ( select ( "Yes", "No" ) == 2 ) close;
    set CLONE_SKILL, .skill$[.@menu * 3 +1];
    set CLONE_SKILL_LV, .skill$[.@menu * 3 +2];
    atcommand "@kick "+ strcharinfo(0);
    end;
OnInit:
    setarray .skill$, 
        "< Remove >", 0, 0,
        "Fire Bolt", 19, 10,
        "Cold Bolt", 14, 10,
        "Lightning Bolt", 20, 10;
    set .@skillsize, getarraysize(.skill$);
    for ( set .@i,0; .@i < .@skillsize; set .@i, .@i +3 )
        set .menu$, .menu$ + .skill$[.@i] +":";
    end;
}

Is it possible to choose the lvl of the skill you want to copy (like: Please, select the skill you want to copy. next; Please, select its level)? Since that NPC only teaches you lvl 10 skills. Also... Once I log out the copied skill doesn't disappear x__x can someone help me? Thanks in advance!

7 answers to this question

Recommended Posts

Posted


prontera,155,180,5 script dksfsdfkb 100,{

mes "select which skill you want to be copy, your existing one will be overwrite";

next;

set .@menu, select(.menu$) -1;

if ( getskilllv(.skill$[.@menu * 3 +1]) ) {

mes "you already copied that skill";

close;

}

mes "are you sure you want to copy "+ .skill$[.@menu * 3] +"?";

mes "you'll need to relogin again";

next;

if ( select ( "Yes", "No" ) == 2 ) close;

.@text$ = atoi( .skill$[.@menu * 3 +2] ) > 1 ? "-" + .skill$[.@menu * 3 +2] : "" ;

mes "choose a level (1" + .@text$ + ")";

if ( input( .@input, 1, ( atoi( .skill$[.@menu * 3 +2] ) > 1 ? atoi( .skill$[.@menu * 3 +2] ) : 1 )) != 0 ) {

mes "wrong level";

close;

}

set CLONE_SKILL, atoi( .skill$[.@menu * 3 +1] );

set CLONE_SKILL_LV, .@input;

atcommand "@kick "+ strcharinfo(0);

end;

OnInit:

setarray .skill$,

// "< Remove >", 0, 0,

"Fire Bolt", 19, 10,

"Cold Bolt", 14, 10,

"Lightning Bolt", 20, 10;

set .@skillsize, getarraysize(.skill$);

for ( set .@i,0; .@i < .@skillsize; set .@i, .@i +3 )

set .menu$, .menu$ + .skill$[.@i] +":";

end;

}

Posted
prontera,155,180,5	script	dksfsdfkb	100,{
	mes "select which skill you want to be copy, your existing one will be overwrite";
	next;
	set .@menu, select(.menu$) -1;
	if ( getskilllv(.skill$[.@menu * 3 +1]) ) {
		mes "you already copied that skill";
		close;
	}
	mes "are you sure you want to copy "+ .skill$[.@menu * 3] +"?";
	mes "you'll need to relogin again";
	next;
	if ( select ( "Yes", "No" ) == 2 ) close;
	.@text$ = atoi( .skill$[.@menu * 3 +2] ) > 1 ? "-" + .skill$[.@menu * 3 +2] : "" ;
	mes "choose a level (1" + .@text$ + ")";
	if ( input( .@input, 1, ( atoi( .skill$[.@menu * 3 +2] ) > 1 ? atoi( .skill$[.@menu * 3 +2] ) : 1 )) != 0 ) {
		mes "wrong level";
		close;
	}
	set CLONE_SKILL, atoi( .skill$[.@menu * 3 +1] );
	set CLONE_SKILL_LV, .@input;
	atcommand "@kick "+ strcharinfo(0);
	end;
OnInit:
	setarray .skill$, 
		// "< Remove >", 0, 0,
		"Fire Bolt", 19, 10,
		"Cold Bolt", 14, 10,
		"Lightning Bolt", 20, 10;
	set .@skillsize, getarraysize(.skill$);
	for ( set .@i,0; .@i < .@skillsize; set .@i, .@i +3 )
		set .menu$, .menu$ + .skill$[.@i] +":";
	end;
}

 

Possible to add last skill menu, Last skill the player has copied?

Posted
prontera,155,180,5	script	dksfsdfkb	100,{
	mes "select which skill you want to be copy, your existing one will be overwrite";
	next;
	set .@menu, select(.menu$) -1;
	if ( getskilllv(.skill$[.@menu * 3 +1]) ) {
		mes "you already copied that skill";
		close;
	}
	mes "are you sure you want to copy "+ .skill$[.@menu * 3] +"?";
	mes "you'll need to relogin again";
	next;
	if ( select ( "Yes", "No" ) == 2 ) close;
	.@text$ = atoi( .skill$[.@menu * 3 +2] ) > 1 ? "-" + .skill$[.@menu * 3 +2] : "" ;
	mes "choose a level (1" + .@text$ + ")";
	if ( input( .@input, 1, ( atoi( .skill$[.@menu * 3 +2] ) > 1 ? atoi( .skill$[.@menu * 3 +2] ) : 1 )) != 0 ) {
		mes "wrong level";
		close;
	}
	set CLONE_SKILL, atoi( .skill$[.@menu * 3 +1] );
	set CLONE_SKILL_LV, .@input;
	atcommand "@kick "+ strcharinfo(0);
	end;
OnInit:
	setarray .skill$, 
		// "< Remove >", 0, 0,
		"Fire Bolt", 19, 10,
		"Cold Bolt", 14, 10,
		"Lightning Bolt", 20, 10;
	set .@skillsize, getarraysize(.skill$);
	for ( set .@i,0; .@i < .@skillsize; set .@i, .@i +3 )
		set .menu$, .menu$ + .skill$[.@i] +":";
	end;
}

 

 

Wow this is nice Mr. Capuche.

 

But can you debugg this for me because I get an error when I run it using 3ceam.

script error on npc/extras/stalker.txt line 15
    parse_line: expect command, missing function name or calling undeclared func
tion
    10 :        }
    11 :        mes "are you sure you want to copy "+ .skill$[.@menu * 3] +"?";
    12 :        mes "you'll need to relogin again";
    13 :        next;
    14 :        if ( select ( "Yes", "No" ) == 2 ) close;
*   15 :        '.'@text$ = atoi( .skill$[.@menu * 3 +2] ) > 1 ? "-" + .skill$[.
@menu * 3 +2] : "" ;
    16 :        mes "choose a level (1" + .@text$ + ")";
    17 :        if ( input( .@input, 1, ( atoi( .skill$[.@menu * 3 +2] ) > 1 ? a
toi( .skill$[.@menu * 3 +2] ) : 1 )) != 0 ) {
    18 :                mes "wrong level";
    19 :                close;
    20 :        }

Thank you sir.

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...