Nie wiem na ile to działa, możliwe, że nawet ci to otsa rozjebie, ale ryzyk fizyk xd.function getDupy(pos)
for i=1,255(?) do
pos.stackpos = i
dupa = getThingfromPos(pos)
if isPlayer(dupa) then
cipy++
end
return cipy
end
pos = {x=666,y=69,z=7,stackpos=1}
ile = getDupy(pos)
function getPlayerCount(pos)
local playerCount = 0
for i=1,100 do
local pos2 = {x=pos.x, y=pos.y, z=pos.z,stackpos = i}
local thing = getThingfromPos(pos2)
if isPlayer(thing.uid) == TRUE then
playerCount = playerCount+1
end
end
return playerCount
end
//getTileInfo(pos)
PositionEx pos;
popPosition(L, pos);
if(Tile* tile = g_game.getMap()->getTile(pos))
{
ScriptEnviroment* env = getEnv();
pushThing(L, tile->ground, env->addThing(tile->ground));
setFieldBool(L, "protection", tile->hasFlag(TILESTATE_PROTECTIONZONE));
setFieldBool(L, "optional", tile->hasFlag(TILESTATE_OPTIONALZONE));
setFieldBool(L, "nologout", tile->hasFlag(TILESTATE_NOLOGOUT));
setFieldBool(L, "hardcore", tile->hasFlag(TILESTATE_HARDCOREZONE));
setFieldBool(L, "refresh", tile->hasFlag(TILESTATE_REFRESH));
setFieldBool(L, "trashed", tile->hasFlag(TILESTATE_TRASHED));
setFieldBool(L, "house", tile->hasFlag(TILESTATE_HOUSE));
setFieldBool(L, "bed", tile->hasFlag(TILESTATE_BED));
setFieldBool(L, "depot", tile->hasFlag(TILESTATE_DEPOT));
setField(L, "things", tile->getThingCount());
[B]setField(L, "creatures", tile->getCreatureCount());[/B]
setField(L, "items", tile->getItemCount());
setField(L, "topItems", tile->getTopItemCount());
setField(L, "downItems", tile->getDownItemCount());
}
setField(L, "things", tile->getThingCount());
setField(L, "creatures", tile->getCreatureCount());
setField(L, "items", tile->getItemCount());
setField(L, "topItems", tile->getTopItemCount());
setField(L, "downItems", tile->getDownItemCount());