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

Solved problem with VIP

Ramy Sedkey

New Member
Joined
Dec 7, 2013
Messages
78
Reaction score
2
Hello Otland Fellows!
I got this problem with i try to add this (registerCreatureEvent(cid, "TempleTeleporter")
or this (registerCreatureEvent(cid, "VipCheck")
to login.lua the first one to teleport the player to temple when vip days gone and the second to show how many vipd days lift

this what happen

Code:
[0:3:20.140] > Loading creaturescripts...
[0:3:20.140] [Error - Test Interface]
[0:3:20.156] data/creaturescripts/scripts/login.lua
[0:3:20.156] Description:
[0:3:20.156] (LuaInterface::luaRegisterCreatureEvent) Creature not found

[0:3:20.156] [Error - Test Interface]
[0:3:20.156] data/creaturescripts/scripts/login.lua
[0:3:20.156] Description:
[0:3:20.156] (LuaInterface::luaRegisterCreatureEvent) Creature not found

[0:3:20.156] [Error - Test Interface]
[0:3:20.171] data/creaturescripts/scripts/login.lua
[0:3:20.171] Description:
[0:3:20.171] (LuaInterface::luaRegisterCreatureEvent) Creature not found

[0:3:20.171] [Error - CreatureScript Interface]
[0:3:20.171] data/creaturescripts/scripts/login.lua
[0:3:20.171] Description:
[0:3:20.171] (LuaInterface::luaRegisterCreatureEvent) Creature not found

[0:3:20.187] [Error - CreatureScript Interface]
[0:3:20.187] data/creaturescripts/scripts/login.lua
[0:3:20.187] Description:
[0:3:20.187] (LuaInterface::luaRegisterCreatureEvent) Creature not found

[0:3:20.187] [Error - CreatureScript Interface]
[0:3:20.187] data/creaturescripts/scripts/login.lua
[0:3:20.187] Description:
[0:3:20.203] (LuaInterface::luaRegisterCreatureEvent) Creature not found

I scripted it from this link on otland http://otland.net/threads/the-best-vip-system-ever-action-movevent-globalevent.71638/

so what should I do ?!
 
Code:
registerCreatureEvent(cid, "TempleTeleporter")
registerCreatureEvent(cid, "VipCheck")
local config = {
    loginMessage = getConfigValue('loginMessage'),
    useFragHandler = getBooleanFromString(getConfigValue('useFragHandler'))
}

registerCreatureEvent(cid, "VipCheck")


function onLogin(cid)
    local loss = getConfigValue('deathLostPercent')
    if(loss ~= nil) then
        doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, loss * 10)
    end

    local accountManager = getPlayerAccountManager(cid)
    if(accountManager == MANAGER_NONE) then
        local lastLogin, str = getPlayerLastLoginSaved(cid), config.loginMessage
        if(lastLogin > 0) then
            doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str)
            str = "Your last visit was on " .. os.date("%a %b %d %X %Y", lastLogin) .. "."
        else
            str = str .. " Please choose your outfit."
            doPlayerSendOutfitWindow(cid)
        end

        doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str)
    elseif(accountManager == MANAGER_NAMELOCK) then
        addEvent(valid(doCreatureSay), 500, cid, "Hello, it appears that your character has been locked for name violating rules, what new name would you like to have?", TALKTYPE_PRIVATE_NP, true, cid)
    elseif(accountManager == MANAGER_ACCOUNT) then
        addEvent(valid(doCreatureSay), 500, cid, "Hello, type {account} to manage your account. If you would like to start over, type {cancel} anywhere.", TALKTYPE_PRIVATE_NP, true, cid)
    else
        addEvent(valid(doCreatureSay), 500, cid, "Hello, type {account} to create an account or {recover} to recover an account.", TALKTYPE_PRIVATE_NP, true, cid)
    end

    if(not isPlayerGhost(cid)) then
        doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT)
    end

    registerCreatureEvent(cid, "Idle")
    registerCreatureEvent(cid, "Mail")
    if(getPlayerOperatingSystem(cid) >= CLIENTOS_OTCLIENT_LINUX) then
        registerCreatureEvent(cid, "ExtendedOpcode")
    end

    registerCreatureEvent(cid, "ReportBug")
    if(config.useFragHandler) then
        registerCreatureEvent(cid, "SkullCheck")
    end

    registerCreatureEvent(cid, "GuildEvents")
    registerCreatureEvent(cid, "AdvanceSave")
    registerCreatureEvent(cid, "BountyHunter")
    return true
end

this is it
 
Code:
function onLogin(cid)
registerCreatureEvent(cid, "TempleTeleporter")
registerCreatureEvent(cid, "VipCheck")
local config = {
    loginMessage = getConfigValue('loginMessage'),
    useFragHandler = getBooleanFromString(getConfigValue('useFragHandler'))
}

registerCreatureEvent(cid, "VipCheck")
    local loss = getConfigValue('deathLostPercent')
    if(loss ~= nil) then
        doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, loss * 10)
    end

    local accountManager = getPlayerAccountManager(cid)
    if(accountManager == MANAGER_NONE) then
        local lastLogin, str = getPlayerLastLoginSaved(cid), config.loginMessage
        if(lastLogin > 0) then
            doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str)
            str = "Your last visit was on " .. os.date("%a %b %d %X %Y", lastLogin) .. "."
        else
            str = str .. " Please choose your outfit."
            doPlayerSendOutfitWindow(cid)
        end

        doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str)
    elseif(accountManager == MANAGER_NAMELOCK) then
        addEvent(valid(doCreatureSay), 500, cid, "Hello, it appears that your character has been locked for name violating rules, what new name would you like to have?", TALKTYPE_PRIVATE_NP, true, cid)
    elseif(accountManager == MANAGER_ACCOUNT) then
        addEvent(valid(doCreatureSay), 500, cid, "Hello, type {account} to manage your account. If you would like to start over, type {cancel} anywhere.", TALKTYPE_PRIVATE_NP, true, cid)
    else
        addEvent(valid(doCreatureSay), 500, cid, "Hello, type {account} to create an account or {recover} to recover an account.", TALKTYPE_PRIVATE_NP, true, cid)
    end

    if(not isPlayerGhost(cid)) then
        doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT)
    end

    registerCreatureEvent(cid, "Idle")
    registerCreatureEvent(cid, "Mail")
    if(getPlayerOperatingSystem(cid) >= CLIENTOS_OTCLIENT_LINUX) then
        registerCreatureEvent(cid, "ExtendedOpcode")
    end

    registerCreatureEvent(cid, "ReportBug")
    if(config.useFragHandler) then
        registerCreatureEvent(cid, "SkullCheck")
    end

    registerCreatureEvent(cid, "GuildEvents")
    registerCreatureEvent(cid, "AdvanceSave")
    registerCreatureEvent(cid, "BountyHunter")
    return true
end
 
Back
Top