Ir para conteúdo

Featured Replies

Postado
  • Autor
30 minutos atrás, KotZletY disse:

@Luzetti você tem certeza que seu tfs é 1.0 ? Meu script está mais que perfeito.

Me passe seu login.lua ae!

 

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

function onLogin(cid)
accountManager = "Account Manager"                       
managerCounter = 0

   for i, player in ipairs(getOnlinePlayers()) do
      if accountManager:lower() == player:lower() then             
      managerCounter = managerCounter + 1
      end 
   end
 
   if managerCounter >= 3 then
      return false
   end
    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 = "A ultima vez que voce fez login foi em " .. 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
        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, "ReportBug")
registerCreatureEvent(cid, "AdvanceSave")
registerCreatureEvent(cid, "attackguild")    
registerCreatureEvent(cid, "advance")
registerCreatureEvent(cid, "FimVip")
registerCreatureEvent(cid, "SkullCheck")
registerCreatureEvent(cid, "demonOakLogout")
registerCreatureEvent(cid, "demonOakDeath")
registerCreatureEvent(cid, "ReportBug")
registerCreatureEvent(cid, "VipReceive")
registerCreatureEvent(cid, "PlayerKill")
registerCreatureEvent(cid, "onPrepareDeath")
registerCreatureEvent(cid, "onPrepareDeath2")
registerCreatureEvent(cid, "KillingInTheNameOf")
registerCreatureEvent(cid, "exp_pmob")
registerCreatureEvent(cid, "forever amulet")
registerCreatureEvent(cid, "Senha")
registerCreatureEvent(cid, "PointSystem")
registerCreatureEvent(cid, "ExpVip")
player:registerEvent("FerumbrasQuest")

    if (InitArenaScript ~= 0) then
    InitArenaScript = 1

        for i = 42300, 42309 do
            setGlobalStorageValue(i, 0)
            setGlobalStorageValue(i+100, 0)
        end
    end

    if getPlayerStorageValue(cid, 42309) < 1 then
        for i = 42300, 42309 do
            setPlayerStorageValue(cid, i, 0)
        end
    end

    if getPlayerStorageValue(cid, 42319) < 1 then
        for i = 42310, 42319 do
            setPlayerStorageValue(cid, i, 0)
        end
    end

    if getPlayerStorageValue(cid, 42329) < 1 then
        for i = 42320, 42329 do
            setPlayerStorageValue(cid, i, 0)
        end
    end
    if getPlayerStorageValue(cid, 42355) == -1 then
        setPlayerStorageValue(cid, 42355, 0)
    end
    
     if getPlayerAccess(cid) > 3 then
      doPlayerSendCancel(cid, "$@$Administrador")
      doPlayerSendCancel(cid, " ")
    end
    
    setPlayerStorageValue(cid, 42350, 0)
    setPlayerStorageValue(cid, 42352, 0)
    


local txt = [[
Pegue seu item inicial no andar de cima.

PS Para saber sobre os aols leia o Log no client

Att: Kevintwo
]]
doPlayerPopupFYI(cid, txt)


return true


end

 

ta ai

  • Respostas 26
  • Visualizações 668
  • Created
  • Última resposta

Top Posters In This Topic

Posted Images

Postado

@Luzetti cara, aprende a colocar scripts grandes em spolier, no canto esquerdo, na segunda fuleira, a quarta função, que tem forma de olho, clica nele e bota os scripts dentro.

 

Em fim: mude isso: player:registerEvent("FerumbrasQuest")

 

para isso: registerCreatureEvent(cid, "FerumbrasQuest")

                                                              ezgif-1-98aab239f3.gif.1a897c9c3225228909e7b356a5cfb8e4.gif

Postado
  • Autor
Em 18/03/2017 ás 18:22, KotZletY disse:

@Luzetti cara, aprende a colocar scripts grandes em spolier, no canto esquerdo, na segunda fuleira, a quarta função, que tem forma de olho, clica nele e bota os scripts dentro.

 

Em fim: mude isso: player:registerEvent("FerumbrasQuest")

 

para isso: registerCreatureEvent(cid, "FerumbrasQuest")

fiz como vc falou, porem o monstro ele morre mas a vida n some, e começa a dar isso no console.

 

 

Untitledsw.png

Untitleds.png

Postado

@Luzetti com toda certeza desse mundo, sua distro não é 1.0, testei aqui em meu servidor, uso otx 1.3, e funcionou perfeitamente, as funções usada na minha scripts funcionariam em 100% no 1.0 sem nenhum erro. 

