Jump to content

Release: @hidepet / @hidepetall commands


Daegaladh

Recommended Posts


  • Group:  Developer
  • Topic Count:  30
  • Topics Per Day:  0.01
  • Content Count:  239
  • Reputation:   147
  • Joined:  11/21/11
  • Last Seen:  

@hidepet / @hidepetall commands


@hidepet allows to hide all pets except the player's, whereas @hidepetall hides all pets, including the player's.

This mod also allows to set a default parameter in battle_conf, just add

hide_pet: 1

To set all pets hidden except the player's, or 2 for all pets period.

 

 


 

  • Upvote 2
  • Love 1
  • MVP 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  63
  • Topics Per Day:  0.02
  • Content Count:  1016
  • Reputation:   191
  • Joined:  11/27/14
  • Last Seen:  

I hope this will add to rA Master . This is really cool idea

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  27
  • Topics Per Day:  0.01
  • Content Count:  166
  • Reputation:   27
  • Joined:  11/20/11
  • Last Seen:  

Is this safe @Daegaladh ?

 

hidepet.png

aaassss.png

Edited by Ice Bear
Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  30
  • Topics Per Day:  0.01
  • Content Count:  239
  • Reputation:   147
  • Joined:  11/21/11
  • Last Seen:  

5 hours ago, Ice Bear said:

Is this safe @Daegaladh ?

 

hidepet.png

aaassss.png

I made this for the lastest rAthena, so just update your rAthena, or use sd->fd instead

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  27
  • Topics Per Day:  0.01
  • Content Count:  166
  • Reputation:   27
  • Joined:  11/20/11
  • Last Seen:  

@Daegaladh thanks manage to solve it. anyone who experience the same error can dm me for the changes thanks again ❤️

Edited by Ice Bear
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  27
  • Topics Per Day:  0.01
  • Content Count:  166
  • Reputation:   27
  • Joined:  11/20/11
  • Last Seen:  

Thanks ill check the latest one for this part ill try 😄

Link to comment
Share on other sites

  • 3 weeks later...

  • Group:  Developer
  • Topic Count:  30
  • Topics Per Day:  0.01
  • Content Count:  239
  • Reputation:   147
  • Joined:  11/21/11
  • Last Seen:  

I've improved it a bit and added a version compatible with the old clif_clearunit_single for older rAthena versions.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.02
  • Content Count:  17
  • Reputation:   0
  • Joined:  08/17/24
  • Last Seen:  

very useful features command for player love it works fine thanks

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  7
  • Reputation:   1
  • Joined:  10/14/16
  • Last Seen:  

Hello! this warning appeared on the console like this even using the old_clearunit version

In file included from ../common/cbasetypes.hpp:338:0,
                 from atcommand.hpp:7,
                 from atcommand.cpp:4:
