Jump to content
  • 0

Npc conflict sader's Enchantment and Card Remove


Gladius

Question


  • Group:  Members
  • Topic Count:  12
  • Topics Per Day:  0.01
  • Content Count:  235
  • Reputation:   63
  • Joined:  04/29/19
  • Last Seen:  

Hi Guys

I need help ? 
Sader's npc Enchantment has conflict with the original npc "card remove" from rathena.

It is possible to remove the enchantament by using card remove, lol.
Script: https://rathena.org/board/files/file/3602-saders-enchantment-npc/

How do I add the function for that?

My script: (pt-br) i modified him to recognize VIP players

prt_in,28,73,4	script	Velha Sábia	78,{
	
set .vip_needed, 5; //Nível necessário de VIP para acessar os recursos especias do NPC

	if (getgroupid() < .vip_needed) {
	mes "^00B2EE[Velha Sábia]^000000";
	mes "Eu tenho o poder de remover cartas que já foram usadas nos seus equipamentos. Essa idéia pode ajudá-lo?";
	next;
	switch(select("^3CB371[»]^000000 Continuar:^FFA500[»]^000000 Informaçoes:^ff0000[»]^000000 Desistir")) {
		case 1:
			mes "^00B2EE[Velha Sábia]^000000";
			mes "Tudo bem. Qual ítem quer que eu examine para voce?";
			next;

			setarray .@position$[1], "Acessório (Direita)","Sapatos","Capa","Cabeça (Baixo)","Cabeça (Meio)","Cabeça (Topo)","Armadura","Mao Direita","Mao Esquerda","Visual","Visual","Visual";
			set .@menu$,"";
			for( set .@i,1; .@i <= 10; set .@i,.@i+1 )
			{
				if( getequipisequiped(.@i) )
					set .@menu$, .@menu$ + .@position$[.@i] + " - " + "[" + getequipname(.@i) + "]";
				set .@menu$, .@menu$ + ":";
			}
			set .@part,select(.@menu$);

			mes "^00B2EE[Velha Sábia]^000000";

			if(!getequipisequiped(.@part))
			{
				mes "Meu jovem, equipe algo para que eu possa trabalhar. nao posso fazer nada por voce assim.";
				close;
			}

			set .@cardcount,getequipcardcnt(.@part);
			if(!.@cardcount)
			{
				mes "Meu jovem, nao há cartas equipadas neste ítem. nao posso trabalhar assim!";
				close;
			}

			if ( !checkweight(1202,(.@cardcount+1)) )
			{ 
				mes "^3355FFAguarde um momento!";
				mes "Eu nao posso oferecer meus serviços a voce pois está com excesso de peso ou itens no iventário.";
				close;
			}
			mes "Esse ítem tem " + .@cardcount + " cartas equipadas.";
			mes "Para melhorar minha magia, sao necessários " + (200000+(.@cardcount * 25000)) + " zeny,";
			mes "um ^0000FFFragmento Estelar^000000, e uma ^0000FFGema Amarela^000000.";
			next;
			mes "^00B2EE[Velha Sábia]^000000";
			if(select("^3CB371[»]^000000 Continuar:^ff0000[»]^000000 Desistir") == 2)
			{
				mes "Muito bem, agradeço por utilizar os meus serviços!";
				close;
			}
			if((Zeny < (200000+(.@cardcount * 25000))) || (countitem(1000) < 1) || (countitem(715) < 1))
			{	
				next;
				mes "Voce nao tem tudo que é necessário para a minha mágica, garot"+(sex > 0 ? "o" : "a")+". Volte quando conseguí-los.";
				close;
			}
			
			next;
			mes "^00B2EE[Velha Sábia]^000000";
			mes "Muito vem, vamos começar!.";
			set Zeny,Zeny - (200000+(.@cardcount * 25000));
			delitem 1000,1;
			delitem 715,1;

			successremovecards .@part;
			next;
			mes "^00B2EE[Velha Sábia]^000000";
			mes "O processo foi um grande sucesso. Tome suas cartas e seus ítens.";
			close;			

		case 2:
			next;
			mes "^00B2EE[Velha Sábia]^000000";
			mes "Eu preciso de 200000 zeny, mais 25000 zeny para cada carta removida de seus ítens. E adicionalmente, preciso de um Fragmento Estelar e uma Gema Amarela para trabalhar com a minha mágica.";
			close;

		case 3:
			next;
			mes "^00B2EE[Velha Sábia]^000000";
			mes "Muito bem, volte quando precisar dos meus serviços.";
			close;
	}
	}
	else {
	mes "^00B2EE[Velha Sábia]^000000";
	mes "Eu tenho o poder de remover cartas que já foram usadas nos seus equipamentos. Essa idéia pode ajudá-lo?";
	next;
	switch(select("^3CB371[»]^000000 Continuar:^ff0000[»]^000000 Desistir")) {
		case 1:
			mes "^00B2EE[Velha Sábia]^000000";
			mes "Tudo bem. Qual ítem quer que eu examine para voce?";
			next;

			setarray .@position$[1], "Acessório (Direita)","Sapatos","Capa","Cabeça (Baixo)","Cabeça (Meio)","Cabeça (Topo)","Armadura","Mao Direita","Mao Esquerda","Visual","Visual","Visual";
			set .@menu$,"";
			for( set .@i,1; .@i <= 10; set .@i,.@i+1 )
			{
				if( getequipisequiped(.@i) )
					set .@menu$, .@menu$ + .@position$[.@i] + " - " + "[" + getequipname(.@i) + "]";
				set .@menu$, .@menu$ + ":";
			}
			set .@part,select(.@menu$);

			mes "^00B2EE[Velha Sábia]^000000";

			if(!getequipisequiped(.@part))
			{
				mes "Meu jovem, equipe algo para que eu possa trabalhar. nao posso fazer nada por voce assim.";
				close;
			}

			set .@cardcount,getequipcardcnt(.@part);
			if(!.@cardcount)
			{
				mes "Meu jovem, nao há cartas equipadas neste ítem. nao posso trabalhar assim!";
				close;
			}

			if ( !checkweight(1202,(.@cardcount+1)) )
			{ 
				mes "^3355FFAguarde um momento!";
				mes "Eu nao posso oferecer meus serviços a voce pois está com excesso de peso ou itens no iventário.";
				close;
			}
			mes "Esse ítem tem " + .@cardcount + " cartas equipadas.";
			next;
			mes "^00B2EE[Velha Sábia]^000000";
			if(select("^3CB371[»]^000000 Continuar:^ff0000[»]^000000 Desistir") == 2)
			{
				mes "Muito bem, agradeço por utilizar os meus serviços!";
				close;
			}
			next;
			mes "^00B2EE[Velha Sábia]^000000";
			mes "Muito vem, vamos começar!.";

			successremovecards .@part;
			next;
			mes "^00B2EE[Velha Sábia]^000000";
			mes "O processo foi um grande sucesso. Tome suas cartas e seus ítens.";
			close;			


		case 2:
			mes "^00B2EE[Velha Sábia]^000000";
			mes "Muito bem, volte quando precisar dos meus serviços.";
			close;
	}
	}
	}

