//https://rathena.org/board/topic/108845-can-anyone-give-me-the-mvp-npc-script-and-help-me-unknown-item-3/ prontera,184,177,5 script Credit Trader 851,{ .@zeny_worth = 1000000; query_sql ( "SELECT `balance` FROM `cp_credits` WHERE `account_id` = "+getcharid(3)+";", .@credits ); mes "What would you like to do?"; next; .@select = select("Credits -> Zeny?:Zeny -> Credits?") -1; mes "How "+( .@select ? "much zeny" : "many credits" )+" would you like to convert?"; mes .@select ? "Zeny: ^0000FF"+Zeny+"^000000" : "Credits: ^0000FF"+.@credits+"^000000"; next; if( input( .@withdraw, 1, .@select ? Zeny : .@credits ) != 0 ) { mes "Please input a number between 1 and ^0000FF"+(.@select ? Zeny : .@credits)+"^000000."; close; } if( .@select && .@withdraw < .@zeny_worth ) { mes "Each credit costs at least ^0000FF"+.@zeny_worth+"^000000 Zeny."; close; } mes "Are you sure?"; mes .@select ? "^0000FF"+.@withdraw+"^000000 Zeny -> ^00FF00"+( .@withdraw / .@zeny_worth )+"^000000 Credits."; : "^0000FF"+.@withdraw+"^000000 Credits -> ^00FF00"+( .@withdraw * .@zeny_worth )+"^000000 Zeny."; next; if( select("Yes:No") == 2 ) { mes "Alright come again!"; close; } Zeny = .@select ? ( ( Zeny - .@withdraw ) + ( .@withdraw % .@zeny_worth ) ) : Zeny + ( .@withdraw * .@zeny_worth ); query_sql ( "UPDATE `cp_credits` SET `balance` = "+( .@select ? .@credits + ( .@withdraw / .@zeny_worth ) : .@credits - .@withdraw )+" WHERE `account_id` = "+getcharid(3)+";" ); mes "Thanks for using our service have a nice day."; close; }