hakuren Posted April 10, 2020 Share Posted April 10, 2020 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 Quote Link to comment Share on other sites More sharing options...
0 Capuche Posted April 10, 2020 Share Posted April 10, 2020 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) 1 Quote Link to comment Share on other sites More sharing options...
0 Start_ Posted April 10, 2020 Share Posted April 10, 2020 Did you try setcell walkable into it? (Not sure it's work but you can try) Quote Link to comment Share on other sites More sharing options...
0 hakuren Posted April 10, 2020 Author Share Posted April 10, 2020 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 Quote Link to comment Share on other sites More sharing options...
0 Akkarin Posted April 10, 2020 Share Posted April 10, 2020 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 1 Quote Link to comment Share on other sites More sharing options...
0 hakuren Posted April 11, 2020 Author Share Posted April 11, 2020 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 Quote Link to comment Share on other sites More sharing options...
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