Jump to content
  • 0

R> @hatredreset command for players


Question

Posted

A source modification that allows player to use @hatredreset. Thank you. I already tried the one in eAthena. but i think

its a little more different :-) 

 

Thank you for those who will share :-)

14 answers to this question

Recommended Posts

  • 0
Posted

Not sure what variable does Hatred skill store in global_reg_value, kindly change the 'pc_hate_id' to the correct variable name...

-	script	hatredreset	-1,{

OnInit:
	bindatcmd strnpcinfo(1),strnpcinfo(1)+"::OnAtcommand",0,40;
	end;

OnAtcommand:
	query_sql("UPDATE `global_reg_value` SET `value`='0' WHERE `str`='PC_HATE_MOB_%' AND `char_id`='"+getcharid(0)+"'");
	message strcharinfo(0),"Reset 'Hatred' maps, you may need to relog for the changes to take effect.";
	end;

}
  • 0
Posted

 

Not sure what variable does Hatred skill store in global_reg_value, kindly change the 'pc_hate_id' to the correct variable name...

-	script	hatredreset	-1,{

OnInit:
	bindatcmd strnpcinfo(1),strnpcinfo(1)+"::OnAtcommand",0,40;
	end;

OnAtcommand:
	query_sql("UPDATE `global_reg_value` SET `value`='0' WHERE `str`='pc_hate_id' AND `char_id`='"+getcharid(0)+"'");
	message strcharinfo(0),"Your hatred has been reset.";
	end;

}

 

Which one is it :

 

PC_HATE_MOB_MOON
PC_HATE_MOB_STAR
PC_HATE_MOB_SUN
 
???
  • 0
Posted
src/map/atcommand.c

 

Add this

/*==========================================
 * Feel (SG save map) Reset [HiddenDragon]
 *------------------------------------------*/
ACMD_FUNC(feelreset)
{
pc_resetfeel(sd);
clif_displaymessage(fd, msg_txt(sd,1324)); // Reset 'Feeling' maps.


return 0;
}
+ /*==========================================
+ * Hatred Reset [GodLesZ] modified by n00b1e 
+ *------------------------------------------*/ 
+ ACMD_FUNC(hatredreset) 
+ { 
+ pc_resethate(sd); 
+ clif_displaymessage(sd->fd, "Reset 'Hatred' state~"); 
+ return 0; 
+ }

and this

 

 ACMD_DEF(feelreset),
+ACMD_DEF(hatredreset),
 ACMD_DEF(auction),

And then edit your groups.conf and atcommand.conf

 

btw Thanks to GodLesZ for the old eathena modification

  • 0
Posted

when i used this i got error then suddenly when i remove it
 

atcommand.c: In function ‘atcommand_param’:
atcommand.c:2517: error: ‘struct Battle_Config’ has no member named ‘atcommand_max_stat_bypass’
atcommand.c: In function ‘atcommand_stat_all’:
atcommand.c:2579: error: ‘struct Battle_Config’ has no member named ‘atcommand_max_stat_bypass’
atcommand.c: In function ‘atcommand_recallall’:
atcommand.c:3532: error: too few arguments to function ‘pc_setstand’
atcommand.c: In function ‘atcommand_reload’:
atcommand.c:3690: warning: implicit declaration of function ‘merc_reload’
atcommand.c:3691: warning: implicit declaration of function ‘read_mercenarydb’
atcommand.c:3692: warning: implicit declaration of function ‘read_mercenary_skilldb’
atcommand.c:3697: warning: implicit declaration of function ‘merc_skill_reload’
atcommand.c: In function ‘atcommand_useskill’:
atcommand.c:5525: warning: implicit declaration of function ‘merc_is_hom_active’
atcommand.c: In function ‘atcommand_autotrade’:
atcommand.c:5747: error: ‘buyingstore_db’ undeclared (first use in this function)
atcommand.c:5747: error: (Each undeclared identifier is reported only once
atcommand.c:5747: error: for each function it appears in.)
atcommand.c: In function ‘atcommand_homlevel’:
atcommand.c:7132: warning: implicit declaration of function ‘merc_hom_levelup’
atcommand.c: In function ‘atcommand_homevolution’:
atcommand.c:7154: warning: implicit declaration of function ‘merc_hom_evolution’
atcommand.c: In function ‘atcommand_makehomun’:
atcommand.c:7214: warning: implicit declaration of function ‘merc_create_homunculus_request’
atcommand.c: In function ‘atcommand_homshuffle’:
atcommand.c:7421: warning: implicit declaration of function ‘merc_hom_shuffle’
atcommand.c: In function ‘atcommand_font’:
atcommand.c:8672: error: ‘struct map_session_data’ has no member named ‘user_font’
atcommand.c:8674: error: ‘struct map_session_data’ has no member named ‘user_font’
atcommand.c:8686: error: ‘struct map_session_data’ has no member named ‘user_font’
atcommand.c:8688: error: ‘struct map_session_data’ has no member named ‘user_font’
atcommand.c: In function ‘atcmd_channel_help’:
atcommand.c:9082: error: ‘Channel_Config’ undeclared (first use in this function)
atcommand.c: In function ‘atcommand_channel’:
atcommand.c:9175: error: ‘Channel_Config’ undeclared (first use in this function)
atcommand.c: In function ‘atcommand_fontcolor’:
atcommand.c:9224: error: ‘Channel_Config’ undeclared (first use in this function)
make[1]: *** [obj/atcommand.o] Error 1
make[1]: Leaving directory `/root/rAthena/src/map'
make: *** [map] Error 2
  • 0
Posted

which one is working?

 

The one Sandbox posted.

-	script	hatredreset	-1,{

OnInit:
	bindatcmd strnpcinfo(1),strnpcinfo(1)+"::OnAtcommand",0,40;
	end;

OnAtcommand:
	query_sql("UPDATE `acc_reg_str` SET `value`='0' WHERE `str`='PC_HATE_MOB_%' AND `char_id`='"+getcharid(0)+"'");
	message strcharinfo(0),"Reset 'Hatred' maps, you may need to relog for the changes to take effect.";
	end;

}
  • 0
Posted

you have to use the source mod to clear the hatred, not the SQL trick.

 

The SQL trick only work if you executed it while your char isn't online.

Any changes that you made on the data that stored within these `acc_reg_*` table won't be updated unless your char is currently offline.

When your char logout, it would simply get overwritten by current status of the char.

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...