asamy / forgottenmapeditor

Map editor written in lua for Open Tibia. Written with OtClient's framework.
Other
46 stars 20 forks source link

Zones #21

Closed tosty33 closed 11 years ago

tosty33 commented 11 years ago

Hello, Here are some of my suggestions for zones:

Also some new functions for them will be useful:

asamy commented 11 years ago

Thanks|! Good suggestions, i'll implement them ASAP in otclient and will update this issue.

asamy commented 11 years ago

These functions can already be accessed via tile, e.g.:

local tile = g_map.getTile(pos)
local flags = tile:getFlags()
... test flags for bits like TILESTATE_PROTECTIONZONE etc...
... and then set the flags desired with tile:setFlags() or tile:setFlag() ...

Do also note, that tile:setFlags() may require that you know the flags the tile has first, so be careful, you may overwrite flags.

This cannot be done using UIMap, instead, I have made it using g_map, also with new functions:

And their respective get's, but for show zones, you have:

asamy commented 11 years ago

OTClient's upstream commit https://github.com/edubart/otclient/commit/5eabf6f5189d0aa70441f6434f14bb29b8008686 implements all of these. If there are more issues, make new issue, closing this.