Jump to content
Drow

Error en npc Refiner Ayuda porfavor

Recommended Posts

Estimados(a) no logro hacer que mi npc funcione correctamente siempre me arroja un error, les adjuntare el error  y el script.

[Error]: npc_parse_function: Missing left curly '%TAB%{' in file 'npc/NPCsServer/refine.txt', line '47'. Skipping the rest of the file.

(scrip adjunto)

Saludos cordiales.

 

Refinador por tokens custom.txt

Link to comment
Share on other sites

Hola perdon por lo lento de la respuesta pero no me llego la notificaron de que me respondieron.

El npc es reciclado de un proyecto anterior, y lo ver la vercion del emulador no recuerdo como verla xD.

 

Le preguntare al hoster.

Link to comment
Share on other sites

9 hours ago, Drow said:

Hola perdon por lo lento de la respuesta pero no me llego la notificaron de que me respondieron.

El npc es reciclado de un proyecto anterior, y lo ver la vercion del emulador no recuerdo como verla xD.

 

Le preguntare al hoster.

Aquí esta la versión actualizada del script que adjuntas:

https://github.com/rathena/rathena/blob/master/npc/merchants/refine.txt

Link to comment
Share on other sites

hummm Hola, no comprendo este npc que me envias , este puede refinar seguro usando tokens ? o.o

porque a mi no me hace eso

 

Link to comment
Share on other sites

10 hours ago, Drow said:

hummm Hola, no comprendo este npc que me envias , este puede refinar seguro usando tokens ? o.o

porque a mi no me hace eso

 

Digamos que es la versión actual del script que compartes.

Tu script es muy antiguo aún arreglando el [Error]: npc_parse_function: Missing left curly '%TAB%{' in file 'npc/NPCsServer/refine.txt', line '47'. Skipping the rest of the file. La lista de nuevos errores es un dolor de cabeza, especifica mejor qué es lo que debería hacer ese npc o mejor dicho cómo funciona ese npc.

Edited by Mael
Más información
Link to comment
Share on other sites

Ok, esencialmente este npc funciona como el refiner normal pero cuando tienes que refinar los upgrades riesgosos te permite utilizar un "token" para realizarlo de forma segura.

 

Eso es básicamente lo que hace.

Link to comment
Share on other sites

4 hours ago, Drow said:

Ok, esencialmente este npc funciona como el refiner normal pero cuando tienes que refinar los upgrades riesgosos te permite utilizar un "token" para realizarlo de forma segura.

 

Eso es básicamente lo que hace.

O sea te permite evitar la destrucción? o te permite subir un nivel de refinería si o si?

Link to comment
Share on other sites

Claro, al momento que te dice que el upgrade es peligroso te pregunta si quieres refinarlo de manera segura, es entonces cuando pide el " refinery token"

Link to comment
Share on other sites

17 minutes ago, Drow said:

Claro, al momento que te dice que el upgrade es peligroso te pregunta si quieres refinarlo de manera segura, es entonces cuando pide el " refinery token"

Aquí está lo que buscas:

 

Link to comment
Share on other sites

checking oo

I do not understand that I isolate him, I still sent him a PM but he has not responded.

Although I may not respond since the post is from 2012

Link to comment
Share on other sites

5 hours ago, Drow said:

No compre que iso el, igualmente le envie un PM pero no a respondido.

Aunque quizas no responda ya que el posteo es del 2012

A qué te refieres?

Link to comment
Share on other sites

37 minutes ago, Drow said:

Pasa que no entiendo que fue lo el iso para agregar la función,

Creo que no has revisado bien el post que compartí... btw aquí está en script que necesitas.

function	script	refinemaint	{
	disable_items;
	[email protected]_name$ = getarg(0);
	[email protected] = getarg(1);
	mes "["+ [email protected]_name$ +"]";
	mes "I'm the Armsmith.";
	mes "I can refine all kinds of weapons, armor and equipment, so let me";
	mes "know what you want me to refine.";
	next;

	setarray [email protected][1], EQI_HEAD_TOP, EQI_ARMOR, EQI_HAND_L, EQI_HAND_R, EQI_GARMENT, EQI_SHOES, EQI_ACC_L, EQI_ACC_R, EQI_HEAD_MID, EQI_HEAD_LOW;
	for([email protected] = 1; [email protected]<getarraysize([email protected]); [email protected]) {
		if(getequipisequiped([email protected][[email protected]])) {
			[email protected]$ = [email protected]$ + F_getpositionname([email protected][[email protected]]) + "-[" + getequipname([email protected][[email protected]]) + "]";
			[email protected] = 1;
		}
		[email protected]$ = [email protected]$ + ":";
	}
	if ([email protected] == 0) {
		mes "["+ [email protected]_name$ +"]";
		mes "I don't think I can refine any items you have...";
		close;
	}
	[email protected] = [email protected][select([email protected]$)];

	if(!getequipisequiped([email protected])) { //custom check
		mes "["+ [email protected]_name$ +"]";
		mes "You're not wearing";
		mes "anything there that";
		mes "I can refine.";
		emotion ET_FRET;
		close;
	}
	//Check if the item is refinable...
	if(!getequipisenableref([email protected])) {
		mes "["+ [email protected]_name$ +"]";
		mes "I don't think I can";
		mes "refine this item at all...";
		close;
	}
	//Check to see if the items is already +10
	if(getequiprefinerycnt([email protected]) >= 10) {
		mes "["+ [email protected]_name$ +"]";
		mes "I can't refine this";
		mes "any more. This is as";
		mes "refined as it gets!";
		close;
	}
	[email protected] = getequipid([email protected]); // save id of the item
	[email protected] = getequiprefinerycnt([email protected]); //save refinery count
	setarray [email protected][0], getequipcardid([email protected],0), getequipcardid([email protected],1), getequipcardid([email protected],2), getequipcardid([email protected],3);
	[email protected] = getequiprefinecost([email protected], REFINE_COST_NORMAL, REFINE_ZENY_COST);
	[email protected] = getequiprefinecost([email protected], REFINE_COST_NORMAL, REFINE_MATERIAL_ID);

	switch (getequipweaponlv([email protected])) {
		case 1: [email protected] = 7; break;
		case 2: [email protected] = 6; break;
		case 3: [email protected] = 5; break;
		case 4:
		default: [email protected] = 4; break;
	}

	// If the VIP system is enabled, the prices for non-VIP players are considerably higher.
	if (VIP_SCRIPT && !vip_status(VIP_STATUS_ACTIVE)) {
		switch(getequipweaponlv([email protected])) {
			case 0: [email protected] = [email protected] * 10; break;
			case 1: [email protected] = [email protected] * 40; break;
			case 2: [email protected] = [email protected] * 50; break;
			case 3: [email protected] = [email protected] * 2; break;
			case 4: [email protected] = [email protected] * 2; break;
			case 5: [email protected] = [email protected] * 10; break;
		}
	}
	
	[email protected]_itemid = 7539;
	[email protected]_rate = 50;
	if ([email protected]_itemid) {
		if (getequippercentrefinery([email protected]) <= [email protected]_rate) {
			mes "[Item Protection]";
			mes "Do you have "+getitemname([email protected]_itemid)+" item ? It will protect your armor/weapon from broken.";
			next;
			if (select((countitem([email protected]_itemid)? "Yes":""), "No") == 1) {
				[email protected] = 1;
			}
		}
	}
	
	if([email protected] != 1) {
		mes "["+ [email protected]_name$ +"]";
		mes "To refine this I need";
		mes "one ^003366"+getitemname([email protected])+"^000000 and";
		mes "a service fee of " + [email protected] + " Zeny.";
		mes "Do you really wish to continue?";
		next;
		if(select("Yes:No") == 2){
			mes "["+ [email protected]_name$ +"]";
			mes "Yeah...";
			mes "There's no need to";
			mes "rush. Take your time.";
			close;
		}
		if(getequippercentrefinery([email protected]) < 100) {
			mes "["+ [email protected]_name$ +"]";
			mes "Oh no! If I continue to";
			mes "refine this, there's a risk it could";
			switch([email protected]) {
			case 985:
				mes "be destroyed! That means that ^FF0000this equipment^000000, and ^FF0000any cards^000000 or special properties added to this armor, ^FF0000will be gone^000000.";
				break;
			default:
				mes "be destroyed, and you'd ^FF0000lose the weapon^000000, any ^FF0000cards in the weapon^000000,";
				mes "or any added special properties.";
				break;
			}
			next;
			mes "["+getarg(0)+"]";
			mes "I can't make it any clearer.";
			mes "Once a weapon is destroyed,";
			mes "there's no getting it back.";
			mes "You really have a chance to";
			mes "^FF0000lose this weapon^000000 forever.";
			mes "Do you still want to refine?";
			next;
			if(select("Yes:No") == 2){
				mes "["+ [email protected]_name$ +"]";
				mes "I completely agree...";
				mes "I might be a great refiner, but sometimes even I make mistakes.";
				close;
			}
		}
		if((countitem([email protected]) < 1) || (Zeny < [email protected])) {
			mes "["+ [email protected]_name$ +"]";
			mes "You don't seem to have";
			mes "enough Zeny or "+getitemname([email protected])+"...";
			mes "Go get some more. I'll be";
			mes "here all day if you need me.";
			close;
		}
		Zeny = [email protected];
		delitem [email protected],1;

		// anti-hack
		if (callfunc("F_IsEquipIDHack", [email protected], [email protected]) || callfunc("F_IsEquipCardHack", [email protected], [email protected][0], [email protected][1], [email protected][2], [email protected][3]) ||
		    callfunc("F_IsEquipRefineHack", [email protected], [email protected])) {
			mes "["+ [email protected]_name$ +"]";
			emotion ET_FRET;
			mes "Wait a second...";
			mes "Do you think I'm stupid?!";
			mes "You switched the item while I wasn't looking! Get out of here!";
			close;
		}

		if(getequippercentrefinery([email protected]) <= rand(100)) {
			if ([email protected]) 	
				delitem [email protected]_itemid, 1;
			else 
				failedrefitem [email protected];
			mes "["+ [email protected]_name$ +"]";
			emotion (!rand(5))?ET_MONEY:ET_HUK;
			[email protected] = rand(1,3);
			if ([email protected] == 1) {
				mes "OH! MY GOD!";
				mes "Damn it! Not again!";
				mes "I'm terribly sorry, but you know practice does make perfect.";
				mes "Um, right? Heh heh...";
			} else if([email protected] == 2) {
				mes "Nooooooo!";
				mes "It broke!";
				mes "I-I'm sorry!";
			} else {
				mes "Crap!";
				mes "It couldn't take";
				mes "much more tempering!";
				mes "Sorry about this...";
			}
			close;
		}
		mes "["+getarg(0)+"]";
		successrefitem [email protected];
		emotion ET_SMILE;
		[email protected] = rand(1,3);
		if ([email protected] == 1) {
			mes "Perfect!";
			mes "Heh heh!";
			mes "Once again,";
			mes "flawless work";
			mes "from the master~";
		} else if([email protected] == 2) {
			mes "Success...!";
			mes "Yet again, my amazing";
			mes "talent truly dazzles";
			mes "and shines today.";
		} else {
			mes "Heh heh!";
			mes "I'm all done.";
			mes "No doubt, my work is";
			mes "to your satisfaction.";
			mes "Sheer, utter perfection~";
		}
		close;
	}
}	

