Sorry I'm not really good in coding, I just need help to change my script from unrefined item to refined item (Account Bound). Thanks in advance!
This is the script
if ( gepard_int_get("GPACKRWD") ) {
mes "You already received your reward previously.";
close;
}
mes "Which job you would like to have?";
next;
.@s = select(.menu$)-1;
mes "here you go!";
close2;
gepard_int_set("GPACKRWD",true);
explode(.@T$, .data$[.@s], "|");
explode(.@TT$, .@T$[1], ",");
for ( .@i = 0; .@i < getarraysize(.@TT$); .@i++ ) {
explode(.@item$, .@TT$[.@i], ":");
getitembound3 atoi(.@item$[0]), atoi(.@item$[1]), Bound_Account; // account bound
}
end;
OnInit:
setarray .data$,
// <JobID>|<item>:<amount1>{,<item2>:<amount2>}..
"4008|2504:1",
"4009|2504:1";
for (.@i = 0; .@i < getarraysize(.data$); .@i++ ) {
explode(.@T$, .data$[.@i], "|");
.jobid[.@i] = atoi(.@T$[0]);
.reward$[.@i] = .@T$[1];
.menu$ += jobname(.jobid[.@i]) + ":";
}
end;
}