../custom/atcommand.inc: In function int atcommand_hidepet_sub(block_list*, __va_list_tag*)’:
../custom/atcommand.inc:449:18: warning: bool is promoted to int when passed through ‘...’
  if (!va_arg(ap, bool) && sd->pd != nullptr && sd->pd->bl.id == bl->id) {
                  ^
../custom/atcommand.inc:449:18: note: (so you should pass int not bool to va_arg’)
../custom/atcommand.inc:449:18: note: if this code is reached, the program will abort
../custom/atcommand.inc:450:17: warning: uint8 {aka unsigned char}’ is promoted to int when passed through ‘...’
   if(va_arg(ap, uint8) == 2)
                 ^
../custom/atcommand.inc:450:17: note: if this code is reached, the program will abort

@edit

Solvet change bool and unit8 to int.  "If this will break I don't know but it worked"

+	if (!va_arg(ap, bool) && sd->pd != nullptr && sd->pd->bl.id == bl->id) {
+		if(va_arg(ap, uint8) == 2)
+			clif_spawn(&sd->pd->bl, true);
+		return 0;
+	}
+

TO

+	if (!va_arg(ap, int) && sd->pd != nullptr && sd->pd->bl.id == bl->id) {
+		if(va_arg(ap, int) == 2)
+			clif_spawn(&sd->pd->bl, true);
+		return 0;
+	}
+

 

Edited by drigoguille
  • Upvote 1
Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  30
  • Topics Per Day:  0.01
  • Content Count:  239
  • Reputation:   147
  • Joined:  11/21/11
  • Last Seen:  

On 9/18/2024 at 2:40 PM, drigoguille said:

Hello! this warning appeared on the console like this even using the old_clearunit version

In file included from ../common/cbasetypes.hpp:338:0,
                 from atcommand.hpp:7,
                 from atcommand.cpp:4:
../custom/atcommand.inc: In function int atcommand_hidepet_sub(block_list*, __va_list_tag*)’:
../custom/atcommand.inc:449:18: warning: bool is promoted to int when passed through ‘...’
  if (!va_arg(ap, bool) && sd->pd != nullptr && sd->pd->bl.id == bl->id) {
                  ^
../custom/atcommand.inc:449:18: note: (so you should pass int not bool to va_arg’)
../custom/atcommand.inc:449:18: note: if this code is reached, the program will abort
../custom/atcommand.inc:450:17: warning: uint8 {aka unsigned char}’ is promoted to int when passed through ‘...’
   if(va_arg(ap, uint8) == 2)
                 ^
../custom/atcommand.inc:450:17: note: if this code is reached, the program will abort

@edit

Solvet change bool and unit8 to int.  "If this will break I don't know but it worked"

+	if (!va_arg(ap, bool) && sd->pd != nullptr && sd->pd->bl.id == bl->id) {
+		if(va_arg(ap, uint8) == 2)
+			clif_spawn(&sd->pd->bl, true);
+		return 0;
+	}
+

TO

+	if (!va_arg(ap, int) && sd->pd != nullptr && sd->pd->bl.id == bl->id) {
+		if(va_arg(ap, int) == 2)
+			clif_spawn(&sd->pd->bl, true);
+		return 0;
+	}
+

 

When is your rAthena from? I used one from January 1st 2024 as a base for the old clif_clearunit_single version.

Not sure why you get that warning, since all and prev_state are defined as bool and uint8 respectively.

 

It seems to be an issue with the compiler, I'll fix it on the next version

Edited by Daegaladh
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  53
  • Topics Per Day:  0.01
  • Content Count:  141
  • Reputation:   0
  • Joined:  06/22/14
  • Last Seen:  

How to fix this?

clif_clearunit_single(bl->id, CLR_OUTSIGHT, *sd);


image.png.5f9edc7dd8db0e68b627b86cb3c8cf79.png

Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  30
  • Topics Per Day:  0.01
  • Content Count:  239
  • Reputation:   147
  • Joined:  11/21/11
  • Last Seen:  

15 hours ago, louigui0224 said:

How to fix this?

clif_clearunit_single(bl->id, CLR_OUTSIGHT, *sd);


image.png.5f9edc7dd8db0e68b627b86cb3c8cf79.png

Just use the old clif_clearunit_single version or update your rAthena 

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  45
  • Reputation:   8
  • Joined:  03/17/21
  • Last Seen:  

clif_clearunit_single(bl->id, CLR_OUTSIGHT, fd);

 

Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  30
  • Topics Per Day:  0.01
  • Content Count:  239
  • Reputation:   147
  • Joined:  11/21/11
  • Last Seen:  

10 hours ago, EAJ_BASEMASK said:
clif_clearunit_single(bl->id, CLR_OUTSIGHT, fd);

 

That's incorrect, there's no direct access to fd on that function. Plus I already provided a fix for that specific version.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  45
  • Reputation:   8
  • Joined:  03/17/21
  • Last Seen:  

6 hours ago, Daegaladh said:

That's incorrect, there's no direct access to fd on that function. Plus I already provided a fix for that specific version.

i just realized it was changed, the headers changes as well in this commit: https://github.com/rathena/rathena/commit/5df7de2b15959b234d0b1a73c534b1720e3acc21

Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  30
  • Topics Per Day:  0.01
  • Content Count:  239
  • Reputation:   147
  • Joined:  11/21/11
  • Last Seen:  

That's why I released 2 versions of the patch, for before and after clif_clearunit_single changes.

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