Huntre
Member
- Joined
- Mar 22, 2011
- Messages
- 70
- Solutions
- 1
- Reaction score
- 8
Good afternoon.
I thought of making an order for pokemon but I have a bug someone has an idea how to solve.
Problem: how much of the order in 1 sqm does it go straight but how much and farther it teleports.
c++
lua
I thought of making an order for pokemon but I have a bug someone has an idea how to solve.
Problem: how much of the order in 1 sqm does it go straight but how much and farther it teleports.
c++
C++:
int LuaScriptInterface::luaGamePlayerMovePokemon(lua_State* L)
{
// Game.playerMovePokemon(pokemon, toPosition)
Creature* pokemon = getCreature(L, 1);
if (pokemon->getMonster()) {
const Position& position = getPosition(L, 2);
Tile* toTile = g_game.map.getTile(position);
g_game.internalMoveCreature(*pokemon, *toTile, FLAG_NOLIMIT);
}
return 1;
}
lua
Lua:
function onUse(player, item, fromPosition, target, toPosition, isHotkey)
local poke = player:getSummons()[1]
Game.playerMovePokemon(poke, toPosition)
return true
end