lekkereten Posted November 26, 2012 Posted November 26, 2012 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: (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.
Euphy Posted November 26, 2012 Posted November 26, 2012 I remember already having this discussion before... o: Agreed with splitting into @cleanarea / @cleanmap. That drawing is brilliant. xD
Lighta Posted November 26, 2012 Posted November 26, 2012 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)
Akkarin Posted November 26, 2012 Posted November 26, 2012 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
Emistry Posted November 26, 2012 Posted November 26, 2012 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; 1
xazax Posted November 26, 2012 Posted November 26, 2012 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.
Recommended Posts