prontera,150,150,5	script	Vestry#prt	826,{
	callfunc "refinemaint","Vestry",0;
	end;
}

Aquí cambias el item que quieras utilizar como Token:

	[email protected]_itemid = 7539;

Créditos a: @Emistry

Edited by Mael
Información Adicional
Link to comment
Share on other sites

Ya lo puse y funciona, pero no es exactamente lo que deseo, osea refina seguro pero te tira todo el refine de una vez. osea te pide el item el oridecon y todo bien pero cuando refina te sube a +10 de una.

Link to comment
Share on other sites

5 minutes ago, Drow said:

Ya lo puse y funciona, pero no es exactamente lo que deseo, osea refina seguro pero te tira todo el refine de una vez. osea te pide el item el oridecon y todo bien pero cuando refina te sube a +10 de una.

Ah? has probado el que acabo de postear?

45 minutes ago, Mael said:

Creo que no has revisado bien el post que compartí... btw aquí está en script que necesitas.

function	script	refinemaint	{
	disable_items;
	[email protected]_name$ = getarg(0);
	[email protected] = getarg(1);
	mes "["+ [email protected]_name$ +"]";
	mes "I'm the Armsmith.";
	mes "I can refine all kinds of weapons, armor and equipment, so let me";
	mes "know what you want me to refine.";
	next;

	setarray [email protected][1], EQI_HEAD_TOP, EQI_ARMOR, EQI_HAND_L, EQI_HAND_R, EQI_GARMENT, EQI_SHOES, EQI_ACC_L, EQI_ACC_R, EQI_HEAD_MID, EQI_HEAD_LOW;
	for([email protected] = 1; [email protected]<getarraysize([email protected]); [email protected]) {
		if(getequipisequiped([email protected][[email protected]])) {
			[email protected]$ = [email protected]$ + F_getpositionname([email protected][[email protected]]) + "-[" + getequipname([email protected][[email protected]]) + "]";
			[email protected] = 1;
		}
		[email protected]$ = [email protected]$ + ":";
	}
	if ([email protected] == 0) {
		mes "["+ [email protected]_name$ +"]";
		mes "I don't think I can refine any items you have...";
		close;
	}
	[email protected] = [email protected][select([email protected]$)];

	if(!getequipisequiped([email protected])) { //custom check
		mes "["+ [email protected]_name$ +"]";
		mes "You're not wearing";
		mes "anything there that";
		mes "I can refine.";
		emotion ET_FRET;
		close;
	}
	//Check if the item is refinable...
	if(!getequipisenableref([email protected])) {
		mes "["+ [email protected]_name$ +"]";
		mes "I don't think I can";
		mes "refine this item at all...";
		close;
	}
	//Check to see if the items is already +10
	if(getequiprefinerycnt([email protected]) >= 10) {
		mes "["+ [email protected]_name$ +"]";
		mes "I can't refine this";
		mes "any more. This is as";
		mes "refined as it gets!";
		close;
	}
	[email protected] = getequipid([email protected]); // save id of the item
	[email protected] = getequiprefinerycnt([email protected]); //save refinery count
	setarray [email protected][0], getequipcardid([email protected],0), getequipcardid([email protected],1), getequipcardid([email protected],2), getequipcardid([email protected],3);
	[email protected] = getequiprefinecost([email protected], REFINE_COST_NORMAL, REFINE_ZENY_COST);
	[email protected] = getequiprefinecost([email protected], REFINE_COST_NORMAL, REFINE_MATERIAL_ID);

	switch (getequipweaponlv([email protected])) {
		case 1: [email protected] = 7; break;
		case 2: [email protected] = 6; break;
		case 3: [email protected] = 5; break;
		case 4:
		default: [email protected] = 4; break;
	}

	// If the VIP system is enabled, the prices for non-VIP players are considerably higher.
	if (VIP_SCRIPT && !vip_status(VIP_STATUS_ACTIVE)) {
		switch(getequipweaponlv([email protected])) {
			case 0: [email protected] = [email protected] * 10; break;
			case 1: [email protected] = [email protected] * 40; break;
			case 2: [email protected] = [email protected] * 50; break;
			case 3: [email protected] = [email protected] * 2; break;
			case 4: [email protected] = [email protected] * 2; break;
			case 5: [email protected] = [email protected] * 10; break;
		}
	}
	
	[email protected]_itemid = 7539;
	[email protected]_rate = 50;
	if ([email protected]_itemid) {
		if (getequippercentrefinery([email protected]) <= [email protected]_rate) {
			mes "[Item Protection]";
			mes "Do you have "+getitemname([email protected]_itemid)+" item ? It will protect your armor/weapon from broken.";
			next;
			if (select((countitem([email protected]_itemid)? "Yes":""), "No") == 1) {
				[email protected] = 1;
			}
		}
	}
	
	if([email protected] != 1) {
		mes "["+ [email protected]_name$ +"]";
		mes "To refine this I need";
		mes "one ^003366"+getitemname([email protected])+"^000000 and";
		mes "a service fee of " + [email protected] + " Zeny.";
		mes "Do you really wish to continue?";
		next;
		if(select("Yes:No") == 2){
			mes "["+ [email protected]_name$ +"]";
			mes "Yeah...";
			mes "There's no need to";
			mes "rush. Take your time.";
			close;
		}
		if(getequippercentrefinery([email protected]) < 100) {
			mes "["+ [email protected]_name$ +"]";
			mes "Oh no! If I continue to";
			mes "refine this, there's a risk it could";
			switch([email protected]) {
			case 985:
				mes "be destroyed! That means that ^FF0000this equipment^000000, and ^FF0000any cards^000000 or special properties added to this armor, ^FF0000will be gone^000000.";
				break;
			default:
				mes "be destroyed, and you'd ^FF0000lose the weapon^000000, any ^FF0000cards in the weapon^000000,";
				mes "or any added special properties.";
				break;
			}
			next;
			mes "["+getarg(0)+"]";
			mes "I can't make it any clearer.";
			mes "Once a weapon is destroyed,";
			mes "there's no getting it back.";
			mes "You really have a chance to";
			mes "^FF0000lose this weapon^000000 forever.";
			mes "Do you still want to refine?";
			next;
			if(select("Yes:No") == 2){
				mes "["+ [email protected]_name$ +"]";
				mes "I completely agree...";
				mes "I might be a great refiner, but sometimes even I make mistakes.";
				close;
			}
		}
		if((countitem([email protected]) < 1) || (Zeny < [email protected])) {
			mes "["+ [email protected]_name$ +"]";
			mes "You don't seem to have";
			mes "enough Zeny or "+getitemname([email protected])+"...";
			mes "Go get some more. I'll be";
			mes "here all day if you need me.";
			close;
		}
		Zeny = [email protected];
		delitem [email protected],1;

		// anti-hack
		if (callfunc("F_IsEquipIDHack", [email protected], [email protected]) || callfunc("F_IsEquipCardHack", [email protected], [email protected][0], [email protected][1], [email protected][2], [email protected][3]) ||
		    callfunc("F_IsEquipRefineHack", [email protected], [email protected])) {
			mes "["+ [email protected]_name$ +"]";
			emotion ET_FRET;
			mes "Wait a second...";
			mes "Do you think I'm stupid?!";
			mes "You switched the item while I wasn't looking! Get out of here!";
			close;
		}

		if(getequippercentrefinery([email protected]) <= rand(100)) {
			if ([email protected]) 	
				delitem [email protected]_itemid, 1;
			else 
				failedrefitem [email protected];
			mes "["+ [email protected]_name$ +"]";
			emotion (!rand(5))?ET_MONEY:ET_HUK;
			[email protected] = rand(1,3);
			if ([email protected] == 1) {
				mes "OH! MY GOD!";
				mes "Damn it! Not again!";
				mes "I'm terribly sorry, but you know practice does make perfect.";
				mes "Um, right? Heh heh...";
			} else if([email protected] == 2) {
				mes "Nooooooo!";
				mes "It broke!";
				mes "I-I'm sorry!";
			} else {
				mes "Crap!";
				mes "It couldn't take";
				mes "much more tempering!";
				mes "Sorry about this...";
			}
			close;
		}
		mes "["+getarg(0)+"]";
		successrefitem [email protected];
		emotion ET_SMILE;
		[email protected] = rand(1,3);
		if ([email protected] == 1) {
			mes "Perfect!";
			mes "Heh heh!";
			mes "Once again,";
			mes "flawless work";
			mes "from the master~";
		} else if([email protected] == 2) {
			mes "Success...!";
			mes "Yet again, my amazing";
			mes "talent truly dazzles";
			mes "and shines today.";
		} else {
			mes "Heh heh!";
			mes "I'm all done.";
			mes "No doubt, my work is";
			mes "to your satisfaction.";
			mes "Sheer, utter perfection~";
		}
		close;
	}
}	

prontera,150,150,5	script	Vestry#prt	826,{
	callfunc "refinemaint","Vestry",0;
	end;
}

Aquí cambias el item que quieras utilizar como Token:

	[email protected]_itemid = 7539;

Créditos a: @Emistry

 

Edited by Mael
Typo error
Link to comment
Share on other sites

Si lo testie pero el npc falla el refine y cuando lo hace te da un down grade al item

Edited by Drow
Link to comment
Share on other sites

2 hours ago, Drow said:

Si lo testie pero el npc falla el refine y cuando lo hace te da un down grade al item

No se que habrás testeado xD cuando falla se consume el poring coin y se evita la destrucción del item.

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
Reply to this topic...

×   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...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.