

KidoSang
-
Posts
24 -
Joined
-
Last visited
Community Answers
-
KidoSang's post in Multiple Input was marked as the answer
function script guildbox { setarray .@weaponcard[1],4140,4062; setarray .@garmentcard[1],4402,4359; setarray .@acccard[1],4252,4344; setarray .@armorcard[1],4409,4401; if(#end == 1){ goto cardend; }else{ goto card1; } end; card1: for( .@i = 1; .@i < getarraysize(.@weaponcard); .@i++ ){ .@menu1$ = .@menu1$ + getitemname(.@weaponcard[.@i]) + ":"; } #selectedcard[1] = .@weaponcard[select(.@menu1$)]; if(#end == 1){ goto cardend; } goto card2; end; card2: for( .@i = 1; .@i < getarraysize(.@armorcard); .@i++ ){ .@menu2$ = .@menu2$ + getitemname(.@armorcard[.@i]) + ":"; } #selectedcard[2] = .@armorcard[select(.@menu2$)]; if(#end == 1){ goto cardend; } goto card3; end; card3: for( .@i = 1; .@i < getarraysize(.@acccard); .@i++ ){ .@menu3$ = .@menu3$ + getitemname(.@acccard[.@i]) + ":"; } #selectedcard[3] = .@acccard[select(.@menu3$)]; if(#end == 1){ goto cardend; } goto card4; end; card4: for( .@i = 1; .@i < getarraysize(.@garmentcard); .@i++ ){ .@menu4$ = .@menu4$ + getitemname(.@garmentcard[.@i]) + ":"; } #selectedcard[4] = .@garmentcard[select(.@menu4$)]; goto cardend; end; cardend: #end = 1; .@menu5$ = ""; mes "You had selected the card as below."; mes "Do you wish to change or continue?"; for( .@i = 1; .@i < getarraysize(#selectedcard); .@i++ ){ .@menu5$ = .@menu5$ + "Change " +getitemname(#selectedcard[.@i]) + ":"; } .@menu5$ = .@menu5$ + "Proceed"; .@finalanswer = select(.@menu5$); switch(.@finalanswer){ case 1: goto card1; break; case 2: goto card2; break; case 3: goto card3; break; case 4: goto card4; break; default: for( .@i = 1; .@i <= getarraysize(#selectedcard); .@i++ ){ getitem #selectedcard[.@i],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"; .@checking = 0; if (!countitem2(.RefineItem,1,7,0,0,0,0,0)) { .@checking = 1; } mes "+"+.RefineLevel+" "+getitemname(.RefineItem)+" "+countitem2(.RefineItem,1,7,0,0,0,0,0)+"/1"; for(.@i=0; .@i < getarraysize(.OtherItem); set .@i,.@i+2){ if(countitem(.OtherItem[.@i]) < .OtherItem[.@i+1]){ .@checking = 1; } mes "~ "+.OtherItem[.@i+1]+" "+getitemname(.OtherItem[.@i])+" "+countitem(.OtherItem[.@i])+"/"+.OtherItem[.@i+1]; } mes "to exchange "+getitemname(.Reward); .@sel = select("Exchange Please!","No"); if(.@sel){ if(.@checking){ next; mes "Sorry you are missing some items"; }else{ next; mes "Done!"; delitem2(.RefineItem,1,1,7,0,0,0,0,0); for(.@i=0; .@i < getarraysize(.OtherItem); set .@i,.@i+2) delitem .OtherItem[.@i],.OtherItem[.@i+1]; getitem .Reward,1; } } end; }