Em fim:

A tag xml e o register event continua o mesmo, mude apenas o script:

Spoiler

local frbs = {
-- Mesma área da talkactions que invoca os monstros
AreaFrom = {x=1011,y=916,z=7}, -- Canto superior esquerdo da área
AreaTo = {x=1019,y=922,z=7}, -- Canto inferior direito da área
monsterName = "Ferumbras", -- Nome do monstros
storage = 98392, -- Storage global da script
TpTo = {x=1012,y=920,z=7}, -- Para onde o teleporte vai levar
TpId = 1387, -- id do Teleporte
TpTime = 5 -- Tempo
}

function onKill(cid, target)

if isMonster(target) and getCreatureName(target):lower() == (frbs.monsterName:lower()) and isPlayer(cid) then	
	
if isInRange(getCreaturePosition(target), frbs.AreaFrom, frbs.AreaTo) then
	setGlobalStorageValue(frbs.storage, getGlobalStorageValue(frbs.storage)+1)
	doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, getGlobalStorageValue(frbs.storage))
end
	
	
if getGlobalStorageValue(frbs.storage) >= 10 then
	doCreatureSay(target, "O teleporte foi aberto, e vai sumir em".. frbs.TpTime .." segundos.", TALKTYPE_MONSTER)
	setGlobalStorageValue(frbs.storage, 0)
	local PosMon = getCreaturePosition(target)
	doCreateTeleport(frbs.TpId, frbs.TpTo, PosMon)
     addEvent(function()
	 local tpHere = getTileItemById(PosMon, frbs.TpId)
     if tpHere then
	 doRemoveItem(tpHere.uid, 1) 
	 end
	 end, frbs.TpTime*1000)
	 end
end
	
	return true
end


 

 

Testei aqui e está 100%

 

@Luzetti então ?

 

                                                              ezgif-1-98aab239f3.gif.1a897c9c3225228909e7b356a5cfb8e4.gif

Postado
  • Autor
Em 18/03/2017 ás 23:29, KotZletY disse:

@Luzetti com toda certeza desse mundo, sua distro não é 1.0, testei aqui em meu servidor, uso otx 1.3, e funcionou perfeitamente, as funções usada na minha scripts funcionariam em 100% no 1.0 sem nenhum erro. 

Em fim:

A tag xml e o register event continua o mesmo, mude apenas o script:

  Ocultar conteúdo


local frbs = {
-- Mesma área da talkactions que invoca os monstros
AreaFrom = {x=1011,y=916,z=7}, -- Canto superior esquerdo da área
AreaTo = {x=1019,y=922,z=7}, -- Canto inferior direito da área
monsterName = "Ferumbras", -- Nome do monstros
storage = 98392, -- Storage global da script
TpTo = {x=1012,y=920,z=7}, -- Para onde o teleporte vai levar
TpId = 1387, -- id do Teleporte
TpTime = 5 -- Tempo
}

function onKill(cid, target)

if isMonster(target) and getCreatureName(target):lower() == (frbs.monsterName:lower()) and isPlayer(cid) then	
	
if isInRange(getCreaturePosition(target), frbs.AreaFrom, frbs.AreaTo) then
	setGlobalStorageValue(frbs.storage, getGlobalStorageValue(frbs.storage)+1)
	doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, getGlobalStorageValue(frbs.storage))
end
	
	
if getGlobalStorageValue(frbs.storage) >= 10 then
	doCreatureSay(target, "O teleporte foi aberto, e vai sumir em".. frbs.TpTime .." segundos.", TALKTYPE_MONSTER)
	setGlobalStorageValue(frbs.storage, 0)
	local PosMon = getCreaturePosition(target)
	doCreateTeleport(frbs.TpId, frbs.TpTo, PosMon)
     addEvent(function()
	 local tpHere = getTileItemById(PosMon, frbs.TpId)
     if tpHere then
	 doRemoveItem(tpHere.uid, 1) 
	 end
	 end, frbs.TpTime*1000)
	 end
end
	
	return true
end


 

 

Testei aqui e está 100%

 

@Luzetti então ?

 

opa desculpa a demora de responder estava em uam chacara fds, entao testei hje o sistema, nao aparece mais aqueles erros do print, porem quando mato todos os ferumbras da area nao abre nenhum tp.

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.7k

Informação Importante

Confirmação de Termo