viewing paste Unknown #1024 | Athena

Posted on the
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
prontera,155,181,5%TAB%script%TAB%Sample%TAB%718,{
    // 1 Poring Coin = How Many Zeny ?
    set .Rates,100000;
    while( 1 ){
        switch( select("Poring Coin to Zeny:Zeny to Poring Coin") )
        {
            case 1:  
                if( !countitem(7539) ){   
                    mes "You didnt have enough Poring Coin.";  
                }else {   
                    mes "You have "+countitem(7539)+" Poring Coin.";   
                    mes "How many Poring Coin will be convert to zeny ?";   
                    input @Amount,0,countitem(7539);   
                    if( !@Amount || (( .Rates * @Amount ) + Zeny ) > 1000000000 ){  
                        mes "Deal Cancelled.";   
                    } else {    
                        delitem 7539,@Amount;   
                        mes "Converted "+@Amount+" of Poring Coin into Zeny."
                        mes "Gained Total of "+( .Rates * @Amount )+" of Zeny.";    
                        set Zeny,Zeny + ( .Rates * @Amount );   
                    }  
                }  
                next;  
                break;
            case 2:  
                if( Zeny < .Rates ){   
                    mes "You didnt have enough Zeny.";  
                } else {   
                    mes "You have "+Zeny+" Zeny.";   
                    mes "How many Poring Coin you want ?";   
                    mes "You can get maximum of "+( Zeny / .Rates )+" Poring Coin.";   
                    input @Amount,0,( Zeny / .Rates );   
                    if( !@Amount ){ 
                        mes "Deal Cancelled.";   
                    } else {    
                        set Zeny,Zeny - ( @Amount * .Rates );   
                        mes "Converted "+( @Amount * .Rates )+" Zeny into "+@Amount+" Poring Coin.";    
                        getitem 7539,@Amount;   
                    }  
                }  
                next;  
                break;
        }
    }
    close;
}
Viewed 1289 times, submitted by lighta.