Ir para conteúdo

Featured Replies

Postado
  • Autor
  Em 26/08/2017 em 01:37, Frenesy disse:

local config = {
 loginMessage = getConfigValue('loginMessage'),
 useFragHandler = getBooleanFromString(getConfigValue('useFragHandler'))
}

function onLogin(cid)
boost.addSkills(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) .. "."
  end

  doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str)
 elseif(accountManager == MANAGER_NAMELOCK) then
  doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, it appears that your character has been namelocked, what would you like as your new name?")
 elseif(accountManager == MANAGER_ACCOUNT) then
  doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, type 'account' to manage your account and if you want to start over then type 'cancel'.")
 else
  doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, type 'account' to create an account or type 'recover' to recover an account.")
 end

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

 registerCreatureEvent(cid, "Mail")
 registerCreatureEvent(cid, "GuildMotd")

 registerCreatureEvent(cid, "Idle")
 if(config.useFragHandler) then
  registerCreatureEvent(cid, "SkullCheck")
 end
registerCreatureEvent(cid, "Biohazard")
registerCreatureEvent(cid, "ZombieAttack")
registerCreatureEvent(cid, "WeaponMana")
registerCreatureEvent(cid, "showVoc")       
registerCreatureEvent(cid, "ReportBug")
registerCreatureEvent(cid, "AdvanceSave")
registerCreatureEvent(cid, "Outfit")
registerCreatureEvent(cid, "MonsteDeath")
registerCreatureEvent(cid, "ExameJouninDead")
registerCreatureEvent(cid, "ExameJouninBoss")
setPlayerStorageValue(cid, 8855, -1)
registerCreatureEvent(cid, "Senha")
registerCreatureEvent(cid, "eventotimes")
registerCreatureEvent(cid, "ExpBonus")
registerCreatureEvent(cid, "report")
registerCreatureEvent(cid, "attackguild")
registerCreatureEvent(cid, "DeathHP")
registerCreatureEvent(cid, "FirstItems")
registerCreatureEvent(cid, "Reward")
registerCreatureEvent(cid, "KamuiMuzan")
registerCreatureEvent(cid, "UP")
registerCreatureEvent(cid, "LookVoc")
registerCreatureEvent(cid, "Niwdeath")
registerCreatureEvent(cid, "Izanagi")
registerCreatureEvent(cid, "Izanami")
registerCreatureEvent(cid, "pvptarget")
registerCreatureEvent(cid, "pvpstats")
 if getPlayerStorageValue(cid, 49607) == -1 then
        setPlayerStorageValue(cid, 49607, 0) 
    end 

 if getPlayerStorageValue(cid, 49608) ~= 0 then
        setPlayerStorageValue(cid, 49608, 0) 
    end
---------- UCHIHAGAESHI ----------------
registerCreatureEvent(cid, "uchihagaeshi")
if getPlayerStorageValue(cid, 3482101) ~= 0 then
        setPlayerStorageValue(cid, 3482101, 0) 
end
-----------GRAN CASTLE -----------
registerCreatureEvent(cid, "Gran Tower")
registerCreatureEvent(cid, "Gran Aura")
registerCreatureEvent(cid, "Gran Aura Stats")
registerCreatureEvent(cid, "Gran Aura Logout")
registerCreatureEvent(cid, "Gran Tower Target")
--- CRITICAL SYSTEM ----
registerCreatureEvent(cid, "critical")
if getPlayerStorageValue(cid, 48903) == -1 then
        setPlayerStorageValue(cid, 48903, 0) 
    end
---------- PlayerPort---------------
if getPlayerStorageValue(cid, 49708) ~= 0 then
        setPlayerStorageValue(cid, 49708, 0) 
end
        if getPlayerGuildId(cid) > 0 then
             local guild = getPlayerGuildId(cid)
            doGuildAddEnemy(guild, enemy, 0, WAR_GUILD)
        else
        end
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_GREEN, "[Bem-Vindo ao Nto Fire]n/Para Ativar o PvP !Pvp on;!Pvp off/nVersao do Elfbot 8.80/nObrigado Por Jogar Nosso Servidor,Tenha um Bom Dia." ..player:getName()..'! now is: '.. os.date("%H:%M:%S", os.time())..'.')
 return true
end

 

 

9:14:54.294] [Error - CreatureScript Interface]
[9:14:54.295] data/creaturescripts/scripts/login.lua:onLogin
[9:14:54.296] Description:
[9:14:54.297] data/creaturescripts/scripts/login.lua:102: attempt to index global 'player' (a nil value)
[9:14:54.299] stack traceback:
[9:14:54.301]   data/creaturescripts/scripts/login.lua:102: in function <data/creaturescripts/scripts/login.lua:6>

  Em 26/08/2017 em 15:52, DboExplorer disse:

 


local config = {
 loginMessage = getConfigValue('loginMessage'),
 useFragHandler = getBooleanFromString(getConfigValue('useFragHandler'))
}