prontera,133,201,5	duplicate(Velha Sábia)	Velha Sábia#2	78

 Id enchantaments, I added a few extras

4709,4719,4729,4739,4749,4759,4760,4761,4806,4811,4810,4809,4808,4820,4821,4822,4823,4824,4825,4832,4833,4834,4835,4836,4837,4838,4839,4840,4841,4818,4817,4816,4843,4844,4815,4814,4813,4812,4826,4827,4828,4829,4830,4831,4933,4934,4935,4859,4860,4762,4763,4807,4842,4869,4872,4873,4881,4861,4862,4867,4868,4900,4863,4864,4865,4866

 

@sader1992 I would like to know how to add a lock to enchant weapons in the shield hand (assassin cross use) in sader's Enchantment could you help?

Edited by Gladius
Link to comment
Share on other sites

21 answers to this question

Recommended Posts

  • 0

  • Group:  Content Moderator
  • Topic Count:  55
  • Topics Per Day:  0.02
  • Content Count:  1676
  • Reputation:   702
  • Joined:  12/21/14
  • Last Seen:  

that depend on what you want to do

do you want that people can't put enchantment on the card slot if exist or you want the players to not be able to remove the enchantment but still can put it in empty card slot ?

you can do both

to not allow the enchantment to be in an empty card slot , you get the slot number of the enchantment npc and check if it's a card slot or it's no slot

to not allow to remove the enchantment you need to edit the card removal to check if the item the player want to remove is a card or not (item type 6)

Edited by sader1992
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  12
  • Topics Per Day:  0.01
  • Content Count:  235
  • Reputation:   63
  • Joined:  04/29/19
  • Last Seen:  

14 minutes ago, sader1992 said:

that depend on what you want to do

do you want that people can't put enchantment on the card slot if exist or you want the players to not be able to remove the enchantment but still can put it in empty card slot ?

you can do both

to not allow the enchantment to be in an empty card slot , you get the slot number of the enchantment npc and check if it's a card slot or it's no slot

to not allow to remove the enchantment you need to edit the card removal to check if the item the player want to remove is a card or not (item type 6)

You did not understand ?

I do not want the players to remove the enchantment by the card remover.
I want them to use your npc. I set it up for price, etc.

But I have discovered that it is possible to remove the enchantment by using the card remover.
so I need a restriction on the card remover, so as not to remove the enchantment.

 

Another problem I had is that I removed the enchantment from the weapons, I just left it for equipment.
but if a asassin uses a weapon in the shield's hand, he manages to enchant. I need a restraint for that too.

Link to comment
Share on other sites

  • 0

  • Group:  Content Moderator
  • Topic Count:  55
  • Topics Per Day:  0.02
  • Content Count:  1676
  • Reputation:   702
  • Joined:  12/21/14
  • Last Seen:  

do you use the random options system ?

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  12
  • Topics Per Day:  0.01
  • Content Count:  235
  • Reputation:   63
  • Joined:  04/29/19
  • Last Seen:  

27 minutes ago, sader1992 said:

do you use the random options system ?

Yes

Link to comment
Share on other sites

  • 0

  • Group:  Content Moderator
  • Topic Count:  55
  • Topics Per Day:  0.02
  • Content Count:  1676
  • Reputation:   702
  • Joined:  12/21/14
  • Last Seen:  

i didn't test it , i am sure i have some syntax not right xD

test it first

