KidoSang
-
Posts
24 -
Joined
-
Last visited
Community Answers
-
KidoSang's post in Multiple Input was marked as the answer
function script guildbox { setarray [email protected][1],4140,4062; setarray [email protected][1],4402,4359; setarray [email protected][1],4252,4344; setarray [email protected][1],4409,4401; if(#end == 1){ goto cardend; }else{ goto card1; } end; card1: for( [email protected] = 1; [email protected] < getarraysize([email protected]); [email protected]++ ){ [email protected]$ = [email protected]$ + getitemname([email protected][[email protected]]) + ":"; } #selectedcard[1] = [email protected][select([email protected]$)]; if(#end == 1){ goto cardend; } goto card2; end; card2: for( [email protected] = 1; [email protected] < getarraysize([email protected]); [email protected]++ ){ [email protected]$ = [email protected]$ + getitemname([email protected][[email protected]]) + ":"; } #selectedcard[2] = [email protected][select([email protected]$)]; if(#end == 1){ goto cardend; } goto card3; end; card3: for( [email protected] = 1; [email protected] < getarraysize([email protected]); [email protected]++ ){ [email protected]$ = [email protected]$ + getitemname([email protected][[email protected]]) + ":"; } #selectedcard[3] = [email protected][select([email protected]$)]; if(#end == 1){ goto cardend; } goto card4; end; card4: for( [email protected] = 1; [email protected] < getarraysize([email protected]); [email protected]++ ){ [email protected]$ = [email protected]$ + getitemname([email protected][[email protected]]) + ":"; } #selectedcard[4] = [email protected][select([email protected]$)]; goto cardend; end; cardend: #end = 1; [email protected]$ = ""; mes "You had selected the card as below."; mes "Do you wish to change or continue?"; for( [email protected] = 1; [email protected] < getarraysize(#selectedcard); [email protected]++ ){ [email protected]$ = [email protected]$ + "Change " +getitemname(#selectedcard[[email protected]]) + ":"; } [email protected]$ = [email protected]$ + "Proceed"; [email protected] = select([email protected]$); switch([email protected]){ case 1: goto card1; break; case 2: goto card2; break; case 3: goto card3; break; case 4: goto card4; break; default: for( [email protected] = 1; [email protected] <= getarraysize(#selectedcard); [email protected]++ ){ getitem #selectedcard[[email protected]],1; } delitem theitemid,1 #end = 0; break; } end; } I think this is what you mentioned.
Just call this function when you use the guild package item and change the delitem theitemid,1 to guild package box id.
-
KidoSang's post in R>Exchange +9item to item was marked as the answer
Fresh script that i just coded, you may try it.
//===== rAthena Script ======================================= //= Exchange Shop //===== By: ================================================== //= KidoSang //===== Current Version: ===================================== //= 1.0 //===== Compatible With: ===================================== //= rAthena Project //===== Description: ========================================= //= Simple Exchange Shop. //===== Additional Comments: ================================= //= 1.0 Initial script. //============================================================ prontera,156,182,4 script Exchange Shop 826,{ set .RefineItem,1201; //Refine item id set .RefineLevel,7; //Refine value setarray .OtherItem[0],909,20,969,10; //Adding other items for exchange set .Reward,512; //Reward mes "You need to give me"; [email protected] = 0; if (!countitem2(.RefineItem,1,7,0,0,0,0,0)) { [email protected] = 1; } mes "+"+.RefineLevel+" "+getitemname(.RefineItem)+" "+countitem2(.RefineItem,1,7,0,0,0,0,0)+"/1"; for([email protected]=0; [email protected] < getarraysize(.OtherItem); set [email protected],[email protected]+2){ if(countitem(.OtherItem[[email protected]]) < .OtherItem[[email protected]+1]){ [email protected] = 1; } mes "~ "+.OtherItem[[email protected]+1]+" "+getitemname(.OtherItem[[email protected]])+" "+countitem(.OtherItem[[email protected]])+"/"+.OtherItem[[email protected]+1]; } mes "to exchange "+getitemname(.Reward); [email protected] = select("Exchange Please!","No"); if([email protected]){ if([email protected]){ next; mes "Sorry you are missing some items"; }else{ next; mes "Done!"; delitem2(.RefineItem,1,1,7,0,0,0,0,0); for([email protected]=0; [email protected] < getarraysize(.OtherItem); set [email protected],[email protected]+2) delitem .OtherItem[[email protected]],.OtherItem[[email protected]+1]; getitem .Reward,1; } } end; }