Jump to content
  • 0

Array of Coordinates in Map.h


Freya

Question


  • Group:  Members
  • Topic Count:  16
  • Topics Per Day:  0.01
  • Content Count:  120
  • Reputation:   53
  • Joined:  02/12/17
  • Last Seen:  

Greetings, I would like to ask multiple coordinates when you use the command @go to avoid warp portals spamming. Thank you.

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  42
  • Topics Per Day:  0.01
  • Content Count:  1096
  • Reputation:   344
  • Joined:  02/26/12
  • Last Seen:  

2 hours ago, Freya said:

Greetings, I would like to ask multiple coordinates when you use the command @go to avoid warp portals spamming. Thank you.

Can you show any example what do you want receive in result, and how it must looks like? (and for what, what are you trying to avoid (how reproduce)?)

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  16
  • Topics Per Day:  0.01
  • Content Count:  120
  • Reputation:   53
  • Joined:  02/12/17
  • Last Seen:  

Hello @Anacondaqq, for example using @go would normally lead you to only one coordinate. For example, if you use @go prontera, you will be warped to only one coord. In my request, I would like to ask that whenever I use @go prontera, there would be two more coords.
For example, if I use the command @go 0 then either I will be warped at prontera 0,0 or prontera 1,1, these two are randomized.

The thing I'm avoiding is the warp portal spamming. Because of one coordination available, warp portal jokers might abuse their skills to other players thus leading their client to load always -- I believe using @skilloff won't restrict warp portals. Thank you.

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  42
  • Topics Per Day:  0.01
  • Content Count:  1096
  • Reputation:   344
  • Joined:  02/26/12
  • Last Seen:  

1 hour ago, Freya said:

Hello @Anacondaqq, for example using @go would normally lead you to only one coordinate. For example, if you use @go prontera, you will be warped to only one coord. In my request, I would like to ask that whenever I use @go prontera, there would be two more coords.
For example, if I use the command @go 0 then either I will be warped at prontera 0,0 or prontera 1,1, these two are randomized.

The thing I'm avoiding is the warp portal spamming. Because of one coordination available, warp portal jokers might abuse their skills to other players thus leading their client to load always -- I believe using @skilloff won't restrict warp portals. Thank you.

1. open pc.c and find function called enum e_setpos pc_setpos(struct map_session_data* sd, unsigned short mapindex, int x, int y, clr_type clrtype)

inside it, after

m = map_mapindex2mapid(mapindex); 

2. add code below:

	if( sd->bl.m == m && sd->bl.x == x && sd->bl.y == y )
		return SETPOS_OK;

3. recompile the  server, and test.

 

Main logic, if player coordinates the same where need to warp a player -> then do nothing.

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  16
  • Topics Per Day:  0.01
  • Content Count:  120
  • Reputation:   53
  • Joined:  02/12/17
  • Last Seen:  

Thank you for the fast reply Anacondaqq, unfortunately it did not work. Perhaps I could use that in the near future.

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