Jump to content

@cleanmap -- Not doing what it says?


lekkereten

Recommended Posts


  • Group:  Members
  • Topic Count:  8
  • Topics Per Day:  0.00
  • Content Count:  148
  • Reputation:   46
  • Joined:  11/02/11
  • Last Seen:  

ACMD_FUNC(cleanmap)
{
   map_foreachinarea(atcommand_cleanmap_sub, sd->bl.m,
                     sd->bl.x-AREA_SIZE*2, sd->bl.y-AREA_SIZE*2,
                     sd->bl.x+AREA_SIZE*2, sd->bl.y+AREA_SIZE*2,
                     BL_ITEM);
   clif_displaymessage(fd, msg_txt(1221)); // All dropped items have been cleaned up.
   return 0;
}

Now knowing that by default AREA_SIZE equals 14, and assuming x=50 and y=68, this is the area (the inside the red rectangle) that would be cleaned:

hAaKU.jpg(verified by Flaid --blame him if it is wrong)

It doesnt clean everything on the map like it says it does.

So I suggest we create a new command @cleanarea to do what @cleanmap is doing right now and change @clean to actually clean the entire map.

Feel free to discuss.

@edit

Implemented in r16971.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  72
  • Topics Per Day:  0.02
  • Content Count:  2997
  • Reputation:   1130
  • Joined:  05/27/12
  • Last Seen:  

I remember already having this discussion before... o:

Agreed with splitting into @cleanarea / @cleanmap.

That drawing is brilliant. xD

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  16
  • Topics Per Day:  0.00
  • Content Count:  737
  • Reputation:   216
  • Joined:  11/29/11
  • Last Seen:  

Damn I tought the graphic was with real scale xd.

Agreing with Euphy for splitting the command and probably renome this one. (map_foreachinrange may be easier to use for area)

Link to comment
Share on other sites


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

So I suggest we create a new command @cleanarea to do what @cleanmap is doing right now and change @clean to actually clean the entire map.

I agree - well spotted :P

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.00
  • Content Count:  554
  • Reputation:   70
  • Joined:  04/04/12
  • Last Seen:  

+1

well agreed go for it! :)

:meow:

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  

erm...just another addon suggestion for this.. ...

if this @cleanmap / @cleanarea is approved... can add this for Script Command too ?

so that a npc can perform cleanmap / cleanarea in specific map / location / area ??

currently we have makeitem to create item on floor...why not add a cleanmap / cleanarea

Example

cleanmap "mapname";

cleanarea "mapname",x1,y1,x2,y2;

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  11
  • Topics Per Day:  0.00
  • Content Count:  427
  • Reputation:   123
  • Joined:  11/17/11
  • Last Seen:  

Agreed.

Cleanarea atcommand could have an optional area size. About the script command.. Yeah, as far as I know, we do not recommend to use atcommands in scripts, so maybe it is worth add these command too.

Link to comment
Share on other sites

×
×
  • Create New...