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.
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: