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

Extended Opcodes using revscriptsys [TFS 1.3] not executed why?

Acubens

Old Penguin
Joined
May 6, 2008
Messages
1,123
Solutions
7
Reaction score
118
Location
YurOTS Land
I using this same script on my old server but now in TFS 1.3 [Latest] using revscriptsys says this.

ERROR: Unable to send extended opcode 52, extended opcodes are not enabled on this server

Whats wrong there? i register it on login event but nothing change, thanks if someone help! =)

Lua:
-- Register the creature event for player

local opcodeLoginEvent = CreatureEvent()
opcodeLoginEvent:type("login")

function opcodeLoginEvent.onLogin(player)
    player:registerEvent("storeBalance")
    return true
end
opcodeLoginEvent:register()

-- The rest

local opcodeEvent = CreatureEvent("storeBalance")
opcodeEvent:type("extendedopcode")

function opcodeEvent.onExtendedOpcode(player, opcode, buffer)
    
    if(opcode == 52) then
        if(buffer == 'refresh') then
            player:sendExtendedOpcode(STORE_OPCODE, player:getMoney())
        end
    end
    return true
end

opcodeEvent:register()

EDIT: Was no problem on TFS <lol> was on OTClient i forgot enable the feature on module game_features xD
Lua:
g_game.enableFeature(GameExtendedOpcode)
 
Last edited:
Top