Jump to content
  • 0

cell walkable with hidden npc in it


Question

Posted

hi rathena

im having a problem with hidden npc or hidenpc when i try to walk to cell that my npc in it, it just move at the side of the cell please help me

is it possible to make that npc hidden at the same time cell-walkable?

 

hope someone help me and thank you in advance have a nice day

6 answers to this question

Recommended Posts

  • 1
Posted

Well there is no setting like Akkarin said, but this change in map.cpp should allow you to walk on cell where the npcs are hidden/disabled/invisible (untested)

@@ -553,6 +553,11 @@ int map_count_oncell(int16 m, int16 x, int16 y, int type, int flag)
 	if (type&~BL_MOB)
 		for( bl = mapdata->block[bx+by*mapdata->bxs] ; bl != NULL ; bl = bl->next )
 			if(bl->x == x && bl->y == y && bl->type&type) {
+				if (bl->type == BL_NPC) {
+					struct npc_data *nd = (struct npc_data *)bl;
+					if (nd && (nd->sc.option&(OPTION_INVISIBLE|OPTION_HIDE) || nd->class_ == JT_FAKENPC || nd->class_ == JT_HIDDEN_WARP_NPC))
+						continue;
+				}
 				if(flag&1) {
 					struct unit_data *ud = unit_bl2ud(bl);
 					if(!ud || ud->walktimer == INVALID_TIMER)

 

  • MVP 1
  • 1
Posted

Simple answer: no.

You'd need to completely disable the NPC before you can walk on that cell again. Objects in a cell aren't stackable.

However, you can see the /src/config/core.hpp file for a workaround. Many moons ago there was a mod installed but left disabled by default to allow cell stacking.

https://github.com/rathena/rathena/blob/master/src/config/core.hpp#L29

  • MVP 1
  • 0
Posted
21 hours ago, Capuche said:

Well there is no setting like Akkarin said, but this change in map.cpp should allow you to walk on cell where the npcs are hidden/disabled/invisible (untested)


@@ -553,6 +553,11 @@ int map_count_oncell(int16 m, int16 x, int16 y, int type, int flag)
 	if (type&~BL_MOB)
 		for( bl = mapdata->block[bx+by*mapdata->bxs] ; bl != NULL ; bl = bl->next )
 			if(bl->x == x && bl->y == y && bl->type&type) {
+				if (bl->type == BL_NPC) {
+					struct npc_data *nd = (struct npc_data *)bl;
+					if (nd && (nd->sc.option&(OPTION_INVISIBLE|OPTION_HIDE) || nd->class_ == JT_FAKENPC || nd->class_ == JT_HIDDEN_WARP_NPC))
+						continue;
+				}
 				if(flag&1) {
 					struct unit_data *ud = unit_bl2ud(bl);
 					if(!ud || ud->walktimer == INVALID_TIMER)

 

thank you @Capuche it works!

this can be help with my custom script thank you so much

and thank you also @Akkarin ?

  • 0
Posted
On 4/10/2020 at 4:35 AM, Start_ said:

Did you try setcell walkable into it? (Not sure it's work but you can try)

Hello sir, 

Many moons agora you've suggested this setcell walkable thing and if you may I would like to know where can I change the "walkable cells"?

Thank you for the consideration and I wish you all the best! ❤️

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