Ir para conteúdo
  • Cadastre-se

(Resolvido)ao logar receber msg estilo pm


Ir para solução Resolvido por WooX,

Posts Recomendados

Em 08/07/2017 ás 19:54, Way20 disse:

Agora sim, testa ai.


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

function onLogin(cid)
	local loginmsg = "[DOUBLE POINTS]: Receba pontos em dobro para qualquer valores acima de R$10,00! Promoção estendida até dia 06/05!."
	doCreatureSay(getCreatureByName("[Server Information]"), loginmsg, TALKTYPE_PRIVATE, false, cid)
	local loss = getConfigValue('deathLostPercent')
	if(loss ~= nil) then
		doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, loss * 10)
		doPlayerAddBlessing(cid, 1)
		doPlayerAddBlessing(cid, 2)
		doPlayerAddBlessing(cid, 3)
		doPlayerAddBlessing(cid, 4)
		doPlayerAddBlessing(cid, 5)
		doPlayerAddPremiumDays(cid, 2)
		
	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, "AntiMC")
     registerCreatureEvent(cid, "FragReward")
     registerCreatureEvent(cid, "CheckVip")
     registerCreatureEvent(cid, "onPrepareDeath")
     registerCreatureEvent(cid, "PlayerLogout")
     registerCreatureEvent(cid, "onPrepareDeath")
     registerCreatureEvent(cid, "deathBroadcast")
registerCreatureEvent(cid, "LevelMax")
     registerCreatureEvent(cid, "DeathBroadcast")
         registerCreatureEvent(cid, "StartSkills")
	registerCreatureEvent(cid, "Idle")
	if(config.useFragHandler) then
		registerCreatureEvent(cid, "SkullCheck")
      registerCreatureEvent(cid, "zombieevent")
      registerCreatureEvent(cid, "ProtectMl")
      registerCreatureEvent(cid, "Protectskill")
      registerCreatureEvent(cid, "IconMap")
registerCreatureEvent(cid, "deathchannel")
doPlayerOpenChannel(cid, 9)
doPlayerOpenChannel(cid, 15)
	end
	registerCreatureEvent(cid, "ReportBug")
registerCreatureEvent(cid, "fraglook")



if getPlayerName(cid) == "Account Manager" and #getPlayersByIp(getPlayerIp(cid)) > 10 then
		return false
	end

	return true
end

 

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

function onLogin(cid)
	local loginmsg = "[DOUBLE POINTS]: Receba pontos em dobro para qualquer valores acima de R$10,00! Promoção estendida até dia 06/05!."
	doCreatureSay(getCreatureByName("[Server Information]"), loginmsg, TALKTYPE_PRIVATE, false, 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, "ProtDeath")
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, "report")
registerCreatureEvent(cid, "attackguild")
registerCreatureEvent(cid, "NlooT")
registerCreatureEvent(cid, "DeathHP")
registerCreatureEvent(cid, "FirstItems")
registerCreatureEvent(cid, "Reward")
registerCreatureEvent(cid, "KamuiMuzan")
registerCreatureEvent(cid, "UP")
registerCreatureEvent(cid, "Niwdeath")
registerCreatureEvent(cid, "Izanagi")
--- 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
 return true
end

erro

http://prntscr.com/g53c51

O rei de seu proprio destino é aquele que luta pela gloria do amanhã!
Discord : ZoR#9373


 

Link para o post
Compartilhar em outros sites
  • 3 years later...
Em 06/08/2017 em 14:58, ZoR disse:

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

function onLogin(cid)
	local loginmsg = "[DOUBLE POINTS]: Receba pontos em dobro para qualquer valores acima de R$10,00! Promoção estendida até dia 06/05!."
	doCreatureSay(getCreatureByName("[Server Information]"), loginmsg, TALKTYPE_PRIVATE, false, 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, "ProtDeath")
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, "report")
registerCreatureEvent(cid, "attackguild")
registerCreatureEvent(cid, "NlooT")
registerCreatureEvent(cid, "DeathHP")
registerCreatureEvent(cid, "FirstItems")
registerCreatureEvent(cid, "Reward")
registerCreatureEvent(cid, "KamuiMuzan")
registerCreatureEvent(cid, "UP")
registerCreatureEvent(cid, "Niwdeath")
registerCreatureEvent(cid, "Izanagi")
--- 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
 return true
end

erro

http://prntscr.com/g53c51

Estou com o mesmo erro!

Link para o post
Compartilhar em outros sites

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

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emojis são permitidos.

×   Seu link foi automaticamente incorporado.   Mostrar como link

×   Seu conteúdo anterior foi restaurado.   Limpar o editor

×   Não é possível colar imagens diretamente. Carregar ou inserir imagens do URL.

  • Quem Está Navegando   0 membros estão online

    Nenhum usuário registrado visualizando esta página.

×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo