Jump to content
  • 0

potion trader error debug


Newbiedev-chan

Question


  • Group:  Members
  • Topic Count:  12
  • Topics Per Day:  0.00
  • Content Count:  33
  • Reputation:   2
  • Joined:  01/19/16
  • Last Seen:  

image.png.08571065f56fbae83cd4fb59b13b94a3.png

hello i encounter this error when i overlap requierd items can anyone help me fix this problem thank you.

here's the script.

 

Spoiler

prontera,138,224,5    script    Potion Trader    982,{
    set @name$,"[^FF0000"+strnpcinfo(1)+"^000000]";

    mes @name$;
    mes "I can convert your Siege White Potion to Siege Blue Potion and Siege Blue Potion to Siege White Potion.";
    next;
    mes "^FF0000Please make sure you have enough item slot for this transaction.^000000";
    mes "^FF0000We (GM TEAM) are not responsible of any loss or if you drop the exchange items.^000000";

next;
    mes "^0000EE2 Siege White Potion^000000 = ^FF00001 Siege Blue Potion";
    mes "^0000EE2 Siege Blue Potion^000000 = ^FF00001 Siege White Potion";
    next;
    switch(select("^0000EE(Siege White Potion)^000000 to ^FF0000(Siege Blue Potion):^0000EE(Siege Blue Potion)^000000 to ^FF0000(Siege White Potion)")) {

        case 1:
            next;
            mes @name$;
            mes "How many "+getitemname(11504)+" do you want?";
            input .@item_count ;
            if( .@item_count == 0 ) close;
            if(countitem(11503) >= 5001){
            mes " ";
            mes "Your Inventory is full";
            mes "Your "+getitemname(11503)+" is more than 5,000  put some in storage";
            close;
            }
            delitem 11503,(.@item_count*2);
            getitem 11504,.@item_count;
            next;
            mes @name$;
            mes "There you go! You got your "+.@item_count+"x "+getitemname(11504)+". Hope to see you again!";
            close;
        case 2:
            next;
            mes @name$;
            mes "How many "+getitemname(11503)+" do you want?";
            input .@item_count ;
            if( .@item_count == 0 ) close;
            if(countitem(11504) >= 5001){
            mes " ";
            mes "Your Inventory is full";
            mes "Your "+getitemname(11504)+" is more than 5,000  put some in storage";
            close;
            }
            delitem 11504,(.@item_count*2);
            getitem 11503,.@item_count;
            next;
            mes @name$;
            mes "There you go! You got your "+.@item_count+"x "+getitemname(11503)+". Hope to see you again!";
            close;

}
}

 

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  61
  • Topics Per Day:  0.02
  • Content Count:  911
  • Reputation:   166
  • Joined:  11/27/14
  • Last Seen:  

 delitem 11503,.@item_count;

Do this to your 3 option

Edited by Poring King
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...