Jump to content
  • 0
Sign in to follow this  
MikZ

error in skill.c 180

Question

18 answers to this question

Recommended Posts

  • 0

well gepard not prevent cheaters. it create some issues for botters only. Real protection can be only server side.

from log this is packets with wrong skill id. you can ignore them or add some code for disconnect players with wrong skill sent.

 

remove code what you add before, and place this code:

if (skill->get_index(skill_id) == 0) {
	sockt->eof(fd);
	ShowWarning("Wrong skill detected %d. Player disconnected\n", skill_id);
	return;
}

This code should disconnect anyone who using skill what was not added to skill_db.

 

Share this post


Link to post
Share on other sites
  • 0

this mean you have unsupported skill somewhere.

if you adding new skill by patching server, you must add range for this skill in skill_get_index.

if you adding new skill by plugin, you must override CUSTOM_SKILL_RANGES in environment variables before compile server.

If this error from clean hercules, probably some one cheating and want use non existing skill.

 

Share this post


Link to post
Share on other sites
  • 0
3 hours ago, 4144 said:

this mean you have unsupported skill somewhere.

if you adding new skill by patching server, you must add range for this skill in skill_get_index.

if you adding new skill by plugin, you must override CUSTOM_SKILL_RANGES in environment variables before compile server.

If this error from clean hercules, probably some one cheating and want use non existing skill.

 

 

For 1 and 2 is there a command to locate which specific skill or plugin it came from?

 

And where can i find CUSTOM_SKILL_RANGES. 

 

also ichecked the error and found this. Skill Id is not being handled. and cant find such skill. is it safe to assume that some one is using cheat?

image.png.305220e721bf12978ecb46778835cf46.png

Edited by MikZ

Share this post


Link to post
Share on other sites
  • 0

no you cant know where skill was used/added except stack trace what you show on screenshot.

try search in your plugins and in hercules code for 5423.

 

this skill usage look like code from client. may be you have this skill id in your client lua files?

 

if this is some one want exploit some non existing skill, you can simply ignore it.

Share this post


Link to post
Share on other sites
  • 0
On 4/1/2020 at 11:45 AM, 4144 said:

no you cant know where skill was used/added except stack trace what you show on screenshot.

try search in your plugins and in hercules code for 5423.

 

this skill usage look like code from client. may be you have this skill id in your client lua files?

 

if this is some one want exploit some non existing skill, you can simply ignore it.


If someone is cheating is there a way to trace whose that person is? Already updated my Hercules git. still got the same error.

Share this post


Link to post
Share on other sites
  • 0

you can add into function clif_useSkillToIdReal at start code:

if (skill_id == 5423)
{
	ShowError("Wrong skill 5423 from account_id: %d\n", sd->status.account_id);
}

 

Share this post


Link to post
Share on other sites
  • 0
46 minutes ago, 4144 said:

you can add into function clif_useSkillToIdReal at start code:

if (skill_id == 5423) { ShowError("Wrong skill 5423 from account_id: %d\n", sd->status.account_id); }


if (skill_id == 5423)
{
	ShowError("Wrong skill 5423 from account_id: %d\n", sd->status.account_id);
}

 

sorry. which file? Im new to this. 

Share this post


Link to post
Share on other sites
  • 0
1 hour ago, MikZ said:

sorry. which file? Im new to this. 

Is this correct under clif.c?

 

