Jump to content
  • 0

Question

Posted (edited)

After give him the items and he give me the item, when i talk with him again he doesn't say nothing, just stays in blank, because i want the npc to say a different thing when i come with "x items" if i dont have that items he dont say nothing and just say "  mes "Im sorry for being rude, please, come near me. Would you like to hear my melancholic tale?", the script;          but the npc just stays blank when i give him the items

Spoiler

@count++;
    mes "[npc name]";
    if (@count == 1) mes "Please, do not bother me. I am in pain.";
    if (@count == 2) mes "Can you not see I am grieving? Begone.";
    if (@count == 3) mes "I have no quarrel with you stranger, LEAVE ME BE.";
    if (@count == 4) {
    if(countitem(578) >= 80)
        {
            delitem 578,80;
            
            getitem 19620,1;
            
            mes "Congrats!";
            close;
        }
        
        mes "Im sorry for being rude, please, come near me. Would you like to hear my melancholic tale?";

 

Edited by Exmas

4 answers to this question

Recommended Posts

  • 0
Posted (edited)
prontera,155,179,2	script	Debug	1001,{
	OnTouch:
		announce @count, 0;
		mes "[npc name]";
		
		switch(@count){
			case 0:{
				mes "Please, do not bother me. I am in pain.";
				@count++;
				close;
			}break;
			case 1:{
				mes "Can you not see I am grieving? Begone.";
				@count++;
				close;
			}break;
			case 2:{
				mes "I have no quarrel with you stranger, LEAVE ME BE.";
				@count++;
				close;
			}break;
			case 3:{				
				if(countitem(578) >= 80){
					delitem 578,80;

					getitem 19620,1;

					mes "Congrats!";
					@count++;
					close;
				}else{
					mes "You don't have what I want.";
					close;
				}
			}break;
		}
		
		mes "Im sorry for being rude, please, come near me. Would you like to hear my melancholic tale?";
		close;
	end;
	
	OnInit:
		set @count, 0;
	end;
}

 

Edited by Johnathan
  • Upvote 1
  • 0
Posted
48 minutes ago, Johnathan said:

prontera,155,179,2	script	Debug	1001,{
	OnTouch:
		announce @count, 0;
		mes "[npc name]";
		
		switch(@count){
			case 0:{
				mes "Please, do not bother me. I am in pain.";
				@count++;
				close;
			}break;
			case 1:{
				mes "Can you not see I am grieving? Begone.";
				@count++;
				close;
			}break;
			case 2:{
				mes "I have no quarrel with you stranger, LEAVE ME BE.";
				@count++;
				close;
			}break;
			case 3:{				
				if(countitem(578) >= 80){
					delitem 578,80;

					getitem 19620,1;

					mes "Congrats!";
					@count++;
					close;
				}else{
					mes "You don't have what I want.";
					close;
				}
			}break;
		}
		
		mes "Im sorry for being rude, please, come near me. Would you like to hear my melancholic tale?";
		close;
	end;
	
	OnInit:
		set @count, 0;
	end;
}

 

happen this

script.png

  • 0
Posted
prontera,155,179,2	script	Debug	1001,{
	OnTouch:
  		//set @count, 0;
		mes "[npc name]";
		
		switch(@count){
			case 0:{
				mes "Please, do not bother me. I am in pain.";
				@count++;
				close;
			}break;
			case 1:{
				mes "Can you not see I am grieving? Begone.";
				@count++;
				close;
			}break;
			case 2:{
				mes "I have no quarrel with you stranger, LEAVE ME BE.";
				@count++;
				close;
			}break;
			case 3:{				
				if(countitem(578) >= 80){
					delitem 578,80;

					getitem 19620,1;

					mes "Congrats!";
					@count++;
					close;
				}else{
					mes "You don't have what I want.";
					close;
				}
			}break;
		}
		
		mes "Im sorry for being rude, please, come near me. Would you like to hear my melancholic tale?";
		close;
	end;
}

Was the OnInit, @count it's on player, can't be executed at OnInit Now I suppose that will runs everything ok.

  • Upvote 1
  • 0
Posted
1 minute ago, Johnathan said:

prontera,155,179,2	script	Debug	1001,{
	OnTouch:
  		//set @count, 0;
		mes "[npc name]";
		
		switch(@count){
			case 0:{
				mes "Please, do not bother me. I am in pain.";
				@count++;
				close;
			}break;
			case 1:{
				mes "Can you not see I am grieving? Begone.";
				@count++;
				close;
			}break;
			case 2:{
				mes "I have no quarrel with you stranger, LEAVE ME BE.";
				@count++;
				close;
			}break;
			case 3:{				
				if(countitem(578) >= 80){
					delitem 578,80;

					getitem 19620,1;

					mes "Congrats!";
					@count++;
					close;
				}else{
					mes "You don't have what I want.";
					close;
				}
			}break;
		}
		
		mes "Im sorry for being rude, please, come near me. Would you like to hear my melancholic tale?";
		close;
	end;
}

Was the OnInit, @count it's on player, can't be executed at OnInit Now I suppose that will runs everything ok.

It worked thank you so much :D

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