Jump to content
  • 0

Array of Coordinates in Map.h


Question

4 answers to this question

Recommended Posts

  • 0
Posted
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)?)

  • 0
Posted

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.

  • 0
Posted
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.

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...