prt_in,28,73,4	script	Velha Sábia	78,{
	
set .vip_needed, 5; //Nível necessário de VIP para acessar os recursos especias do NPC

	if (getgroupid() < .vip_needed) {
	mes "^00B2EE[Velha Sábia]^000000";
	mes "Eu tenho o poder de remover cartas que já foram usadas nos seus equipamentos. Essa idéia pode ajudá-lo?";
	next;
	switch(select("^3CB371[»]^000000 Continuar:^FFA500[»]^000000 Informaçoes:^ff0000[»]^000000 Desistir")) {
		case 1:
			mes "^00B2EE[Velha Sábia]^000000";
			mes "Tudo bem. Qual ítem quer que eu examine para voce?";
			next;

			setarray .@position$[1], "Acessório (Direita)","Sapatos","Capa","Cabeça (Baixo)","Cabeça (Meio)","Cabeça (Topo)","Armadura","Mao Direita","Mao Esquerda","Visual","Visual","Visual";
			set .@menu$,"";
			for( set .@i,1; .@i <= 10; set .@i,.@i+1 )
			{
				if( getequipisequiped(.@i) )
					set .@menu$, .@menu$ + .@position$[.@i] + " - " + "[" + getequipname(.@i) + "]";
				set .@menu$, .@menu$ + ":";
			}
			set .@part,select(.@menu$);

			mes "^00B2EE[Velha Sábia]^000000";

			if(!getequipisequiped(.@part))
			{
				mes "Meu jovem, equipe algo para que eu possa trabalhar. nao posso fazer nada por voce assim.";
				close;
			}

			set .@cardcount,getequipcardcnt(.@part);
			if(!.@cardcount)
			{
				mes "Meu jovem, nao há cartas equipadas neste ítem. nao posso trabalhar assim!";
				close;
			}

			if ( !checkweight(1202,(.@cardcount+1)) )
			{ 
				mes "^3355FFAguarde um momento!";
				mes "Eu nao posso oferecer meus serviços a voce pois está com excesso de peso ou itens no iventário.";
				close;
			}
			mes "Esse ítem tem " + .@cardcount + " cartas equipadas.";
			mes "Para melhorar minha magia, sao necessários " + (200000+(.@cardcount * 25000)) + " zeny,";
			mes "um ^0000FFFragmento Estelar^000000, e uma ^0000FFGema Amarela^000000.";
			next;
			mes "^00B2EE[Velha Sábia]^000000";
			if(select("^3CB371[»]^000000 Continuar:^ff0000[»]^000000 Desistir") == 2)
			{
				mes "Muito bem, agradeço por utilizar os meus serviços!";
				close;
			}
			if((Zeny < (200000+(.@cardcount * 25000))) || (countitem(1000) < 1) || (countitem(715) < 1))
			{	
				next;
				mes "Voce nao tem tudo que é necessário para a minha mágica, garot"+(sex > 0 ? "o" : "a")+". Volte quando conseguí-los.";
				close;
			}
			
			next;
			mes "^00B2EE[Velha Sábia]^000000";
			mes "Muito vem, vamos começar!.";
			
			getinventorylist;
			if((.@ndx = inarray(@inventorylist_equip,.@part)) != -1){
				
				if(getiteminfo(@inventorylist_card1[.@ndx],2) == 6){
					.@cards[1] = 0; .@gets[1] = @inventorylist_card1[.@ndx];
				}else{//card slot 1 is not a card so there is no cards in this item.
					mes "you don't have cards in this item";
					end;
				}
				
				if(getiteminfo(@inventorylist_card2[.@ndx],2) == 6){
					.@cards[2] = 0; .@gets[2] = @inventorylist_card2[.@ndx];
				}else
					.@cards[2] = @inventorylist_card2[.@ndx];
				
				if(getiteminfo(@inventorylist_card3[.@ndx],2) == 6){
					.@cards[3] = 0; .@gets[3] = @inventorylist_card3[.@ndx];
				}else
					.@cards[3] = @inventorylist_card3[.@ndx];
				
				if(getiteminfo(@inventorylist_card4[.@ndx],2) == 6){
					.@cards[4] = 0; .@gets[4] = @inventorylist_card4[.@ndx];
				}else
					.@cards[4] = @inventorylist_card4[.@ndx];
				
				//card detected so we get the requirment first before we go on.
				set Zeny,Zeny - (200000+(.@cardcount * 25000));
				delitem 1000,1;
				delitem 715,1;
				delequip .@part;//delete the equipment
				
				//building the random options
		setarray .@ids,@inventorylist_option_id1[.@ndx],@inventorylist_option_id2[.@ndx],@inventorylist_option_id3[.@ndx],@inventorylist_option_id4[.@ndx],@inventorylist_option_id5[.@ndx];
		setarray .@values,@inventorylist_option_value1[.@ndx],@inventorylist_option_value2[.@ndx],@inventorylist_option_value3[.@ndx],@inventorylist_option_value4[.@ndx],@inventorylist_option_value5[.@ndx];
		setarray .@parameters,@inventorylist_option_parameter1[.@ndx],@inventorylist_option_parameter2[.@ndx],@inventorylist_option_parameter3[.@ndx],@inventorylist_option_parameter4[.@ndx],@inventorylist_option_parameter5[.@ndx];
		
		//get new equipment
		getitem3 @inventorylist_id[.@ndx],1,@inventorylist_identify[.@ndx],@inventorylist_refine[.@ndx],@inventorylist_attribute[.@ndx],
			.@cards[1],.@cards[2],.@cards[3],.@cards[4],.@ids,.@values,.@parameters;
				for(.@i=0;.@i<getarraysize(.@gets);.@i++){
					if(.@gets[.@i]){
						getitem .@gets[.@i],1;
					}
				}
		
				next;
				mes "^00B2EE[Velha Sábia]^000000";
				mes "O processo foi um grande sucesso. Tome suas cartas e seus ítens.";
				close;
			}
			end;
		case 2:
			next;
			mes "^00B2EE[Velha Sábia]^000000";
			mes "Eu preciso de 200000 zeny, mais 25000 zeny para cada carta removida de seus ítens. E adicionalmente, preciso de um Fragmento Estelar e uma Gema Amarela para trabalhar com a minha mágica.";
			close;

		case 3:
			next;
			mes "^00B2EE[Velha Sábia]^000000";
			mes "Muito bem, volte quando precisar dos meus serviços.";
			close;
	}
	}
	else {
	mes "^00B2EE[Velha Sábia]^000000";
	mes "Eu tenho o poder de remover cartas que já foram usadas nos seus equipamentos. Essa idéia pode ajudá-lo?";
	next;
	switch(select("^3CB371[»]^000000 Continuar:^ff0000[»]^000000 Desistir")) {
		case 1:
			mes "^00B2EE[Velha Sábia]^000000";
			mes "Tudo bem. Qual ítem quer que eu examine para voce?";
			next;

			setarray .@position$[1], "Acessório (Direita)","Sapatos","Capa","Cabeça (Baixo)","Cabeça (Meio)","Cabeça (Topo)","Armadura","Mao Direita","Mao Esquerda","Visual","Visual","Visual";
			set .@menu$,"";
			for( set .@i,1; .@i <= 10; set .@i,.@i+1 )
			{
				if( getequipisequiped(.@i) )
					set .@menu$, .@menu$ + .@position$[.@i] + " - " + "[" + getequipname(.@i) + "]";
				set .@menu$, .@menu$ + ":";
			}
			set .@part,select(.@menu$);

			mes "^00B2EE[Velha Sábia]^000000";

			if(!getequipisequiped(.@part))
			{
				mes "Meu jovem, equipe algo para que eu possa trabalhar. nao posso fazer nada por voce assim.";
				close;
			}

			set .@cardcount,getequipcardcnt(.@part);
			if(!.@cardcount)
			{
				mes "Meu jovem, nao há cartas equipadas neste ítem. nao posso trabalhar assim!";
				close;
			}

			if ( !checkweight(1202,(.@cardcount+1)) )
			{ 
				mes "^3355FFAguarde um momento!";
				mes "Eu nao posso oferecer meus serviços a voce pois está com excesso de peso ou itens no iventário.";
				close;
			}
			mes "Esse ítem tem " + .@cardcount + " cartas equipadas.";
			next;
			mes "^00B2EE[Velha Sábia]^000000";
			if(select("^3CB371[»]^000000 Continuar:^ff0000[»]^000000 Desistir") == 2)
			{
				mes "Muito bem, agradeço por utilizar os meus serviços!";
				close;
			}
			next;
			mes "^00B2EE[Velha Sábia]^000000";
			mes "Muito vem, vamos começar!.";

			getinventorylist;
			if((.@ndx = inarray(@inventorylist_equip,.@part)) != -1){
				
				if(getiteminfo(@inventorylist_card1[.@ndx],2) == 6){
					.@cards[1] = 0; .@gets[1] = @inventorylist_card1[.@ndx];
				}else{//card slot 1 is not a card so there is no cards in this item.
					mes "you don't have cards in this item";
					end;
				}
				
				if(getiteminfo(@inventorylist_card2[.@ndx],2) == 6){
					.@cards[2] = 0; .@gets[2] = @inventorylist_card2[.@ndx];
				}else
					.@cards[2] = @inventorylist_card2[.@ndx];
				
				if(getiteminfo(@inventorylist_card3[.@ndx],2) == 6){
					.@cards[3] = 0; .@gets[3] = @inventorylist_card3[.@ndx];
				}else
					.@cards[3] = @inventorylist_card3[.@ndx];
				
				if(getiteminfo(@inventorylist_card4[.@ndx],2) == 6){
					.@cards[4] = 0; .@gets[4] = @inventorylist_card4[.@ndx];
				}else
					.@cards[4] = @inventorylist_card4[.@ndx];
				
				delequip .@part;//delete the equipment
				
				//building the random options
		setarray .@ids,@inventorylist_option_id1[.@ndx],@inventorylist_option_id2[.@ndx],@inventorylist_option_id3[.@ndx],@inventorylist_option_id4[.@ndx],@inventorylist_option_id5[.@ndx];
		setarray .@values,@inventorylist_option_value1[.@ndx],@inventorylist_option_value2[.@ndx],@inventorylist_option_value3[.@ndx],@inventorylist_option_value4[.@ndx],@inventorylist_option_value5[.@ndx];
		setarray .@parameters,@inventorylist_option_parameter1[.@ndx],@inventorylist_option_parameter2[.@ndx],@inventorylist_option_parameter3[.@ndx],@inventorylist_option_parameter4[.@ndx],@inventorylist_option_parameter5[.@ndx];
		
		//get new equipment
		getitem3 @inventorylist_id[.@ndx],1,@inventorylist_identify[.@ndx],@inventorylist_refine[.@ndx],@inventorylist_attribute[.@ndx],
			.@cards[1],.@cards[2],.@cards[3],.@cards[4],.@ids,.@values,.@parameters;
				for(.@i=0;.@i<getarraysize(.@gets);.@i++){
					if(.@gets[.@i]){
						getitem .@gets[.@i],1;
					}
				}
		
				next;
				mes "^00B2EE[Velha Sábia]^000000";
				mes "O processo foi um grande sucesso. Tome suas cartas e seus ítens.";
				close;
			}
			end;

		case 2:
			mes "^00B2EE[Velha Sábia]^000000";
			mes "Muito bem, volte quando precisar dos meus serviços.";
			close;
	}
	}
	}

prontera,133,201,5	duplicate(Velha Sábia)	Velha Sábia#2	78

just so you know this the edit

	getinventorylist;
	if((.@ndx = inarray(@inventorylist_equip,.@part)) != -1){
		
		if(getiteminfo(@inventorylist_card1[.@ndx],2) == 6){
			.@cards[1] = 0; .@gets[1] = @inventorylist_card1[.@ndx];
		}else{//card slot 1 is not a card so there is no cards in this item.
			mes "you don't have cards in this item";
			end;
		}
		
		if(getiteminfo(@inventorylist_card2[.@ndx],2) == 6){
			.@cards[2] = 0; .@gets[2] = @inventorylist_card2[.@ndx];
		}else
			.@cards[2] = @inventorylist_card2[.@ndx];
		
		if(getiteminfo(@inventorylist_card3[.@ndx],2) == 6){
			.@cards[3] = 0; .@gets[3] = @inventorylist_card3[.@ndx];
		}else
			.@cards[3] = @inventorylist_card3[.@ndx];
		
		if(getiteminfo(@inventorylist_card4[.@ndx],2) == 6){
			.@cards[4] = 0; .@gets[4] = @inventorylist_card4[.@ndx];
		}else
			.@cards[4] = @inventorylist_card4[.@ndx];
		
		//card detected so we get the requirment first before we go on.
		set Zeny,Zeny - (200000+(.@cardcount * 25000));
		delitem 1000,1;
		delitem 715,1;
		delequip .@part;//delete the equipment
		
		//building the random options
		setarray .@ids,@inventorylist_option_id1[.@ndx],@inventorylist_option_id2[.@ndx],@inventorylist_option_id3[.@ndx],@inventorylist_option_id4[.@ndx],@inventorylist_option_id5[.@ndx];
		setarray .@values,@inventorylist_option_value1[.@ndx],@inventorylist_option_value2[.@ndx],@inventorylist_option_value3[.@ndx],@inventorylist_option_value4[.@ndx],@inventorylist_option_value5[.@ndx];
		setarray .@parameters,@inventorylist_option_parameter1[.@ndx],@inventorylist_option_parameter2[.@ndx],@inventorylist_option_parameter3[.@ndx],@inventorylist_option_parameter4[.@ndx],@inventorylist_option_parameter5[.@ndx];
		
		//get new equipment
		getitem3 @inventorylist_id[.@ndx],1,@inventorylist_identify[.@ndx],@inventorylist_refine[.@ndx],@inventorylist_attribute[.@ndx],
			.@cards[1],.@cards[2],.@cards[3],.@cards[4],.@ids,.@values,.@parameters;
		for(.@i=0;.@i<getarraysize(.@gets);.@i++){
			if(.@gets[.@i] != 0){
				getitem .@gets[.@i],1;
			}
		}
		end;
	}

so basically we get the inventory list , search for the item , check for it's card slots , if it's type 6 than it's a card , we remove it if it's else , we leave it

that we delete the equipment and getitem3 the new equipment to the player , and we give him the cards we removed

 

 

this just given me an idea for rathena command ?

Edited by sader1992
.@i = .@ndx
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  12
  • Topics Per Day:  0.01
  • Content Count:  235
  • Reputation:   63
  • Joined:  04/29/19
  • Last Seen:  

16 minutes ago, sader1992 said:

i didn't test it , i am sure i have some syntax not right xD

test it first


