Jump to content

Question

Posted (edited)

Can some one help me on thise npc

npc that gives 1 level up for ----> 1 [ 6011 ] and it can be used only for ppl in lvl 80 to max 90

only 10 cards can be used

Edited by SpongeBOB

11 answers to this question

Recommended Posts

Posted

Test

prontera,150,150,0    script    Leveler    100,{
    if ( BaseLevel < 80 || BaseLevel > 90 || #GAIN == 10 ) end;

    mes .npc$;
    mes "Want to gain 1 level?";
    next;
    if (select("Yes:No") - 1) end;
    if (!countitem(.id)) {
        mes .npc$;
        mes "Sorry but you need a " +getitemname(.id)+ " to gain 1 level";
        close;
    }
    BaseLevel = BaseLevel + 1;
    #GAIN = #GAIN + 1;
    mes .npc$;
    mes "Gained 1 level!";
    close;

    OnInit:
        .npc$ = "[ " +strnpcinfo(1)+ " ]";
        #GAIN = 0;
        .id = 6011;
        end;
}
Posted

Test

Because there are only 10 levels between 80 and 90 you don't need the account variable, besides it wouldn't work inside the OnInit label because no player is attached. I recommend just removing it.
Posted

Because there are only 10 levels between 80 and 90 you don't need the account variable

If the player rebirth he can use the npc 20 times and

only 10 cards can be used

 

@Patskie

You forgot to delete the item. I use your script if you don't mind

prontera,155,180,0	script	Leveler	100,{
	if ( BaseLevel < 80 || BaseLevel > 90 || #GAIN == 10 ) end;

	.@item_id = 6011;	// your item id required
	.@npc_name$ = strnpcinfo(1);

	mes "[ " + .@npc_name$ + " ]";
	mes "Want to gain 1 level?";
	next;
	if (select("Yes:No") - 1) end;
	if (!countitem(.@item_id)) {
		mes "[ " + .@npc_name$ + " ]";
		mes "Sorry but you need a " +getitemname(.@item_id)+ " to gain 1 level";
		close;
	}
	BaseLevel = BaseLevel + 1;
	#GAIN = #GAIN + 1;
	delitem .@item_id,1;
	mes "[ " + .@npc_name$ + " ]";
	mes "Gained 1 level!";
	close;
}
  • Upvote 1
Posted (edited)

If the player rebirth he can use the npc 20 times and

Good point sometimes these things escape me. /swt Edited by Skorm
Posted

prontera,155,180,0	script	Leveler	100,{

if ( BaseLevel < 80 || BaseLevel > 90 || #GAIN == 10 ) end;

set .@item_id, 6011; // your item id required

set .@npc_name$, strnpcinfo(1);

mes "[ " + .@npc_name$ + " ]";

mes "Want to gain 1 level?";

next;

if (select("Yes:No") - 1) end;

if (!countitem(.@item_id)) {

mes "[ " + .@npc_name$ + " ]";

mes "Sorry but you need a " +getitemname(.@item_id)+ " to gain 1 level";

close;

}

set BaseLevel, BaseLevel + 1;

set #GAIN, #GAIN + 1;

delitem .@item_id,1;

mes "[ " + .@npc_name$ + " ]";

mes "Gained 1 level!";

close;

}

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