Jump to content
  • 0

Npc blank


Noctis

Question


  • Group:  Members
  • Topic Count:  47
  • Topics Per Day:  0.01
  • Content Count:  226
  • Reputation:   13
  • Joined:  02/17/15
  • Last Seen:  

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
Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  21
  • Reputation:   3
  • Joined:  11/29/16
  • Last Seen:  

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
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  21
  • Reputation:   3
  • Joined:  11/29/16
  • Last Seen:  

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
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  47
  • Topics Per Day:  0.01
  • Content Count:  226
  • Reputation:   13
  • Joined:  02/17/15
  • Last Seen:  

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

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  47
  • Topics Per Day:  0.01
  • Content Count:  226
  • Reputation:   13
  • Joined:  02/17/15
  • Last Seen:  

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

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