Jump to content
  • 0

Hidden Watchers on PVP event problem


Good Fellow

Question


  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  22
  • Reputation:   0
  • Joined:  04/23/18
  • Last Seen:  

Hi guys please help me...

On my Setup I have an Event Watchers Hidden...

My problem is the cells that has been occupied by the watchers are not walkable or standable by the players playing inside arena.

Please enlighten me how to fix this.. I hope that watchers location (cell) won't effect the players inside..

Link to comment
Share on other sites

8 answers to this question

Recommended Posts

  • 1

  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  2044
  • Reputation:   682
  • Joined:  10/09/12
  • Last Seen:  

you seems to have 0 knowledge on source edits ...
so ... spoon feed -> this patch has been tested work

 src/map/unit.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/map/unit.cpp b/src/map/unit.cpp
index 8171fff..327db3b 100644
--- a/src/map/unit.cpp
+++ b/src/map/unit.cpp
@@ -562,7 +562,7 @@ static int unit_walktoxy_timer(int tid, unsigned int tick, int id, intptr_t data
 		ud->to_y = bl->y;
 
 		if(battle_config.official_cell_stack_limit > 0
-			&& map_count_oncell(bl->m, x, y, BL_CHAR|BL_NPC, 1) > battle_config.official_cell_stack_limit) {
+			&& map_count_oncell(bl->m, x, y, BL_CHAR, 1) > battle_config.official_cell_stack_limit) {
 			//Walked on occupied cell, call unit_walktoxy again
 			if(ud->steptimer != INVALID_TIMER) {
 				//Execute step timer on next step instead

this will make players can stand on top of ANY npc ... though
it seems the map_count_oncell is used by several other functions, so I dare not touch it

Link to comment
Share on other sites

  • 0

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

Set your npc script as "floating":

-	script	npcname	-1,{
	...
}

 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  2
  • Reputation:   0
  • Joined:  01/22/18
  • Last Seen:  

I think he's not referring to npc.. He's Referring to the watcher?

 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  2044
  • Reputation:   682
  • Joined:  10/09/12
  • Last Seen:  

just tested

prontera,155,185,5	script	kjsdfhksjf	-1,{}

even as I use FAKE_NPC (-1) or HIDDEN_NPC(139), and @rura prontera 155 185, I can't walk on top of that tile
as if telling the players there is indeed an npc hiding there

 

btw what is event watchers ... when I use forum search it point to my old post :ani_swt3:

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  22
  • Reputation:   0
  • Joined:  04/23/18
  • Last Seen:  

5 hours ago, AnnieRuru said:

just tested


prontera,155,185,5	script	kjsdfhksjf	-1,{}

even as I use FAKE_NPC (-1) or HIDDEN_NPC(139), and @rura prontera 155 185, I can't walk on top of that tile
as if telling the players there is indeed an npc hiding there

 

btw what is event watchers ... when I use forum search it point to my old post :ani_swt3:

Hi Master AnnieRuru..

Hi This watcher is likely same on the one of your old post sorry my title is incorrect.. Thanks for the Idea! I use SC_Berserk instead of pcblockchat getcharid(3), 1;         pcblockattack getcharid(3), 1;

My problem is When the watcher is inside the arena (hidden) the Players can't walk on top of that tile.. I just Want to know if it is possible to make the watcher's hidden while you can walk on the top of it?

Thanks!

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  2044
  • Reputation:   682
  • Joined:  10/09/12
  • Last Seen:  

1 hour ago, Good Fellow said:

I just Want to know if it is possible to make the watcher's hidden while you can walk on the top of it? 

https://github.com/HerculesWS/Hercules/issues/834
according to kyeme in the screenshot taken from iro server, you CANNOT walk on top of FAKE_NPC sprite

in other words, you want to make some unofficial adjustment ...

just check the source code, seems possible
under unit_walktoxy function inside src\map\unit.cpp ...

	if ((flag&8) && !map_closest_freecell(bl->m, &x, &y, BL_CHAR|BL_NPC, 1)) //This might change x and y
		return 0;

just add a condition inside the map_closest_freecell function ...

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  22
  • Reputation:   0
  • Joined:  04/23/18
  • Last Seen:  

I'm Sorry AnnieRuru thanks fot the fast response. I'm kinda confuse on this 1.. If you have a free time please help me.. What should I do?

If BL_CHAR = atcommandhide ? or if it NPC -1? or should i edit this one..

 if ((flag&8) && !map_closest_freecell(bl->m, &x, &y, BL_CHAR|BL_NPC, 1)) //This might change x and y
        return 0;

Thanks..

 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  22
  • Reputation:   0
  • Joined:  04/23/18
  • Last Seen:  

Sorry for having 0 Knowledge and spoon feeding master AnnieRuru

Thanks for the help..

Solved! using the script you've provide!

 

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