Jump to content
  • 0

Question

Posted

Hye can someone look at my script? It says npc_parsesrcfile: Unknown syntax in file 'npc/custom/mr tuesday.txt', line '1'.

prontera,155,170,2  script  Mr.Tuesday 911,{
 //=========================== Settings ====================================
 set .@changername$,"[ Mr.Tuesday ]";// YOU MAY CHANGE THE NAME OF THE NPC
 set .tcgid,20101;
 set @tcgamount,1;
 //======================= Settings End ====================================
 //*************************************************************************
 mes .@changername$;
 mes "Damn where is he's hiding';
 mes "Have you seen my little brother Mr. Monday?";
 next;
 switch(select("Yes I've already talk to him.:Find it yourself")){
 case 1:
  if (countitem(20100) > 0){
   mes .@changername$;
  mes "Hello "+strcharinfo(0)+" ,";
  mes "Hmm. Do you see that wild boar there?";
  mes "Today is Tuesday, a day of wildboar hunting";
  mes "What you didn't see it? Me too. Hahaha";
  next;
  mes "Owh my little brother send you to see me?";
  mes "About that unsual stone? Owh I see";
  mes "I gave it to my sister already Mrs. Wednesday";
  next;
  switch(select("Can you tell me where she is?:I got to go dude")){
    case 1:
 mes .@changername$;
 mes "Sure but I don't know if she want to see you";
 mes "You seem very determined my friend.";
 mes "How about we made a deal alright chap?";
 next;
 switch(select("Okay what is it?:Cancel")){
   case 1:
  mes .@changername$;
	  mes "I really love hunting and I can't see very far";
	  mes "Can you made find the material for ^FF0000 Binoculars ^000000";
	  mes "so I can craft it myself";
	  mes "and I need 4 ^0000FF TCG ^000000";
	  next;
	  switch(select("I have it right now:Cancel")){
   case 1:
   mes .@changername$;
   mes "Okay let me check if";
   mes "you have the material";
   next;
   mes .@changername$;
   mes "Rustle... Rustle...";
   if((countitem(2243) > 0) && (countitem(999) > 99) && (countitem(7227) > 3)){
	 delitem 2243,1;
	 delitem 999,99;
	 delitem 7227,2;
	 next;
	 mes .@changername$;
	 getitem .tcgid,@tcgamount; //Change to next Item!
	 mes "Here take this and see my sister";
	 mes "Mrs. Wednesday. Take this and she will talk to you";
	 close;
   }
   else {
	  mes .@changername$;
	  mes "Sorry you have to get the items first!";
	  close;
 }
    case 2:
   mes .@changername$;
   mes "Okay goodbye!";
   close;
  }
   case 2:
  mes .@changername$;
  mes "Okay goodbye!";
  close;
   }
  case 2:
  mes .@changername$;
  mes "Okay goodbye!";
  close;
  }
else {
mes .@changername$;
mes "How rude you young man!";
mes "Try to cheat on me";
close;
}
case 2:
mes .@changername$;
mes "Okay goodbye!";
close;
}
// Enabling
OnClock0655:  // 06:55 AM
 if(GetTime(4) == 2) // Monday
   EnableNPC("Mr.Monday");
 End();
// Enabling
OnClock1805:  // 06:05 PM
 if(GetTime(4) == 2) // Monday
   DisableNPC("Mr.Monday");
 End();
}

8 answers to this question

Recommended Posts

Posted

prontera,155,170,2    script    Mr.Tuesday    911,{

and a minor typo mistake at following lines..

mes "Damn where is he's hiding';

should be

mes "Damn where is he's hiding";

Posted

Thanks emistry, Now the error is :

   74 :			    case 2:
   75 :			    mes .@changername$;
   76 :			    mes "Okay goodbye!";
   77 :			    close;
   78 :			    }
*   79 :	    'e'lse {
   80 :	    mes .@changername$;
   81 :	    mes "How rude you young man!";
   82 :	    mes "Try to cheat on me";
   83 :	    close;
   84 :	    }

can you help me?

but before he said missing right curly at line 102. so I add another } at bottom. Now it says this

Posted

prontera,155,170,2	script	Mr.Tuesday	911,{
//=========================== Settings ====================================
set .@changername$,"[ Mr.Tuesday ]";// YOU MAY CHANGE THE NAME OF THE NPC
set .tcgid,20101;
set @tcgamount,1;
//======================= Settings End ====================================
//*************************************************************************
mes .@changername$;
mes "Damn where is he's hiding";
mes "Have you seen my little brother Mr. Monday?";
next;
switch(select("Yes I've already talk to him.:Find it yourself"))
{
case 1:
if (countitem(20100) > 0)
{
mes .@changername$;
mes "Hello "+strcharinfo(0)+" ,";
mes "Hmm. Do you see that wild boar there?";
mes "Today is Tuesday, a day of wildboar hunting";
mes "What you didn't see it? Me too. Hahaha";
next;
mes "Owh my little brother send you to see me?";
mes "About that unsual stone? Owh I see";
mes "I gave it to my sister already Mrs. Wednesday";
next;
switch(select("Can you tell me where she is?:I got to go dude"))
{
case 1:
mes .@changername$;
mes "Sure but I don't know if she want to see you";
mes "You seem very determined my friend.";
mes "How about we made a deal alright chap?";
next;
switch(select("Okay what is it?:Cancel"))
{
case 1:
mes .@changername$;
mes "I really love hunting and I can't see very far";
mes "Can you made find the material for ^FF0000 Binoculars ^000000";
mes "so I can craft it myself";
mes "and I need 4 ^0000FF TCG ^000000";
next;
switch(select("I have it right now:Cancel"))
{
case 1:
mes .@changername$;
mes "Okay let me check if";
mes "you have the material";
next;
mes .@changername$;
mes "Rustle... Rustle...";
if((countitem(2243) > 0) && (countitem(999) > 99) && (countitem(7227) > 3))
{
delitem 2243,1;
delitem 999,99;
delitem 7227,2;
next;
mes .@changername$;
getitem .tcgid,@tcgamount; //Change to next Item!
mes "Here take this and see my sister";
mes "Mrs. Wednesday. Take this and she will talk to you";
close;
}
else
{
mes .@changername$;
mes "Sorry you have to get the items first!";
close;
}
case 2:
mes .@changername$;
mes "Okay goodbye!";
close;
}
case 2:
mes .@changername$;
mes "Okay goodbye!";
close;
}
case 2:
mes .@changername$;
mes "Okay goodbye!";
close;
}
}
else
{
mes .@changername$;
mes "How rude you young man!";
mes "Try to cheat on me";
close;
}
case 2:
mes .@changername$;
mes "Okay goodbye!";
close;
}

// Enabling
OnClock0655: // 06:55 AM
if(GetTime(4) == 2) // Monday
EnableNPC("Mr.Monday");
End();
// Enabling
OnClock1805: // 06:05 PM
if(GetTime(4) == 2) // Monday
DisableNPC("Mr.Monday");
End();
}[/codeBOX]