prt_in,28,73,4	script	Velha Sábia	78,{
	
set .vip_needed, 5; //Nível necessário de VIP para acessar os recursos especias do NPC

	if (getgroupid() < .vip_needed) {
	mes "^00B2EE[Velha Sábia]^000000";
	mes "Eu tenho o poder de remover cartas que já foram usadas nos seus equipamentos. Essa idéia pode ajudá-lo?";
	next;
	switch(select("^3CB371[»]^000000 Continuar:^FFA500[»]^000000 Informaçoes:^ff0000[»]^000000 Desistir")) {
		case 1:
			mes "^00B2EE[Velha Sábia]^000000";
			mes "Tudo bem. Qual ítem quer que eu examine para voce?";
			next;

			setarray .@position$[1], "Acessório (Direita)","Sapatos","Capa","Cabeça (Baixo)","Cabeça (Meio)","Cabeça (Topo)","Armadura","Mao Direita","Mao Esquerda","Visual","Visual","Visual";
			set .@menu$,"";
			for( set .@i,1; .@i <= 10; set .@i,.@i+1 )
			{
				if( getequipisequiped(.@i) )
					set .@menu$, .@menu$ + .@position$[.@i] + " - " + "[" + getequipname(.@i) + "]";
				set .@menu$, .@menu$ + ":";
			}
			set .@part,select(.@menu$);

			mes "^00B2EE[Velha Sábia]^000000";

			if(!getequipisequiped(.@part))
			{
				mes "Meu jovem, equipe algo para que eu possa trabalhar. nao posso fazer nada por voce assim.";
				close;
			}

			set .@cardcount,getequipcardcnt(.@part);
			if(!.@cardcount)
			{
				mes "Meu jovem, nao há cartas equipadas neste ítem. nao posso trabalhar assim!";
				close;
			}

			if ( !checkweight(1202,(.@cardcount+1)) )
			{ 
				mes "^3355FFAguarde um momento!";
				mes "Eu nao posso oferecer meus serviços a voce pois está com excesso de peso ou itens no iventário.";
				close;
			}
			mes "Esse ítem tem " + .@cardcount + " cartas equipadas.";
			mes "Para melhorar minha magia, sao necessários " + (200000+(.@cardcount * 25000)) + " zeny,";
			mes "um ^0000FFFragmento Estelar^000000, e uma ^0000FFGema Amarela^000000.";
			next;
			mes "^00B2EE[Velha Sábia]^000000";
			if(select("^3CB371[»]^000000 Continuar:^ff0000[»]^000000 Desistir") == 2)
			{
				mes "Muito bem, agradeço por utilizar os meus serviços!";
				close;
			}
			if((Zeny < (200000+(.@cardcount * 25000))) || (countitem(1000) < 1) || (countitem(715) < 1))
			{	
				next;
				mes "Voce nao tem tudo que é necessário para a minha mágica, garot"+(sex > 0 ? "o" : "a")+". Volte quando conseguí-los.";
				close;
			}
			
			next;
			mes "^00B2EE[Velha Sábia]^000000";
			mes "Muito vem, vamos começar!.";
			
			getinventorylist;
			if((.@ndx = inarray(@inventorylist_equip,.@part)) != -1){
				
				if(getiteminfo(@inventorylist_card1[.@ndx],2) == 6){
					.@cards[1] = 0; .@gets[1] = @inventorylist_card1[.@ndx];
				}else{//card slot 1 is not a card so there is no cards in this item.
					mes "you don't have cards in this item";
					end;
				}
				
				if(getiteminfo(@inventorylist_card2[.@ndx],2) == 6){
					.@cards[2] = 0; .@gets[2] = @inventorylist_card2[.@ndx];
				}else
					.@cards[2] = @inventorylist_card2[.@ndx];
				
				if(getiteminfo(@inventorylist_card3[.@ndx],2) == 6){
					.@cards[3] = 0; .@gets[3] = @inventorylist_card3[.@ndx];
				}else
					.@cards[3] = @inventorylist_card3[.@ndx];
				
				if(getiteminfo(@inventorylist_card4[.@ndx],2) == 6){
					.@cards[4] = 0; .@gets[4] = @inventorylist_card4[.@ndx];
				}else
					.@cards[4] = @inventorylist_card4[.@ndx];
				
				//card detected so we get the requirment first before we go on.
				set Zeny,Zeny - (200000+(.@cardcount * 25000));
				delitem 1000,1;
				delitem 715,1;
				delequip .@part;//delete the equipment
				
				//building the random options
		setarray .@ids,@inventorylist_option_id1[.@ndx],@inventorylist_option_id2[.@ndx],@inventorylist_option_id3[.@ndx],@inventorylist_option_id4[.@ndx],@inventorylist_option_id5[.@ndx];
		setarray .@values,@inventorylist_option_value1[.@ndx],@inventorylist_option_value2[.@ndx],@inventorylist_option_value3[.@ndx],@inventorylist_option_value4[.@ndx],@inventorylist_option_value5[.@ndx];
		setarray .@parameters,@inventorylist_option_parameter1[.@ndx],@inventorylist_option_parameter2[.@ndx],@inventorylist_option_parameter3[.@ndx],@inventorylist_option_parameter4[.@ndx],@inventorylist_option_parameter5[.@ndx];
		
		//get new equipment
		getitem3 @inventorylist_id[.@ndx],1,@inventorylist_identify[.@ndx],@inventorylist_refine[.@ndx],@inventorylist_attribute[.@ndx],
			.@cards[1],.@cards[2],.@cards[3],.@cards[4],.@ids,.@values,.@parameters;
				for(.@i=0;.@i<getarraysize(.@gets);.@i++){
					if(.@gets[.@i]){
						getitem .@gets[.@i],1;
					}
				}
		
				next;
				mes "^00B2EE[Velha Sábia]^000000";
				mes "O processo foi um grande sucesso. Tome suas cartas e seus ítens.";
				close;
			}
			end;
		case 2:
			next;
			mes "^00B2EE[Velha Sábia]^000000";
			mes "Eu preciso de 200000 zeny, mais 25000 zeny para cada carta removida de seus ítens. E adicionalmente, preciso de um Fragmento Estelar e uma Gema Amarela para trabalhar com a minha mágica.";
			close;

		case 3:
			next;
			mes "^00B2EE[Velha Sábia]^000000";
			mes "Muito bem, volte quando precisar dos meus serviços.";
			close;
	}
	}
	else {
	mes "^00B2EE[Velha Sábia]^000000";
	mes "Eu tenho o poder de remover cartas que já foram usadas nos seus equipamentos. Essa idéia pode ajudá-lo?";
	next;
	switch(select("^3CB371[»]^000000 Continuar:^ff0000[»]^000000 Desistir")) {
		case 1:
			mes "^00B2EE[Velha Sábia]^000000";
			mes "Tudo bem. Qual ítem quer que eu examine para voce?";
			next;

			setarray .@position$[1], "Acessório (Direita)","Sapatos","Capa","Cabeça (Baixo)","Cabeça (Meio)","Cabeça (Topo)","Armadura","Mao Direita","Mao Esquerda","Visual","Visual","Visual";
			set .@menu$,"";
			for( set .@i,1; .@i <= 10; set .@i,.@i+1 )
			{
				if( getequipisequiped(.@i) )
					set .@menu$, .@menu$ + .@position$[.@i] + " - " + "[" + getequipname(.@i) + "]";
				set .@menu$, .@menu$ + ":";
			}
			set .@part,select(.@menu$);

			mes "^00B2EE[Velha Sábia]^000000";

			if(!getequipisequiped(.@part))
			{
				mes "Meu jovem, equipe algo para que eu possa trabalhar. nao posso fazer nada por voce assim.";
				close;
			}

			set .@cardcount,getequipcardcnt(.@part);
			if(!.@cardcount)
			{
				mes "Meu jovem, nao há cartas equipadas neste ítem. nao posso trabalhar assim!";
				close;
			}

			if ( !checkweight(1202,(.@cardcount+1)) )
			{ 
				mes "^3355FFAguarde um momento!";
				mes "Eu nao posso oferecer meus serviços a voce pois está com excesso de peso ou itens no iventário.";
				close;
			}
			mes "Esse ítem tem " + .@cardcount + " cartas equipadas.";
			next;
			mes "^00B2EE[Velha Sábia]^000000";
			if(select("^3CB371[»]^000000 Continuar:^ff0000[»]^000000 Desistir") == 2)
			{
				mes "Muito bem, agradeço por utilizar os meus serviços!";
				close;
			}
			next;
			mes "^00B2EE[Velha Sábia]^000000";
			mes "Muito vem, vamos começar!.";

			getinventorylist;
			if((.@ndx = inarray(@inventorylist_equip,.@part)) != -1){
				
				if(getiteminfo(@inventorylist_card1[.@ndx],2) == 6){
					.@cards[1] = 0; .@gets[1] = @inventorylist_card1[.@ndx];
				}else{//card slot 1 is not a card so there is no cards in this item.
					mes "you don't have cards in this item";
					end;
				}
				
				if(getiteminfo(@inventorylist_card2[.@ndx],2) == 6){
					.@cards[2] = 0; .@gets[2] = @inventorylist_card2[.@ndx];
				}else
					.@cards[2] = @inventorylist_card2[.@ndx];
				
				if(getiteminfo(@inventorylist_card3[.@ndx],2) == 6){
					.@cards[3] = 0; .@gets[3] = @inventorylist_card3[.@ndx];
				}else
					.@cards[3] = @inventorylist_card3[.@ndx];
				
				if(getiteminfo(@inventorylist_card4[.@ndx],2) == 6){
					.@cards[4] = 0; .@gets[4] = @inventorylist_card4[.@ndx];
				}else
					.@cards[4] = @inventorylist_card4[.@ndx];
				
				delequip .@part;//delete the equipment
				
				//building the random options
		setarray .@ids,@inventorylist_option_id1[.@ndx],@inventorylist_option_id2[.@ndx],@inventorylist_option_id3[.@ndx],@inventorylist_option_id4[.@ndx],@inventorylist_option_id5[.@ndx];
		setarray .@values,@inventorylist_option_value1[.@ndx],@inventorylist_option_value2[.@ndx],@inventorylist_option_value3[.@ndx],@inventorylist_option_value4[.@ndx],@inventorylist_option_value5[.@ndx];
		setarray .@parameters,@inventorylist_option_parameter1[.@ndx],@inventorylist_option_parameter2[.@ndx],@inventorylist_option_parameter3[.@ndx],@inventorylist_option_parameter4[.@ndx],@inventorylist_option_parameter5[.@ndx];
		
		//get new equipment
		getitem3 @inventorylist_id[.@ndx],1,@inventorylist_identify[.@ndx],@inventorylist_refine[.@ndx],@inventorylist_attribute[.@ndx],
			.@cards[1],.@cards[2],.@cards[3],.@cards[4],.@ids,.@values,.@parameters;
				for(.@i=0;.@i<getarraysize(.@gets);.@i++){
					if(.@gets[.@i]){
						getitem .@gets[.@i],1;
					}
				}
		
				next;
				mes "^00B2EE[Velha Sábia]^000000";
				mes "O processo foi um grande sucesso. Tome suas cartas e seus ítens.";
				close;
			}
			end;

		case 2:
			mes "^00B2EE[Velha Sábia]^000000";
			mes "Muito bem, volte quando precisar dos meus serviços.";
			close;
	}
	}
	}

