Jump to content
  • 0

Cash Points Trader


Quesooo

Question


  • Group:  Members
  • Topic Count:  197
  • Topics Per Day:  0.07
  • Content Count:  883
  • Reputation:   28
  • Joined:  02/13/17
  • Last Seen:  

Hi good day i would like to ask how to make 1 gold coins = 5 cash points

to

20 gold coins to 5 cash points

 

heres the script

Quote

prontera,84,37,3    script    CashPoint Trader    902,{
setarray .Coins[1],30052,30060;
setarray .CashPoint[1],5,1000;

set @Menu$,"";
for( set .@a,1; .@a < getarraysize( .Coins ); set .@a,.@a+1 ){
    set @Menu$,@Menu$ + getitemname( .Coins[.@a] )+":";
    }
while( 1 ){
    mes "[CashPoint Trader]";
    mes "You can trade ^0000ffItems^000000 to ^0000ffCashPoint^000000 here.";
    next;
    switch(select("[Coin to CashPoint]")){
        case 1:
            mes "[CashPoint Trader]";
            mes "Current Rates";
            for( set .@a,1; .@a < getarraysize( .Coins ); set .@a,.@a+1 ){
                mes "^0000FF"+getitemname( .Coins[.@a] )+" = ^FF0000"+.CashPoint[.@a]+"^000000 CashPoint.";
                }
            next;
            set .@a,select( @Menu$ );
            mes "Select the Amount of Coins you want to trade into CashPoint.";
            mes "You have "+countitem( .Coins[.@a] )+" "+getitemname( .Coins[.@a] )+".";
            input @Amount,0,countitem( .Coins[.@a] );
            if( @Amount < 1 ){
            mes "You cancelled.";
            } else{
            set #CASHPOINTS,#CASHPOINTS + ( @Amount * .CashPoint[.@a] );
            delitem .Coins[.@a],@Amount;
            mes "Done, you have traded "+@Amount+" of "+getitemname(.Coins[.@a])+" into "+( @Amount * .CashPoint[.@a] )+" CashPoint.";
            }
            close;
        }
    }
}

btw the gold coin id is 30052

 

thank you so much

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

  • Group:  Developer
  • Topic Count:  7
  • Topics Per Day:  0.00
  • Content Count:  292
  • Reputation:   199
  • Joined:  05/03/13
  • Last Seen:  

if( @Amount < 1 ){       <— Change here
            mes "You cancelled.";
            } else{
            set #CASHPOINTS,#CASHPOINTS + ( @Amount * .CashPoint[.@a] ); <— here 
            delitem .Coins[.@a],@Amount; <— here 
            mes "Done, you have traded "+@Amount+" of "+getitemname(.Coins[.@a])+" into "+( @Amount * .CashPoint[.@a] )+" CashPoint.";
            }
            close;

 

not sure but seems like that script can generate infinite amount of Cashpoints, since there is no actual check for gold coins In inventory

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