Jump to content
  • 0

cell walkable with hidden npc in it


hakuren

Question


  • Group:  Members
  • Topic Count:  120
  • Topics Per Day:  0.03
  • Content Count:  295
  • Reputation:   6
  • Joined:  12/02/11
  • Last Seen:  

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

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 1

  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   613
  • Joined:  07/05/12
  • Last Seen:  

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

  • 1

  • Group:  Forum Manager
  • Topic Count:  282
  • Topics Per Day:  0.06
  • Content Count:  3123
  • Reputation:   1617
  • Joined:  03/26/12
  • Last Seen:  

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

  • 0

  • Group:  Members
  • Topic Count:  25
  • Topics Per Day:  0.01
  • Content Count:  926
  • Reputation:   168
  • Joined:  04/05/13
  • Last Seen:  

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

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  120
  • Topics Per Day:  0.03
  • Content Count:  295
  • Reputation:   6
  • Joined:  12/02/11
  • Last Seen:  

24 minutes ago, Start_ said:

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

already did but nothing happen cant walk to that coordinate

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  120
  • Topics Per Day:  0.03
  • Content Count:  295
  • Reputation:   6
  • Joined:  12/02/11
  • Last Seen:  

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 ?

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