/* http://rathena.org/board/topic/95249-givepoints-script/ */ - script give_afk_point -1,{ OnInit: bindatcmd "giveafkpoints",strnpcinfo(0)+"::OnAtcommand"; end; OnAtcommand: .@target_aid = getcharid( 3,.@atcmd_parameters$[0] ); .@point = atoi( .@atcmd_parameters$[1] ); if( .@atcmd_numparameters != 2 ){ dispbottom "Usage : "+.@atcmd_command$+" "; } else if( .@point > #AFKPOINTS ){ dispbottom "You only have "+#AFKPOINTS+" Points."; } else if( !.@target_aid ){ dispbottom "Target not found/Offline."; } else{ .@sender_name$ = strcharinfo(0); #AFKPOINTS -= .@point; dispbottom "Sent "+.@point+" Point to "+.@atcmd_parameters$[0]; attachrid( .@target_aid ); #AFKPOINTS += .@point; dispbottom "Received "+.@point+" Points send by "+.@sender_name$; } end; }