Jump to content

Error NPC Heal - Multi-Tarea


KhrizPlayCL

Recommended Posts


  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  17
  • Reputation:   1
  • Joined:  01/31/20
  • Last Seen:  

Amigos, buenas tardes, solicito su apoyo para identificar el siguiente problema, tengo el siguiente script que entrega, heal, repara equipo, identifica y refina piedras, el problema es que el código de identificar muestra el siguiente error en consola, como información adicional

uso Centos7, ultima versión de rathena y un cliente 2018 en sistema PRE-RE


[Error]: pc_checkskill: Invalid skill id 0 (char_id=150000).
[Error]: buildin_countitem: Invalid item '0'.
[Debug]: Source (NPC): Healer#prt at prontera (162,193)
[Error]: pc_checkskill: Invalid skill id 0 (char_id=150000).
[Error]: pc_checkskill: Invalid skill id 0 (char_id=150000).
[Error]: pc_checkskill: Invalid skill id 0 (char_id=150000).
[Error]: pc_checkskill: Invalid skill id 0 (char_id=150000).

código NPC

//===== rAthena Script =======================================
//= Healer
//===== By: ==================================================
//= Euphy
//===== Current Version: =====================================
//= 1.1
//===== Compatible With: =====================================
//= rAthena Project
//===== Description: =========================================
//= Basic healer script.
//===== Additional Comments: =================================
//= 1.0 Initial script.
//= 1.1 Aligned coordinates with @go.
//============================================================

-	script	Healer	-1,{

	.@Price = 0;	// Zeny required for heal
	.@Buffs = 1;	// Also buff players? (1: yes / 0: no)
	.@Delay = 5;	// Heal delay, in seconds

	if (@HD > gettimetick(2))
		end;
	if (.@Price) {
		message strcharinfo(0), "Healing costs " + callfunc("F_InsertComma",.@Price) + " Zeny.";
		if (Zeny < .@Price)
			end;
		if (select("^0055FFHeal^000000:^777777Cancel^000000") == 2)
			end;
		Zeny -= .@Price;
	}
//	Elimina Los Buff negativos	
	sc_end SC_STONE;
	sc_end SC_FREEZE;
	sc_end SC_STUN;
	sc_end SC_SLEEP;
	sc_end SC_POISON;
	sc_end SC_CURSE;
	sc_end SC_SILENCE;
	sc_end SC_CONFUSION;
	sc_end SC_BLIND;
	sc_end SC_BLEEDING;
	sc_end SC_QUAGMIRE;
	sc_end SC_DECREASEAGI;
	sc_end SC_BERSERK;
//	refina Oridicon
	.@ori = countitem(756);
	if ( .@ori >= 5 ) {
		delitem 756, .@ori / 5 * 5;
		getitem 984, .@ori / 5;
		message strcharinfo(0), "Refined "+ ( .@ori / 5 * 5 ) +" Oridecon Stones, got "+ ( .@ori / 5 ) +" Oridecons.";
	}
//	refina Elunium	
	.@elu = countitem(757);
	if ( .@elu >= 5 ) {
		delitem 757, .@elu / 5 * 5;
		getitem 985, .@elu / 5;
		message strcharinfo(0), "Refined "+ ( .@elu / 5 * 5 ) +" Elunium Stones, got "+ ( .@elu / 5 ) +" Eluniums.";
	}
//	repara el equipo dañado
	if( getbrokenid(1) ) repairall;
//	identifica el equipamiento
	getinventorylist;
	while( .@i < @inventorylist_count ){
	getinventorylist;
	freeloop(true);
	for( .@i = 0; .@i < @inventorylist_count; .@i++ ) {
		if ( @inventorylist_identify[.@i] == 1 )
			continue;
		else if ( getskilllv(MC_IDENTIFY) == 1 && Sp >= 10 )
			heal 0,0; // lol... this is supposed to reduce their SP by 10, whatever
		else if ( countitem(Spectacles) )
			delitem Spectacles,1;
		else if ( getskilllv(RG_COMPULSION) && Zeny >= ( 100 - ( 5 + 4 * getskilllv(RG_COMPULSION) ) )* 2/5 )
			Zeny -= ( 100 - ( 5 + 4 * getskilllv(RG_COMPULSION) ) )* 2/5;
		else if ( getskilllv(MC_DISCOUNT) && Zeny >= ( 100 - ( 5 + 2 * getskilllv(MC_DISCOUNT) ) )* 2/5 )
			Zeny -= ( 100 - ( 5 + 2 * getskilllv(MC_DISCOUNT) ) )* 2/5;
		else if ( Zeny >= 40 )
			Zeny -= 40;
		else
			break;
		delitem2 @inventorylist_id[.@i], 1, 0, @inventorylist_refine[.@i], @inventorylist_attribute[.@i], @inventorylist_card1[.@i], @inventorylist_card2[.@i], @inventorylist_card3[.@i], @inventorylist_card4[.@i];
		getitem2 @inventorylist_id[.@i], 1, 1, @inventorylist_refine[.@i], 0, @inventorylist_card1[.@i], @inventorylist_card2[.@i], @inventorylist_card3[.@i], @inventorylist_card4[.@i];
		.@icount++;
	}
	freeloop(false);
	if ( .@icount )
		message strcharinfo(0), "Identified "+ .@icount +" Items.";
	}
//	Entrega los Buff		
	specialeffect2 EF_HEAL2;
	percentheal 100,100;
	if (.@Buffs) {
		specialeffect2 EF_INCAGILITY;
		sc_start SC_INCREASEAGI,240000,10;
		specialeffect2 EF_BLESSING;
		sc_start SC_BLESSING,240000,10;
	}
	percentheal 100,100;	
	if (.@Delay)
		@HD = gettimetick(2) + .@Delay;
	end;
}


