Jump to content
  • 0

Help what's wrong with this?


Newbie Scripter

Question


  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.00
  • Content Count:  21
  • Reputation:   0
  • Joined:  11/25/13
  • Last Seen:  


sec_in01,94,156,4 script Gabrielle 720,{

mes "[ ^F660ABGabrielle^000000 ]";

mes "Hi ^F4123F"+strcharinfo(0)+"^000000";

next;

mes "[ ^F660ABGabrielle^000000 ]";

mes "I can trade several items to you for an item(s)";

mes "Do you want to know?";

next;

switch(select("^F4123FBlue Scarf^000000:^F4123FCyan Scarf^000000:^F4123FBlack Scarf^000000:^F4123FRed Scarf^000000:^F4123FPink Scarf^000000:^F4123FGreen Scarf^000000:"^F4123FExit^000000")) {

case 1:

mes "[ ^F660ABGabrielle^000000 ]";

mes "I can give you special magical Scarfs";

mes "Would you like one?";

Emotion e_ho;

next;

mes "[ ^F660ABGabrielle^000000 ]";

mes "You can trade me certain items for 1 ^0000FFBlue Scarf^000000";

mes "What do you say?";

next;

if(countitem(7227) > 1)

if(countitem(2236) > 4)

if(countitem(538) > 499)

if(countitem(529) > 499)

if(countitem(978) > 9)

if(countitem(982) > 9)

if(countitem(7267) > 99)

if(countitem(7047) > 99)

if(countitem(675) > 9) {

mes "[ ^F660ABGabrielle^000000 ]";

mes "Wow! You really want that huh!";

next;

delitem 7227,1;

delitem 2236,5;

delitem 538,500;

delitem 529,500;

delitem 978,10;

delitem 982,10;

delitem 7267,100;

delitem 7047,100;

delitem 675,10;

mes "[ ^F660Gabrielle^000000 ]";

mes "Here you go";

getitem 21290,1;

Emotion e_grat;

next;

mes "[ ^F660ABGabrielle^000000 ]";

mes "See you around!";

Emotion e_bo;

close;

}

else {

mes "[ ^F660ABGabrielle^000000 ]";

mes "You don't meet my standards go away!";

Emotion e_heh;

close;

}

case 2:

mes "[ ^F660ABGabrielle^000000 ]";

mes "I can give you special magical Scarfs";

mes "Would you like one?";

Emotion e_ho;

next;

mes "[ ^F660ABGabrielle^000000 ]";

mes "You can trade me certain items for 1 ^0000FFCyan Scarf^000000";

mes "What do you say?";

next;

if(countitem(7227) < 1)

if(countitem(2236) > 4)

if(countitem(538) > 499)

if(countitem(529) > 499)

if(countitem(978) > 9)

if(countitem(982) > 9)

if(countitem(7267) > 99)

if(countitem(7047) > 99)

if(countitem(675) >9) {

mes "[ ^F660ABGabrielle^000000 ]";

mes "Wow! You really want that huh!";

next;

delitem 7227,1;

delitem 2236,5;

delitem 538,500;

delitem 529,500;

delitem 978,10;

delitem 982,10;

delitem 7267,100;

delitem 7047,100;

delitem 675,10;

mes "[ ^F660Gabrielle^000000 ]";

mes "Here you go";

getitem 21290,1;

Emotion e_grat;

next;

mes "[ ^F660ABGabrielle^000000 ]";

mes "See you around!";

Emotion e_bo;

close;

}

else {

mes "[ ^F660ABGabrielle^000000 ]";

mes "You don't meet my standards go away!";

Emotion e_heh;

close;

}

case 3:

mes "[ ^F660ABGabrielle^000000 ]";

mes "I can give you special magical Scarfs";

mes "Would you like one?";

Emotion e_ho;

next;

mes "[ ^F660ABGabrielle^000000 ]";

mes "You can trade me certain items for 1 ^0000FFBlack Scarf^000000";

mes "What do you say?";

next;

if(countitem(7227) < 1)

if(countitem(2236) > 4)

if(countitem(538) > 499)

if(countitem(529) > 499)

if(countitem(978) > 9)

if(countitem(982) > 9)

if(countitem(7267) > 99)

if(countitem(7047) > 99)

if(countitem(675) >9) {

mes "[ ^F660ABGabrielle^000000 ]";

mes "Wow! You really want that huh!";

next;

delitem 7227,1;

delitem 2236,5;

delitem 538,500;

delitem 529,500;

delitem 978,10;

delitem 982,10;

delitem 7267,100;

delitem 7047,100;

delitem 675,10;

mes "[ ^F660Gabrielle^000000 ]";

mes "Here you go";

getitem 21290,1;

Emotion e_grat;

next;

mes "[ ^F660ABGabrielle^000000 ]";

mes "See you around!";

Emotion e_bo;

close;

}

else {

mes "[ ^F660ABGabrielle^000000 ]";

mes "You don't meet my standards go away!";

Emotion e_heh;

close;

}

case 4:

mes "[ ^F660ABGabrielle^000000 ]";

mes "I can give you special magical Scarfs";

mes "Would you like one?";

Emotion e_ho;

next;

mes "[ ^F660ABGabrielle^000000 ]";

mes "You can trade me certain items for 1 ^0000FFRed Scarf^000000";

mes "What do you say?";

next;

if(countitem(7227) < 1)

if(countitem(2236) > 4)

if(countitem(538) > 499)

if(countitem(529) > 499)

if(countitem(978) > 9)

if(countitem(982) > 9)

if(countitem(7267) > 99)

if(countitem(7047) > 99)

if(countitem(675) >9) {

mes "[ ^F660ABGabrielle^000000 ]";

mes "Wow! You really want that huh!";

next;

delitem 7227,1;

delitem 2236,5;

delitem 538,500;

delitem 529,500;

delitem 978,10;

delitem 982,10;

delitem 7267,100;

delitem 7047,100;

delitem 675,10;

mes "[ ^F660Gabrielle^000000 ]";

mes "Here you go";

getitem 21290,1;

Emotion e_grat;

next;

mes "[ ^F660ABGabrielle^000000 ]";

mes "See you around!";

Emotion e_bo;

close;

}

else {

mes "[ ^F660ABGabrielle^000000 ]";

mes "You don't meet my standards go away!";

Emotion e_heh;

close;

}

case 5:

mes "[ ^F660ABGabrielle^000000 ]";

mes "I can give you special magical Scarfs";

mes "Would you like one?";

Emotion e_ho;

next;

mes "[ ^F660ABGabrielle^000000 ]";

mes "You can trade me certain items for 1 ^0000FFPink Scarf^000000";

mes "What do you say?";

next;

if(countitem(7227) < 1)

if(countitem(2236) > 4)

if(countitem(538) > 499)

if(countitem(529) > 499)

if(countitem(978) > 9)

if(countitem(982) > 9)

if(countitem(7267) > 99)

if(countitem(7047) > 99)

if(countitem(675) >9) {

mes "[ ^F660ABGabrielle^000000 ]";

mes "Wow! You really want that huh!";

next;

delitem 7227,1;

delitem 2236,5;

delitem 538,500;

delitem 529,500;

delitem 978,10;

delitem 982,10;

delitem 7267,100;

delitem 7047,100;

delitem 675,10;

mes "[ ^F660Gabrielle^000000 ]";

mes "Here you go";

getitem 21290,1;

Emotion e_grat;

next;

mes "[ ^F660ABGabrielle^000000 ]";

mes "See you around!";

Emotion e_bo;

close;

}

else {

mes "[ ^F660ABGabrielle^000000 ]";

mes "You don't meet my standards go away!";

Emotion e_heh;

close;

}

case 6:

mes "[ ^F660ABGabrielle^000000 ]";

mes "I can give you special magical Scarfs";

mes "Would you like one?";

Emotion e_ho;

next;

mes "[ ^F660ABGabrielle^000000 ]";

mes "You can trade me certain items for 1 ^0000FFGreen Scarf^000000";

mes "What do you say?";

next;

if(countitem(7227) < 1)

if(countitem(2236) > 4)

if(countitem(538) > 499)

if(countitem(529) > 499)

if(countitem(978) > 9)

if(countitem(982) > 9)

if(countitem(7267) > 99)

if(countitem(7047) > 99)

if(countitem(675) >9) {

mes "[ ^F660ABGabrielle^000000 ]";

mes "Wow! You really want that huh!";

next;

delitem 7227,1;

delitem 2236,5;

delitem 538,500;

delitem 529,500;

delitem 978,10;

delitem 982,10;

delitem 7267,100;

delitem 7047,100;

delitem 675,10;

mes "[ ^F660Gabrielle^000000 ]";

mes "Here you go";

getitem 21290,1;

Emotion e_grat;

next;

mes "[ ^F660ABGabrielle^000000 ]";

mes "See you around!";

Emotion e_bo;

close;

}

else {

mes "[ ^F660ABGabrielle^000000 ]";

mes "You don't meet my standards go away!";

Emotion e_heh;

close;

}

case 7:

mes "[ ^F660ABJura^000000 ]";

mes "Alright!";

mes "Just come back , Ill be waiting baby!";

Emotion e_no1;

close;

}

}

Link to comment
Share on other sites

10 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  104
  • Topics Per Day:  0.02
  • Content Count:  429
  • Reputation:   60
  • Joined:  08/19/12
  • Last Seen:  

please post your error too
and error msg from map-server

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.00
  • Content Count:  21
  • Reputation:   0
  • Joined:  11/25/13
  • Last Seen:  

I can't make the npc work after i reload script it still wont appear.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  104
  • Topics Per Day:  0.02
  • Content Count:  429
  • Reputation:   60
  • Joined:  08/19/12
  • Last Seen:  

did you add it to scripts_custom.conf ?
and can you please show your map-server?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.00
  • Content Count:  21
  • Reputation:   0
  • Joined:  11/25/13
  • Last Seen:  

[Error]: npc_parsesrcfile: File not found 'npc/custom/script/NEWQUEST.txt'.
[Error]: npc_parsesrcfile: File not found 'npc/custom/script/test.txt'.
[Error]: npc_parsesrcfile: File not found 'npc/custom/script/gab.txt'.

that's the only error i get, the npc won't show up what to do?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  104
  • Topics Per Day:  0.02
  • Content Count:  429
  • Reputation:   60
  • Joined:  08/19/12
  • Last Seen:  

what's the name of that npc txt file?
 

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  24
  • Topics Per Day:  0.01
  • Content Count:  151
  • Reputation:   5
  • Joined:  11/09/12
  • Last Seen:  

running script 

sec_in01,94,156,4	script	Gabrielle	720,{
	mes "[ ^F660ABGabrielle^000000 ]";
	mes "Hi ^F4123F"+strcharinfo(0)+"^000000";
	next;
	mes "[ ^F660ABGabrielle^000000 ]";
	mes "I can trade several items to you for an item(s)";
	mes "Do you want to know?";
	next;
	switch(select("^F4123FBlue Scarf^000000:^F4123FCyan Scarf^000000:^F4123FBlack Scarf^000000:^F4123FRed Scarf^000000:^F4123FPink Scarf^000000:^F4123FGreen Scarf^000000:^F4123FExit^000000")) {
	case 1:
		mes "[ ^F660ABGabrielle^000000 ]";
		mes "I can give you special magical Scarfs";
		mes "Would you like one?";
		Emotion e_ho;
		next;
		mes "[ ^F660ABGabrielle^000000 ]";
		mes "You can trade me certain items for 1 ^0000FFBlue Scarf^000000";
		mes "What do you say?";
		next; 
		if(countitem(7227) > 1) 
		if(countitem(2236) > 4) 
		if(countitem(538) > 499) 
		if(countitem(529) > 499) 
		if(countitem(978) > 9) 
		if(countitem(982) > 9) 
		if(countitem(7267) > 99) 
		if(countitem(7047) > 99)
		if(countitem(675) > 9)	{
			mes "[ ^F660ABGabrielle^000000 ]";
			mes "Wow! You really want that huh!";
			next;
			delitem 7227,1;
			delitem 2236,5;
			delitem 538,500;
			delitem 529,500;
			delitem 978,10;
			delitem 982,10;
			delitem 7267,100;
			delitem 7047,100;
			delitem 675,10;
			mes "[ ^F660Gabrielle^000000 ]";
			mes "Here you go";
			getitem 21290,1;
			Emotion e_grat;
			next;
			mes "[ ^F660ABGabrielle^000000 ]";
			mes "See you around!";
			Emotion e_bo;
			close;
		}
		else {
			mes "[ ^F660ABGabrielle^000000 ]";
			mes "You don't meet my standards go away!";
			Emotion e_heh;
			close;			
		}
	case 2:
		mes "[ ^F660ABGabrielle^000000 ]";
		mes "I can give you special magical Scarfs";
		mes "Would you like one?";
		Emotion e_ho;
		next;
		mes "[ ^F660ABGabrielle^000000 ]";
		mes "You can trade me certain items for 1 ^0000FFCyan Scarf^000000";
		mes "What do you say?";
		next; 
		if(countitem(7227) < 1) 
		if(countitem(2236) > 4) 
		if(countitem(538) > 499) 
		if(countitem(529) > 499) 
		if(countitem(978) > 9) 
		if(countitem(982) > 9) 
		if(countitem(7267) > 99) 
		if(countitem(7047) > 99)
		if(countitem(675) >9)	{
			mes "[ ^F660ABGabrielle^000000 ]";
			mes "Wow! You really want that huh!";
			next;
			delitem 7227,1;
			delitem 2236,5;
			delitem 538,500;
			delitem 529,500;
			delitem 978,10;
			delitem 982,10;
			delitem 7267,100;
			delitem 7047,100;
			delitem 675,10;
			mes "[ ^F660Gabrielle^000000 ]";
			mes "Here you go";
			getitem 21290,1;
			Emotion e_grat;
			next;
			mes "[ ^F660ABGabrielle^000000 ]";
			mes "See you around!";
			Emotion e_bo;
			close;
		}
		else {
			mes "[ ^F660ABGabrielle^000000 ]";
			mes "You don't meet my standards go away!";
			Emotion e_heh;
			close;			
		}
	case 3:
		mes "[ ^F660ABGabrielle^000000 ]";
		mes "I can give you special magical Scarfs";
		mes "Would you like one?";
		Emotion e_ho;
		next;
		mes "[ ^F660ABGabrielle^000000 ]";
		mes "You can trade me certain items for 1 ^0000FFBlack Scarf^000000";
		mes "What do you say?";
		next; 
		if(countitem(7227) < 1) 
		if(countitem(2236) > 4) 
		if(countitem(538) > 499) 
		if(countitem(529) > 499) 
		if(countitem(978) > 9) 
		if(countitem(982) > 9) 
		if(countitem(7267) > 99) 
		if(countitem(7047) > 99)
		if(countitem(675) >9) 	{
			mes "[ ^F660ABGabrielle^000000 ]";
			mes "Wow! You really want that huh!";
			next;
			delitem 7227,1;
			delitem 2236,5;
			delitem 538,500;
			delitem 529,500;
			delitem 978,10;
			delitem 982,10;
			delitem 7267,100;
			delitem 7047,100;
			delitem 675,10;
			mes "[ ^F660Gabrielle^000000 ]";
			mes "Here you go";
			getitem 21290,1;
			Emotion e_grat;
			next;
			mes "[ ^F660ABGabrielle^000000 ]";
			mes "See you around!";
			Emotion e_bo;
			close;
		}
		else {
			mes "[ ^F660ABGabrielle^000000 ]";
			mes "You don't meet my standards go away!";
			Emotion e_heh;
			close;			
		}
	case 4:
		mes "[ ^F660ABGabrielle^000000 ]";
		mes "I can give you special magical Scarfs";
		mes "Would you like one?";
		Emotion e_ho;
		next;
		mes "[ ^F660ABGabrielle^000000 ]";
		mes "You can trade me certain items for 1 ^0000FFRed Scarf^000000";
		mes "What do you say?";
		next; 
		if(countitem(7227) < 1) 
		if(countitem(2236) > 4) 
		if(countitem(538) > 499) 
		if(countitem(529) > 499) 
		if(countitem(978) > 9) 
		if(countitem(982) > 9) 
		if(countitem(7267) > 99) 
		if(countitem(7047) > 99)
		if(countitem(675) >9)	{
			mes "[ ^F660ABGabrielle^000000 ]";
			mes "Wow! You really want that huh!";
			next;
			delitem 7227,1;
			delitem 2236,5;
			delitem 538,500;
			delitem 529,500;
			delitem 978,10;
			delitem 982,10;
			delitem 7267,100;
			delitem 7047,100;
			delitem 675,10;
			mes "[ ^F660Gabrielle^000000 ]";
			mes "Here you go";
			getitem 21290,1;
			Emotion e_grat;
			next;
			mes "[ ^F660ABGabrielle^000000 ]";
			mes "See you around!";
			Emotion e_bo;
			close;
		}
		else {
			mes "[ ^F660ABGabrielle^000000 ]";
			mes "You don't meet my standards go away!";
			Emotion e_heh;
			close;			
		}
	case 5:
		mes "[ ^F660ABGabrielle^000000 ]";
		mes "I can give you special magical Scarfs";
		mes "Would you like one?";
		Emotion e_ho;
		next;
		mes "[ ^F660ABGabrielle^000000 ]";
		mes "You can trade me certain items for 1 ^0000FFPink Scarf^000000";
		mes "What do you say?";
		next; 
		if(countitem(7227) < 1) 
		if(countitem(2236) > 4) 
		if(countitem(538) > 499) 
		if(countitem(529) > 499) 
		if(countitem(978) > 9) 
		if(countitem(982) > 9) 
		if(countitem(7267) > 99) 
		if(countitem(7047) > 99)
		if(countitem(675) >9)	{
			mes "[ ^F660ABGabrielle^000000 ]";
			mes "Wow! You really want that huh!";
			next;
			delitem 7227,1;
			delitem 2236,5;
			delitem 538,500;
			delitem 529,500;
			delitem 978,10;
			delitem 982,10;
			delitem 7267,100;
			delitem 7047,100;
			delitem 675,10;
			mes "[ ^F660Gabrielle^000000 ]";
			mes "Here you go";
			getitem 21290,1;
			Emotion e_grat;
			next;
			mes "[ ^F660ABGabrielle^000000 ]";
			mes "See you around!";
			Emotion e_bo;
			close;
		}
		else {
			mes "[ ^F660ABGabrielle^000000 ]";
			mes "You don't meet my standards go away!";
			Emotion e_heh;
			close;			
		}
 
	case 6:
		mes "[ ^F660ABGabrielle^000000 ]";
		mes "I can give you special magical Scarfs";
		mes "Would you like one?";
		Emotion e_ho;
		next;
		mes "[ ^F660ABGabrielle^000000 ]";
		mes "You can trade me certain items for 1 ^0000FFGreen Scarf^000000";
		mes "What do you say?";
		next; 
		if(countitem(7227) < 1) 
		if(countitem(2236) > 4) 
		if(countitem(538) > 499) 
		if(countitem(529) > 499) 
		if(countitem(978) > 9) 
		if(countitem(982) > 9) 
		if(countitem(7267) > 99) 
		if(countitem(7047) > 99)
		if(countitem(675) >9)	{
			mes "[ ^F660ABGabrielle^000000 ]";
			mes "Wow! You really want that huh!";
			next;
			delitem 7227,1;
			delitem 2236,5;
			delitem 538,500;
			delitem 529,500;
			delitem 978,10;
			delitem 982,10;
			delitem 7267,100;
			delitem 7047,100;
			delitem 675,10;
			mes "[ ^F660Gabrielle^000000 ]";
			mes "Here you go";
			getitem 21290,1;
			Emotion e_grat;
			next;
			mes "[ ^F660ABGabrielle^000000 ]";
			mes "See you around!";
			Emotion e_bo;
			close;
		}
		else {
			mes "[ ^F660ABGabrielle^000000 ]";
			mes "You don't meet my standards go away!";
			Emotion e_heh;
			close;			
		}
	case 7:
		mes "[ ^F660ABJura^000000 ]";
		mes "Alright!";
		mes "Just come back , Ill be waiting baby!";
		Emotion e_no1;
		close;
	}
}

Error


9- switch(select("^F4123FBlue Scarf^000000:^F4123FCyan Scarf^000000:^F4123FBlack Scarf^000000:^F4123FRed Scarf^000000:^F4123FPink Scarf^000000:^F4123FGreen Scarf^000000:^F4123FExit^000000")) {
- "^F4123FExit^000000")) {
+ ^F4123FExit^000000")) {
Edited by Dynasty
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.00
  • Content Count:  21
  • Reputation:   0
  • Joined:  11/25/13
  • Last Seen:  

[Error]:  Loading NPC file: npc/custom/script/jura.txtscript error on npc/custom/script/jura.txt line 9    Unexpected newline at string.     4 :        mes "[ ^F660ABGabrielle^000000 ]";     5 :        mes "I can trade several items to you for an item(s)";     6 :        mes "Do you want to know?";     7 :        next;     8 :        switch(select("^F4123FBlue Scarf^000000:^F4123FCyan Scarf^000000:^F4123FBlack Scarf^000000:^F4123FRed Scarf^000000:^F4123FPink Scarf^000000:^F4123FGreen Scarf^000000:"^F4123FExit^000000")) {*    9 :        case 1:    10 :                mes "[ ^F660ABGabrielle^000000 ]";    11 :                mes "I can give you special magical Scarfs";    12 :                mes "Would you like one?";    13 :                Emotion e_ho;    14 :                next;

here is the error qnpz.jpg

Edited by Emistry
added code bbcode.
Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  


switch(select("^F4123FBlue Scarf^000000:^F4123FCyan Scarf^000000:^F4123FBlack Scarf^000000:^F4123FRed Scarf^000000:^F4123FPink Scarf^000000:^F4123FGreen Scarf^000000:^F4123FExit^000000")) {

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  24
  • Topics Per Day:  0.01
  • Content Count:  151
  • Reputation:   5
  • Joined:  11/09/12
  • Last Seen:  

change the line 9 for this

 
switch(select("^F4123FBlue Scarf^000000:^F4123FCyan Scarf^000000:^F4123FBlack Scarf^000000:^F4123FRed Scarf^000000:^F4123FPink Scarf^000000:^F4123FGreen Scarf^000000:^F4123FExit^000000")) {
Edited by Dynasty
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.00
  • Content Count:  21
  • Reputation:   0
  • Joined:  11/25/13
  • Last Seen:  

What do i change it with? im kinda new with making these sorry :(


Its Still the same.


Woah thank you Dynasty but what did you change? tell me and thank you to emistry and the others thank you for making it work.


It did run but its functions are not working :( i try to make a quest but it does do what i intended to do.


I want it to say what items are needed so that players could get them


Can you fix my script? it doesn't stop until it run's all the case.

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