Jump to content

Tanlor

Members
  • Posts

    50
  • Joined

  • Last visited

Community Answers

  1. Tanlor's post in ADD Rops was marked as the answer   
    //By Brian //http://rathena.org/board/user/237-brian/ prontera,156,178,4 script ChangeMe 910,{ if (getgmlevel() < 10) end; set [email protected], getcharid(3); // save their RID mes "Hello GM"; mes "Enter the char's name:"; input [email protected]$; query_sql "SELECT `account_id`,`name` FROM `char` WHERE `name` = '"+escape_sql([email protected]$)+"'", [email protected]_id,[email protected]$; if ([email protected]_id) { mes "^FF0000 This player doesn't exist!"; close; } mes "How many cash point would you like give to^0000FF " + [email protected]$ + "^000000?"; input [email protected]; if ([email protected] < 1) { mes "^FF0000 Amount must be positive."; close; } mes " "; mes "Give "[email protected]+" cash points to "[email protected]$+"?"; if(select("Yes:No")==2) close; if (attachrid([email protected]_id)) { set #CASHPOINTS, #CASHPOINTS + [email protected]; dispbottom "Gained "[email protected]+" cash points. Total "+#CASHPOINTS+" points"; } else { query_sql "SELECT COUNT(`account_id`) FROM `global_reg_value` WHERE `str`='#CASHPOINTS' AND `account_id`='"[email protected]_id+"'", [email protected]; if ([email protected]) query_sql "UPDATE `global_reg_value` SET `value` = (CAST(`value` AS UNSIGNED)+'"[email protected]+"') WHERE `str`='#CASHPOINTS' AND `account_id`='"[email protected]_id+"'"; else query_sql "INSERT INTO `global_reg_value` (`str`,`value`,`type`,`account_id`) VALUES ('#CASHPOINTS',"[email protected]+",2,"[email protected]_id+")"; } attachrid([email protected]); mes "Gave "[email protected]+" cash points to "[email protected]$+"."; announce "GM "+strcharinfo(0)+" gave to "[email protected]$+" "[email protected]+" Cash Points",bc_all; close; } Try it.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.