• 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!

C++ Look ignore tile

Huntre

Member
Joined
Mar 22, 2011
Messages
70
Solutions
1
Reaction score
8
I have a question and it is possible to ignore an item in a look.
ex: I'm on floor 4 and look at item in floot 7 but between that item has the item x and possible to ignore this item x and get the item below?
If it is possible how I should do it until I changed the event of the look, the most I could do was not show.


C++:
if (Creature* creature = thing->getCreature()) {
    LuaScriptInterfacePushUserdata<Creature>(L, creature);
    LuaScriptInterface::setCreatureMetatable(L, -1, creature);
} else if (Item* item = thing->getItem()) {
    Tile* tile = g_game.map.getTile(position);
    Item* item = g_game.findItemOfType(tile, 10300, false, -1);
    if (!item) {
        LuaScriptInterfacePushUserdata<Item>(L, item);
        LuaScriptInterface::setItemMetatable(L, -1, item);
    }
} else {
    lua_pushnil(L);
}
 
Last edited by a moderator:
Tip: This is on OTClient's source, not on TFS's one.

I already fixed it on mine.
Are you able to compile your sources?
If yes, you can fix that also.

Note: If you expect me to see your answer for my message as I think you do, quote my message. Otherwise, I won't be notified.
Yes I have the sources of the otclient please help me, fuck it, do this
 
Back
Top