Jump to content

Question

Posted

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;

}

 

3 answers to this question

Recommended Posts

Posted

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

Posted (edited)

Tanos92 is right, Also please use a code box when your posting a script

[codebox] like this [/ codebox]
Edited by Stolao

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