I'd suggest to use Notepad++ or some other editor with bracket highlighting. It's kind of ridiculous that we have to check this for you all the time.

change to this

[size=3][font=arial,helvetica,sans-serif]

[code]else if((countitem(2243) < 0) && (countitem(999) < 99) && (countitem(7227) < 3)){[/code]

[/font][/size]

then change it to

[color=#000088]else if[/color][color=#000000] [/color][color=#666600]([/color][color=#000000]countitem[/color][color=#666600]([/color][color=#006666]20100[/color][color=#666600])[/color][color=#000000] [/color][color=#666600]<[/color][color=#000000] [/color][color=#006666]0[/color][color=#666600]){[/color]

Less than 0? Can you tell me how to get an amount of items less than 0?
Posted
prontera,155,170,2 script Mr.Tuesday 911,{
//=========================== Settings ====================================
set .@changername$,"[ Mr.Tuesday ]";// YOU MAY CHANGE THE NAME OF THE NPC
set .tcgid,20101;
set @tcgamount,1;
//======================= Settings End ====================================
//*************************************************************************
mes .@changername$;
mes "Damn where is he's hiding";
mes "Have you seen my little brother Mr. Monday?";
next;
switch(select("Yes I've already talk to him.:Find it yourself"))
{
 case 1:
  if (countitem(20100) > 0)
  {
   mes .@changername$;
   mes "Hello "+strcharinfo(0)+" ,";
   mes "Hmm. Do you see that wild boar there?";
   mes "Today is Tuesday, a day of wildboar hunting";
   mes "What you didn't see it? Me too. Hahaha";
   next;
   mes "Owh my little brother send you to see me?";
   mes "About that unsual stone? Owh I see";
   mes "I gave it to my sister already Mrs. Wednesday";
   next;
   switch(select("Can you tell me where she is?:I got to go dude"))
   {
 case 1:
  mes .@changername$;
  mes "Sure but I don't know if she want to see you";
  mes "You seem very determined my friend.";
  mes "How about we made a deal alright chap?";
  next;
  switch(select("Okay what is it?:Cancel"))
  {
   case 1:
    mes .@changername$;
    mes "I really love hunting and I can't see very far";
    mes "Can you made find the material for ^FF0000 Binoculars ^000000";
    mes "so I can craft it myself";
    mes "and I need 4 ^0000FF TCG ^000000";
    next;
    switch(select("I have it right now:Cancel"))
    {
	 case 1:
	  mes .@changername$;
	  mes "Okay let me check if";
	  mes "you have the material";
	  next;
	  mes .@changername$;
	  mes "Rustle... Rustle...";
	  if((countitem(2243) > 0) && (countitem(999) > 99) && (countitem(7227) > 3))
	  {
	   delitem 2243,1;
	   delitem 999,99;
	   delitem 7227,2;
	   next;
	   mes .@changername$;
	   getitem .tcgid,@tcgamount; //Change to next Item!
	   mes "Here take this and see my sister";
	   mes "Mrs. Wednesday. Take this and she will talk to you";
	   close;
	  }
	  else if((countitem(2243) == 0) && (countitem(999) < 99) && (countitem(7227) < 3))
	  {
	   mes .@changername$;
	   mes "Sorry you have to get the items first!";
	   close;
	  }
	 case 2:
	  mes .@changername$;
	  mes "Okay goodbye!";
	  close;
    }
   case 2:
    mes .@changername$;
    mes "Okay goodbye!";
    close;
  }
 case 2:
  mes .@changername$;
  mes "Okay goodbye!";
  close;
   }
  }
  else if (countitem(20100) == 0)
  {
   mes .@changername$;
   mes "How rude you young man!";
   mes "Try to cheat on me";
   close;
  }
 case 2:
  mes .@changername$;
  mes "Okay goodbye!";
  close;
}
// Enabling
OnClock0655:  // 06:55 AM
if(GetTime(4) == 2) // Monday
 EnableNPC("Mr.Monday");
End();
// Enabling
OnClock1805:  // 06:05 PM
if(GetTime(4) == 2) // Monday
 DisableNPC("Mr.Monday");
End();
}

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