prontera,133,201,5	duplicate(Velha Sábia)	Velha Sábia#2	78

just so you know this the edit


	getinventorylist;
	if((.@ndx = inarray(@inventorylist_equip,.@part)) != -1){
		
		if(getiteminfo(@inventorylist_card1[.@ndx],2) == 6){
			.@cards[1] = 0; .@gets[1] = @inventorylist_card1[.@ndx];
		}else{//card slot 1 is not a card so there is no cards in this item.
			mes "you don't have cards in this item";
			end;
		}
		
		if(getiteminfo(@inventorylist_card2[.@ndx],2) == 6){
			.@cards[2] = 0; .@gets[2] = @inventorylist_card2[.@ndx];
		}else
			.@cards[2] = @inventorylist_card2[.@ndx];
		
		if(getiteminfo(@inventorylist_card3[.@ndx],2) == 6){
			.@cards[3] = 0; .@gets[3] = @inventorylist_card3[.@ndx];
		}else
			.@cards[3] = @inventorylist_card3[.@ndx];
		
		if(getiteminfo(@inventorylist_card4[.@ndx],2) == 6){
			.@cards[4] = 0; .@gets[4] = @inventorylist_card4[.@ndx];
		}else
			.@cards[4] = @inventorylist_card4[.@ndx];
		
		//card detected so we get the requirment first before we go on.
		set Zeny,Zeny - (200000+(.@cardcount * 25000));
		delitem 1000,1;
		delitem 715,1;
		delequip .@part;//delete the equipment
		
		//building the random options
		setarray .@ids,@inventorylist_option_id1[.@ndx],@inventorylist_option_id2[.@ndx],@inventorylist_option_id3[.@ndx],@inventorylist_option_id4[.@ndx],@inventorylist_option_id5[.@ndx];
		setarray .@values,@inventorylist_option_value1[.@ndx],@inventorylist_option_value2[.@ndx],@inventorylist_option_value3[.@ndx],@inventorylist_option_value4[.@ndx],@inventorylist_option_value5[.@ndx];
		setarray .@parameters,@inventorylist_option_parameter1[.@ndx],@inventorylist_option_parameter2[.@ndx],@inventorylist_option_parameter3[.@ndx],@inventorylist_option_parameter4[.@ndx],@inventorylist_option_parameter5[.@ndx];
		
		//get new equipment
		getitem3 @inventorylist_id[.@ndx],1,@inventorylist_identify[.@ndx],@inventorylist_refine[.@ndx],@inventorylist_attribute[.@ndx],
			.@cards[1],.@cards[2],.@cards[3],.@cards[4],.@ids,.@values,.@parameters;
		for(.@i=0;.@i<getarraysize(.@gets);.@i++){
			if(.@gets[.@i] != 0){
				getitem .@gets[.@i],1;
			}
		}
		end;
	}

so basically we get the inventory list , search for the item , check for it's card slots , if it's type 6 than it's a card , we remove it if it's else , we leave it

that we delete the equipment and getitem3 the new equipment to the player , and we give him the cards we removed

 

 

this just given me an idea for rathena command ?

image.thumb.png.70ec465ed3b6cde3a70a43265900e0eb.png

Link to comment
Share on other sites

  • 0

  • Group:  Content Moderator
  • Topic Count:  55
  • Topics Per Day:  0.02
  • Content Count:  1676
  • Reputation:   702
  • Joined:  12/21/14
  • Last Seen:  

how old is your rathena ?

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  12
  • Topics Per Day:  0.01
  • Content Count:  235
  • Reputation:   63
  • Joined:  04/29/19
  • Last Seen:  

5 minutes ago, sader1992 said:

how old is your rathena ?

yes

Link to comment
Share on other sites

  • 0

  • Group:  Content Moderator
  • Topic Count:  55
  • Topics Per Day:  0.02
  • Content Count:  1676
  • Reputation:   702
  • Joined:  12/21/14
  • Last Seen:  

5 minutes ago, Gladius said:

yes

replace the

