Jump to content
  • 0

R> @hatredreset command for players


Markyieee

Question


  • Group:  Members
  • Topic Count:  42
  • Topics Per Day:  0.01
  • Content Count:  134
  • Reputation:   4
  • Joined:  06/14/12
  • Last Seen:  

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 :-)

Link to comment
Share on other sites

14 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  38
  • Topics Per Day:  0.01
  • Content Count:  949
  • Reputation:   174
  • Joined:  06/12/12
  • Last Seen:  

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;

}
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  42
  • Topics Per Day:  0.01
  • Content Count:  134
  • Reputation:   4
  • Joined:  06/14/12
  • Last Seen:  

 

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
 
???
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  38
  • Topics Per Day:  0.01
  • Content Count:  949
  • Reputation:   174
  • Joined:  06/12/12
  • Last Seen:  

I've updated the post containing the script, test it out

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  2
  • Topics Per Day:  0.00
  • Content Count:  15
  • Reputation:   6
  • Joined:  02/11/12
  • Last Seen:  

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

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  7
  • Topics Per Day:  0.00
  • Content Count:  10
  • Reputation:   0
  • Joined:  02/16/13
  • Last Seen:  

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
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  35
  • Topics Per Day:  0.01
  • Content Count:  92
  • Reputation:   2
  • Joined:  01/04/15
  • Last Seen:  

thanks for this hatredreset working fine!

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  3
  • Topics Per Day:  0.00
  • Content Count:  16
  • Reputation:   0
  • Joined:  02/16/16
  • Last Seen:  

which one is working?

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  162
  • Topics Per Day:  0.05
  • Content Count:  1546
  • Reputation:   192
  • Joined:  07/23/14
  • Last Seen:  

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;

}
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  3
  • Topics Per Day:  0.00
  • Content Count:  16
  • Reputation:   0
  • Joined:  02/16/16
  • Last Seen:  

how to make this @hatredreset without relogging?


bump?

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  48
  • Reputation:   0
  • Joined:  07/06/16
  • Last Seen:  

Sandbox's script has no error, i can @hatredreset but it does not reset my hatred. Any help?

Edited by mauiboy
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  38
  • Topics Per Day:  0.01
  • Content Count:  949
  • Reputation:   174
  • Joined:  06/12/12
  • Last Seen:  

Sandbox's script has no error, i can @hatredreset but it does not reset my hatred. Any help?

You need to relogin/char select.

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  48
  • Reputation:   0
  • Joined:  07/06/16
  • Last Seen:  

 

Sandbox's script has no error, i can @hatredreset but it does not reset my hatred. Any help?

You need to relogin/char select.

 

Still the same.

Link to comment
Share on other sites

  • 0

  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10013
  • Reputation:   2346
  • Joined:  10/28/11
  • Last Seen:  

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.

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  48
  • Reputation:   0
  • Joined:  07/06/16
  • Last Seen:  

I have found a solution. This is currently working on my test server.

 

https://rathena.org/board/topic/65054-hatereset/

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