Markyieee Posted April 30, 2014 Group: Members Topic Count: 42 Topics Per Day: 0.01 Content Count: 134 Reputation: 4 Joined: 06/14/12 Last Seen: August 17, 2017 Share Posted April 30, 2014 I got this error. [Error]: chat_createnpcchat: npc 'Freebies' already has a chatroom, cannot create new one! This is my script prontera,159,190,4 script Freebies 461,{mes "Hello";mes "I can give you a free gift based on your future job.";mes "Please choose the correct item for the future job"; if(!#Freebie) { mes "Select one:"; next; switch(select("Swordsman:Magician:Archer:Monk:Merchant:Thief")) { case 1: getitem 20113,1; getitem 20114,1; getitem 20115,1; getitem 20116,1; getitem 4305,5; getitem 4142,1; getitem 20094,2; getitem 20077,1; getitem 20017,1; getitem 4302,1; getitem 4047,1; getitem 4174,1; getitem 4128,1; break; case 2: getitem 20113,1; getitem 20114,1; getitem 20115,1; getitem 20116,1; getitem 4305,5; getitem 4142,1; getitem 20094,2; getitem 5138,1; getitem 20059,1; getitem 4302,1; getitem 4047,1; getitem 4174,1; getitem 4128,1; break; case 3: getitem 20113,1; getitem 20114,1; getitem 20115,1; getitem 20116,1; getitem 4305,5; getitem 4142,1; getitem 20094,2; getitem 20080,1; getitem 20073,1; getitem 4302,1; getitem 4047,1; getitem 4174,1; getitem 4128,1; break; case 4: getitem 20113,1; getitem 20114,1; getitem 20115,1; getitem 20116,1; getitem 4305,5; getitem 4142,1; getitem 20094,2; getitem 20072,1; getitem 20077,1; getitem 4302,1; getitem 4047,1; getitem 4174,1; getitem 4128,1; break; case 5: getitem 20113,1; getitem 20114,1; getitem 20115,1; getitem 20116,1; getitem 4305,5; getitem 4142,1; getitem 20094,2; getitem 20077,1; getitem 20017,1; getitem 4302,1; getitem 4047,1; getitem 4174,1; getitem 4128,1; break; case 6: getitem 20113,1; getitem 20114,1; getitem 20115,1; getitem 20116,1; getitem 4305,5; getitem 4142,1; getitem 20094,2; getitem 20077,1; getitem 20017,1; getitem 4302,1; getitem 4047,1; getitem 4174,1; getitem 4128,1; break; } set #Freebie, 1; close;}OnInit:waitingroom "Get your freebies here ! ",0;end;} Quote Link to comment Share on other sites More sharing options...
Tanos-Varguen Posted April 30, 2014 Group: Members Topic Count: 1 Topics Per Day: 0.00 Content Count: 20 Reputation: 19 Joined: 07/02/12 Last Seen: January 22 Share Posted April 30, 2014 I think you should try like this:....getitem 4302,1;getitem 4047,1;getitem 4174,1;getitem 4128,1;break;}set #Freebie, 1;end;}OnInit:waitingroom "Get your freebies here ! ",0;end;} Because the "break;" make your script continue after the }, and the "close;" close only the chat with the NPC. So after the #Freebie is set to one, the script continues and try to open a new chatroom. I'm not sure, but i think it is the problem Quote Link to comment Share on other sites More sharing options...
Stolao Posted April 30, 2014 Group: Developer Topic Count: 48 Topics Per Day: 0.01 Content Count: 1443 Reputation: 344 Joined: 10/17/12 Last Seen: April 9 Share Posted April 30, 2014 (edited) Tanos92 is right, Also please use a code box when your posting a script [codebox] like this [/ codebox] Edited April 30, 2014 by Stolao Quote Link to comment Share on other sites More sharing options...
Markyieee Posted May 1, 2014 Group: Members Topic Count: 42 Topics Per Day: 0.01 Content Count: 134 Reputation: 4 Joined: 06/14/12 Last Seen: August 17, 2017 Author Share Posted May 1, 2014 Thank you both :-) Quote Link to comment Share on other sites More sharing options...
Question
Markyieee
I got this error.
mes "Hello";
mes "I can give you a free gift based on your future job.";mes "Please choose the correct item for the future job";
if(!#Freebie) {
mes "Select one:";next;
switch(select("Swordsman:Magician:Archer:Monk:Merchant:Thief")) {case 1:
getitem 20113,1;getitem 20114,1;
getitem 20115,1;getitem 20116,1;
getitem 4305,5;getitem 4142,1;
getitem 20094,2;getitem 20077,1;
getitem 20017,1;getitem 4302,1;
getitem 4047,1;getitem 4174,1;
getitem 4128,1;break;
case 2:
getitem 20113,1;getitem 20114,1;
getitem 20115,1;getitem 20116,1;
getitem 4305,5;getitem 4142,1;
getitem 20094,2;getitem 5138,1;
getitem 20059,1;getitem 4302,1;
getitem 4047,1;getitem 4174,1;
getitem 4128,1;break;
case 3:
getitem 20113,1;getitem 20114,1;
getitem 20115,1;getitem 20116,1;
getitem 4305,5;getitem 4142,1;
getitem 20094,2;getitem 20080,1;
getitem 20073,1;getitem 4302,1;
getitem 4047,1;getitem 4174,1;
getitem 4128,1;break;
case 4:
getitem 20113,1;getitem 20114,1;
getitem 20115,1;getitem 20116,1;
getitem 4305,5;getitem 4142,1;
getitem 20094,2;getitem 20072,1;
getitem 20077,1;getitem 4302,1;
getitem 4047,1;getitem 4174,1;
getitem 4128,1;break;
case 5:
getitem 20113,1;getitem 20114,1;
getitem 20115,1;getitem 20116,1;
getitem 4305,5;getitem 4142,1;
getitem 20094,2;getitem 20077,1;
getitem 20017,1;getitem 4302,1;
getitem 4047,1;getitem 4174,1;
getitem 4128,1;break;
case 6:
getitem 20113,1;getitem 20114,1;
getitem 20115,1;getitem 20116,1;
getitem 4305,5;getitem 4142,1;
getitem 20094,2;getitem 20077,1;
getitem 20017,1;getitem 4302,1;
getitem 4047,1;getitem 4174,1;
getitem 4128,1;break;
}set #Freebie, 1;
close;}
OnInit:waitingroom "Get your freebies here ! ",0;
end;}
Link to comment
Share on other sites
3 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.