static void clif_useSkillToIdReal(int fd, struct map_session_data *sd, int skill_id, int skill_lv, int target_id) __attribute__((nonnull (2)));
static void clif_useSkillToIdReal(int fd, struct map_session_data *sd, int skill_id, int skill_lv, int target_id)
if (skill_id == 5423)
{
	ShowError("Wrong skill 5423 from account_id: %d\n", sd->status.account_id);
}
{
	int64 tick = timer->gettick();

	if (skill_lv < 1)
		skill_lv = 1; //No clue, I have seen the client do this with guild skills :/ [Skotlex]

	int tmp = skill->get_inf(skill_id);
	if (tmp & INF_GROUND_SKILL || !tmp)
		return; //Using a ground/passive skill on a target? WRONG.

	if (skill_id >= HM_SKILLBASE && skill_id < HM_SKILLBASE + MAX_HOMUNSKILL) {
		clif->pUseSkillToId_homun(sd->hd, sd, tick, skill_id, skill_lv, target_id);
		return;
	}

	if (skill_id >= MC_SKILLBASE && skill_id < MC_SKILLBASE + MAX_MERCSKILL) {
		clif->pUseSkillToId_mercenary(sd->md, sd, tick, skill_id, skill_lv, target_id);
		return;
	}

	// Whether skill fails or not is irrelevant, the char ain't idle. [Skotlex]
	pc->update_idle_time(sd, BCIDLE_USESKILLTOID);

	if (sd->npc_id || sd->state.workinprogress & 1) {

 

Share this post


Link to post
Share on other sites
  • 0

don't know why,

 

but its getting worse is this bug? or does the script below cause this error?

image.png.76fd88513f4e1cfbf38a69a58c8f1d4a.png

image.png.cdf1f11cd85442df07b230f1068d58fa.png

 

function	script	H_VIPBuff	{
		query_sql( "SELECT CAST( `vip` AS DATE ),DATEDIFF( IFNULL(`vip`,NOW()),NOW() ), TIMESTAMPDIFF(SECOND, NOW(), `vip`) FROM `login` WHERE `account_id` = "+getcharid(3)+" LIMIT 1", .@vip_date$, .@day, .@vip_second);
		if ( .@day > 0 || .@vip_second > 0) {
		return true;
	end;
}
		return false;
}

-	script	Healer	FAKE_NPC,{

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

	if (@HD > gettimetick(2)) end;
	if (.@price) {
		message strcharinfo(PC_NAME),"Healing costs "+.@price+" Zeny.";
		if (Zeny < .@price) end;
		if(select("^0055FFHeal^000000", "^777777Cancel^000000") == 2) close;
		Zeny -= .@price;
	}

	specialeffect(EF_HEAL2, AREA, playerattached()); percentheal 100,100;
	if (.@Buffs) {

	if (callfunc ("H_VIPBuff")) {
		//sc_start SC_CASH_PLUSEXP,.exp_bonus_duration,.bonus_vip_exp_rate;
		//sc_start SC_CASH_RECEIVEITEM,.bonus_duration,.bonus_vip_drop_rate;

		specialeffect(EF_INCAGILITY, AREA, playerattached());
		sc_start SC_INC_AGI,240000,10;
		specialeffect(EF_BLESSING, AREA, playerattached());
		sc_start SC_BLESSING,240000,10;
       		specialeffect(EF_KYRIE, AREA, playerattached());
		sc_start SC_KYRIE, 120000, 0;
		specialeffect( EF_IMPOSITIO, AREA, playerattached());
		sc_start SC_IMPOSITIO, 60000, 0;
		specialeffect(EF_GLORIA, AREA, playerattached());
		sc_start SC_GLORIA, 30000, 0;

	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_BLOODING;
	sc_end SC_DPOISON;
	sc_end SC_FEAR;
	sc_end SC_COLD;
	sc_end SC_BURNING;
	sc_end SC_DEEP_SLEEP;
	sc_end SC_DEC_AGI;
	sc_end SC_BROKENARMOR;
	sc_end SC_BROKENWEAPON;
	sc_end SC_NOEQUIPWEAPON;
	sc_end SC_NOEQUIPSHIELD;
	sc_end SC_NOEQUIPARMOR;
	sc_end SC_NOEQUIPHELM;
	sc_end SC__STRIPACCESSARY;
	sc_end SC_PROPERTYUNDEAD;
	sc_end SC_ORCISH;
	sc_end SC_BERSERK;
	sc_end SC_SKE;
	sc_end SC_SWOO;
	sc_end SC_SKA;
	sc_end SC_SLOWDOWN;
	sc_end SC_FROSTMISTY;
	sc_end SC_ILLUSION;
	sc_end SC_BITESCAR;

	if( getbrokenid(1) ) repairall;
		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.";
	}
}
else {
		specialeffect(EF_INCAGILITY, AREA, playerattached());
		sc_start SC_INC_AGI,240000,10;
		specialeffect(EF_BLESSING, AREA, playerattached());
		sc_start SC_BLESSING,240000,10;
}
	if (.@Delay) @HD = gettimetick(2)+.@Delay;
	end;

}
	OnInit:	
		setarray .debuffs[0], SC_LEXAETERNA, SC_DEC_AGI, SC_POISON, SC_CURSE, SC_SILENCE, SC_BLIND, SC_VENOMBLEED, SC_DPOISON, SC_BURNING;

}

 

Please help me with this errors.

Edited by MikZ

Share this post


Link to post
Share on other sites
  • 0

you put code before function start, but need after first

{

 

Share this post


Link to post
Share on other sites
  • 0
4 hours ago, 4144 said:

you put code before function start, but need after first

{


{

 

I tried adding this

function	script	H_VIPBuff	-1,{

then use Herc script check and got this error. Does the error had to do with GEPARD SHIELD 3.0 im getting above?

[Error]: npc_parse_function: Missing left curly '%TAB%{' in file '(DIRECT INPUT)', line '1'. Skipping the rest of the file. 
 * w1=function 
 * w2=script 
 * w3=H_VIPBuff 
 * w4=-1,{ 

 

Edited by MikZ

Share this post


Link to post
Share on other sites
  • 0

i speaked about c code and not scripts. add it to clif.c

 

wrong:

static void clif_useSkillToIdReal(int fd, struct map_session_data *sd, int skill_id, int skill_lv, int target_id) __attribute__((nonnull (2)));
static void clif_useSkillToIdReal(int fd, struct map_session_data *sd, int skill_id, int skill_lv, int target_id)
if (skill_id == 5423)
{
	ShowError("Wrong skill 5423 from account_id: %d\n", sd->status.account_id);
}
{
	int64 tick = timer->gettick();

 

correct:

static void clif_useSkillToIdReal(int fd, struct map_session_data *sd, int skill_id, int skill_lv, int target_id) __attribute__((nonnull (2)));
static void clif_useSkillToIdReal(int fd, struct map_session_data *sd, int skill_id, int skill_lv, int target_id)
{
	if (skill_id == 5423)
	{
		ShowError("Wrong skill 5423 from account_id: %d\n", sd->status.account_id);
	}
	int64 tick = timer->gettick();

and i add skill id what you show in first screenshot.

 

Share this post


Link to post
Share on other sites
  • 0
On 4/6/2020 at 11:03 AM, 4144 said:

i speaked about c code and not scripts. add it to clif.c

 

wrong:

static void clif_useSkillToIdReal(int fd, struct map_session_data *sd, int skill_id, int skill_lv, int target_id) __attribute__((nonnull (2))); static void clif_useSkillToIdReal(int fd, struct map_session_data *sd, int skill_id, int skill_lv, int target_id) if (skill_id == 5423) { ShowError("Wrong skill 5423 from account_id: %d\n", sd->status.account_id); } { int64 tick = timer->gettick();


static void clif_useSkillToIdReal(int fd, struct map_session_data *sd, int skill_id, int skill_lv, int target_id) __attribute__((nonnull (2)));
static void clif_useSkillToIdReal(int fd, struct map_session_data *sd, int skill_id, int skill_lv, int target_id)
if (skill_id == 5423)
{
	ShowError("Wrong skill 5423 from account_id: %d\n", sd->status.account_id);
}
{
	int64 tick = timer->gettick();

 

correct:

static void clif_useSkillToIdReal(int fd, struct map_session_data *sd, int skill_id, int skill_lv, int target_id) __attribute__((nonnull (2))); static void clif_useSkillToIdReal(int fd, struct map_session_data *sd, int skill_id, int skill_lv, int target_id) { if (skill_id == 5423) { ShowError("Wrong skill 5423 from account_id: %d\n", sd->status.account_id); } int64 tick = timer->gettick();


static void clif_useSkillToIdReal(int fd, struct map_session_data *sd, int skill_id, int skill_lv, int target_id) __attribute__((nonnull (2)));
static void clif_useSkillToIdReal(int fd, struct map_session_data *sd, int skill_id, int skill_lv, int target_id)
{
	if (skill_id == 5423)
	{
		ShowError("Wrong skill 5423 from account_id: %d\n", sd->status.account_id);
	}
	int64 tick = timer->gettick();

and i add skill id what you show in first screenshot.

 



Hi I got much more specific error. how can i fixed this?

 

image.png.1236623af6b86dbd3c043685151d8dd1.png

image.png.c759b5634c04b583d595ded02b00a488.png

image.png.4a6229fdfb20fd39d909ad79db1793a3.png

Share this post


Link to post
Share on other sites
  • 0

look like same errors but other skill id

client send wrong skills.

if this is on your production server as i said before it can be some one who cheating.

if on your local server, then some thing wrong with your client.

 

also if you using any client modifications like game guard or external tools, this can be from this things too.

Share this post


Link to post
Share on other sites
  • 0
36 minutes ago, 4144 said:

look like same errors but other skill id

client send wrong skills.

if this is on your production server as i said before it can be some one who cheating.

if on your local server, then some thing wrong with your client.

 

also if you using any client modifications like game guard or external tools, this can be from this things too.


/sob I have Gepard. I don't know but per functor its not from gepard. Wonder if this can be fixed. So irritating to see. /sob

Share this post


Link to post
Share on other sites
  • 0
On 4/9/2020 at 9:36 AM, 4144 said:

well gepard not prevent cheaters. it create some issues for botters only. Real protection can be only server side.

from log this is packets with wrong skill id. you can ignore them or add some code for disconnect players with wrong skill sent.

 

remove code what you add before, and place this code:

if (skill->get_index(skill_id) == 0) { sockt->eof(fd); ShowWarning("Wrong skill detected %d. Player disconnected\n", skill_id); return; }


if (skill->get_index(skill_id) == 0) {
	sockt->eof(fd);
	ShowWarning("Wrong skill detected %d. Player disconnected\n", skill_id);
	return;
}

This code should disconnect anyone who using skill what was not added to skill_db.

 

 

 

I got this error

image.png.74efff8d80e8d9e6d8d056676aadebdf.png

Share this post


Link to post
Share on other sites
  • 0

you see ?? in my snipet? but error show what you add it

this mean you add by self some chars. simply code only code what i gave

Share this post


Link to post
Share on other sites
  • 0
On 4/9/2020 at 9:36 AM, 4144 said:

well gepard not prevent cheaters. it create some issues for botters only. Real protection can be only server side.

from log this is packets with wrong skill id. you can ignore them or add some code for disconnect players with wrong skill sent.

 

remove code what you add before, and place this code:

if (skill->get_index(skill_id) == 0) { sockt->eof(fd); ShowWarning("Wrong skill detected %d. Player disconnected\n", skill_id); return; }

This code should disconnect anyone who using skill what was not added to skill_db.

 

Yes, will try again next update. I don't know why. I just copy paste your snippet. Will get  back to you. thanks!

 

Share this post


Link to post
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.   Restore formatting

  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.

Loading...
Sign in to follow this  

×
×
  • Create New...

Important Information

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