lekkereten Posted November 26, 2012 Group: Members Topic Count: 8 Topics Per Day: 0.00 Content Count: 148 Reputation: 46 Joined: 11/02/11 Last Seen: November 25, 2024 Share 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. Link to comment Share on other sites More sharing options...
Euphy Posted November 26, 2012 Group: Members Topic Count: 72 Topics Per Day: 0.02 Content Count: 2997 Reputation: 1132 Joined: 05/27/12 Last Seen: June 1, 2017 Share Posted November 26, 2012 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 More sharing options...
Lighta Posted November 26, 2012 Group: Members Topic Count: 16 Topics Per Day: 0.00 Content Count: 737 Reputation: 216 Joined: 11/29/11 Last Seen: December 20, 2020 Share 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) Link to comment Share on other sites More sharing options...
Akkarin Posted November 26, 2012 Group: Forum Manager Topic Count: 282 Topics Per Day: 0.06 Content Count: 3144 Reputation: 1632 Joined: 03/26/12 Last Seen: April 15 Share 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 Link to comment Share on other sites More sharing options...
malufett Posted November 26, 2012 Group: Members Topic Count: 9 Topics Per Day: 0.00 Content Count: 554 Reputation: 70 Joined: 04/04/12 Last Seen: November 8, 2013 Share Posted November 26, 2012 +1 well agreed go for it! Link to comment Share on other sites More sharing options...
Emistry Posted November 26, 2012 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10018 Reputation: 2369 Joined: 10/28/11 Last Seen: Sunday at 05:32 PM Share 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 Link to comment Share on other sites More sharing options...
xazax Posted November 26, 2012 Group: Members Topic Count: 11 Topics Per Day: 0.00 Content Count: 427 Reputation: 123 Joined: 11/17/11 Last Seen: December 31, 2022 Share 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. Link to comment Share on other sites More sharing options...
Recommended Posts