// Duplicates
//============================================================
alberta,25,240,6	duplicate(Healer)	Healer#alb	909,13,13
aldebaran,135,118,6	duplicate(Healer)	Healer#alde	909,13,13
amatsu,200,79,4	duplicate(Healer)	Healer#ama	909,13,13
ayothaya,207,169,6	duplicate(Healer)	Healer#ayo	909,13,13
comodo,184,158,6	duplicate(Healer)	Healer#com	909,13,13
einbech,57,36,6	duplicate(Healer)	Healer#einbe	909,13,13
einbroch,57,202,6	duplicate(Healer)	Healer#einbr	909,13,13
geffen,115,72,6	duplicate(Healer)	Healer#gef	909,13,13
gonryun,156,122,6	duplicate(Healer)	Healer#gon	909,13,13
hugel,89,150,6	duplicate(Healer)	Healer#hug	909,13,13
izlude,125,118,6	duplicate(Healer)	Healer#izl	909,13,13	//Pre-RE: (125,118)
jawaii,250,139,4	duplicate(Healer)	Healer#jaw	909,13,13
lighthalzen,152,100,6	duplicate(Healer)	Healer#lhz	909,13,13
louyang,226,103,4	duplicate(Healer)	Healer#lou	909,13,13
manuk,272,144,6	duplicate(Healer)	Healer#man	909,13,13
mid_camp,203,289,6	duplicate(Healer)	Healer#mid	909,13,13
moc_ruins,72,164,4	duplicate(Healer)	Healer#moc	909,13,13
morocc,153,97,6	duplicate(Healer)	Healer#mor	909,13,13
moscovia,220,191,4	duplicate(Healer)	Healer#mos	909,13,13
niflheim,212,182,5	duplicate(Healer)	Healer#nif	909,13,13
payon,179,106,4	duplicate(Healer)	Healer#pay	909,13,13
prontera,162,193,4	duplicate(Healer)	Healer#prt	909,13,13
rachel,125,116,6	duplicate(Healer)	Healer#rac	909,13,13
splendide,201,153,4	duplicate(Healer)	Healer#spl	909,13,13
thor_camp,249,74,4	duplicate(Healer)	Healer#thor	909,13,13
umbala,105,148,3	duplicate(Healer)	Healer#umb	909,13,13
veins,217,121,4	duplicate(Healer)	Healer#ve	909,13,13
xmas,143,136,4	duplicate(Healer)	Healer#xmas	909,13,13
yuno,164,45,4	duplicate(Healer)	Healer#yuno	909,13,13

// Duplicates (Renewal)
//============================================================
brasilis,194,221,6	duplicate(Healer)	Healer#bra	909,13,13
dewata,195,187,4	duplicate(Healer)	Healer#dew	909,13,13
dicastes01,201,194,4	duplicate(Healer)	Healer#dic	909,13,13
ecl_in01,45,60,4	duplicate(Healer)	Healer#ecl	909,13,13
malangdo,132,114,6	duplicate(Healer)	Healer#mal	909,13,13
malaya,227,204,6	duplicate(Healer)	Healer#ma	909,13,13
mora,55,152,4	duplicate(Healer)	Healer#mora	909,13,13

saludos,

Edited by KhrizPlayCL
texto
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  17
  • Reputation:   1
  • Joined:  01/31/20
  • Last Seen:  

Problema Solucionado hay que modificar el código por el siguiente, cambiando los nombre de las skill e item por las ID

 

//	identifica el equipamiento
	getinventorylist;
	while( .@i < @inventorylist_count ){
	getinventorylist;
	freeloop(true);
	for( .@i = 0; .@i < @inventorylist_count; .@i++ ) {
		if ( @inventorylist_identify[.@i] == 1 )
			continue;
		else if ( getskilllv(40) == 1 && Sp >= 10 )
			heal 0,0; // lol... this is supposed to reduce their SP by 10, whatever
		else if ( countitem(611) )
			delitem 611,1;
		else if ( getskilllv(224) && Zeny >= ( 100 - ( 5 + 4 * getskilllv(224) ) )* 2/5 )
			Zeny -= ( 100 - ( 5 + 4 * getskilllv(224) ) )* 2/5;
		else if ( getskilllv(37) && Zeny >= ( 100 - ( 5 + 2 * getskilllv(37) ) )* 2/5 )
			Zeny -= ( 100 - ( 5 + 2 * getskilllv(37) ) )* 2/5;
		else if ( Zeny >= 40 )
			Zeny -= 40;
		else
			break;
		delitem2 @inventorylist_id[.@i], 1, 0, @inventorylist_refine[.@i], @inventorylist_attribute[.@i], @inventorylist_card1[.@i], @inventorylist_card2[.@i], @inventorylist_card3[.@i], @inventorylist_card4[.@i];
		getitem2 @inventorylist_id[.@i], 1, 1, @inventorylist_refine[.@i], 0, @inventorylist_card1[.@i], @inventorylist_card2[.@i], @inventorylist_card3[.@i], @inventorylist_card4[.@i];
		.@icount++;
	}
	freeloop(false);
	if ( .@icount )
		message strcharinfo(0), "Identified "+ .@icount +" Items.";
	}

 

  • Upvote 1
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...