function onLogin(cid)
boost.addSkills(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) .. "."
  end

  doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str)
 elseif(accountManager == MANAGER_NAMELOCK) then
  doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, it appears that your character has been namelocked, what would you like as your new name?")
 elseif(accountManager == MANAGER_ACCOUNT) then
  doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, type 'account' to manage your account and if you want to start over then type 'cancel'.")
 else
  doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, type 'account' to create an account or type 'recover' to recover an account.")
 end

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

 registerCreatureEvent(cid, "Mail")
 registerCreatureEvent(cid, "GuildMotd")

 registerCreatureEvent(cid, "Idle")
 if(config.useFragHandler) then
  registerCreatureEvent(cid, "SkullCheck")
 end
registerCreatureEvent(cid, "Biohazard")
registerCreatureEvent(cid, "ZombieAttack")
registerCreatureEvent(cid, "WeaponMana")
registerCreatureEvent(cid, "showVoc")       
registerCreatureEvent(cid, "ReportBug")
registerCreatureEvent(cid, "AdvanceSave")
registerCreatureEvent(cid, "Outfit")
registerCreatureEvent(cid, "MonsteDeath")
registerCreatureEvent(cid, "ExameJouninDead")
registerCreatureEvent(cid, "ExameJouninBoss")
setPlayerStorageValue(cid, 8855, -1)
registerCreatureEvent(cid, "Senha")
registerCreatureEvent(cid, "eventotimes")
registerCreatureEvent(cid, "ExpBonus")
registerCreatureEvent(cid, "report")
registerCreatureEvent(cid, "attackguild")
registerCreatureEvent(cid, "DeathHP")
registerCreatureEvent(cid, "FirstItems")
registerCreatureEvent(cid, "Reward")
registerCreatureEvent(cid, "KamuiMuzan")
registerCreatureEvent(cid, "UP")
registerCreatureEvent(cid, "LookVoc")
registerCreatureEvent(cid, "Niwdeath")
registerCreatureEvent(cid, "Izanagi")
registerCreatureEvent(cid, "Izanami")
registerCreatureEvent(cid, "pvptarget")
registerCreatureEvent(cid, "pvpstats")
 if getPlayerStorageValue(cid, 49607) == -1 then
        setPlayerStorageValue(cid, 49607, 0)
    end

 if getPlayerStorageValue(cid, 49608) ~= 0 then
        setPlayerStorageValue(cid, 49608, 0)
    end
---------- UCHIHAGAESHI ----------------
registerCreatureEvent(cid, "uchihagaeshi")
if getPlayerStorageValue(cid, 3482101) ~= 0 then
        setPlayerStorageValue(cid, 3482101, 0)
end
-----------GRAN CASTLE -----------
registerCreatureEvent(cid, "Gran Tower")
registerCreatureEvent(cid, "Gran Aura")
registerCreatureEvent(cid, "Gran Aura Stats")
registerCreatureEvent(cid, "Gran Aura Logout")
registerCreatureEvent(cid, "Gran Tower Target")
--- CRITICAL SYSTEM ----
registerCreatureEvent(cid, "critical")
if getPlayerStorageValue(cid, 48903) == -1 then
        setPlayerStorageValue(cid, 48903, 0)
    end
---------- PlayerPort---------------
if getPlayerStorageValue(cid, 49708) ~= 0 then
        setPlayerStorageValue(cid, 49708, 0)
end
        if getPlayerGuildId(cid) > 0 then
             local guild = getPlayerGuildId(cid)
            doGuildAddEnemy(guild, enemy, 0, WAR_GUILD)
        else
        end
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_GREEN, "[Bem-Vindo ao Nto Fire]n/Para Ativar o PvP !Pvp on;!Pvp off/nVersao do Elfbot 8.80/nObrigado Por Jogar Nosso Servidor,Tenha um Bom Dia." '..getPlayerName(cid)..'! now is: '.. os.date("%H:%M:%S", os.time())..'.')
 return true
end

 

[9:15:39.523] [Error - LuaInterface::loadFile] data/creaturescripts/scripts/login.lua:102: ')' expected near ''..getPlayerName(cid)..''
[9:15:39.525] [Warning - Event::loadScript] Cannot load script (data/creaturescripts/scripts/login.lua)
[9:15:39.526] data/creaturescripts/scripts/login.lua:102: ')' expected near ''..getPlayerName(cid)..''

  • Respostas 9
  • Visualizações 2.4k
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • @ZikaLord o problema é que você está usando um method sendo que sua versão não foi convertida a userdata ainda. player:sendTextMessage(MESSAGE_STATUS_CONSOLE_GREEN   Creio que isso foi

Postado
  • Solução
Mostrar conteúdo oculto

 

Editado por Dwarfer (veja o histórico de edições)

Postado

@ZikaLord o problema é que você está usando um method sendo que sua versão não foi convertida a userdata ainda.

player:sendTextMessage(MESSAGE_STATUS_CONSOLE_GREEN

 

Creio que isso foi quando você foi instalar algum sistema, porém não deve ter lido que é para a versão 1.x+.

 

 

Postado
  • Autor
  Em 26/08/2017 em 19:57, KotZletY disse:

@ZikaLord o problema é que você está usando um method sendo que sua versão não foi convertida a userdata ainda.

player:sendTextMessage(MESSAGE_STATUS_CONSOLE_GREEN

 

Creio que isso foi quando você foi instalar algum sistema, porém não deve ter lido que é para a versão 1.x+.

 

 

Tambem achei isso,só que nao sabia como converter

Participe da conversa

Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.

Visitante
Responder

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.6k

Informação Importante

Confirmação de Termo