• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

[Clean] Protection Zone!

slaw

Software Developer
Joined
Aug 27, 2007
Messages
3,784
Solutions
133
Reaction score
1,275
Location
Germany
GitHub
slawkens
I want enable cleaning in PZ. Becouse when there is map cleaning then it only delete 1/10 becouse 9/10 is in depo! So this clean make nothing! :P

I have found it
Code:
						for(int32_t ly = 0; ly < FLOOR_SIZE; ++ly)
						{
							for(int32_t lx = 0; lx < FLOOR_SIZE; ++lx)
							{
								if(floor && (tile = floor->tiles[(nx + lx) & FLOOR_MASK][(ny + ly) & FLOOR_MASK]))
								{
									if(!tile->hasFlag(TILESTATE_PROTECTIONZONE))
									{
										for(uint32_t i = 0; i < tile->getThingCount(); ++i)
										{
											item = tile->__getThing(i)->getItem();
											if(item && !item->isLoadedFromMap() && !item->isNotMoveable())
											{
												g_game.internalRemoveItem(item);
												i--;
												count++;
											}
										}
									}
								}
							}
						}

need i remove something more, or
if(!tile->hasFlag(TILESTATE_PROTECTIONZONE))
is enought, and it will work propertly?

#Edit
Doesnt work becouse cleaning houses =\. Changed to TILESTATE_HOUSE, and i'll try.
 
Last edited:
Does TILESTATE_HOUSE even exists? :p
Still, my team said its good to clean without depots.
Since if someone would show his equipment and some kids throw on it mass trash, on clean he would lose like MPA...
 
Does TILESTATE_HOUSE even exists? :p
Still, my team said its good to clean without depots.
Since if someone would show his equipment and some kids throw on it mass trash, on clean he would lose like MPA...

So you can set no pz under depot... and gl with clean 1/10, becouse i'm sure that you have too 90% items on floor in pz ;D
 
Haha, sry, i didnt thinked about it :D it wasnt good idea becouse it will clean to, so i will make house tiles there.
 
Back
Top