Jump to content

@cleanmap -- Not doing what it says?


Recommended Posts

Posted

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.

Posted

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

Agreed with splitting into @cleanarea / @cleanmap.

That drawing is brilliant. xD

Posted

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)

Posted

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

Posted

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
Posted

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.

  • Recently Browsing   0 members

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