Jump to content
  • 0

Question

Posted

edit please to check weight before converting cash points to poring coin. The coin drops if you are overweight.

prontera,137,171,5 script CoinExchanger 510,{

mes "[Exchanger]";

mes " ... ";

next;

switch(select("Poring Coin to Cash Point:Cash Points to Poring Coin")) {

case 1:

mes "How many Points you want?";

mes "NOTE: 1 Poring Coin = 1 CASHPOINT";

mes " ";

mes "Enter number of Points to exchange with.";

input .@Point;

if (.@Point < 1 || .@Point > countitem(7539)) { // Edit POD Id here

mes "You Don't have enought Poring Coin or the Entered Value is Not allowed.";

close;

}

set #CASHPOINTS, #CASHPOINTS + .@Point; // Edit Point Variable

dispbottom "You have total of " + #CASHPOINTS;

delitem 7539,.@Point; // Edit this

mes "Exchange successfully done.";

close;

case 2:

mes "How many Poring Coin you want?";

mes "NOTE: 1 CASHPOINT = 1 Poring Coin";

mes " ";

mes "Enter number of PODS to exchange with.";

input .@POD;

if (.@POD < 1 || .@POD > #CASHPOINTS) { // Edit Point Variable here

mes "You Don't have enought CashPoints or the Entered Value is Not allowed.";

close;

}

getitem 7539,.@POD; // Edit Point Variable

set #CASHPOINTS, #CASHPOINTS - .@POD; // Edit Point Variable

dispbottom "You have total of " + #CASHPOINTS + ".";

mes "Exchange successfully done.";

close;

}

}

2 answers to this question

Recommended Posts

Posted (edited)

Please use code or codebox

Try this . . . .

prontera,137,171,5    script    CoinExchanger    510,{

mes "[Exchanger]";
mes " ...  ";
next;
switch(select("Poring Coin to Cash Point:Cash Points to Poring Coin")) {

       case 1:
       mes "How many Points you want?";
       mes "NOTE: 1 Poring Coin = 1 CASHPOINT";
       mes " ";
       mes "Enter number of Points to exchange with.";
       input .@Point;
       if (.@Point < 1 || .@Point > countitem(7539)) { // Edit POD Id here
           mes "You Don't have enought Poring Coin or the Entered Value is Not allowed.";
           close;
       }
       set #CASHPOINTS, #CASHPOINTS + .@Point; // Edit Point Variable
       dispbottom "You have total of " + #CASHPOINTS;
       delitem 7539,.@Point; // Edit this
       mes "Exchange successfully done.";
       close;

       case 2:
       mes "How many Poring Coin you want?";
       mes "NOTE: 1 CASHPOINT = 1 Poring Coin";
       mes " ";
       mes "Enter number of PODS to exchange with.";
       input .@POD;
       if (.@POD < 1 || .@POD > #CASHPOINTS) { // Edit Point Variable here
           mes "You Don't have enought CashPoints or the Entered Value is Not allowed.";
           close;
       }
       if (checkweight(7539,.@POD)) {
       getitem 7539,.@POD; // Edit Point Variable
       set #CASHPOINTS, #CASHPOINTS - .@POD; // Edit Point Variable
       dispbottom "You have total of " + #CASHPOINTS + ".";
       mes "Exchange successfully done.";
       } else {
       mes "Sorry you cannot hold this amount of PODS.";
       }
       close;
   }
}

Edited by Lelouch

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