Hi, rAthena Community i've this scripts, but when i select first slot, it equip to 2nd, then i try to select 2nd, but i cant only can uncard, so i select 3rd slot and it select the 4th slot... so i can set cards on 1st and 3rd slot only on 2nd and 4th :/ how can i solve this ? Thx!
prontera,193,188,4 script Katonai 821,{
mes .npc$;
mes "Hello there!";
mes "I can enchant your items,";
mes "for a small fee of "+.pric+"z.";
emotion e_no1,0; next;
if(select("Yes:No")&2) { mes .npc$; mes "Alright, thanks anyways!"; close; }
if(Zeny<.pric) { mes .npc$; mes "I'm sorry you don't have enough Zeny, please come back later."; close; }
mes .npc$;
mes "Which item would you like to enchant?"; next;
for( .@a = 0; .@a < .e_len; .@a++ ) {
if(getequipid(.equiploc[.@a])>-1) {
set .@menu$, .@menu$+.eqp$[.@a]+"- [^0000FF"+getitemname(getequipid(.equiploc[.@a]))+"^000000]:";
} else { set .@menu$, .@menu$+"^adb4be"+.eqp$[.@a]+"- [Empty]^000000:"; }
}
select(.@menu$);
set .@eq_loc, .equiploc[@menu-1];
set .@eq_itm, getequipid(.@eq_loc);
if(.@eq_itm<0) {
mes .npc$;
mes "Hmm, I don't think you have anything equipped there.";
close;
}
set .@menu$, "";
set(.@eq,(getiteminfo(.@eq_itm,2)==4?4:.@eq_loc));
for(set(.@b,0);.@b<getarraysize(getd(".itm"+.@eq));set(.@b,.@b+1)) {
set(.@items,getd(".itm"+.@eq+"["+.@b+"]"));
if(getiteminfo(.@items,2)>-1)
if(set(.@c,countitem(.@items))) {
set .@menu$, .@menu$+getitemname(.@items)+" x"+.@c+":";
set .@b,.@b+1; set .@item[.@b], .@items;
}
}
if(.@menu$=="") {
mes .npc$;
mes "Hmm, you don't seem to have any enchantment orbs for that equipment.";
close;
}
mes .npc$;
mes "Please, select an enchantment from the menu."; next;
select(.@menu$);
set .@itm, .@item[@menu];
set .@menu$, ""; set .@a, 0;
while((set(.@a,.@a+1)-1)<4) {
setd(".@crd"+.@a, getequipcardid(.@eq_loc,.@a-1));
if(getequipcardid(.@eq_loc,.@a-1))
set .@menu$, .@menu$+.@a+.crd_c$[.@a-1]+" Slot- [^a92435"+getitemname(getequipcardid(.@eq_loc,.@a-1))+"^000000]:";
else set .@menu$, .@menu$+.@a+.crd_c$[.@a-1]+" Slot- [^30ad25Empty^000000]:";
}
mes .npc$;
mes "Select a slot."; next;
set(.@slot,select(.@menu$)-1);
set .@eqrf, getequiprefinerycnt(.@eq_loc);
if(getequipcardid(.@eq_loc,.@slot)) {
mes .npc$;
mes "Would you like me to remove this card?"; next;
if(select("Yes:No")&2) { mes .npc$; mes "Alright, thanks anyways!"; close; }
getitem getequipcardid(.@eq_loc,.@slot),1;
delitem2 .@eq_itm, 1, 1, .@eqrf, 0, .@crd1, .@crd2, .@crd3, .@crd4;
setd(".@crd"+(@menu+1), 0);
getitem2 .@eq_itm, 1, 1, .@eqrf, 0, .@crd1, .@crd2, .@crd3, .@crd4;
}
if(rand(101)>.perc[.@slot]) {
mes .npc$;
mes "I'm sorry but I've failed you!";
misceffect 155; emotion e_sob,0;
set Zeny,Zeny-.pric;
close;
}
set Zeny,Zeny-.pric;
delitem .@itm,1;
delitem2 .@eq_itm, 1, 1, .@eqrf, 0, .@crd1, .@crd2, .@crd3, .@crd4;
setd(".@crd"+(@menu+1), .@itm);
getitem2 .@eq_itm, 1, 1, .@eqrf, 0, .@crd1, .@crd2, .@crd3, .@crd4;
misceffect .efet;
emotion e_no1,0;
mes .npc$;
mes "All done!";
equip .@eq_itm;
close;
//NPC Constants
OnInit:
//=-=-=-=-=-=-=Configuration=-=-=-=-=-=-=
set .npc$ , "[^0000FFEnchant Expert^000000]"; // NPC Name
set .pric , 1000000; // Price
set .efet , 154; // Effect Number
setarray .perc , 100,80,50,10; // Percent slot
setarray .crd_c$, "st", "nd", "rd", "th"; // Count
setarray .itm32 , 29101; // Sheilds
setarray .itm16 , 29101; // Armor
setarray .itm4 , 29101; // Garment
setarray .itm64 , 29101; // Footgear
setarray .itm128 , 29101; // Accessory1
setarray .itm10 , 29101; // Accessory2
setarray .itm2 , 29101; // Weapon
setarray .itm1 , 29101; // Low Headgear
setarray .itm512 , 29101; // Mid Headgear
setarray .itm256 , 29101; // Upper Headgear
setarray .eqp$ , "Upper Headgear", "Mid Headgear", "Low Headgear", "Armor", "Left Hand", "Right Hand", "Garment",
"Shoes", "Accessory1", "Accessory2";
setarray .equiploc, EQI_HEAD_TOP, EQI_HEAD_MID, EQI_HEAD_LOW, EQI_ARMOR, EQI_HAND_L, EQI_HAND_R, EQI_GARMENT, EQI_SHOES, EQI_ACC_L, EQI_ACC_R;
set .e_len , getarraysize(.eqp$);
//=-=-=-=-=-=-=-=-Skorm-=-=-=-=-=-=-=-=-=
}
as you can see on the image below the 2nd and 4th is not problem but i cant equip on 1st and 3rd, if i pick 1st... it equip on 2nd, if i pick 2nd, it jus tell me about remove, if i pick 3rd, it equipo to 4th, if i try again on 1st o 3rd, it egain re-equip on 2nd or 4th :/
Question
ItsFree
Hi, rAthena Community i've this scripts, but when i select first slot, it equip to 2nd, then i try to select 2nd, but i cant only can uncard, so i select 3rd slot and it select the 4th slot... so i can set cards on 1st and 3rd slot only on 2nd and 4th :/ how can i solve this ? Thx!
as you can see on the image below the 2nd and 4th is not problem but i cant equip on 1st and 3rd, if i pick 1st... it equip on 2nd, if i pick 2nd, it jus tell me about remove, if i pick 3rd, it equipo to 4th, if i try again on 1st o 3rd, it egain re-equip on 2nd or 4th :/

Edited by ItsFree5 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.