What is wrong in this script? [2]

NewNewbie

New member
Messages
9
Points
0
Code:
{
       mes "Hey bro!";
       mes "I work in a pizzeria because I love pizza! HAHA";
       next;
       mes "Do you love pizza?";
       switch(select("Yes","No")){
              case 1:
              mes "I can't give you a piece of that, sorry...";
              mes "But If you bring some itens for me, I can give you a incredible hat!";
              next;
              mes "Do you wanna a Pizza Hat?";
              mes "Besides being beautiful, it enables ^0000FFLv1 Provoke.";
              switch(select("Sure!","No thanks!")){
                        case 1:
                        next;
                        mes "Ok, I will need:";
                        mes "^0000FF50x Cheese";
                        mes "^0000FF50x Egg";
                        next;
                        emotion e_heh;
                        mes "And please don't forget my tip";
                        mes "^0000FF150.000 Zeny";
                        next;
                        mes "You have my items?";
                        switch(select("Yes","Not yet")){
                                     case 1:
if (countitem(574) > 49 && countitem(548) > 49  && zeny >149999) {
                                     delitem 574,50;
                                     delitem 548,50;
                                     set zeny,zeny-150000;
                                     getitem 5499, 1;
                                     next;
                                     mes "Done!!";
                                     close;
}
else {
goto n_FORGOT;
}
                                     case 2:
                                     next;
                                     mes "Don't worry, go pick up the itens.";
                                     close;
 
 
n_FORGOT:
mes "Bro, you forgot something";
close;
                                     }
                        
              
                        case 2:
                        next;
                        mes "Ok, no problem.";
                        mes "Cya";
                        close;
                        }
              case 2:
              mes "You do not know what you're missing!";
              close;
                        
                        }
}
 
post the whole script using pastebin.com, tell us what is not working, and if there is any message in server console

 
Lol sorry.

I have 500x Cheese, 500x Egg and 500kk, but always go to n_FORGOT message.

What is wrong?

 
prontera,150,150,3 script Name 4_M_SAGE_C,{

mes "Hey bro!";

mes "I work in a pizzeria because I love pizza! HAHA";

next;

mes "Do you love pizza?";

if (select("Yes","No") == 2) { mes "You do not know what you're missing!"; close; }

mes "I can't give you a piece of that, sorry...";

mes "But If you bring some items for me, I can give you a incredible hat!";

next;

mes "Do you want a Pizza Hat?";

mes "Besides being beautiful, it enables ^0000FFLv1 Provoke.";

next;

if (select("Sure!","No, Thanks..") == 2) { mes "Ok, no problem. Cya"; close; }

mes "Ok, I will need:";

mes "^0000FF50x Cheese";

mes "^0000FF50x Egg";

next;

emotion e_heh;

mes "And please don't forget my tip";

mes "^0000FF150.000 Zeny";

next;

mes "You have my items?";

if (select("Yes","Not yet") == 2) { mes "Take your time and come back whenever you have them."; close; }

if (countitem(Egg) >= 50) && (countitem(Cheese) >= 50) && (Zeny >= 150000) {

next;

mes "There you go!!";

close2;

delitem Egg,50;

delitem Cheese,50;

Zeny = Zeny - 150000;

getitem Pizza_Hat, 1;

end;

} else {

next;

mes "Hmmm... It seems as though you dont have the correct amount of items needed. Come back when you do!";

close;

}

}

 
Last edited by a moderator:
Actually you Also forgot some ()

 
if (countitem(574) > 49 && countitem(548) > 49 && zeny >149999) {

Code:
 if ( countitem(574) > 49 ) && ( countitem(548) > 49 )  && ( Zeny > 149999) {
nihad included that
default_smile.png


 
Also with the english you labeled items as itens. I'm curious did you just start scripting? I saw that your other post was related to like:

Go get certain items and zeny for so and so prize.

If you want I could teach you a bit more in scripting if you're determined

 
Also with the english you labeled items as itens. I'm curious did you just start scripting? I saw that your other post was related to like:

Go get certain items and zeny for so and so prize.

If you want I could teach you a bit more in scripting if you're determined
yeah.. listen, last time I played ragnarok, was like 10 years ago, and in now i'm a boxer, nothing like a programmer...
I know nothing about this, but i'm working hard to learn scripiting and english, to make a cool server lol
 
and the reason that I wrote "itens" rather than "items" is because in my language (portuguese) "itens" is right xD
 

thank y'all, sorry any thing
 
Last edited by a moderator:
Good stuff don't be afraid to ask questions, we are a community after all! Just try to resolve issues yourself if you can, because, from experience, you learn a lot more when you figure it out yourself. And satisfaction is better.
default_smile.png


 
Good stuff don't be afraid to ask questions, we are a community after all! Just try to resolve issues yourself if you can, because, from experience, you learn a lot more when you figure it out yourself. And satisfaction is better.
default_smile.png
I'm trying xD
But sometimes is just a " more or a wrong letter... i'm studying... I will work harder
thank you for the words, 
my regards
 
Back
Top