unrestricted Posted October 6, 2021 Share Posted October 6, 2021 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; [email protected] = select(.menu$)-1; mes "here you go!"; close2; gepard_int_set("GPACKRWD",true); explode([email protected]$, .data$[[email protected]], "|"); explode([email protected]$, [email protected]$[1], ","); for ( [email protected] = 0; [email protected] < getarraysize([email protected]$); [email protected]++ ) { explode([email protected]$, [email protected]$[[email protected]], ":"); getitembound3 atoi([email protected]$[0]), atoi([email protected]$[1]), Bound_Account; // account bound } end; OnInit: setarray .data$, // <JobID>|<item>:<amount1>{,<item2>:<amount2>}.. "4008|2504:1", "4009|2504:1"; for ([email protected] = 0; [email protected] < getarraysize(.data$); [email protected]++ ) { explode([email protected]$, .data$[[email protected]], "|"); .jobid[[email protected]] = atoi([email protected]$[0]); .reward$[[email protected]] = [email protected]$[1]; .menu$ += jobname(.jobid[[email protected]]) + ":"; } end; } Quote Link to comment Share on other sites More sharing options...
0 Elicorna Posted October 7, 2021 Share Posted October 7, 2021 (edited) Hi! If I'm not mistaken, you need to do getitembound2: *getitembound2 <item id>,<amount>,<identify>,<refine>,<attribute>,<card1>,<card2>,<card3>,<card4>,<bound type>{,<account ID>}; *getitembound2 "<item name>",<amount>,<identify>,<refine>,<attribute>,<card1>,<card2>,<card3>,<card4>,<bound type>{,<account ID>}; This command behaves identically to 'getitem2', but the items created will be bound to the target character as specified by the bound type. All items created in this manner cannot be dropped, sold, vended, auctioned, or mailed, and in some cases cannot be traded or stored. identify - Whether you want the item to be identified (1) or not (0). refine - For how many pluses will it be refined. It will not let you refine an item higher than the max refine. attribute - Whether the item is broken (1) or not (0). card1,2,3,4 - If you want a card compound to it, place the card ID number into the specific card slot. so for example: (obvs without the spaces but it's to explain) getitembound2 atoi([email protected]$[0]), atoi([email protected]$[1]), 1, 10, 0 , , , , ,Bound_Account; gets the item ID amount identified refine attribute cards bound even if you put no cards you need to put the commas because otherwise it won't read the script properly ~ Edited October 7, 2021 by Elicorna Quote Link to comment Share on other sites More sharing options...
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;
[email protected] = select(.menu$)-1;
mes "here you go!";
close2;
gepard_int_set("GPACKRWD",true);
explode([email protected]$, .data$[[email protected]], "|");
explode([email protected]$, [email protected]$[1], ",");
for ( [email protected] = 0; [email protected] < getarraysize([email protected]$); [email protected]++ ) {
explode([email protected]$, [email protected]$[[email protected]], ":");
getitembound3 atoi([email protected]$[0]), atoi([email protected]$[1]), Bound_Account; // account bound
}
end;
OnInit:
setarray .data$,
// <JobID>|<item>:<amount1>{,<item2>:<amount2>}..
"4008|2504:1",
"4009|2504:1";
for ([email protected] = 0; [email protected] < getarraysize(.data$); [email protected]++ ) {
explode([email protected]$, .data$[[email protected]], "|");
.jobid[[email protected]] = atoi([email protected]$[0]);
.reward$[[email protected]] = [email protected]$[1];
.menu$ += jobname(.jobid[[email protected]]) + ":";
}
end;
}
Link to comment
Share on other sites