Jump to content

Tupac

Members
  • Posts

    101
  • Joined

  • Last visited

Posts posted by Tupac

  1. 8 minutes ago, Yoh Asakura said:

    Hello,

    I would like to know if there's a way to remove the categories from the Euphy's Quest Shop script (npc/custom/quests/quest_shop.txt). This way when the user clicks on the npc it will directly show the items available to "Purchase".

    Thanks in advance.

    prontera,164,203,6 script Quest Shop#1 998,{ callfunc "qshop"; }
    prontera,165,203,6 script Quest Shop#2 998,{ callfunc "qshop",1,2; } // call the shop 1 and 2 defined below
    
    
    prontera,165,203,6 script Quest Shop#2 998,{ callfunc "qshop",1; } // call the shop 1
    
    prontera,165,203,6 script Quest Shop#2 998,{ callfunc "qshop",2; } // call the shop 2

     

    • Like 2
  2. On 5/31/2019 at 10:07 AM, Litro Endemic said:

    you can try use this one, ref: https://rathena.org/board/topic/112186-faw-enchant-error-script/

    
    moc_para01,179,27,0	script	Valkyrie#FAWEnchant	403,{
    	disable_items;
    	mes .@npc_name$ = "[^AA0000Valkyrie^000000]";
    	mes "I am here to enchant the",
    		"magnificent ^000099Fallen Angel Wing^000000.",
    		"Would you like to enchant yours?";
    	next;
    	.@menu$ = select("Information:Enchant Fallen Angel Wing:Reset Enchantment");
    	switch(.@menu$) {
    		default:
    		case 1:
    			break;
    		case 2:
    			callsub S_Check;
    			.@ref = getequiprefinerycnt(EQI_GARMENT);
    			.@card[0] = getequipcardid(EQI_GARMENT,0);
    			.@card[1] = getequipcardid(EQI_GARMENT,1);
    			.@card[2] = getequipcardid(EQI_GARMENT,2);
    			.@card[3] = getequipcardid(EQI_GARMENT,3);
    			
    			// Check if enchantment slot is full here, do no need to continue if full.
    			if(.@card[1] && .@card[2] && .@card[3]) {
    				mes .@npc_name$,
    				"Hmm.. it seems that all", 
    				"slots have already been enchanted.";
    				close;
    			}
    			if ((.@card[1] && !.@card[2] && (.@ref < 7)) || (.@card[1] && .@card[2] && !.@card[3] && (.@ref < 9))) {
    				mes .@npc_name$,
    				"Sorry, but your",
    				"^000099Fallen Angel Wing^000000's",
    				"refinement level is too", 
    				"low to continue";
    				close;
    			}
    			if (.@ref > 8) .@enc_count = 3;
    			else if (.@ref > 6 && .@ref < 9) .@enc_count = 2;
    			else
    				.@enc_count = 1;
    			mes .@npc_name$;
    			mes "You have a ^000099+"+.@ref+" Fallen Angel Wing^000000.",
    				"It can have a total of "+.@enc_count+" enchantment"+(.@enc_count > 1? "s.":".")+" Please";
    			mes "select your preferred enchantment.";
    			next;
    			.@menu$ = "";
    			for (.@i = 0; .@i < getarraysize(.enchant_type$); .@i++)
    				.@menu$ = .@menu$ + .enchant_type$[.@i]+":";
    			.@type = select(.@menu$);
    			.@enc_stat = getd(".enc"+.@type+"["+callsub(S_ChanceType, .chance_type, .@card[1], .@card[2], .@card[3])+"]");
    			if(.enchant_cost) {
    				if(Zeny < .enchant_cost) {
    					mes .@npc_name$,
    						"You don't have enough zeny.";
    					close;
    				}
    				Zeny -= .enchant_cost;
    			}
    			delitem2 2589, 1, 1, .@ref, 0, .@card[0], .@card[1], .@card[2], .@card[3];
    			if(!.@card[1]) .@card[1] = .@enc_stat;
    			else if(!.@card[2] && .@ref > 6) .@card[2] = .@enc_stat;
    			else if(!.@card[3] && .@ref > 8) .@card[3] = .@enc_stat;
    			getitem2 2589, 1, 1, .@ref, 0, .@card[0], .@card[1], .@card[2], .@card[3];
    			mes .@npc_name$,
    				"Your ^000099Fallen Angel Wing^000000 has",
    				"been enchanted with ^000099"+getitemname(.@enc_stat)+"^000000.";
    			close;
    		case 3:
    			callsub S_Check;
    			mes .@npc_name$,
    				"This will cost you "+callfunc("F_InsertComma", .reset_cost)+"z.",
    				"Are you sure?";
    			next;
    			select("Yes");
    			mes .@npc_name$;
    			if(Zeny < .reset_cost) {
    				mes "You don't bring enough zeny.";
    				close;
    			}
    			Zeny -= .reset_cost;
    			.@ref = getequiprefinerycnt(EQI_GARMENT);
    			.@card[0] = getequipcardid(EQI_GARMENT,0);
    			.@card[1] = getequipcardid(EQI_GARMENT,1);
    			.@card[2] = getequipcardid(EQI_GARMENT,2);
    			.@card[3] = getequipcardid(EQI_GARMENT,3);
    			delitem2 2589, 1, 1, .@ref, 0, .@card[0], .@card[1], .@card[2], .@card[3];
    			getitem2 2589, 1, 1, .@ref, 0, .@card[0], 0, 0, 0;
    			mes "Your ^000099Fallen Angel Wing^000000's",
    				"enchantments have been reset.";
    			equip 2589; // didn't know it will work while npc set disable_items
    			specialeffect2 261;
    			specialeffect2 119;
    			close;
    	}
    	mes .@npc_name$,
    		"I can enchant your",
    		"^000099Fallen Angel Wing^000000 for",
    		(.enchant_cost ? callfunc("F_InsertComma",.enchant_cost)+"z":"free")+" to give it various.", 
    		"effects. In fact, I can do it",
    		"twice if its refinement level is",
    		"+7 ~ +8, and thrice if its",
    		"+9 and above.";
    	next;
    	mes .@npc_name$,
    		"The 3rd enchantment has a",
    		"chance to be more powerful",
    		"than the first two.";
    	next;
    	mes .@npc_name$,
    		"There is no chance to",
    		"fail, so enchant away",
    		"as much as you like.";
    	next;	
    	mes .@npc_name$,
    		"But if you're not happy",
    		"with the results, you can",
    		"reset the enchantments",
    		"for ^009900"+callfunc("F_InsertComma",.reset_cost)+"z^000000.";
    	next;
    	mes .@npc_name$,
    		"That's about everything.";
    	close;
    
    S_Check:
    	if (getequipid(EQI_GARMENT) != 2589) {
    		mes .@npc_name$;
    		mes "Please equip your",
    			"^000099Fallen Angel Wing^000000 if",
    			"you want to have it enchanted.";
    		close;
    	}
    	return;
    	
    S_ChanceType:
    	switch(getarg(0)) {
    		case 1:
    		//Decreasing Chance of Enchantment
    		//60% low, 30% mid, 10% high for 1st & 2nd enchant slot
    		//40% low, 30% mid, 20% high, 10% special for 3rd enchant slot
    			.@rand = rand(1,10);
    			if(getarg(2) && getarg(3)) { //For 3rd & 4th Card Slot aka 2nd & 3rd Enchant Slot
    				if (.@rand < 5 ) .@x = 0; 
    				else if (.@rand < 7) .@x = 1; 
    				else if (.@rand < 9) .@x = 2; 
    				else .@x = 3;	
    			} else {	//For 2nd Card slot aka 1st Enchant Slot
    				if (.@rand < 7) .@x=0; 
    				else if (.@rand < 10) .@x = 1; 
    				else .@x = 2; 
    			}
    			return .@x;
    		case 0:
    			if(getarg(2) && getarg(3))
    				return rand(0,3);
    			else
    				return rand(0,2);
    	}
    	
    OnInit:
    	setarray .enchant_type$, "Fighting Enchant", "Magic Enchant", "Archer Enchant", "Critical/Fatal Enchant",
    							 "Max HP Enchant", "Max SP Enchant", "ASPD Enchant", "STR Enchant","AGI Enchant",
    							 "DEX Enchant", "VIT Enchant","INT Enchant","LUK Enchant";
    	
    	setarray .enc1[0], 4809,4808,4820, 4821;	//Fighting 3~5
    	setarray .enc2[0], 4812,4826,4827, 4828;	//Magic 4~6
    	setarray .enc3[0], 4832,4833,4834, 4835;	//Expert Arc 1~3
    	setarray .enc4[0], 4863,4864,4865, 4866;	//Fatal 1~3
    	setarray .enc5[0], 4861,4862,4867, 4868;	//MHPP 1~3%
    	setarray .enc6[0], 4870,4800,4871, 4801;	//MaxSP 25,50,75
    	setarray .enc7[0], 4869,4872,4873, 4807;	//ASPD 1~3
    //	setarray .enc7[0], 4869,4872,4873, 4881;	//ASPD 1~3
    	setarray .enc8[0], 4702,4703,4704, 4853;	//STR 3~5 | Special Str
    	setarray .enc9[0], 4731,4732,4733, 4854;	//AGI 2~4
    	setarray .enc10[0], 4722,4723,4724, 4857;	//DEX 3~5
    	setarray .enc11[0], 4742,4743,4744, 4855;	//VIT 3~5
    	setarray .enc12[0], 4712,4713,4714, 4856;	//INT 3~5
    	setarray .enc13[0], 4752,4753,4754, 4858;	//LUK 3~5
    	
    	// 1 = 60% low, 30% mid, 10% high for 1st & 2nd enchant slot && 40% low, 30% mid, 20% high, 10% special for 3rd enchant slot
    	// 0 = Equal Chance
    	.chance_type = 0;
    
    	//Cost for Enchanting. It's free in iRO
    	.enchant_cost = 1000000;
    
    	//Cost to reset | Costs 1Mz in iRO
    	.reset_cost = 5000000;
    
    	end;
    }

     

    Thx, but i would like to keep script.

    @Nerfwood help, update script

  3. Hi iam use:

    //===== rAthena Script =======================================
    //= Unofficial Fallen Angel Wing (FAW) Enchants
    //===== By: ==================================================
    //= Nerfwood
    //===== Current Version: =====================================
    //= 1.0
    //===== Compatible With: =====================================
    //= rAthena Project
    //===== Description: =========================================
    //= Enchants FAW as per iROWiki's information
    //= Dialogue are unofficial
    //===== Additional Comments: =================================
    //= 1.0 First Version
    //============================================================
    
    //Decreasing Chance of Enchantment
    // 60% low, 30% mid, 10% high for 1st & 2nd enchant slot
    //40% low, 30% mid, 20% high, 10% special for 3rd enchant slot
    function	script	EnchantStat_1	{
    
    	.chance = rand(1,10);
    	
    	if(.@card2 && .@card3) { //For 4th Slot aka 3rd Enchant Slot
    		
    		if(.chance<5) .x=0; 
    		else if(.chance<7) .x=1; 
    		else if(.chance<9) .x=2; 
    		else .x=3;
    		
    	}
    	else {	//For 2nd and 3rd card slot aka 1st and 2nd Enchant Slot
    
    		if(.chance<7) .x=0; 
    		else if(.chance<10) .x=1; 
    		else .x=2; 
    	}
    	return getelementofarray(getvariableofnpc( getd(".enc" + getarg(0) )  , "Dark Luhir"), .x );
    	
    }
    
    
    
    	
    //Equal Chance of Enchanting	
    function	script	EnchantStat_0	{
    	if(.@card2 && .@card3)
    		return  getelementofarray(getvariableofnpc( getd(".enc" + getarg(0) )  , "Dark Luhir"), rand(0,3) );
    	else
    		return  getelementofarray(getvariableofnpc( getd(".enc" + getarg(0) )  , "Dark Luhir"), rand(0,2) );
    		
    }
    
    
    //=======MAIN NPC
    
    prontera,148,169,3	script	Dark Luhir	403,{
    	mes .npc$;
    	mes "I am here to enchant the",
    		"magnificent ^000099"+getitemname(.faw)+"^000000.",
    		"Would you like to enchant yours?";
    	if(countitem(2589)) {
    		set .@menu$, "Enchant Fallen Angel Wing";
    	}
    	else .@menu$="";
    	next;
    	switch(select("Information:" + .@menu$ + ":Reset Enchantment"))
    	{
    		case 1: goto OnInformation;
    		case 2: goto OnEnchantNow;
    		case 3: goto OnResetEnchant;
    		default: close;
    	}
    
    OnInformation:
    	mes .npc$,
    		"I can enchant your",
    		"^000099"+getitemname(.faw)+"^000000 for",
    		(.cost?callfunc("F_InsertComma",.cost)+"z":"free")+" to give it various.", 
    		"effects. In fact, I can do it",
    		"twice if its refinement level is",
    		"+7 ~ +8, and thrice if its",
    		"+9 and above.";
    	next;
    	mes .npc$,
    		"The 3rd enchantment has a",
    		"chance to be more powerful",
    		"than the first two.";
    	next;
    	mes .npc$,
    		"There is no chance to",
    		"fail, so enchant away",
    		"as much as you like.";
    	next;	
    	mes .npc$,
    		"But if you're not happy",
    		"with the results, you can",
    		"reset the enchantments",
    		"for ^009900"+ callfunc("F_InsertComma",.cost2) + "z^000000.";
    	next;
    	mes .npc$,
    		"That's about everything.";
    		close;
    		
    OnEnchantNow:	
    	mes .npc$;
    	if( (getequipid(EQI_GARMENT)!=2589) ) {
    		mes "Please equip your",
    			"^000099Fallen Angel Wing^000000 if",
    			"you want to have it enchanted.";
    		if(!.autoequip) close;	
    		next;
    		if(select("Equip:Don't Equip")==2) close;
    		equip 2589;
    		mes .npc$;
    	}
    	.@refeq = getequiprefinerycnt(EQI_GARMENT);
    	if(.@refeq<7) .@refeq2 = 1;
    	else if(.@refeq>8) .@refeq2 = 3;
    	else .@refeq2 = 2;
    	
    	mes "You have a ^000099+" +.@refeq + " Fallen Angel Wing^000000.",
    		"It can have a total of " + .@refeq2 + " enchantment"  +( .@refeq2>1?"s.":".")+" Please";
    	mes "select your preferred","enchantment.";
    	next;
    	setd ".@enc$", select("Fighting Enchant:Magic Enchant:Archer Enchant:Critical/Fatal Enchant:Max HP Enchant:Max SP Enchant:ASPD Enchant:STR Enchant:AGI Enchant:DEX Enchant:VIT Enchant:INT Enchant:LUK Enchant");
    	if(.cost) callsub OnCostlyEnchant;
    	
    	.@card1 = getequipcardid(EQI_GARMENT,0);
    	.@card2 = getequipcardid(EQI_GARMENT,1);
    	.@card3 = getequipcardid(EQI_GARMENT,2);
    	.@card4 = getequipcardid(EQI_GARMENT,3);
    	
    	if( .@card2 && .@card3 && .@card4) {
    		mes .npc$,
    		"Hmm.. it seems that all", 
    		"slots have already been enchanted.";
    		close;
    	}
    	
    	.@EnStat =   callfunc( (.chancetype?"EnchantStat_1":"EnchantStat_0"), .@enc$) ;
    	
    	if(!.@card2) callsub OnFawEnchant , .@EnStat , .@card3 , .@card4 , .@refeq;	
    	else if(!.@card3 && .@refeq>6) callsub OnFawEnchant , .@card2 , .@EnStat , .@card4 , .@refeq;
    	else if(!.@card4 && .@refeq>8) callsub OnFawEnchant , .@card2 , .@card3 , .@EnStat , .@refeq;
    	else {
    		mes .npc$,
    		"Sorry, but your",
    		"^000099"+getitemname(.faw)+"^000000's",
    		"refinement level is too", 
    		"low to continue";
    		close;
    	}
    	
    	mes .npc$,
    		"Your ^000099"+getitemname(.faw)+"^000000 has",
    		"been enchanted with ^000099"+getitemname(.@EnStat)+"^000000.";
    	close;
    
    OnFawEnChant:
    		if ( !countitem( 2589 ) ) {
    			mes "You dont have the items.";
    			close;
    		}
    		delitem2 2589, 1, 1, getarg(3), 0, .@card1, .@card2, .@card3, .@card4;
    		getitem2 2589, 1, 1, getarg(3) , 0, .@card1, getarg(0), getarg(1), getarg(2);
    		equip 2589;
    		specialeffect2 1019;
    		specialeffect2 98;
    		return;
    
    	
    OnResetEnchant:
    	mes .npc$,
    		"Irá precisar: 1x ^000099"+getitemname(.item)+"^000000.",
    		"Você tem certeza?";
    	next;
    	if(select("Sim:Não")==2) close;
    	mes .npc$;
    	if(countitem(6417)<1) {
    		mes "Você não tem o item: ^000099"+getitemname(.item)+"^000000.";
    		close;
    	}
    	delitem 6417,1;
    	mes "Your ^000099"+getitemname(.faw)+"^000000's",
    		"enchantments have been reset.";
    	.@refeq = getequiprefinerycnt(EQI_GARMENT);
    	.@card1 = getequipcardid(EQI_GARMENT,0);
    	.@card2 = getequipcardid(EQI_GARMENT,1);
    	.@card3 = getequipcardid(EQI_GARMENT,2);
    	.@card4 = getequipcardid(EQI_GARMENT,3);
    	delitem2 2589, 1, 1, .@refeq, 0, .@card1, .@card2, .@card3, .@card4;
    	getitem2 2589, 1, 1, .@refeq, 0, .@card1, 0, 0, 0;
    	equip 2589;
    	specialeffect2 261;
    	specialeffect2 119;
    	close;
    	
    //Only called when .cost is defined	
    OnCostlyEnchant:	
    	if(Zeny<.cost) {
    		
    		mes .npc$,
    			"You don't have enough zeny.";
    		close;
    	}
    	Zeny -= .cost;
    	return;
    	
    	
    	
    	
    OnInit:
    	.npc$ = "[^AA0000Valkyrie^000000]";
    	setarray .enc1[0], 4809,4808,4820, 4821;	//Fighting 3~5
    	setarray .enc2[0], 4812,4826,4827, 4828;	//Magic 4~6
    	setarray .enc3[0], 4832,4833,4834, 4835;	//Expert Arc 1~3
    	setarray .enc4[0], 4863,4864,4865, 4866;	//Fatal 1~3
    	setarray .enc5[0], 4861,4862,4867, 4868;	//MHPP 1~3%
    	setarray .enc6[0], 4870,4800,4871, 4801;	//MaxSP 25,50,75
    	setarray .enc7[0], 4869,4872,4873, 4807;	//ASPD 1~3
    //	setarray .enc7[0], 4869,4872,4873, 4881;	//ASPD 1~3
    	setarray .enc8[0], 4702,4703,4704, 4853;	//STR 3~5 | Special Str
    	setarray .enc9[0], 4731,4732,4733, 4854;	//AGI 2~4
    	setarray .enc10[0], 4722,4723,4724, 4857;	//DEX 3~5
    	setarray .enc11[0], 4742,4743,4744, 4855;	//VIT 3~5
    	setarray .enc12[0], 4712,4713,4714, 4856;	//INT 3~5
    	setarray .enc13[0], 4752,4753,4754, 4858;	//LUK 3~5
    	// 1 = 60% low, 30% mid, 10% high for 1st & 2nd enchant slot && 40% low, 30% mid, 20% high, 10% special for 3rd enchant slot
    	// 0 = Equal Chance
    	.chancetype = 0;
    	//Turn on Equip Selection if garment is unequipped? 1 = Yes
    	.autoequip = 0;
    	//Cost for Enchanting. It's free in iRO
    	.cost=6000000;
    	//Cost to reset | Costs 1Mz in iRO
    	.cost2 = 6000000;
    	.faw = 2589;
    	.item = 6417;
    	}

    Error on 2nd enchant:

    [Error]: buildin_delitem2: failed to delete 1 items (AID=2000000 item_id=2589).

     

     

  4. On 5/18/2019 at 12:09 AM, Expl0iter said:

    Olá.

    Estou com um problema.

    Configurei o servidor para trabalhar como pre, porém estou usando kRO como base e data do iRO.

    Porém quando após configurar da maneira que achei, estou recebendo informações no debug de que o servidor de mapas crasha. Sendo assim, eu sou desconectado e não consigo mais conectar, sou rejeitado. o erro é o seguinte:

    "Server received crash signal! Attempting to save all online characters!"

     

    executo o comando do status e diz que o servidor de mapa está desligado. Ele desliga após esse erro, aí tenho que reiniciar o servidor para que volte a funcionar, mas o erro persiste.

    Sendo que antes de configurar do modo que achei para pre-renewal, ele não crashava. Quando estava em Renewal estava tudo ok.

    Será que poderiam me dar uma luz de como fazer o certo e evitar esse erro?

    Desde já, agradeço.

    Qual hexed esta usando ? e qual esta configurado? Possui algum script custom ?

  5. 8 minutes ago, spawnn said:

    Hi, how modify script do not remove cards ? just enchants of fourth slot.

    
    //===== rAthena Script =======================================
    //= saders enchant npc
    //===== By: ==================================================
    //= Sader1992
    //https://rathena.org/board/profile/30766-sader1992/
    //===== Current Version: =====================================
    //= 2.6
    //===== Compatible With: ===================================== 
    //= rAthena Project
    //https://rathena.org/board/files/file/3602-saders-enchantment-npc/
    //https://github.com/sader1992/sader_scripts
    //===== Description: =========================================
    //============================================================
    //============================================================
    prontera,157,176,6	script	Encantamentos	998,{
    	disable_items;
    	if(.s_only_vip){
    		if(!vip_status(VIP_STATUS_ACTIVE)){
    			mes "this service only for vip";
    			close;
    		}
    	}
    	if (BaseLevel < .s_level_required[0]){
    		mes "Your level is too Low.";
    		mes "   ";
    		mes "Minimum level "+.s_level_required[0]+".";
    		close;
    	}else if(BaseLevel > .s_level_required[1]){
    		mes "Your level is too High.";
    		mes "   ";
    		mes "Maximum level "+.s_level_required[1]+".";
    		close;
    	}
    	mes "Ola!";
    	mes "Você quer encantar seus equipamentos?";
    	mes "Eu sou o melhor encantador do mundo!";
    	next;
    	if(.s_zeny > 0)
    		mes "isso vai te custar " + .s_zeny + " Zenys !";
    		mes "e 1x <ITEM>Ticket encantamento<INFO>7717</INFO></ITEM>.";
    	if(.item_is_required)
    		mes "e 1x ticket encantamento";
    	mes "Eu farei o meu melhor para encantá-lo com sucesso!";
    	next;
    	.@string$[0] = "Encantar";
    	if(.remove_enchant)
    		.@string$[1] = "Remover Encantamento";
    	if(.enable_the_shop)
    		.@string$[2] = "The Items you can enchant";
    	mes "O que deseja fazer ?";
    	menu .@string$[0],L_Enchant,.@string$[1],L_Remove,.@string$[2],-;
    	callsub Q_shop; end;
    	L_Remove: .@remove_orbs = true;
    	L_Enchant: 
    	next;
    	mes "Por favor, selecione o item.";
    	for(.@i=0; .@i<getarraysize(.s_all$); .@i++)
    		if(getequipid(.s_all_loc[.@i])>-1) {
    			set .@armor_menu$, .@armor_menu$ + .s_all$[.@i] + " - [ ^E81B02" + getitemname(getequipid(.s_all_loc[.@i])) + "^000000 ]:";
    		}else{
    			set .@armor_menu$, .@armor_menu$ + .s_all$[.@i] + " - [ ^D6C4E8" + "No Equip" + "^000000 ]:";
    		}
    	set .@s_all_selected, select(.@armor_menu$) -1;
    	if(getequipid(.s_all_loc[.@s_all_selected])< 0){
    		mes "Você não tem item equipado aí";
    		close;
    	}
    	if (countitem(getequipid(.s_all_loc[.@s_all_selected])) > 1){
    			mes "você tem mais de um item";
    			mes "que você deseja encantar";
    			close;
    	}
    	.@s_item_refine = getequiprefinerycnt(.s_all_loc[.@s_all_selected]);
    	if( getd(".specific_" + .s_all$[.@s_all_selected] + "s") ==1){
    		for(.@i=0;.@i<getarraysize(getd("." + .s_all$[.@s_all_selected] + "s$"));.@i++){
    			if(getequipid(.s_all_loc[.@s_all_selected]) == atoi(getd("." + .s_all$[.@s_all_selected] + "s$["+.@i+"]"))){
    				.@good_to_go = true;
    			}
    		}
    	}else{
    		for(.@i=0;.@i<getarraysize(.black_list$);.@i++){
    			if(getequipid(.s_all_loc[.@s_all_selected]) == atoi(.black_list$[.@i])){
    				.@black_list_item = true;
    			}
    		}
    		.@good_to_go = true;
    	}
    	if(!.@good_to_go || .@black_list_item){
    		mes "sorry";
    		mes " i can't enchant this item.";
    		close;
    	}
    	.@card0 = getequipcardid(.s_all_loc[.@s_all_selected],0);
    	.@card1 = getequipcardid(.s_all_loc[.@s_all_selected],1);
    	.@card2 = getequipcardid(.s_all_loc[.@s_all_selected],2);
    	.@card3 = getequipcardid(.s_all_loc[.@s_all_selected],3);
    	if(.@remove_orbs){
    		next;
    		mes "isso irá remover todas as cartas e encantamentos!";
    		if (.s_zeny_remove > 0) {
    			mes "Isto vai te custar " + .s_zeny_remove + " Zeny.";
    		}
    		mes "Você tem certeza?";
    			switch(select("Não:Sim")){
    				case 1: end;
    				case 2:
    					mes "Pela última vez!";
    					mes "você tem certeza?";
    					switch(select("Não:Sim")){
    					case 1: end;
    					case 2: 
    						if (Zeny < .s_zeny_remove) {
    							mes "Você não tem zeny suficiente.";
    							close;
    						}
    						if(.select_remove_orb){
    							if(.@card0 == 0).@card0$ = " - [ ^D6C4E8" + "No Equip" + "^000000 ]:"; else .@card0$ = getitemname(.@card0);
    							if(.@card1 == 0).@card1$ = " - [ ^D6C4E8" + "No Equip" + "^000000 ]:"; else .@card1$ = getitemname(.@card1);
    							if(.@card2 == 0).@card2$ = " - [ ^D6C4E8" + "No Equip" + "^000000 ]:"; else .@card2$ = getitemname(.@card2);
    							if(.@card3 == 0).@card3$ = " - [ ^D6C4E8" + "No Equip" + "^000000 ]:"; else .@card3$ = getitemname(.@card3);
    							switch(select(.@card0$,.@card1$,.@card2$,.@card3$)){
    								case 1: .@card0 = 0; break;
    								case 2: .@card1 = 0; break;
    								case 3: .@card2 = 0; break;
    								case 4: .@card3 = 0; break;
    							}
    							specialeffect2 EF_REPAIRWEAPON;
    							set .@item, getequipid(.s_all_loc[.@s_all_selected]);
    							delitem .@item,1;
    							getitem2 .@item, 1, 1, .@s_item_refine, 0, .@card0, .@card1, .@card2, .@card3;
    							set Zeny, Zeny-.s_zeny_remove;
    							end;
    						}
    						specialeffect2 EF_REPAIRWEAPON;
    						set .@item, getequipid(.s_all_loc[.@s_all_selected]);
    						delitem .@item,1;
    						getitem2 .@item, 1, 1, .@s_item_refine, 0, 0, 0, 0, 0;
    						set Zeny, Zeny-.s_zeny_remove;
    						end;
    					}
    			}
    	}
    	if(.chosse_orb){
    		next;
    		mes "select the orb you want";
    		for(.@i=0; .@i<getarraysize(getd("." + .s_all$[.@s_all_selected] + "$")); .@i++)
    				set .@orb_menu$, .@orb_menu$ + getitemname(atoi(getd("." + .s_all$[.@s_all_selected] + "$["+.@i+"]"))) + ":";
    		set .@s_orb_selected, select(.@orb_menu$) -1;
    		.@selected_orb_id = getd("." + .s_all$[.@s_all_selected] + "$["+.@s_orb_selected+"]");
    	}else{
    		.@selected_orb_size = rand(getarraysize(getd("." + .s_all$[.@s_all_selected] + "$")));
    		.@selected_orb_id = getd("." + .s_all$[.@s_all_selected] + "$["+.@selected_orb_size+"]");
    	}
    	next;
    	mes "Slot";
    	for(.@i=getd(".slot_count_" + .s_all$[.@s_all_selected]); .@i<4; .@i++)
    		if(getequipcardid(.s_all_loc[.@s_all_selected],.@i)!= null) {
    			set .@slot_menu$, .@slot_menu$ + " [ ^E81B02" + getitemname(getequipcardid(.s_all_loc[.@s_all_selected],.@i)) + "^000000 ]:";
    		}else{
    			set .@slot_menu$, .@slot_menu$ + " [ ^D6C4E8" + "Empty" + "^000000 ]:";
    		}
    	set .@s_slot_selected, select(.@slot_menu$) -1;
    	.@s_slot_selected += getd(".slot_count_" + .s_all$[.@s_all_selected]);
    	if(!.s_enchant_overwrite){
    		if(getequipcardid(.s_all_loc[.@s_all_selected],.@s_slot_selected) > 0){
    			mes "you already have orb in this slot";
    			close;
    		}
    	}
    	if (Zeny < .s_zeny) {
    			mes "Sorry, but you don't have enough zeny.";
    			close;
    		}
    	if(.item_is_required && .chosse_orb){
    		if (countitem(.@selected_orb_id) < 1){
    			mes"you don't have enchant orb";
    			close;
    		}
    	}
    	close2;
    	set Zeny, Zeny-.s_zeny;
    	if(!countitem(7717)){
    	mes "Você precisa de 1x " + getitemname(7717) + " para encantar.";
    	end;
    	}
    	specialeffect2 EF_MAPPILLAR;
    	progressbar "ffff00",.progress_time;
    delitem 7717,1;
    	if(.item_is_required && .chosse_orb){delitem .@selected_orb_id,1;}
    	if (rand(100) < .success_chanse[.@s_slot_selected]){
    		mes "Sucesso!";
    		specialeffect2 154;
    		setd(".@card" + .@s_slot_selected, .@selected_orb_id);
    		set .@item, getequipid(.s_all_loc[.@s_all_selected]);
    		delitem .@item,1;
    		getitem2 .@item, 1, 1, .@s_item_refine, 0, .@card0, .@card1, .@card2, .@card3;
    		equip .@item;
    		close;
    	}else{
    		specialeffect2 155;
    		mes "I am sorry";
    		mes "We did Fail";
    		specialeffect2 EF_PHARMACY_FAIL;
    		if (rand(100) < .brack_chance){
    			set .@item, getequipid(.s_all_loc[.@s_all_selected]);
    			delitem .@item,1;
    			mes "and it broke!!";
    			specialeffect EF_SUI_EXPLOSION;
    		}
    		close;
    	}
    	
    	
    Q_shop:
    	switch(select("Weapons:Armors:Shields:Germents:Shoses:Accessarys:Uppers:Middels:Lowers")){
    	case 1: callshop "enchantable_items_Weapon",1; break;
    	case 2: callshop "enchantable_items_Armor",1; break;
    	case 3: callshop "enchantable_items_Shield",1; break;
    	case 4: callshop "enchantable_items_Germent",1; break;
    	case 5: callshop "enchantable_items_Shose",1; break;
    	case 6: callshop "enchantable_items_Accessary",1; break;
    	case 7: callshop "enchantable_items_Upper",1; break;
    	case 8: callshop "enchantable_items_Middel",1; break;
    	case 9: callshop "enchantable_items_Lower",1; break;
    	}
    end;	
    
    OnInit:
    	//--------------------------------------------------------------//
    	//--------------------------------------------------------------//
    	//--------------------   configuration   -----------------------//
    	//--------------------------------------------------------------//
    	//--------------------------------------------------------------//
    	
    	//--------------------------------------------------------------//
    	//if you want to remove one from the menu you need to remove it down too!! /or add
    	//--------------------------------------------------------------//
    	setarray .s_all$,"Armadura","Meio";
    	setarray .s_all_loc,EQI_ARMOR,EQI_HEAD_MID;
    	
    	//--------------------------------------------------------------//
    	//Orbs IDs (Note : Shield = left hand so the weapon on the left hand count as Shield too!
    	//--------------------------------------------------------------//
    	//setarray .Weapon$,4741,4933,4861,4762,4934;	//right handed weapons
    	setarray .Armadura$,4700,4701,4702,4730,4731,4732,4740,4741,4742,4710,4711,4712,4720,4721,4722,4750,4751,4752,4760,4761,4806,4861,4862,4867,4870,4800,4871;	//Armors
    	//setarray .Shield$,4861,4762,4934;	//Shields and left hand weapons
    	//setarray .Germent$,4741,4933,4861,4762,4934;	//Germent
    	//setarray .Shose$,4741,4933,4861,4762,4934;	//Shose
    	//setarray .Accessary$,4741,4933,4861,4762,4934;	//orbs id
    	//setarray .Upper$,4741,4933,4861,4762,4934;	//Accessary
    	setarray .Meio$,4700,4701,4702,4730,4731,4732,4740,4741,4742,4710,4711,4712,4720,4721,4722,4750,4751,4752,4760,4761,4806,4861,4862,4867,4870,4800,4871;	//Middel
    	//setarray .Lower$,4741,4933,4861,4762,4934;	//Lower
    	
    	//--------------------------------------------------------------//
    	//if you want to put specific IDs for kind of gear put it to 1
    	//--------------------------------------------------------------//
    	.specific_Weapons = false;
    	.specific_Armaduras = false;
    	.specific_Shields = false;
    	.specific_Germents = false;
    	.specific_Shoses = false;
    	.specific_Accessarys = false;
    	.specific_Uppers = false;
    	.specific_Meios = false;
    	.specific_Lowers = false;
    	
    	//--------------------------------------------------------------//
    	//if specific put the IDs here
    	//--------------------------------------------------------------//
    	setarray .Weapons$,1601,1201,1204,1207,1210,1213,1216,1219,1222,1247,1248,1249;	//right handed weapons
    	setarray .Armaduras$,2301,2303,2305,2307,2307,2309,2312,2314,2316,2321,2323,2325,2328,2330,2332;	//Armors
    	setarray .Shields$,2101,2103,2105,2107,2113,2117;	//Shields and left hand weapons
    	setarray .Germents$,2512,2501,2503,2505;	//Germents
    	setarray .Shoses$,2416,2401,2403,2405,2411;	//Shoses
    	setarray .Accessarys$,2628,2608,2609,2612,2613,2627;	//Accessarys
    	setarray .Uppers$,2206,2208,2211,2216;	//Uppers
    	setarray .Meios$,2204,2202;	//Meios
    	setarray .Lowers$,2628,2206;	//Lowers
    	
    	//--------------------------------------------------------------//
    	//if not specific put the black list IDs here (if you want
    	//--------------------------------------------------------------//
    	setarray .black_list$,2335,2338,2340,2341;
    	
    	//--------------------------------------------------------------//
    	//here you can make a specific slot number for each kind
    	//0 = all 4 slot ,1 = last 3 slot ,2 = last 2 slot ,3 = last 1 slot
    	//--------------------------------------------------------------//
    	.slot_count_Weapon = 0;
    	.slot_count_Armadura = 3;
    	.slot_count_Shield = 0;
    	.slot_count_Germent = 0;
    	.slot_count_Shose = 0;
    	.slot_count_Accessary = 0;
    	.slot_count_Upper = 0;
    	.slot_count_Meio = 3;
    	.slot_count_Lower = 0;
    	
    	//--------------------------------------------------------------//
    	//other configuration
    	//--------------------------------------------------------------//
    	setarray .s_level_required,0,175;	//the level required to use the npc
    	.s_only_vip = false;	//if you want only vip to use it put it to 1
    	setarray .success_chanse,100,100,100,100;	//success chanse [1st_slot_chanse,2nd_slot_chanse,3rd_slot_chanse,4th_slot_chanse]
    	.s_zeny = 5000000;	//if you don't want zeny requirment set it to 0
    	.s_zeny_remove = 10000000;	//this for enchantment reset
    	.item_is_required = false;	//if you want the orb it self to be required true = yes , false = no(if .chosse_orb = false this will be false too)
    	.s_enchant_overwrite = false;	//if true then you can overwrite the enchant
    	.progress_time = 1;	//the time that needed to wait until the socket end
    	.chosse_orb = false;	//false = random ,true = yes
    	.brack_chance = 0;	//the chanse that it will brack if it fail
    	.remove_enchant = true;	//false = no ,true = yes
    	.select_remove_orb = false;
    	//--------------------------------------------------------------//
    	//this will only show the items that the npc can enchant in a shop but no one can buy from it as long as you don't give them the value
    	//--------------------------------------------------------------//
    	.enable_the_shop = false;
    
    
    	
    	
    	
    	//--------------------------------------------------------------//
    	//Do not edit here
    	//--------------------------------------------------------------//
    	npcshopdelitem "enchantable_items_Weapon",512;
    	npcshopdelitem "enchantable_items_Armor",512;
    	npcshopdelitem "enchantable_items_Shield",512;
    	npcshopdelitem "enchantable_items_Germent",512;
    	npcshopdelitem "enchantable_items_Shose",512;
    	npcshopdelitem "enchantable_items_Accessary",512;
    	npcshopdelitem "enchantable_items_Upper",512;
    	npcshopdelitem "enchantable_items_Middel",512;
    	npcshopdelitem "enchantable_items_Lower",512;
    	
    	for (.@i = 0; .@i < getarraysize(.Weapons$); .@i++)
    			npcshopadditem "enchantable_items_Weapon", atoi(.Weapons$[.@i]),1;
    	for (.@i = 0; .@i < getarraysize(.Armors$); .@i++)
    			npcshopadditem "enchantable_items_Armor", atoi(.Armors$[.@i]),1;
    	for (.@i = 0; .@i < getarraysize(.Shields$); .@i++)
    			npcshopadditem "enchantable_items_Shield", atoi(.Shields$[.@i]),1;
    	for (.@i = 0; .@i < getarraysize(.Germents$); .@i++)
    			npcshopadditem "enchantable_items_Germent", atoi(.Germents$[.@i]),1;	
    	for (.@i = 0; .@i < getarraysize(.Shoses$); .@i++)
    			npcshopadditem "enchantable_items_Shose", atoi(.Shoses$[.@i]),1;	
    	for (.@i = 0; .@i < getarraysize(.Accessarys$); .@i++)
    			npcshopadditem "enchantable_items_Accessary", atoi(.Accessarys$[.@i]),1;	
    	for (.@i = 0; .@i < getarraysize(.Uppers$); .@i++)
    			npcshopadditem "enchantable_items_Upper", atoi(.Uppers$[.@i]),1;		
    	for (.@i = 0; .@i < getarraysize(.Middels$); .@i++)
    			npcshopadditem "enchantable_items_Middel", atoi(.Middels$[.@i]),1;	
    	for (.@i = 0; .@i < getarraysize(.Lowers$); .@i++)
    			npcshopadditem "enchantable_items_Lower", atoi(.Lowers$[.@i]),1;	
    	end;
    }
    -	pointshop	enchantable_items_Weapon	-1,#YOU_CAN_ENCHANT_Weapons,512:1;
    -	pointshop	enchantable_items_Armor	-1,#YOU_CAN_ENCHANT_Armors,512:1;
    -	pointshop	enchantable_items_Shield	-1,#YOU_CAN_ENCHANT_Shields,512:1;
    -	pointshop	enchantable_items_Germent	-1,#YOU_CAN_ENCHANT_Germents,512:1;
    -	pointshop	enchantable_items_Shose	-1,#YOU_CAN_ENCHANT_Shoses,512:1;
    -	pointshop	enchantable_items_Accessary	-1,#YOU_CAN_ENCHANT_Accessarys,512:1;
    -	pointshop	enchantable_items_Upper	-1,#YOU_CAN_ENCHANT_Uppers,512:1;
    -	pointshop	enchantable_items_Middel	-1,#YOU_CAN_ENCHANT_Middels,512:1;
    -	pointshop	enchantable_items_Lower	-1,#YOU_CAN_ENCHANT_Lowers,512:1;
    
    
    

     

    Solved

    Before:

    getitem2 .@item, 1, 1, .@s_item_refine, 0, 0, 0, 0, 0;

    after:

    getitem2 .@item, 1, 1, .@s_item_refine, 0, .@card0, 0, 0, 0;

     

  6. Hi, how modify script do not remove cards ? just enchants of fourth slot.

    //===== rAthena Script =======================================
    //= saders enchant npc
    //===== By: ==================================================
    //= Sader1992
    //https://rathena.org/board/profile/30766-sader1992/
    //===== Current Version: =====================================
    //= 2.6
    //===== Compatible With: ===================================== 
    //= rAthena Project
    //https://rathena.org/board/files/file/3602-saders-enchantment-npc/
    //https://github.com/sader1992/sader_scripts
    //===== Description: =========================================
    //============================================================
    //============================================================
    prontera,157,176,6	script	Encantamentos	998,{
    	disable_items;
    	if(.s_only_vip){
    		if(!vip_status(VIP_STATUS_ACTIVE)){
    			mes "this service only for vip";
    			close;
    		}
    	}
    	if (BaseLevel < .s_level_required[0]){
    		mes "Your level is too Low.";
    		mes "   ";
    		mes "Minimum level "+.s_level_required[0]+".";
    		close;
    	}else if(BaseLevel > .s_level_required[1]){
    		mes "Your level is too High.";
    		mes "   ";
    		mes "Maximum level "+.s_level_required[1]+".";
    		close;
    	}
    	mes "Ola!";
    	mes "Você quer encantar seus equipamentos?";
    	mes "Eu sou o melhor encantador do mundo!";
    	next;
    	if(.s_zeny > 0)
    		mes "isso vai te custar " + .s_zeny + " Zenys !";
    		mes "e 1x <ITEM>Ticket encantamento<INFO>7717</INFO></ITEM>.";
    	if(.item_is_required)
    		mes "e 1x ticket encantamento";
    	mes "Eu farei o meu melhor para encantá-lo com sucesso!";
    	next;
    	.@string$[0] = "Encantar";
    	if(.remove_enchant)
    		.@string$[1] = "Remover Encantamento";
    	if(.enable_the_shop)
    		.@string$[2] = "The Items you can enchant";
    	mes "O que deseja fazer ?";
    	menu .@string$[0],L_Enchant,.@string$[1],L_Remove,.@string$[2],-;
    	callsub Q_shop; end;
    	L_Remove: .@remove_orbs = true;
    	L_Enchant: 
    	next;
    	mes "Por favor, selecione o item.";
    	for(.@i=0; .@i<getarraysize(.s_all$); .@i++)
    		if(getequipid(.s_all_loc[.@i])>-1) {
    			set .@armor_menu$, .@armor_menu$ + .s_all$[.@i] + " - [ ^E81B02" + getitemname(getequipid(.s_all_loc[.@i])) + "^000000 ]:";
    		}else{
    			set .@armor_menu$, .@armor_menu$ + .s_all$[.@i] + " - [ ^D6C4E8" + "No Equip" + "^000000 ]:";
    		}
    	set .@s_all_selected, select(.@armor_menu$) -1;
    	if(getequipid(.s_all_loc[.@s_all_selected])< 0){
    		mes "Você não tem item equipado aí";
    		close;
    	}
    	if (countitem(getequipid(.s_all_loc[.@s_all_selected])) > 1){
    			mes "você tem mais de um item";
    			mes "que você deseja encantar";
    			close;
    	}
    	.@s_item_refine = getequiprefinerycnt(.s_all_loc[.@s_all_selected]);
    	if( getd(".specific_" + .s_all$[.@s_all_selected] + "s") ==1){
    		for(.@i=0;.@i<getarraysize(getd("." + .s_all$[.@s_all_selected] + "s$"));.@i++){
    			if(getequipid(.s_all_loc[.@s_all_selected]) == atoi(getd("." + .s_all$[.@s_all_selected] + "s$["+.@i+"]"))){
    				.@good_to_go = true;
    			}
    		}
    	}else{
    		for(.@i=0;.@i<getarraysize(.black_list$);.@i++){
    			if(getequipid(.s_all_loc[.@s_all_selected]) == atoi(.black_list$[.@i])){
    				.@black_list_item = true;
    			}
    		}
    		.@good_to_go = true;
    	}
    	if(!.@good_to_go || .@black_list_item){
    		mes "sorry";
    		mes " i can't enchant this item.";
    		close;
    	}
    	.@card0 = getequipcardid(.s_all_loc[.@s_all_selected],0);
    	.@card1 = getequipcardid(.s_all_loc[.@s_all_selected],1);
    	.@card2 = getequipcardid(.s_all_loc[.@s_all_selected],2);
    	.@card3 = getequipcardid(.s_all_loc[.@s_all_selected],3);
    	if(.@remove_orbs){
    		next;
    		mes "isso irá remover todas as cartas e encantamentos!";
    		if (.s_zeny_remove > 0) {
    			mes "Isto vai te custar " + .s_zeny_remove + " Zeny.";
    		}
    		mes "Você tem certeza?";
    			switch(select("Não:Sim")){
    				case 1: end;
    				case 2:
    					mes "Pela última vez!";
    					mes "você tem certeza?";
    					switch(select("Não:Sim")){
    					case 1: end;
    					case 2: 
    						if (Zeny < .s_zeny_remove) {
    							mes "Você não tem zeny suficiente.";
    							close;
    						}
    						if(.select_remove_orb){
    							if(.@card0 == 0).@card0$ = " - [ ^D6C4E8" + "No Equip" + "^000000 ]:"; else .@card0$ = getitemname(.@card0);
    							if(.@card1 == 0).@card1$ = " - [ ^D6C4E8" + "No Equip" + "^000000 ]:"; else .@card1$ = getitemname(.@card1);
    							if(.@card2 == 0).@card2$ = " - [ ^D6C4E8" + "No Equip" + "^000000 ]:"; else .@card2$ = getitemname(.@card2);
    							if(.@card3 == 0).@card3$ = " - [ ^D6C4E8" + "No Equip" + "^000000 ]:"; else .@card3$ = getitemname(.@card3);
    							switch(select(.@card0$,.@card1$,.@card2$,.@card3$)){
    								case 1: .@card0 = 0; break;
    								case 2: .@card1 = 0; break;
    								case 3: .@card2 = 0; break;
    								case 4: .@card3 = 0; break;
    							}
    							specialeffect2 EF_REPAIRWEAPON;
    							set .@item, getequipid(.s_all_loc[.@s_all_selected]);
    							delitem .@item,1;
    							getitem2 .@item, 1, 1, .@s_item_refine, 0, .@card0, .@card1, .@card2, .@card3;
    							set Zeny, Zeny-.s_zeny_remove;
    							end;
    						}
    						specialeffect2 EF_REPAIRWEAPON;
    						set .@item, getequipid(.s_all_loc[.@s_all_selected]);
    						delitem .@item,1;
    						getitem2 .@item, 1, 1, .@s_item_refine, 0, 0, 0, 0, 0;
    						set Zeny, Zeny-.s_zeny_remove;
    						end;
    					}
    			}
    	}
    	if(.chosse_orb){
    		next;
    		mes "select the orb you want";
    		for(.@i=0; .@i<getarraysize(getd("." + .s_all$[.@s_all_selected] + "$")); .@i++)
    				set .@orb_menu$, .@orb_menu$ + getitemname(atoi(getd("." + .s_all$[.@s_all_selected] + "$["+.@i+"]"))) + ":";
    		set .@s_orb_selected, select(.@orb_menu$) -1;
    		.@selected_orb_id = getd("." + .s_all$[.@s_all_selected] + "$["+.@s_orb_selected+"]");
    	}else{
    		.@selected_orb_size = rand(getarraysize(getd("." + .s_all$[.@s_all_selected] + "$")));
    		.@selected_orb_id = getd("." + .s_all$[.@s_all_selected] + "$["+.@selected_orb_size+"]");
    	}
    	next;
    	mes "Slot";
    	for(.@i=getd(".slot_count_" + .s_all$[.@s_all_selected]); .@i<4; .@i++)
    		if(getequipcardid(.s_all_loc[.@s_all_selected],.@i)!= null) {
    			set .@slot_menu$, .@slot_menu$ + " [ ^E81B02" + getitemname(getequipcardid(.s_all_loc[.@s_all_selected],.@i)) + "^000000 ]:";
    		}else{
    			set .@slot_menu$, .@slot_menu$ + " [ ^D6C4E8" + "Empty" + "^000000 ]:";
    		}
    	set .@s_slot_selected, select(.@slot_menu$) -1;
    	.@s_slot_selected += getd(".slot_count_" + .s_all$[.@s_all_selected]);
    	if(!.s_enchant_overwrite){
    		if(getequipcardid(.s_all_loc[.@s_all_selected],.@s_slot_selected) > 0){
    			mes "you already have orb in this slot";
    			close;
    		}
    	}
    	if (Zeny < .s_zeny) {
    			mes "Sorry, but you don't have enough zeny.";
    			close;
    		}
    	if(.item_is_required && .chosse_orb){
    		if (countitem(.@selected_orb_id) < 1){
    			mes"you don't have enchant orb";
    			close;
    		}
    	}
    	close2;
    	set Zeny, Zeny-.s_zeny;
    	if(!countitem(7717)){
    	mes "Você precisa de 1x " + getitemname(7717) + " para encantar.";
    	end;
    	}
    	specialeffect2 EF_MAPPILLAR;
    	progressbar "ffff00",.progress_time;
    delitem 7717,1;
    	if(.item_is_required && .chosse_orb){delitem .@selected_orb_id,1;}
    	if (rand(100) < .success_chanse[.@s_slot_selected]){
    		mes "Sucesso!";
    		specialeffect2 154;
    		setd(".@card" + .@s_slot_selected, .@selected_orb_id);
    		set .@item, getequipid(.s_all_loc[.@s_all_selected]);
    		delitem .@item,1;
    		getitem2 .@item, 1, 1, .@s_item_refine, 0, .@card0, .@card1, .@card2, .@card3;
    		equip .@item;
    		close;
    	}else{
    		specialeffect2 155;
    		mes "I am sorry";
    		mes "We did Fail";
    		specialeffect2 EF_PHARMACY_FAIL;
    		if (rand(100) < .brack_chance){
    			set .@item, getequipid(.s_all_loc[.@s_all_selected]);
    			delitem .@item,1;
    			mes "and it broke!!";
    			specialeffect EF_SUI_EXPLOSION;
    		}
    		close;
    	}
    	
    	
    Q_shop:
    	switch(select("Weapons:Armors:Shields:Germents:Shoses:Accessarys:Uppers:Middels:Lowers")){
    	case 1: callshop "enchantable_items_Weapon",1; break;
    	case 2: callshop "enchantable_items_Armor",1; break;
    	case 3: callshop "enchantable_items_Shield",1; break;
    	case 4: callshop "enchantable_items_Germent",1; break;
    	case 5: callshop "enchantable_items_Shose",1; break;
    	case 6: callshop "enchantable_items_Accessary",1; break;
    	case 7: callshop "enchantable_items_Upper",1; break;
    	case 8: callshop "enchantable_items_Middel",1; break;
    	case 9: callshop "enchantable_items_Lower",1; break;
    	}
    end;	
    
    OnInit:
    	//--------------------------------------------------------------//
    	//--------------------------------------------------------------//
    	//--------------------   configuration   -----------------------//
    	//--------------------------------------------------------------//
    	//--------------------------------------------------------------//
    	
    	//--------------------------------------------------------------//
    	//if you want to remove one from the menu you need to remove it down too!! /or add
    	//--------------------------------------------------------------//
    	setarray .s_all$,"Armadura","Meio";
    	setarray .s_all_loc,EQI_ARMOR,EQI_HEAD_MID;
    	
    	//--------------------------------------------------------------//
    	//Orbs IDs (Note : Shield = left hand so the weapon on the left hand count as Shield too!
    	//--------------------------------------------------------------//
    	//setarray .Weapon$,4741,4933,4861,4762,4934;	//right handed weapons
    	setarray .Armadura$,4700,4701,4702,4730,4731,4732,4740,4741,4742,4710,4711,4712,4720,4721,4722,4750,4751,4752,4760,4761,4806,4861,4862,4867,4870,4800,4871;	//Armors
    	//setarray .Shield$,4861,4762,4934;	//Shields and left hand weapons
    	//setarray .Germent$,4741,4933,4861,4762,4934;	//Germent
    	//setarray .Shose$,4741,4933,4861,4762,4934;	//Shose
    	//setarray .Accessary$,4741,4933,4861,4762,4934;	//orbs id
    	//setarray .Upper$,4741,4933,4861,4762,4934;	//Accessary
    	setarray .Meio$,4700,4701,4702,4730,4731,4732,4740,4741,4742,4710,4711,4712,4720,4721,4722,4750,4751,4752,4760,4761,4806,4861,4862,4867,4870,4800,4871;	//Middel
    	//setarray .Lower$,4741,4933,4861,4762,4934;	//Lower
    	
    	//--------------------------------------------------------------//
    	//if you want to put specific IDs for kind of gear put it to 1
    	//--------------------------------------------------------------//
    	.specific_Weapons = false;
    	.specific_Armaduras = false;
    	.specific_Shields = false;
    	.specific_Germents = false;
    	.specific_Shoses = false;
    	.specific_Accessarys = false;
    	.specific_Uppers = false;
    	.specific_Meios = false;
    	.specific_Lowers = false;
    	
    	//--------------------------------------------------------------//
    	//if specific put the IDs here
    	//--------------------------------------------------------------//
    	setarray .Weapons$,1601,1201,1204,1207,1210,1213,1216,1219,1222,1247,1248,1249;	//right handed weapons
    	setarray .Armaduras$,2301,2303,2305,2307,2307,2309,2312,2314,2316,2321,2323,2325,2328,2330,2332;	//Armors
    	setarray .Shields$,2101,2103,2105,2107,2113,2117;	//Shields and left hand weapons
    	setarray .Germents$,2512,2501,2503,2505;	//Germents
    	setarray .Shoses$,2416,2401,2403,2405,2411;	//Shoses
    	setarray .Accessarys$,2628,2608,2609,2612,2613,2627;	//Accessarys
    	setarray .Uppers$,2206,2208,2211,2216;	//Uppers
    	setarray .Meios$,2204,2202;	//Meios
    	setarray .Lowers$,2628,2206;	//Lowers
    	
    	//--------------------------------------------------------------//
    	//if not specific put the black list IDs here (if you want
    	//--------------------------------------------------------------//
    	setarray .black_list$,2335,2338,2340,2341;
    	
    	//--------------------------------------------------------------//
    	//here you can make a specific slot number for each kind
    	//0 = all 4 slot ,1 = last 3 slot ,2 = last 2 slot ,3 = last 1 slot
    	//--------------------------------------------------------------//
    	.slot_count_Weapon = 0;
    	.slot_count_Armadura = 3;
    	.slot_count_Shield = 0;
    	.slot_count_Germent = 0;
    	.slot_count_Shose = 0;
    	.slot_count_Accessary = 0;
    	.slot_count_Upper = 0;
    	.slot_count_Meio = 3;
    	.slot_count_Lower = 0;
    	
    	//--------------------------------------------------------------//
    	//other configuration
    	//--------------------------------------------------------------//
    	setarray .s_level_required,0,175;	//the level required to use the npc
    	.s_only_vip = false;	//if you want only vip to use it put it to 1
    	setarray .success_chanse,100,100,100,100;	//success chanse [1st_slot_chanse,2nd_slot_chanse,3rd_slot_chanse,4th_slot_chanse]
    	.s_zeny = 5000000;	//if you don't want zeny requirment set it to 0
    	.s_zeny_remove = 10000000;	//this for enchantment reset
    	.item_is_required = false;	//if you want the orb it self to be required true = yes , false = no(if .chosse_orb = false this will be false too)
    	.s_enchant_overwrite = false;	//if true then you can overwrite the enchant
    	.progress_time = 1;	//the time that needed to wait until the socket end
    	.chosse_orb = false;	//false = random ,true = yes
    	.brack_chance = 0;	//the chanse that it will brack if it fail
    	.remove_enchant = true;	//false = no ,true = yes
    	.select_remove_orb = false;
    	//--------------------------------------------------------------//
    	//this will only show the items that the npc can enchant in a shop but no one can buy from it as long as you don't give them the value
    	//--------------------------------------------------------------//
    	.enable_the_shop = false;
    
    
    	
    	
    	
    	//--------------------------------------------------------------//
    	//Do not edit here
    	//--------------------------------------------------------------//
    	npcshopdelitem "enchantable_items_Weapon",512;
    	npcshopdelitem "enchantable_items_Armor",512;
    	npcshopdelitem "enchantable_items_Shield",512;
    	npcshopdelitem "enchantable_items_Germent",512;
    	npcshopdelitem "enchantable_items_Shose",512;
    	npcshopdelitem "enchantable_items_Accessary",512;
    	npcshopdelitem "enchantable_items_Upper",512;
    	npcshopdelitem "enchantable_items_Middel",512;
    	npcshopdelitem "enchantable_items_Lower",512;
    	
    	for (.@i = 0; .@i < getarraysize(.Weapons$); .@i++)
    			npcshopadditem "enchantable_items_Weapon", atoi(.Weapons$[.@i]),1;
    	for (.@i = 0; .@i < getarraysize(.Armors$); .@i++)
    			npcshopadditem "enchantable_items_Armor", atoi(.Armors$[.@i]),1;
    	for (.@i = 0; .@i < getarraysize(.Shields$); .@i++)
    			npcshopadditem "enchantable_items_Shield", atoi(.Shields$[.@i]),1;
    	for (.@i = 0; .@i < getarraysize(.Germents$); .@i++)
    			npcshopadditem "enchantable_items_Germent", atoi(.Germents$[.@i]),1;	
    	for (.@i = 0; .@i < getarraysize(.Shoses$); .@i++)
    			npcshopadditem "enchantable_items_Shose", atoi(.Shoses$[.@i]),1;	
    	for (.@i = 0; .@i < getarraysize(.Accessarys$); .@i++)
    			npcshopadditem "enchantable_items_Accessary", atoi(.Accessarys$[.@i]),1;	
    	for (.@i = 0; .@i < getarraysize(.Uppers$); .@i++)
    			npcshopadditem "enchantable_items_Upper", atoi(.Uppers$[.@i]),1;		
    	for (.@i = 0; .@i < getarraysize(.Middels$); .@i++)
    			npcshopadditem "enchantable_items_Middel", atoi(.Middels$[.@i]),1;	
    	for (.@i = 0; .@i < getarraysize(.Lowers$); .@i++)
    			npcshopadditem "enchantable_items_Lower", atoi(.Lowers$[.@i]),1;	
    	end;
    }
    -	pointshop	enchantable_items_Weapon	-1,#YOU_CAN_ENCHANT_Weapons,512:1;
    -	pointshop	enchantable_items_Armor	-1,#YOU_CAN_ENCHANT_Armors,512:1;
    -	pointshop	enchantable_items_Shield	-1,#YOU_CAN_ENCHANT_Shields,512:1;
    -	pointshop	enchantable_items_Germent	-1,#YOU_CAN_ENCHANT_Germents,512:1;
    -	pointshop	enchantable_items_Shose	-1,#YOU_CAN_ENCHANT_Shoses,512:1;
    -	pointshop	enchantable_items_Accessary	-1,#YOU_CAN_ENCHANT_Accessarys,512:1;
    -	pointshop	enchantable_items_Upper	-1,#YOU_CAN_ENCHANT_Uppers,512:1;
    -	pointshop	enchantable_items_Middel	-1,#YOU_CAN_ENCHANT_Middels,512:1;
    -	pointshop	enchantable_items_Lower	-1,#YOU_CAN_ENCHANT_Lowers,512:1;
    
    
    

     

  7. 5 hours ago, sader1992 said:

    just before you delete the zeny

    
    set Zeny, Zeny-.s_zeny;

    add

    
    if(!countitem(7716)){
    	mes "you need 1 " + getitemname(7716) + " to complete the enchantment.";
    	end;
    }
    delitem 7716,1;

     

    Thx Sader, nice script!

  8. Hi, how modify scrip:

    //===== rAthena Script =======================================
    //= saders enchant npc
    //===== By: ==================================================
    //= Sader1992
    //https://rathena.org/board/profile/30766-sader1992/
    //===== Current Version: =====================================
    //= 2.6
    //===== Compatible With: ===================================== 
    //= rAthena Project
    //https://rathena.org/board/files/file/3602-saders-enchantment-npc/
    //https://github.com/sader1992/sader_scripts
    //===== Description: =========================================
    //============================================================
    //============================================================
    prontera,157,176,6	script	sader enchant	998,{
    	disable_items;
    	if(.s_only_vip){
    		if(!vip_status(VIP_STATUS_ACTIVE)){
    			mes "this service only for vip";
    			close;
    		}
    	}
    	if (BaseLevel < .s_level_required[0]){
    		mes "Your level is too Low.";
    		mes "   ";
    		mes "Minimum level "+.s_level_required[0]+".";
    		close;
    	}else if(BaseLevel > .s_level_required[1]){
    		mes "Your level is too High.";
    		mes "   ";
    		mes "Maximum level "+.s_level_required[1]+".";
    		close;
    	}
    	mes "Hello!";
    	mes "Do you want to enchant you items!";
    	mes "I am the best enchanter in the world!";
    	next;
    	if(.s_zeny > 0)
    		mes "isso vai te custar " + .s_zeny + " Zenys !";
    	if(.item_is_required)
    		mes "e 1x ticket encantamento";
    	mes "i will do my best to enchant it Successfully!";
    	mes "but remember";
    	mes "There is luck in this work too.";
    	next;
    	mes "please if you have items same";
    	mes "as the item you want to enchant";
    	mes "but them in the storage and come back to me!";
    	next;
    	.@string$[0] = "Enchant";
    	if(.remove_enchant)
    		.@string$[1] = "Remove Enchant";
    	if(.enable_the_shop)
    		.@string$[2] = "The Items you can enchant";
    	mes "so what you want to do!";
    	menu .@string$[0],L_Enchant,.@string$[1],L_Remove,.@string$[2],-;
    	callsub Q_shop; end;
    	L_Remove: .@remove_orbs = true;
    	L_Enchant: 
    	next;
    	mes "please select the item you want to enchant";
    	for(.@i=0; .@i<getarraysize(.s_all$); .@i++)
    		if(getequipid(.s_all_loc[.@i])>-1) {
    			set .@armor_menu$, .@armor_menu$ + .s_all$[.@i] + " - [ ^E81B02" + getitemname(getequipid(.s_all_loc[.@i])) + "^000000 ]:";
    		}else{
    			set .@armor_menu$, .@armor_menu$ + .s_all$[.@i] + " - [ ^D6C4E8" + "No Equip" + "^000000 ]:";
    		}
    	set .@s_all_selected, select(.@armor_menu$) -1;
    	if(getequipid(.s_all_loc[.@s_all_selected])< 0){
    		mes "you don't have item equiped there";
    		close;
    	}
    	if (countitem(getequipid(.s_all_loc[.@s_all_selected])) > 1){
    			mes "you have more then one item";
    			mes "from the item that you want to enchant";
    			close;
    	}
    	.@s_item_refine = getequiprefinerycnt(.s_all_loc[.@s_all_selected]);
    	if( getd(".specific_" + .s_all$[.@s_all_selected] + "s") ==1){
    		for(.@i=0;.@i<getarraysize(getd("." + .s_all$[.@s_all_selected] + "s$"));.@i++){
    			if(getequipid(.s_all_loc[.@s_all_selected]) == atoi(getd("." + .s_all$[.@s_all_selected] + "s$["+.@i+"]"))){
    				.@good_to_go = true;
    			}
    		}
    	}else{
    		for(.@i=0;.@i<getarraysize(.black_list$);.@i++){
    			if(getequipid(.s_all_loc[.@s_all_selected]) == atoi(.black_list$[.@i])){
    				.@black_list_item = true;
    			}
    		}
    		.@good_to_go = true;
    	}
    	if(!.@good_to_go || .@black_list_item){
    		mes "sorry";
    		mes " i can't enchant this item.";
    		close;
    	}
    	.@card0 = getequipcardid(.s_all_loc[.@s_all_selected],0);
    	.@card1 = getequipcardid(.s_all_loc[.@s_all_selected],1);
    	.@card2 = getequipcardid(.s_all_loc[.@s_all_selected],2);
    	.@card3 = getequipcardid(.s_all_loc[.@s_all_selected],3);
    	if(.@remove_orbs){
    		next;
    		mes "this will remove all the cards and orbs inside the item!";
    		if (.s_zeny_remove > 0) {
    			mes "this will cost you " + .s_zeny_remove + " Zeny.";
    		}
    		mes "are you sure?";
    			switch(select("NO:Yes")){
    				case 1: end;
    				case 2:
    					mes "for the last time!";
    					mes "are you sure?";
    					switch(select("NO:Yes")){
    					case 1: end;
    					case 2: 
    						if (Zeny < .s_zeny_remove) {
    							mes "Sorry, but you don't have enough zeny.";
    							close;
    						}
    						if(.select_remove_orb){
    							if(.@card0 == 0).@card0$ = " - [ ^D6C4E8" + "No Equip" + "^000000 ]:"; else .@card0$ = getitemname(.@card0);
    							if(.@card1 == 0).@card1$ = " - [ ^D6C4E8" + "No Equip" + "^000000 ]:"; else .@card1$ = getitemname(.@card1);
    							if(.@card2 == 0).@card2$ = " - [ ^D6C4E8" + "No Equip" + "^000000 ]:"; else .@card2$ = getitemname(.@card2);
    							if(.@card3 == 0).@card3$ = " - [ ^D6C4E8" + "No Equip" + "^000000 ]:"; else .@card3$ = getitemname(.@card3);
    							switch(select(.@card0$,.@card1$,.@card2$,.@card3$)){
    								case 1: .@card0 = 0; break;
    								case 2: .@card1 = 0; break;
    								case 3: .@card2 = 0; break;
    								case 4: .@card3 = 0; break;
    							}
    							specialeffect2 EF_REPAIRWEAPON;
    							set .@item, getequipid(.s_all_loc[.@s_all_selected]);
    							delitem .@item,1;
    							getitem2 .@item, 1, 1, .@s_item_refine, 0, .@card0, .@card1, .@card2, .@card3;
    							set Zeny, Zeny-.s_zeny_remove;
    							end;
    						}
    						specialeffect2 EF_REPAIRWEAPON;
    						set .@item, getequipid(.s_all_loc[.@s_all_selected]);
    						delitem .@item,1;
    						getitem2 .@item, 1, 1, .@s_item_refine, 0, 0, 0, 0, 0;
    						set Zeny, Zeny-.s_zeny_remove;
    						end;
    					}
    			}
    	}
    	if(.chosse_orb){
    		next;
    		mes "select the orb you want";
    		for(.@i=0; .@i<getarraysize(getd("." + .s_all$[.@s_all_selected] + "$")); .@i++)
    				set .@orb_menu$, .@orb_menu$ + getitemname(atoi(getd("." + .s_all$[.@s_all_selected] + "$["+.@i+"]"))) + ":";
    		set .@s_orb_selected, select(.@orb_menu$) -1;
    		.@selected_orb_id = getd("." + .s_all$[.@s_all_selected] + "$["+.@s_orb_selected+"]");
    	}else{
    		.@selected_orb_size = rand(getarraysize(getd("." + .s_all$[.@s_all_selected] + "$")));
    		.@selected_orb_id = getd("." + .s_all$[.@s_all_selected] + "$["+.@selected_orb_size+"]");
    	}
    	next;
    	mes "which slot ?";
    	for(.@i=getd(".slot_count_" + .s_all$[.@s_all_selected]); .@i<4; .@i++)
    		if(getequipcardid(.s_all_loc[.@s_all_selected],.@i)!= null) {
    			set .@slot_menu$, .@slot_menu$ + " [ ^E81B02" + getitemname(getequipcardid(.s_all_loc[.@s_all_selected],.@i)) + "^000000 ]:";
    		}else{
    			set .@slot_menu$, .@slot_menu$ + " [ ^D6C4E8" + "Empty" + "^000000 ]:";
    		}
    	set .@s_slot_selected, select(.@slot_menu$) -1;
    	.@s_slot_selected += getd(".slot_count_" + .s_all$[.@s_all_selected]);
    	if(!.s_enchant_overwrite){
    		if(getequipcardid(.s_all_loc[.@s_all_selected],.@s_slot_selected) > 0){
    			mes "you already have orb in this slot";
    			close;
    		}
    	}
    	if (Zeny < .s_zeny) {
    			mes "Sorry, but you don't have enough zeny.";
    			close;
    		}
    	if(.item_is_required && .chosse_orb){
    		if (countitem(.@selected_orb_id) < 1){
    			mes"you don't have enchant orb";
    			close;
    		}
    	}
    	close2;
    	specialeffect2 EF_MAPPILLAR;
    	progressbar "ffff00",.progress_time;
    	set Zeny, Zeny-.s_zeny;
    	if(.item_is_required && .chosse_orb){delitem .@selected_orb_id,1;}
    	if (rand(100) < .success_chanse[.@s_slot_selected]){
    		mes "We did it!";
    		specialeffect2 154;
    		setd(".@card" + .@s_slot_selected, .@selected_orb_id);
    		set .@item, getequipid(.s_all_loc[.@s_all_selected]);
    		delitem .@item,1;
    		getitem2 .@item, 1, 1, .@s_item_refine, 0, .@card0, .@card1, .@card2, .@card3;
    		equip .@item;
    		close;
    	}else{
    		specialeffect2 155;
    		mes "I am sorry";
    		mes "We did Fail";
    		specialeffect2 EF_PHARMACY_FAIL;
    		if (rand(100) < .brack_chance){
    			set .@item, getequipid(.s_all_loc[.@s_all_selected]);
    			delitem .@item,1;
    			mes "and it broke!!";
    			specialeffect EF_SUI_EXPLOSION;
    		}
    		close;
    	}
    	
    	
    Q_shop:
    	switch(select("Weapons:Armors:Shields:Germents:Shoses:Accessarys:Uppers:Middels:Lowers")){
    	case 1: callshop "enchantable_items_Weapon",1; break;
    	case 2: callshop "enchantable_items_Armor",1; break;
    	case 3: callshop "enchantable_items_Shield",1; break;
    	case 4: callshop "enchantable_items_Germent",1; break;
    	case 5: callshop "enchantable_items_Shose",1; break;
    	case 6: callshop "enchantable_items_Accessary",1; break;
    	case 7: callshop "enchantable_items_Upper",1; break;
    	case 8: callshop "enchantable_items_Middel",1; break;
    	case 9: callshop "enchantable_items_Lower",1; break;
    	}
    end;	
    
    OnInit:
    	//--------------------------------------------------------------//
    	//--------------------------------------------------------------//
    	//--------------------   configuration   -----------------------//
    	//--------------------------------------------------------------//
    	//--------------------------------------------------------------//
    	
    	//--------------------------------------------------------------//
    	//if you want to remove one from the menu you need to remove it down too!! /or add
    	//--------------------------------------------------------------//
    	setarray .s_all$,"Armadura","Meio";
    	setarray .s_all_loc,EQI_ARMOR,EQI_HEAD_MID;
    	
    	//--------------------------------------------------------------//
    	//Orbs IDs (Note : Shield = left hand so the weapon on the left hand count as Shield too!
    	//--------------------------------------------------------------//
    	//setarray .Weapon$,4741,4933,4861,4762,4934;	//right handed weapons
    	setarray .Armadura$,4700,4701,4702,4730,4731,4732,4740,4741,4742,4710,4711,4712,4720,4721,4722,4750,4751,4752,4760,4761,4806,4861,4862,4867,4870,4800,4871;	//Armors
    	//setarray .Shield$,4861,4762,4934;	//Shields and left hand weapons
    	//setarray .Germent$,4741,4933,4861,4762,4934;	//Germent
    	//setarray .Shose$,4741,4933,4861,4762,4934;	//Shose
    	//setarray .Accessary$,4741,4933,4861,4762,4934;	//orbs id
    	//setarray .Upper$,4741,4933,4861,4762,4934;	//Accessary
    	setarray .Meio$,4700,4701,4702,4730,4731,4732,4740,4741,4742,4710,4711,4712,4720,4721,4722,4750,4751,4752,4760,4761,4806,4861,4862,4867,4870,4800,4871;	//Middel
    	//setarray .Lower$,4741,4933,4861,4762,4934;	//Lower
    	
    	//--------------------------------------------------------------//
    	//if you want to put specific IDs for kind of gear put it to 1
    	//--------------------------------------------------------------//
    	.specific_Weapons = false;
    	.specific_Armaduras = false;
    	.specific_Shields = false;
    	.specific_Germents = false;
    	.specific_Shoses = false;
    	.specific_Accessarys = false;
    	.specific_Uppers = false;
    	.specific_Meios = false;
    	.specific_Lowers = false;
    	
    	//--------------------------------------------------------------//
    	//if specific put the IDs here
    	//--------------------------------------------------------------//
    	setarray .Weapons$,1601,1201,1204,1207,1210,1213,1216,1219,1222,1247,1248,1249;	//right handed weapons
    	setarray .Armaduras$,2301,2303,2305,2307,2307,2309,2312,2314,2316,2321,2323,2325,2328,2330,2332;	//Armors
    	setarray .Shields$,2101,2103,2105,2107,2113,2117;	//Shields and left hand weapons
    	setarray .Germents$,2512,2501,2503,2505;	//Germents
    	setarray .Shoses$,2416,2401,2403,2405,2411;	//Shoses
    	setarray .Accessarys$,2628,2608,2609,2612,2613,2627;	//Accessarys
    	setarray .Uppers$,2206,2208,2211,2216;	//Uppers
    	setarray .Meios$,2204,2202;	//Meios
    	setarray .Lowers$,2628,2206;	//Lowers
    	
    	//--------------------------------------------------------------//
    	//if not specific put the black list IDs here (if you want
    	//--------------------------------------------------------------//
    	setarray .black_list$,2335,2338,2340,2341;
    	
    	//--------------------------------------------------------------//
    	//here you can make a specific slot number for each kind
    	//0 = all 4 slot ,1 = last 3 slot ,2 = last 2 slot ,3 = last 1 slot
    	//--------------------------------------------------------------//
    	.slot_count_Weapon = 0;
    	.slot_count_Armadura = 3;
    	.slot_count_Shield = 0;
    	.slot_count_Germent = 0;
    	.slot_count_Shose = 0;
    	.slot_count_Accessary = 0;
    	.slot_count_Upper = 0;
    	.slot_count_Meio = 3;
    	.slot_count_Lower = 0;
    	
    	//--------------------------------------------------------------//
    	//other configuration
    	//--------------------------------------------------------------//
    	setarray .s_level_required,0,175;	//the level required to use the npc
    	.s_only_vip = false;	//if you want only vip to use it put it to 1
    	setarray .success_chanse,100,100,100,100;	//success chanse [1st_slot_chanse,2nd_slot_chanse,3rd_slot_chanse,4th_slot_chanse]
    	.s_zeny = 5000000;	//if you don't want zeny requirment set it to 0
    	.s_zeny_remove = 10000000;	//this for enchantment reset
    	.item_is_required = false;	//if you want the orb it self to be required true = yes , false = no(if .chosse_orb = false this will be false too)
    	.s_enchant_overwrite = false;	//if true then you can overwrite the enchant
    	.progress_time = 1;	//the time that needed to wait until the socket end
    	.chosse_orb = false;	//false = random ,true = yes
    	.brack_chance = 0;	//the chanse that it will brack if it fail
    	.remove_enchant = true;	//false = no ,true = yes
    	.select_remove_orb = false;
    	//--------------------------------------------------------------//
    	//this will only show the items that the npc can enchant in a shop but no one can buy from it as long as you don't give them the value
    	//--------------------------------------------------------------//
    	.enable_the_shop = false;
    
    
    	
    	
    	
    	//--------------------------------------------------------------//
    	//Do not edit here
    	//--------------------------------------------------------------//
    	npcshopdelitem "enchantable_items_Weapon",512;
    	npcshopdelitem "enchantable_items_Armor",512;
    	npcshopdelitem "enchantable_items_Shield",512;
    	npcshopdelitem "enchantable_items_Germent",512;
    	npcshopdelitem "enchantable_items_Shose",512;
    	npcshopdelitem "enchantable_items_Accessary",512;
    	npcshopdelitem "enchantable_items_Upper",512;
    	npcshopdelitem "enchantable_items_Middel",512;
    	npcshopdelitem "enchantable_items_Lower",512;
    	
    	for (.@i = 0; .@i < getarraysize(.Weapons$); .@i++)
    			npcshopadditem "enchantable_items_Weapon", atoi(.Weapons$[.@i]),1;
    	for (.@i = 0; .@i < getarraysize(.Armors$); .@i++)
    			npcshopadditem "enchantable_items_Armor", atoi(.Armors$[.@i]),1;
    	for (.@i = 0; .@i < getarraysize(.Shields$); .@i++)
    			npcshopadditem "enchantable_items_Shield", atoi(.Shields$[.@i]),1;
    	for (.@i = 0; .@i < getarraysize(.Germents$); .@i++)
    			npcshopadditem "enchantable_items_Germent", atoi(.Germents$[.@i]),1;	
    	for (.@i = 0; .@i < getarraysize(.Shoses$); .@i++)
    			npcshopadditem "enchantable_items_Shose", atoi(.Shoses$[.@i]),1;	
    	for (.@i = 0; .@i < getarraysize(.Accessarys$); .@i++)
    			npcshopadditem "enchantable_items_Accessary", atoi(.Accessarys$[.@i]),1;	
    	for (.@i = 0; .@i < getarraysize(.Uppers$); .@i++)
    			npcshopadditem "enchantable_items_Upper", atoi(.Uppers$[.@i]),1;		
    	for (.@i = 0; .@i < getarraysize(.Middels$); .@i++)
    			npcshopadditem "enchantable_items_Middel", atoi(.Middels$[.@i]),1;	
    	for (.@i = 0; .@i < getarraysize(.Lowers$); .@i++)
    			npcshopadditem "enchantable_items_Lower", atoi(.Lowers$[.@i]),1;	
    	end;
    }
    -	pointshop	enchantable_items_Weapon	-1,#YOU_CAN_ENCHANT_Weapons,512:1;
    -	pointshop	enchantable_items_Armor	-1,#YOU_CAN_ENCHANT_Armors,512:1;
    -	pointshop	enchantable_items_Shield	-1,#YOU_CAN_ENCHANT_Shields,512:1;
    -	pointshop	enchantable_items_Germent	-1,#YOU_CAN_ENCHANT_Germents,512:1;
    -	pointshop	enchantable_items_Shose	-1,#YOU_CAN_ENCHANT_Shoses,512:1;
    -	pointshop	enchantable_items_Accessary	-1,#YOU_CAN_ENCHANT_Accessarys,512:1;
    -	pointshop	enchantable_items_Upper	-1,#YOU_CAN_ENCHANT_Uppers,512:1;
    -	pointshop	enchantable_items_Middel	-1,#YOU_CAN_ENCHANT_Middels,512:1;
    -	pointshop	enchantable_items_Lower	-1,#YOU_CAN_ENCHANT_Lowers,512:1;
    
    
    

    require item id: 7716

  9. 21 hours ago, Hakahay said:

    Unable to vote for the server. Err no. 3

     

    'PointsType'            => "vote", // credit, vote, cash

    @edit

    No solved.

    Not working, 'PointsType'            => "vote", // credit, vote, cash

  10. On 2/25/2019 at 5:41 AM, CyberDevil said:

    I have downgrade and recompile from GCC-8 to GCC-7 and the first warning is gone... I have only got this warning now:

    Do you think that by doing a downgrade from GCC-7 to GCC-6 I can solve or is it better to go directly to version 5?

    solved your problem?
  11. Error on click:

    [21:32:26][Error]: pc_readparam: Attempt to read unknown parameter '0'.
    [21:32:26][Error]: pc_readparam: Attempt to read unknown parameter '0'.
    [21:32:27][Error]: pc_readparam: Attempt to read unknown parameter '0'.
    [21:32:27][Error]: pc_readparam: Attempt to read unknown parameter '0'.
    [21:32:31][Error]: pc_readparam: Attempt to read unknown parameter '0'.
    [21:32:31][Error]: pc_readparam: Attempt to read unknown parameter '0'.
    [21:32:43][Error]: pc_readparam: Attempt to read unknown parameter '0'.
    [21:32:44][Error]: pc_readparam: Attempt to read unknown parameter '0'.
    [21:32:44][Error]: pc_readparam: Attempt to read unknown parameter '0'.
    [21:32:44][Error]: pc_readparam: Attempt to read unknown parameter '0'.
    [21:32:44][Error]: pc_readparam: Attempt to read unknown parameter '0'.
    [21:32:44][Error]: pc_readparam: Attempt to read unknown parameter '0'.
    [21:32:44][Error]: pc_readparam: Attempt to read unknown parameter '0'.
    [21:32:44][Error]: pc_readparam: Attempt to read unknown parameter '0'.
    [21:32:44][Error]: pc_readparam: Attempt to read unknown parameter '0'.
    [21:32:44][Error]: pc_readparam: Attempt to read unknown parameter '0'.
    [21:32:44][Error]: pc_readparam: Attempt to read unknown parameter '0'.
    [21:32:44][Error]: pc_readparam: Attempt to read unknown parameter '0'.
    [21:32:44][Error]: pc_readparam: Attempt to read unknown parameter '0'.
    [21:32:44][Error]: pc_readparam: Attempt to read unknown parameter '0'.
    [21:32:44][Error]: pc_readparam: Attempt to read unknown parameter '0'.
    [21:32:44][Error]: pc_readparam: Attempt to read unknown parameter '0'.
    [21:32:44][Error]: pc_readparam: Attempt to read unknown parameter '0'.
    [21:32:44][Error]: pc_readparam: Attempt to read unknown parameter '0'.
    [21:32:44][Error]: pc_readparam: Attempt to read unknown parameter '0'.
    [21:32:44][Error]: pc_readparam: Attempt to read unknown parameter '0'.
    [21:32:44][Error]: pc_readparam: Attempt to read unknown parameter '0'.
    [21:32:44][Error]: pc_readparam: Attempt to read unknown parameter '0'.
    [21:32:44][Error]: pc_readparam: Attempt to read unknown parameter '0'.
    [21:32:44][Error]: pc_readparam: Attempt to read unknown parameter '0'.
    [21:32:44][Error]: pc_readparam: Attempt to read unknown parameter '0'.
    [21:32:44][Error]: pc_readparam: Attempt to read unknown parameter '0'.
    [21:32:44][Error]: pc_readparam: Attempt to read unknown parameter '0'.
    [21:32:44][Error]: pc_readparam: Attempt to read unknown parameter '0'.
    [21:32:44][Error]: pc_readparam: Attempt to read unknown parameter '0'.
    [21:32:48][Error]: pc_readparam: Attempt to read unknown parameter '0'.
    [21:32:48][Error]: pc_readparam: Attempt to read unknown parameter '0'.
    [21:32:48][Error]: pc_readparam: Attempt to read unknown parameter '0'.
    [21:32:49][Error]: pc_readparam: Attempt to read unknown parameter '0'.
    [21:32:50][Error]: pc_readparam: Attempt to read unknown parameter '0'.
    [21:32:50][Error]: pc_readparam: Attempt to read unknown parameter '0'.
    [21:32:52][Error]: pc_readparam: Attempt to read unknown parameter '0'.
    [21:32:52][Error]: pc_readparam: Attempt to read unknown parameter '0'.
    [21:32:52][Error]: pc_readparam: Attempt to read unknown parameter '0'.
    [21:32:52][Error]: pc_readparam: Attempt to read unknown parameter '0'.
    [21:32:52][Error]: pc_readparam: Attempt to read unknown parameter '0'.
    [21:32:52][Error]: pc_readparam: Attempt to read unknown parameter '0'.
    [21:32:52][Error]: pc_readparam: Attempt to read unknown parameter '0'.
    [21:32:52][Error]: pc_readparam: Attempt to read unknown parameter '0'.
    [21:32:52][Error]: pc_readparam: Attempt to read unknown parameter '0'.
    [21:32:52][Error]: pc_readparam: Attempt to read unknown parameter '0'.
    [21:32:52][Error]: pc_readparam: Attempt to read unknown parameter '0'.
    [21:32:52][Error]: pc_readparam: Attempt to read unknown parameter '0'.
    [21:32:52][Error]: pc_readparam: Attempt to read unknown parameter '0'.
    [21:32:52][Error]: pc_readparam: Attempt to read unknown parameter '0'.
    [21:32:52][Error]: pc_readparam: Attempt to read unknown parameter '0'.
    [21:32:52][Error]: pc_readparam: Attempt to read unknown parameter '0'.
    [21:32:52][Error]: pc_readparam: Attempt to read unknown parameter '0'.
    [21:32:52][Error]: pc_readparam: Attempt to read unknown parameter '0'.
    [21:32:52][Error]: pc_readparam: Attempt to read unknown parameter '0'.
    [21:32:52][Error]: pc_readparam: Attempt to read unknown parameter '0'.
    [21:32:52][Error]: pc_readparam: Attempt to read unknown parameter '0'.
    [21:32:52][Error]: pc_readparam: Attempt to read unknown parameter '0'.
    [21:32:58][Error]: pc_readparam: Attempt to read unknown parameter '0'.

    Script:

    prontera,158,193,4	script	Curandeira	4_F_VALKYRIE,{
    percentheal 100,100;
    sc_start 32, 600000, 10; // Increase Agi	
    sc_start 30, 600000, 10; // Blessing.
    if(getgroupid() < 5){
    dispbottom "Você não é um membro vip, saiba mas sobre o sistema vip em nosso site!";
    end;
    }
    else {
    dispbottom "Obrigado por ser um membro VIP!";
    percentheal 100,100;
    sc_start 32, 600000, 10; // Increase Agi	
    sc_start 30, 600000, 10; // Blessing
    sc_start SC_ANGELUS, 600000,10;
    sc_start SC_IMPOSITIO,600000,5;
    sc_start SC_GLORIA,600000,5;
    sc_start SC_MAGNIFICAT,600000,5;
    sc_start SC_STRFOOD,600000,10;
    sc_start SC_AGIFOOD,600000,10;
    sc_start SC_VITFOOD,600000,10;
    sc_start SC_INTFOOD,600000,10;
    sc_start SC_DEXFOOD,600000,10;
    sc_start SC_LUKFOOD,600000,10;
    set @PC_LAST_ANN_TIME,gettimetick(2);
    end;
    }
    }

     

  12. Script:

    //===== rAthena Script =======================================
    //= Euphy's Quest Shop
    //===== By: ==================================================
    //= Euphy
    //===== Current Version: =====================================
    //= 1.6b
    //===== Compatible With: =====================================
    //= rAthena SVN r16862+
    //===== Description: =========================================
    //= A dynamic quest shop based on Lunar's, with easier config.
    //= Includes support for multiple shops & cashpoints.
    //= Item Preview script by ToastOfDoom.
    //===== Additional Comments: =================================
    //= 1.0 Initial script.
    //= 1.2 Added category support.
    //= 1.3 More options and fixes.
    //= 1.4 Added debug settings.
    //= 1.5 Replaced categories with shop IDs.
    //= 1.6 Added support for purchasing stackables.
    //= 1.6a Added support for previewing costumes and robes.
    //= 1.6b Added 'disable_items' command.
    //============================================================
    
    // Shop NPCs -- supplying no argument displays entire menu.
    //	callfunc "qshop"{,<shop ID>{,<shop ID>{,...}}};
    //============================================================
    prontera,164,171,3	script	Quest Shop#1	998,{ callfunc "qshop",1,2; }
    //prontera,147,174,5	script	Visual Shop#2	617,{ callfunc "qshop",2; }
    
    // Script Core
    //============================================================
    -	script	quest_shop	-1,{ 
    function Add; function Chk; function Slot; function A_An;
    OnInit:
    
    
    // -----------------------------------------------------------
    //  Basic shop settings.
    // -----------------------------------------------------------
    
    	set .Announce,1;	// Announce quest completion? (1: yes / 0: no)
    	set .ShowSlot,1;	// Show item slots? (2: all equipment / 1: if slots > 0 / 0: never)
    	set .ShowID,1;  	// Show item IDs? (1: yes / 0: no)
    	set .ShowZeny,0;	// Show Zeny cost, if any? (1: yes / 0: no)
    	set .MaxStack,100;	// Max number of quest items purchased at one time.
    
    // -----------------------------------------------------------
    //  Points variable -- optional quest requirement.
    //	setarray .Points$[0],"<variable name>","<display name>";
    // -----------------------------------------------------------
    
    	setarray .Points$[0],"#CASHPOINTS","Cash Points";
    
    // -----------------------------------------------------------
    //  Shop IDs -- to add shops, copy dummy data at bottom of file.
    //	setarray .Shops$[1],"<Shop 1>","<Shop 2>"{,...};
    // -----------------------------------------------------------
    
    	setarray .Shops$[1],"Quest","Quest 2";
    
    // -----------------------------------------------------------
    //  Quest items -- do NOT use a reward item more than once!
    //	Add(<shop ID>,<reward ID>,<reward amount>,
    //	    <Zeny cost>,<point cost>,
    //	    <required item ID>,<required item amount>{,...});
    // -----------------------------------------------------------
    	//quest
    	Add(1,5137,1,10000000,0,4523,10,7047,50,5141,1,1060,100);
    	Add(1,5170,1,10000000,0,5172,1,7063,100,982,1);
    	Add(1,5360,1,10000000,0,919,100,1096,100,7171,50,2213,1);
    	Add(1,5480,1,10000000,0,2233,1,916,100,983,10,982,10,976,10,975,10,978,10);
    	Add(1,18550,1,10000000,0,5170,1,7297,10,7291,10,7292,10);
    	Add(1,18561,1,10000000,0,5170,1,7297,5,7291,5,7292,5);
    	Add(1,5376,1,10000000,0,2255,1,983,10,7511,35,7340,35,923,25,1039,25);
    	Add(1,5361,1,10000000,0,5096,1,2218,1,911,10,507,75,7216,75,7563,150);
    	Add(1,5325,1,10000000,0,2263,5,2296,5,719,100,640,125);
    	Add(1,5463,1,10000000,0,975,5,976,5,978,5,979,5,981,5,983,5,982,5,980,5,1045,125);
    	Add(1,2589,1,10000000,0,7063,200,7441,200,1039,100,983,10);
    	Add(1,2576,1,10000000,0,16010,5,16001,3,976,25,975,25);
    	Add(1,18603,1,10000000,0,18507,1,1038,200,1039,200);
    	Add(1,2899,1,10000000,0,2701,2,4064,2,982,25);
    	Add(1,18536,1,10000000,0,7206,100,905,100,7263,100,976,10);
    	Add(1,5548,1,10000000,0,748,200,990,100,975,20);
    	Add(1,2855,1,10000000,0,7206,100,983,25,975,25,7263,100);
    	Add(1,19263,1,10000000,0,1168,1,7069,50,1527,1,6223,100,1413,1,616,25);
    	Add(1,15041,1,10000000,0,2347,1,7444,100,995,250,962,200);
    	Add(1,19118,1,10000000,0,2202,1,19117,1,713,250,4001,25,7297,25);
    	Add(1,19020,1,10000000,0,5480,1,996,200,4141,25,7292,25,7022,3);
    	Add(1,19021,1,10000000,0,1387,1,1490,1,2160,1,526,200,7053,250,4271,10,4270,10);
    	Add(1,28507,1,10000000,0,7169,3,2701,2,27122,10,4577,10,27161,10,914,200);
    	Add(1,28430,1,10000000,0,2729,2,4053,10,993,200);
    	Add(1,5907,1,10000000,0,1377,5,7022,5,7024,25,999,200);
    	Add(1,5933,1,10000000,0,2274,1,7205,200,983,25,975,25,7159,250);
    	Add(1,19112,1,10000000,0,2274,1,7159,150,7205,100,713,100);
    	//Add(2,5208,1,10000000,0,1006,150,4115,5,2254);
    	//Add(2,20859,1,10000000,0,1015,100,13047,3,4362,5,1059,200);
    	//Add(2,28433,1,10000000,0,4172,10,7297,25,991,200,7291,5);
    	//Add(2,2202,1,10000000,0,7717,1,2201,5);
    	//Add(2,2204,1,10000000,0,7717,1,2203,5);
    	
    	//Visual
    
    	
    	
    // -----------------------------------------------------------
    
    	freeloop(0);
    	set .menu$,"";
    	for(set .@i,1; .@i<=getarraysize(.Shops$); set .@i,.@i+1) {
    		set .menu$, .menu$+.Shops$[.@i]+":";
    		npcshopdelitem "qshop"+.@i,909;
    	}
    	end;
    
    OnMenu:
    	set .@size, getarraysize(@i);
    	if (!.@size) set .@i, select(.menu$);
    	else if (.@size == 1) set .@i, @i[0];
    	else {
    		for(set .@j,0; .@j<.@size; set .@j,.@j+1)
    			set .@menu$, .@menu$+.Shops$[@i[.@j]]+":";
    		set .@i, @i[select(.@menu$)-1];
    	}
    	deletearray @i[0],getarraysize(@i);
    	if (.Shops$[.@i] == "") {
    		message strcharinfo(0),"An error has occurred.";
    		end;
    	}
    	dispbottom "Select one item at a time.";
    	callshop "qshop"+.@i,1;
    	npcshopattach "qshop"+.@i;
    	end;
    
    OnBuyItem:
    	// .@q[] : RewardID, BoughtAmt, RewardAmt, BaseAmt, ReqZeny, ReqPts, { ReqItem, ReqAmt, ... }
    	setarray .@q[0],@bought_nameid[0],((@bought_quantity[0] > .MaxStack)?.MaxStack:@bought_quantity[0]);
    	copyarray .@q[3],getd(".q_"+.@q[0]+"[0]"),getarraysize(getd(".q_"+.@q[0]));
    	set .@q[2],.@q[1]*.@q[3];
    	if (!.@q[2] || .@q[2] > 30000) {
    		message strcharinfo(0),"You can't purchase that many "+getitemname(.@q[0])+".";
    		end;
    	}
    	mes "[Quest Shop]";
    	mes "Reward: ^0055FF"+((.@q[2] > 1)?.@q[2]+"x ":"")+Slot(.@q[0])+"^000000";
    	mes "Requirements:";
    	disable_items;
    	if (.@q[4]) mes " > "+Chk(Zeny,.@q[4]*.@q[1])+(.@q[4]*.@q[1])+" Zeny^000000";
    	if (.@q[5]) mes " > "+Chk(getd(.Points$[0]),.@q[5]*.@q[1])+(.@q[5]*.@q[1])+" "+.Points$[1]+" ("+getd(.Points$[0])+"/"+(.@q[5]*.@q[1])+")^000000";
    	if (.@q[6]) for(set .@i,6; .@i<getarraysize(.@q); set .@i,.@i+2)
    		mes " > "+Chk(countitem(.@q[.@i]),.@q[.@i+1]*.@q[1])+((.ShowID)?"{"+.@q[.@i]+"} ":"")+Slot(.@q[.@i])+" ("+countitem(.@q[.@i])+"/"+(.@q[.@i+1]*.@q[1])+")^000000";
    	next;
    	setarray @qe[1], getiteminfo(.@q[0],5), getiteminfo(.@q[0],11);
    	if (@qe[2] > 0 && ((@qe[1] & 1) || (@qe[1] & 256) || (@qe[1] & 512) || (@qe[1] & 1024) || (@qe[1] & 2048) || (@qe[1] & 4096) || (@qe[1] & 4) || (@qe[1] & 8192)))
    		set .@preview,1;
    	addtimer 1000, strnpcinfo(0)+"::OnEnd";
    	while(1) {
    		switch(select(" ~ Purchase ^0055FF"+getitemname(.@q[0])+"^000000:"+((.@preview && !@qe[7])?" ~ Preview...":"")+": ~ ^777777Cancel^000000")) {
    		case 1:
    			if (@qe[0]) { 
    				mes "[Quest Shop]";
    				mes "You're missing one or more quest requirements.";
    				close;
    			}
    			if (!checkweight(.@q[0],.@q[2])) {
    				mes "[Quest Shop]";
    				mes "^FF0000You need "+(((.@q[2]*getiteminfo(.@q[0],6))+Weight-MaxWeight)/10)+" additional weight capacity to complete this trade.^000000";
    				close;
    			}
    			if (.@q[4]) set Zeny, Zeny-(.@q[4]*.@q[1]);
    			if (.@q[5]) setd .Points$[0], getd(.Points$[0])-(.@q[5]*.@q[1]);
    			if (.@q[6]) for(set .@i,6; .@i<getarraysize(.@q); set .@i,.@i+2)
    				delitem .@q[.@i],.@q[.@i+1]*.@q[1];
    			getitem .@q[0],.@q[2];
    			if (.Announce) announce strcharinfo(0)+" has created "+((.@q[2] > 1)?.@q[2]+"x "+getitemname(.@q[0]):A_An(getitemname(.@q[0])))+"!",0;
    			specialeffect2 EF_FLOWERLEAF;
    			close;
    		case 2:
    			setarray @qe[3], getlook(LOOK_HEAD_BOTTOM), getlook(LOOK_HEAD_TOP), getlook(LOOK_HEAD_MID), getlook(LOOK_ROBE), 1;
    			if ((@qe[1] & 1) || (@qe[1] & 4096)) changelook LOOK_HEAD_BOTTOM, @qe[2];
    			else if ((@qe[1] & 256) || (@qe[1] & 1024)) changelook LOOK_HEAD_TOP, @qe[2];
    			else if ((@qe[1] & 512) || (@qe[1] & 2048)) changelook LOOK_HEAD_MID, @qe[2];
    			else if ((@qe[1] & 4) || (@qe[1] & 8192)) changelook LOOK_ROBE, @qe[2];
    			break;
    		case 3:
    			close;
    		}
    	}
    
    OnEnd:
    	if (@qe[7]) {
    		changelook LOOK_HEAD_BOTTOM, @qe[3];
    		changelook LOOK_HEAD_TOP, @qe[4];
    		changelook LOOK_HEAD_MID, @qe[5];
    		changelook LOOK_ROBE, @qe[6];
    	}
    	deletearray @qe[0],8;
    	end;
    
    function Add {
    	if (getitemname(getarg(1)) == "null") {
    		debugmes "Quest reward #"+getarg(1)+" invalid (skipped).";
    		return;
    	}
    	setarray .@j[0],getarg(2),getarg(3),getarg(4);
    	for(set .@i,5; .@i<getargcount(); set .@i,.@i+2) {
    		if (getitemname(getarg(.@i)) == "null") {
    			debugmes "Quest requirement #"+getarg(.@i)+" invalid (skipped).";
    			return;
    		} else
    			setarray .@j[.@i-2],getarg(.@i),getarg(.@i+1);
    	}
    	copyarray getd(".q_"+getarg(1)+"[0]"),.@j[0],getarraysize(.@j);
    	npcshopadditem "qshop"+getarg(0),getarg(1),((.ShowZeny)?getarg(3):0);
    	return;
    }
    
    function Chk {
    	if (getarg(0) < getarg(1)) {
    		set @qe[0],1;
    		return "^FF0000";
    	} else
    		return "^00FF00";
    }
    
    function Slot {
    	set .@s$,getitemname(getarg(0));
    	switch(.ShowSlot) {
    		case 1: if (!getitemslots(getarg(0))) return .@s$;
    		case 2: if (getiteminfo(getarg(0),2) == 4 || getiteminfo(getarg(0),2) == 5) return .@s$+" ["+getitemslots(getarg(0))+"]";
    		default: return .@s$;
    	}
    }
    
    function A_An {
    	setarray .@A$[0],"a","e","i","o","u";
    	set .@B$, "_"+getarg(0);
    	for(set .@i,0; .@i<5; set .@i,.@i+1)
    		if (compare(.@B$,"_"+.@A$[.@i])) return "an "+getarg(0);
    	return "a "+getarg(0);
    }
    }
    
    function	script	qshop	{
    	deletearray @i[0],getarraysize(@i);
    	for(set .@i,0; .@i<getargcount(); set .@i,.@i+1)
    		set @i[.@i],getarg(.@i);
    	doevent "quest_shop::OnMenu";
    	end;
    }
    
    // Dummy shop data -- copy as needed.
    //============================================================
    -	shop	qshop1	-1,909:-1
    -	shop	qshop2	-1,909:-1
    -	shop	qshop3	-1,909:-1
    -	shop	qshop4	-1,909:-1
    -	shop	qshop5	-1,909:-1

    Error:

     

    quest.png

  13. i modified this script:

    //---------Favor Não retirar os Créditos----------------------------//
    //------------------Filipesaj-------------------------------------------------//
    //-------------------------------------------------------------------------------//
    
    prontera,147,170,5	script	Brosnan	794,{
    mes "^FF0000["+strnpcinfo(1)+"]^000000";
    mes "Sou um encantador profissonal!";
    mes "Posso ativar as pedras secretas de encantamento no seu item.";
    next;
    mes "^FF0000["+strnpcinfo(1)+"]^000000";
    mes "Quanto maior a raridade do encantamento, melhores serão seus bônus.";
    next;
    switch(select("[^339966+^000000]Encantar.:[^FF0000-^000000]Informações."))
    
    {
    case 1:
    next;
    mes "^FF0000["+strnpcinfo(1)+"]^000000";
    mes "Em qual Slot deseja encantar o seu equipamento?";
    mes "^FF0000Apenas o slot 4 é encantavel.^000000";
    input @encan;
    if(@encan>=5) goto maiorque4;
    if(@encan==4) goto iguala4;
    if(@encan==3) goto iguala3;
    if(@encan==2) goto iguala2;
    if(@encan==1) goto iguala1;
    if(@encan==0) goto iguala0;
    close;
    OnInit:
    waitingroom "Desativado até manutenção",0,"",0;
    end;
    
    case 2:
    next;
    mes "^FF0000["+strnpcinfo(1)+"]^000000";
    mes "^0000FFEncantamento^000000";
    mes "Necessário: <ITEM>Ticket encantamento<INFO>7717</INFO></ITEM>";
    mes "Que Pode ser obtidos:";
    mes "- ^FF0000Cash Shop^000000";
    mes "- ^FF0000Eventos^000000";
    close;
    end;
    }
    
    iguala4:
    next;
    mes "^FF0000["+strnpcinfo(1)+"]^000000";
    mes "Tem certeza que deseja encantar sua armadura no slot número 4?";
    switch(select("[^339966+^000000]Sim.:[^FF0000-^000000]Não."))
    {
    case 1:
    if (countitem(7717)<1) {
    set .@item, getequipid(EQI_HEAD_MID);
    set .@rand_bonus, rand(4700,4759);
    set .@refine, getequiprefinerycnt(EQI_HEAD_MID);
    set .@cardid, getequipcardid(EQI_HEAD_MID,0);
    set .@cardid1, getequipcardid(EQI_HEAD_MID,1);
    set .@cardid2, getequipcardid(EQI_HEAD_MID,2);
    if(getequipisequiped(EQI_HEAD_MID)==0)goto noarmo;
    unequip EQI_HEAD_MID;
    delitem 7717,1;
    delitem .@item,1;
    mes "Encantado com Sucesso: "+getitemname(.@rand_bonus);
    getitem2 .@item,1,1,.@refine,0, .@cardid, .@cardid1, .@cardid2, .@rand_bonus;
    specialeffect2 454;
    next;
    mes "^FF0000["+strnpcinfo(1)+"]^000000";
    mes "Parabéns, Seu item foi encantado com Sucesso!";
    close;
    }
    end;
    
    case 2:
    next;
    mes "^FF0000["+strnpcinfo(1)+"]^000000";
    mes "Volte quando quizer!";
    close;
    end;
    }
    
    
    
    iguala3:
    next;
    mes "^FF0000["+strnpcinfo(1)+"]^000000";
    mes "Desculpe, mas ainda não foi descoberto como encantar no Slot 1.";
    mes "Dizem que esse encantamento é uma lenda!";
    close;
    end;
    
    iguala2:
    next;
    mes "^FF0000["+strnpcinfo(1)+"]^000000";
    mes "Desculpe, mas ainda não foi descoberto como encantar no Slot 1.";
    mes "Dizem que esse encantamento é uma lenda!";
    close;
    end;
    
    iguala1:
    next;
    mes "^FF0000["+strnpcinfo(1)+"]^000000";
    mes "Desculpe, mas ainda não foi descoberto como encantar no Slot 1.";
    mes "Dizem que esse encantamento é uma lenda!";
    close;
    end;
    
    iguala0:
    next;
    mes "^FF0000["+strnpcinfo(1)+"]^000000";
    mes "Não existe Slot 0!";
    close;
    end;
    
    maiorque4:
    next;
    mes "^FF0000["+strnpcinfo(1)+"]^000000";
    mes "Não existe Slot maior que 4!";
    close;
    end;
    
    noitem:
    next;
    mes "^FF0000["+strnpcinfo(1)+"]^000000";
    mes "Você não tem o item necessário para realizar o procedimento.";
    next;
    mes "^FF0000["+strnpcinfo(1)+"]^000000";
    mes "Item Necessário: ^339966Ticket Encantamento^000000.";
    close;
    
    noarmo:
    next;
    mes "^FF0000["+strnpcinfo(1)+"]^000000";
    mes "Você não esta usando ^339966Armadura^000000.";
    close;
    }

    if (countitem(7717)<1)

    Require item id: 7717

    Error enchant map_server:

    [Error]: buildin_delitem: failed to delete 1 items (AID=2000001 item_id=7717).
    [Debug]: Source (NPC): Brosnan at prontera (147,170)

     

  14. I am use this script:

    //----------------------------------------------------------------------
    // Desenvolvedor: Fou-lu
    // Script desenvolvido em especial para a comunidade Cronus.
    //
    //----------------------------- DESCRIÇÃO ------------------------------
    // Sistema de presença automático que comporta diversos tipos de
    // configurações para atender ao máximo os diversos servidores.
    //
    // A presença do jogador já é contada ao logar no servidor, sem
    // depender de ficar falando com NPC ou ativando através de comando.
    // Para o jogador checar seus pontos de presença ou quanto tempo
    // faltam para ganhar mais pontos, basta utilizar o comando "@presença".
    //
    //----------------------------------------------------------------------
    
    -	script	SistemaPresenca	-1,{
    	
    	OnInit:    
    		bindatcmd "presença",strnpcinfo(3)+"::OnAtcommand";       
    
    //--------------------------- CONFIGURAÇÕES ----------------------------
    // Tempo para ganho de ponto. (Em minutos)
    	set .tempo, 60;
    // O tempo é resetado ao se deslogar? (1 = sim, 0 = não)
    	set .reset, 0;
    // Tempo máximo em segundos aceito em AFK. (Utilize valor 0 para aceitar jogadores AFK)
    	set .afk, 6000;
    // Defina se será aceito @autotrade, em caso de se permitir jogador AFK. 
    // 0 = É aceito.
    // 1 = Não é aceito personagem em @autotrade.
    // 2 = Não é aceito personagem com loja aberta, mesmo que sem @autotrade.
    	set .loja, 2;
    //
    //----------------------------------------------------------------------
    //----------------- NPC de Troca de Pontos por Itens -------------------
    	
    	initnpctimer;
    	end;
    	
    	OnAtcommand:
    		mes "[Sistema Presença]";
    		if (#PontosPresenca) {
    			mes "Você possui " + #PontosPresenca + " ponto(s) de presença.";
    		}
    		else {
    			mes "Você não possui pontos de presença.";
    		}
    		mes "Falta(m) "+ (.tempo - #TempoPresenca) +" minuto(s) para você ganhar 1 ponto de presença.";
    		mes "Você ganha 1 ponto de presença por cada " + .tempo + " minutos online.";
    		if (.reset) mes "Seu tempo para ganho de ponto é reiniciado ao se deslogar.";
    		if (.afk) mes "Ao ficar AFK o tempo de presença não é contado.";
    		if (.loja == 1) mes "Personagens em @autotrade o tempo de presença não é contado.";
    		if (.loja == 2) mes "Personagens com lojas abertas o tempo de presença não é contado.";
    		close;
    	
    	OnTimer60000:
    		stopnpctimer;
    		query_sql("SELECT account_id FROM `char` WHERE online = 1", .@account_id);
    		for (set .@i, 0; .@i < getarraysize(.@account_id); .@i++) {
    			if (attachrid(.@account_id[.@i])) {
    				if( 
    				(.afk && checkidle(strcharinfo(0)) > .afk) || 
    				(.loja && ((.loja == 1 && checkvending(strcharinfo(0)) == 2) || (.loja == 2 && checkvending(strcharinfo(0))))) 
    				) {
    					break;
    				}
    					
    				set #TempoPresenca, #TempoPresenca + 1;
    				if (#TempoPresenca >= .tempo) {
    					set #PontosPresenca, #PontosPresenca + 1;
    					set #TempoPresenca, 0;
    				}
    				detachrid;
    			}
    		}
    		initnpctimer;
    		end;
    		
    	OnPCLogoutEvent:    
    		if (.reset) {
    			set #TempoPresenca, 0;
    		}
    		end;
    }
    
    //------------------ NPC Troca de Pontos por Itens ---------------------
    prontera,164,174,3	script	Loja Presença	833,{
    
    	mes "[Itens por Presença]";
    	if (#PontosPresenca) {
    		mes "Você possui " + #PontosPresenca + " ponto(s) de presença.";
    	}
    	else {
    		mes "Você não possui pontos de presença.";
    	}
    	next;
    	for (set .@i, 0; .@i < getarraysize(.itemid); .@i++) {
    		set .@menu$, .@menu$ + getitemname(.itemid[.@i]) + "(" + .qtd[.@i] + ") = " + .pontos[.@i] + " pt(s)";
    		if ((.@i+1) != getarraysize(.itemid)) {
    			set .@menu$, .@menu$ + ":";
    		}
    	}
    	if (prompt(.@menu$) != 255) {
    		set @menu, @menu - 1;
    		mes "[Itens por Presença]";
    		if (#PontosPresenca < .pontos[@menu]) {
    			mes "Você não possui pontos suficientes.";
    		}
    		else if (!checkweight(.itemid[@menu],.qtd[@menu])) {
    			mes "Você não possui capacidade de peso suficiente.";
    		}
    		else {
    			mes "Tome seu item " + getitemname(.itemid[@menu]) + ".";
    			getitem .itemid[@menu],.qtd[@menu];
    			set #PontosPresenca, #PontosPresenca - .pontos[@menu];
    		}
    		close;
    	}
    	end;
    
    	OnInit: 
    //----------------- CONFIGURAÇÃO NPC TROCA DE PONTOS -------------------
    // Escreva o id do item, pontos necessários para se obter e a quantidade 
    // ganha que serão exibidos no NPC de recompensas.
    // Você pode aumentar e diminuir a quantidade de itens disponiveis, porem
    // se atentando a ordem entre as arrays. Ou seja, o item ID na primeira
    // posição da array ".itemid" custará os pontos presentes na primeira
    // posição da array ".pontos", onde será recebida a quantidade do item
    // determinada na primeira posição da array ".qtd". Assim por diante com
    // o segundo item, terceiro item e etc. Lembre-se que todas as 3 arrays 
    // precisam ter o mesmo tamanho.
    //
    // ID dos Itens
    	setarray .itemid,7711,7712,7713,6423,6417,6456,6457,673;
    // Pontos Requeridos
    	setarray .pontos,15,35,65,5,5,5,5,5;
    // Quantidade Ganha
    	setarray .qtd,1,1,1,5,5,1,1,1;
    
    	end;
    }

     

    how do add ip block or MAC ?

     

  15. Utilize o sistema vip do rathena.

    Com esta item_db2_re.sql no seu phpmyadmin

    INSERT INTO `item_db2_re` (`id`, `name_english`, `name_japanese`, `type`, `price_buy`, `price_sell`, `weight`, `atk:matk`, `defence`, `range`, `slots`, `equip_jobs`, `equip_upper`, `equip_genders`, `equip_locations`, `weapon_level`, `equip_level`, `refineable`, `view`, `script`, `equip_script`, `unequip_script`) VALUES
    (7711, 'Ticket_Vip#1', 'Ticket Vip #1', 2, 10000, NULL, 10, NULL, NULL, NULL, NULL, 4294967295, 63, 2, NULL, NULL, NULL, NULL, NULL, 'atcommand \"@vip +1d/j \"+strcharinfo(0)+\"\";', NULL, NULL),
    (7712, 'Ticket_Vip#7', 'Ticket Vip #7', 2, 10000, NULL, 10, NULL, NULL, NULL, NULL, 4294967295, 63, 2, NULL, NULL, NULL, NULL, NULL, 'atcommand \"@vip +7d/j \"+strcharinfo(0)+\"\";', NULL, NULL),
    (7713, 'Ticket_Vip#30', 'Ticket Vip #30', 2, 10000, NULL, 10, NULL, NULL, NULL, NULL, 4294967295, 63, 2, NULL, NULL, NULL, NULL, NULL, 'atcommand \"@vip +30d/j \"+strcharinfo(0)+\"\";', NULL, NULL);

    Estava com mesmo problema e foi simples de resolver tão simples que nem imaginava que este seria o problema:

    Troquei o "equip_upper"  de 7 para 63

    E funcionou sem erros!

×
×
  • Create New...