if((.@ndx = inarray(@inventorylist_equip,.@part)) != -1){

(don't forget the "}")

with

	for(.@i = 0;.@i<@inventorylist_count;.@i++){
		if(@inventorylist_equip[.@i] == .@part){
			.@ndx = .@i;
			break;
		}
	}

 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  12
  • Topics Per Day:  0.01
  • Content Count:  235
  • Reputation:   63
  • Joined:  04/29/19
  • Last Seen:  

11 minutes ago, sader1992 said:

replace the


if((.@ndx = inarray(@inventorylist_equip,.@part)) != -1){

(don't forget the "}")

with


	for(.@i = 0;.@i<@inventorylist_count;.@i++){
		if(@inventorylist_equip[.@i] == .@part){
			.@ndx = .@i;
			break;
		}
	}

 

 

I think I did it wrong hahahah

 

//===== eAthena Script ======================================= 
//= Card Removal NPC
//===== By: ================================================== 
//= TyrNemesis^
//===== Current Version: ===================================== 
//= 1.3a CR / 1.2 eA
//===== Compatible With: ===================================== 
//= eAthena SVN
//===== Description: ========================================= 
//= Removes cards from equipped items.
//===== Additional Comments: ================================= 
//= 1.0 First version. [TyrNemesis^]
//= 1.2 Optimized and fixed getequipname menu. [Kisuka]
//= 1.2b Traduzido para o Portugues. [ ??? ]
//			Remova os // caso deseja incluír a falha no NPC
//= 1.3 Corrigidos erros de portugues, semi-otimizado [Keoy]
//= 1.3a Pequeno erro no menu corrigido [Keoy]
//============================================================ 

prt_in,28,73,4	script	Velha Sábia	78,{

set .vip_needed, 5; //Nível necessário de VIP para acessar os recursos especias do NPC

	if (getgroupid() < .vip_needed) {
	mes "^00B2EE[Velha Sábia]^000000";
	mes "Eu tenho o poder de remover cartas que já foram usadas nos seus equipamentos. Essa idéia pode ajudá-lo?";
	next;
	switch(select("^3CB371[»]^000000 Continuar:^FFA500[»]^000000 Informaçoes:^ff0000[»]^000000 Desistir")) {
		case 1:
			mes "^00B2EE[Velha Sábia]^000000";
			mes "Tudo bem. Qual ítem quer que eu examine para voce?";
			next;

			setarray .@position$[1], "Acessório (Direita)","Sapatos","Capa","Cabeça (Baixo)","Cabeça (Meio)","Cabeça (Topo)","Armadura","Mao Direita","Mao Esquerda","Visual","Visual","Visual";
			set .@menu$,"";
			for( set .@i,1; .@i <= 10; set .@i,.@i+1 )
			{
				if( getequipisequiped(.@i) )
					set .@menu$, .@menu$ + .@position$[.@i] + " - " + "[" + getequipname(.@i) + "]";
				set .@menu$, .@menu$ + ":";
			}
			set .@part,select(.@menu$);

			mes "^00B2EE[Velha Sábia]^000000";

			if(!getequipisequiped(.@part))
			{
				mes "Meu jovem, equipe algo para que eu possa trabalhar. não posso fazer nada por voce assim.";
				close;
			}

			set .@cardcount,getequipcardcnt(.@part);
			if(!.@cardcount)
			{
				mes "Meu jovem, não há cartas equipadas neste ítem. não posso trabalhar assim!";
				close;
			}

			if ( !checkweight(1202,(.@cardcount+1)) )
			{ 
				mes "^3355FFAguarde um momento!";
				mes "Eu não posso oferecer meus serviços a voce pois está com excesso de peso ou itens no iventário.";
				close;
			}
			mes "Esse ítem tem " + .@cardcount + " cartas equipadas.";
			mes "Para melhorar minha magia, sao necessários " + (200000+(.@cardcount * 25000)) + " zeny,";
			mes "um ^0000FFFragmento Estelar^000000, e uma ^0000FFGema Amarela^000000.";
			next;
			mes "^00B2EE[Velha Sábia]^000000";
			if(select("^3CB371[»]^000000 Continuar:^ff0000[»]^000000 Desistir") == 2)
			{
				mes "Muito bem, agradeço por utilizar os meus serviços!";
				close;
			}
			if((Zeny < (200000+(.@cardcount * 25000))) || (countitem(1000) < 1) || (countitem(715) < 1))
			{	
				next;
				mes "Voce não tem tudo que é necessário para a minha mágica, garot"+(sex > 0 ? "o" : "a")+". Volte quando conseguí-los.";
				close;
			}
			
			next;
			mes "^00B2EE[Velha Sábia]^000000";
			mes "Muito bem, vamos começar!.";

	getinventorylist;
		for(.@i = 0;.@i<@inventorylist_count;.@i++){
		if(@inventorylist_equip[.@i] == .@part){
			.@ndx = .@i;
			break;
		}
	}
		
		if(getiteminfo(@inventorylist_card1[.@ndx],2) == 6){
			.@cards[1] = 0; .@gets[1] = @inventorylist_card1[.@ndx];
		}else{//card slot 1 is not a card so there is no cards in this item.
			mes "you don't have cards in this item";
			end;
		}
		
		if(getiteminfo(@inventorylist_card2[.@ndx],2) == 6){
			.@cards[2] = 0; .@gets[2] = @inventorylist_card2[.@ndx];
		}else
			.@cards[2] = @inventorylist_card2[.@ndx];
		
		if(getiteminfo(@inventorylist_card3[.@ndx],2) == 6){
			.@cards[3] = 0; .@gets[3] = @inventorylist_card3[.@ndx];
		}else
			.@cards[3] = @inventorylist_card3[.@ndx];
		
		if(getiteminfo(@inventorylist_card4[.@ndx],2) == 6){
			.@cards[4] = 0; .@gets[4] = @inventorylist_card4[.@ndx];
		}else
			.@cards[4] = @inventorylist_card4[.@ndx];
		
		//card detected so we get the requirment first before we go on.
		set Zeny,Zeny - (200000+(.@cardcount * 25000));
		delitem 1000,1;
		delitem 715,1;
		delequip .@part;//delete the equipment
		
		//building the random options
		setarray .@ids,@inventorylist_option_id1[.@ndx],@inventorylist_option_id2[.@ndx],@inventorylist_option_id3[.@ndx],@inventorylist_option_id4[.@ndx],@inventorylist_option_id5[.@ndx];
		setarray .@values,@inventorylist_option_value1[.@ndx],@inventorylist_option_value2[.@ndx],@inventorylist_option_value3[.@ndx],@inventorylist_option_value4[.@ndx],@inventorylist_option_value5[.@ndx];
		setarray .@parameters,@inventorylist_option_parameter1[.@ndx],@inventorylist_option_parameter2[.@ndx],@inventorylist_option_parameter3[.@ndx],@inventorylist_option_parameter4[.@ndx],@inventorylist_option_parameter5[.@ndx];
		
		//get new equipment
		getitem3 @inventorylist_id[.@ndx],1,@inventorylist_identify[.@ndx],@inventorylist_refine[.@ndx],@inventorylist_attribute[.@ndx],
			.@cards[1],.@cards[2],.@cards[3],.@cards[4],.@ids,.@values,.@parameters;
		for(.@i=0;.@i<getarraysize(.@gets);.@i++){
			if(.@gets[.@i] != 0){
				getitem .@gets[.@i],1;
			}
		}
		end;
			
			next;
			mes "^00B2EE[Velha Sábia]^000000";
			mes "O processo foi um grande sucesso. Tome suas cartas e seus ítens.";
			close;			

		case 2:
			next;
			mes "^00B2EE[Velha Sábia]^000000";
			mes "Eu preciso de 200000 zeny, mais 25000 zeny para cada carta removida de seus ítens. E adicionalmente, preciso de um Fragmento Estelar e uma Gema Amarela para trabalhar com a minha mágica.";
			close;

		case 3:
			next;
			mes "^00B2EE[Velha Sábia]^000000";
			mes "Muito bem, volte quando precisar dos meus serviços.";
			close;
	}
	} //vip
	else {
	mes "^00B2EE[Velha Sábia]^000000";
	mes "Eu tenho o poder de remover cartas que já foram usadas nos seus equipamentos. Essa idéia pode ajudá-lo?";
	next;
	switch(select("^3CB371[»]^000000 Continuar:^ff0000[»]^000000 Desistir")) {
		case 1:
			mes "^00B2EE[Velha Sábia]^000000";
			mes "Tudo bem. Qual ítem quer que eu examine para voce?";
			next;

			setarray .@position$[1], "Acessório (Direita)","Sapatos","Capa","Cabeça (Baixo)","Cabeça (Meio)","Cabeça (Topo)","Armadura","Mao Direita","Mao Esquerda","Visual","Visual","Visual";
			set .@menu$,"";
			for( set .@i,1; .@i <= 10; set .@i,.@i+1 )
			{
				if( getequipisequiped(.@i) )
					set .@menu$, .@menu$ + .@position$[.@i] + " - " + "[" + getequipname(.@i) + "]";
				set .@menu$, .@menu$ + ":";
			}
			set .@part,select(.@menu$);

			mes "^00B2EE[Velha Sábia]^000000";

			if(!getequipisequiped(.@part))
			{
				mes "Meu jovem, equipe algo para que eu possa trabalhar. não posso fazer nada por voce assim.";
				close;
			}

			set .@cardcount,getequipcardcnt(.@part);
			if(!.@cardcount)
			{
				mes "Meu jovem, não há cartas equipadas neste ítem. não posso trabalhar assim!";
				close;
			}

			if ( !checkweight(1202,(.@cardcount+1)) )
			{ 
				mes "^3355FFAguarde um momento!";
				mes "Eu não posso oferecer meus serviços a voce pois está com excesso de peso ou itens no iventário.";
				close;
			}
			mes "Esse ítem tem " + .@cardcount + " cartas equipadas.";
			next;
			mes "^00B2EE[Velha Sábia]^000000";
			if(select("^3CB371[»]^000000 Continuar:^ff0000[»]^000000 Desistir") == 2)
			{
				mes "Muito bem, agradeço por utilizar os meus serviços!";
				close;
			}
			next;
			mes "^00B2EE[Velha Sábia]^000000";
			mes "Muito vem, vamos começar!.";

			successremovecards .@part;
			next;
			mes "^00B2EE[Velha Sábia]^000000";
			mes "O processo foi um grande sucesso. Tome suas cartas e seus ítens.";
			close;			


		case 2:
			mes "^00B2EE[Velha Sábia]^000000";
			mes "Muito bem, volte quando precisar dos meus serviços.";
			close;
	}
	}
	}

prontera,133,201,5	duplicate(Velha Sábia)	Velha Sábia#2	78

 

error:

image.thumb.png.64bad88a60418fbed54c339f85820dce.png

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  12
  • Topics Per Day:  0.01
  • Content Count:  235
  • Reputation:   63
  • Joined:  04/29/19
  • Last Seen:  

 

ignores the error above, it was a character error

But I corrected, and gave error here

 

image.thumb.png.173c65e2f8ec217238b3c0a239aeab8a.png

Link to comment
Share on other sites

  • 0

  • Group:  Content Moderator
  • Topic Count:  55
  • Topics Per Day:  0.02
  • Content Count:  1676
  • Reputation:   702
  • Joined:  12/21/14
  • Last Seen:  

you use the random options system ?

this command is for the random options system

you should have it if you if you use the system

there is no other way to get item with random options

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  12
  • Topics Per Day:  0.01
  • Content Count:  235
  • Reputation:   63
  • Joined:  04/29/19
  • Last Seen:  

5 minutes ago, sader1992 said:

you use the random options system ?

this command is for the random options system

you should have it if you if you use the system

there is no other way to get item with random options

I do not understand what you mean...

Can not you just not let the cards be removed if you find some of the enchantment items (ids)?
I think it's easier. It will force the player to use the remove of the enchanting itself

Link to comment
Share on other sites

  • 0

  • Group:  Content Moderator
  • Topic Count:  55
  • Topics Per Day:  0.02
  • Content Count:  1676
  • Reputation:   702
  • Joined:  12/21/14
  • Last Seen:  

than you can replace all the codes with

	getinventorylist;
	for(.@i = 0;.@i<@inventorylist_count;.@i++){
		if(@inventorylist_equip[.@i] == .@part){
			.@ndx = .@i;
			break;
		}
	}
	if(
		(@inventorylist_card1[.@ndx] && getiteminfo(@inventorylist_card1[.@ndx],2) != 6) ||
		(@inventorylist_card2[.@ndx] && getiteminfo(@inventorylist_card2[.@ndx],2) != 6) ||
		(@inventorylist_card3[.@ndx] && getiteminfo(@inventorylist_card3[.@ndx],2) != 6) ||
		(@inventorylist_card4[.@ndx] && getiteminfo(@inventorylist_card4[.@ndx],2) != 6)
	
	){
		mes "enchantment detected!";
		end;
	}

 

  • Love 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  12
  • Topics Per Day:  0.01
  • Content Count:  235
  • Reputation:   63
  • Joined:  04/29/19
  • Last Seen:  

It worked, I love you! ❤️

And as i place a restriction on the enchanter not to let enchant weapons in the shield's hand?

Link to comment
Share on other sites

  • 0

  • Group:  Content Moderator
  • Topic Count:  55
  • Topics Per Day:  0.02
  • Content Count:  1676
  • Reputation:   702
  • Joined:  12/21/14
  • Last Seen:  

there is already a config for that in the script i think , as long as you don't have a Shield in the EQI_HAND_R or two hand Shield you should not get the problem you are getting if you configure the script right

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  12
  • Topics Per Day:  0.01
  • Content Count:  235
  • Reputation:   63
  • Joined:  04/29/19
  • Last Seen:  

11 hours ago, sader1992 said:

there is already a config for that in the script i think , as long as you don't have a Shield in the EQI_HAND_R or two hand Shield you should not get the problem you are getting if you configure the script right

in "other configuration"? I did not find the function there.
Could you tell me the location of the configuration you said?

I believe I do not have it configured in npc, lol

Link to comment
Share on other sites

  • 0

  • Group:  Content Moderator
  • Topic Count:  55
  • Topics Per Day:  0.02
  • Content Count:  1676
  • Reputation:   702
  • Joined:  12/21/14
  • Last Seen:  

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  12
  • Topics Per Day:  0.01
  • Content Count:  235
  • Reputation:   63
  • Joined:  04/29/19
  • Last Seen:  

52 minutes ago, sader1992 said:

image.png.e9f23a5b86c2c3b55a89d881f70afb63.png

but I want to enchant the shield...
I do not want you to use the shield hand to enchantment weapons.

can you identify that it is a weapon and not a shield and put an error message?
with this restriction the problem is solved ? 

Link to comment
Share on other sites

  • 0

  • Group:  Content Moderator
  • Topic Count:  55
  • Topics Per Day:  0.02
  • Content Count:  1676
  • Reputation:   702
  • Joined:  12/21/14
  • Last Seen:  

if(.s_all_loc[.@s_all_selected] == EQI_HAND_L && getiteminfo(getequipid(.s_all_loc[.@s_all_selected]),2) != 4){
	mes "you can't enchant weapon from your left hand";
	end;
}

 

image.thumb.png.ade8b5deb17be1f3d4a080ce7719f094.png

  • Love 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  12
  • Topics Per Day:  0.01
  • Content Count:  235
  • Reputation:   63
  • Joined:  04/29/19
  • Last Seen:  

12 minutes ago, sader1992 said:

if(.s_all_loc[.@s_all_selected] == EQI_HAND_L && getiteminfo(getequipid(.s_all_loc[.@s_all_selected]),2) != 4){
	mes "you can't enchant weapon from your left hand";
	end;
}

 

image.thumb.png.ade8b5deb17be1f3d4a080ce7719f094.png

 

YEAAAAAAAAAHHHHHHHHHHH!!!

WORK, tks ❤️

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...