Hi all.. Ermm... First of all.. Im sorry if this topic already exist cuz i did not found a script about item's to kafra point. Well,what im trying to do here,is Im trying to convert an exist script which is change kafra point into item's. Now all i want to do is change some code to make the script can change item's into kafra point back.
Can someone help me finish this script
Well here is the script.. (**I just edit this a liltle until i got stuck on if( #KAFRAPOINTS < 10 )**) **I dont know what are variable or queries that count the skull**
//===== rAthena Script =======================================
//= Converter System
//===== By ===================================================
//= GM Eplison from Reoka-RO
//===== Version ==============================================
//= 1.0
//===== Description ==========================================
//= Convert PvP Skull into Kafra Point
//===== Comments =============================================
//= None....
//============================================================
lunar01,136,211,5 script Converter#1 10071,{
setarray .@ItemID[0],7420;
for( set .@i,0; .@i < getarraysize( .@ItemID ); set .@i,.@i + 1 )
set .@Menu$,.@Menu$ + getitemname( .@ItemID[.@i] )+":";
mes "[Miss Converter #3]";
mes "PvP Skull can be change into Kafra Point?!";
mes "Sound's good huh?..?";
mes "Kafra Point can be obtained from";
mes "How long did you Online on RRO";
mes "Each 15 PvP Skull = 1 Kafra Point";
set .@i,( select( .@Menu$ ) - 1 );
if( #KAFRAPOINTS < 10 ){
mes "Sorry but you didnt have 10 Kafra Points.";
}else{
mes "How many you want ?";
mes "Amount : 1 ~ "+( #KAFRAPOINTS / 10 );
input .@Amount,0,( #KAFRAPOINTS / 10 );
if( .@Amount ){
set #KAFRAPOINTS,#KAFRAPOINTS - ( .@Amount * 10 );
getitem .@ItemID[.@i],.@Amount;
mes "Done";
}
}
close;
OnInit:
waitingroom "PvPSkull-->KafraPoints",0;
}