tuxico
Member
- Joined
- Aug 2, 2010
- Messages
- 52
- Solutions
- 1
- Reaction score
- 7
hello there ... I did not find much about Extended Opcodes for TFS version 1.x, let's ...
I created a talkaction that sends an opcode to the client and I am using the same module of the pokemon client to receive the value and to transform into number as mana:
NEWS
I created a talkaction that sends an opcode to the client and I am using the same module of the pokemon client to receive the value and to transform into number as mana:
Lua:
function onSay(player, words, param)
local ball = player:getSlotItem(CONST_SLOT_FEET)
local pokeid = ball:getCustomAttribute("PokemonID")
local pokemon = player:getSummons()
if not ball or pokeid <= 1 then
return player:sendExtendedOpcode(cid, opcodes.OPCODE_POKEMON_HEALTH, "0|0")
end
if #pokemon >= 1 then
return player:sendExtendedOpcode(cid, opcodes.OPCODE_POKEMON_HEALTH, getCreatureHealth(pokemon[1]).."|"..getCreatureMaxHealth(pokemon[1]))
end
player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "Talkaction Executada!")
return player:sendExtendedOpcode(cid, opcodes.OPCODE_POKEMON_HEALTH, "0|0")
end
Lua:
ERROR: Unable to send extended opcode 104, extended opcodes are not enabled[code]