hakuren Posted April 10, 2020 Group: Members Topic Count: 120 Topics Per Day: 0.02 Content Count: 295 Reputation: 6 Joined: 12/02/11 Last Seen: November 6, 2023 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...
1 Capuche Posted April 10, 2020 Group: Developer Topic Count: 10 Topics Per Day: 0.00 Content Count: 2407 Reputation: 616 Joined: 07/05/12 Last Seen: March 20 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...
1 Akkarin Posted April 10, 2020 Group: Forum Manager Topic Count: 282 Topics Per Day: 0.06 Content Count: 3144 Reputation: 1630 Joined: 03/26/12 Last Seen: Yesterday at 10:17 AM 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 Start_ Posted April 10, 2020 Group: Members Topic Count: 26 Topics Per Day: 0.01 Content Count: 950 Reputation: 180 Joined: 04/05/13 Last Seen: 2 hours ago Share Posted April 10, 2020 Did you try setcell walkable into it? (Not sure it's work but you can try) 1 Quote Link to comment Share on other sites More sharing options...
0 hakuren Posted April 10, 2020 Group: Members Topic Count: 120 Topics Per Day: 0.02 Content Count: 295 Reputation: 6 Joined: 12/02/11 Last Seen: November 6, 2023 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 hakuren Posted April 11, 2020 Group: Members Topic Count: 120 Topics Per Day: 0.02 Content Count: 295 Reputation: 6 Joined: 12/02/11 Last Seen: November 6, 2023 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...
0 zeusc137 Posted September 24, 2024 Group: Members Topic Count: 9 Topics Per Day: 0.01 Content Count: 105 Reputation: 7 Joined: 04/11/22 Last Seen: Sunday at 01:22 AM Share Posted September 24, 2024 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! Quote Link to comment Share on other sites More sharing options...
Question
hakuren
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
6 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.