Ir para conteúdo

Featured Replies

Postado

.Qual servidor ou website você utiliza como base? 

 

Qual o motivo deste tópico? 

 

Está surgindo algum erro? Se sim coloque-o aqui. 

Citar

 

 

Você tem o código disponível? Se tiver publique-o aqui: 

 

 

Você tem alguma imagem que possa auxiliar no problema? Se sim, coloque-a aqui. 

 

Editado por Gryffindori
Errei. (veja o histórico de edições)

  • Gryffindori mudou o título para Sistema de guardian, alguém poderia me ajudar com um?
Postado

Fala Galera do TK, Trouxe Pra vocês o sistema de Guardian Incompleto para que todos possam ajudar a fazer... Foi desenvolvido por mim a parte em lua...

 

Actions > crie o arquivo guardian.lua

Actions.xml > coloque itemID > e o resto da TAG

 

Favor não retirar os créditos, Seja Grato a quem Está tentando disponibilizar algo que é pago para ser feito...
FAVOR NAO RETIRAR OS CREDITOS SEJA GRATO A QUEM PASSOU 3 HORAS PRA CRIAR UM CODIGO + ou - MAS QUE FUNCIONA 
PS: Nao Ataca Sozinho

 

 

 

 

 

--- CREATED BY CLOUD ---

 

local config = {
    pokemons = {"Guardian Mewtwo", "Guardian Mewtwo"}, -- nome dos pokemons que podem ser sumonados,
    time = {summon = 1*60, cd = 2*60}, -- tempo de duração e tempo de cd
    level = 125, -- define o level mínimo para se usar o item
    storages = {summon = 5549, cd = 5550}
}
msg = {finish = "Acabou o Tempo.", begin = "Voce Sumonou Seu Guardian Por" .. config.time.summon/60 .. " Minutos"}

function removePokemon(poke, cid)
    if isCreature(poke) then
        doRemoveCreature(poke)
        doPlayerSay(cid, msg.finish, TALKTYPE_PLAYER_SAY)
   end
end
   

function onUse(cid, item, fromPosition, itemEx, toPosition)
    setPlayerStorageValue(cid, config.storages.cd, 0)
    if (getPlayerStorageValue(cid, config.storages.cd) - os.time()) <= 0 then
        if getPlayerLevel(cid) > config.level then
            pokemon = doCreateMonster(config.pokemons[math.random(1, #config.pokemons)], getCreaturePosition(cid))
            setPlayerStorageValue(cid, config.storages.cd, os.time() + config.time.cd)
            doConvinceCreature(cid, pokemon)
                 addEvent(function()
         if isPlayer(cid) then
        doPlayerSay(cid, "Eu Escolho Voce. I Choose You.")
       end
     end, 10) 
             addEvent(function()
            if isPlayer(cid) then
            doPlayerSay(cid, "Acabou o Tempo do Guardian. Finished Time Of Guardian.")
           end
    end, 10000)
            doPlayerSay(cid, msg.begin, TALKTYPE_PLAYER_SAY)
            addEvent(removePokemon, config.time.summon*1000, pokemon, cid)
        else
            doPlayerSendCancel(cid, "Voce Nao Tem Level Para Usar o Summon.")
        end
    else
        doPlayerSendCancel(cid, "Desculpe o Item Esta em Coowndown.")
    end
return true
end 
 

Não Esqueçam de Criar o XML do Monster com nome Guardian, e add na lib 

  • 5 weeks later...
Postado
  • Autor
Em 23/05/2021 em 14:32, CloudIV disse:

Fala Galera do TK, Trouxe Pra vocês o sistema de Guardian Incompleto para que todos possam ajudar a fazer... Foi desenvolvido por mim a parte em lua...

 

Actions > crie o arquivo guardian.lua

Actions.xml > coloque itemID > e o resto da TAG

 

Favor não retirar os créditos, Seja Grato a quem Está tentando disponibilizar algo que é pago para ser feito...
FAVOR NAO RETIRAR OS CREDITOS SEJA GRATO A QUEM PASSOU 3 HORAS PRA CRIAR UM CODIGO + ou - MAS QUE FUNCIONA 
PS: Nao Ataca Sozinho

 

 

 

 

 

--- CREATED BY CLOUD ---

 

local config = {
    pokemons = {"Guardian Mewtwo", "Guardian Mewtwo"}, -- nome dos pokemons que podem ser sumonados,
    time = {summon = 1*60, cd = 2*60}, -- tempo de duração e tempo de cd
    level = 125, -- define o level mínimo para se usar o item
    storages = {summon = 5549, cd = 5550}
}
msg = {finish = "Acabou o Tempo.", begin = "Voce Sumonou Seu Guardian Por" .. config.time.summon/60 .. " Minutos"}

function removePokemon(poke, cid)
    if isCreature(poke) then
        doRemoveCreature(poke)
        doPlayerSay(cid, msg.finish, TALKTYPE_PLAYER_SAY)
   end
end
   

function onUse(cid, item, fromPosition, itemEx, toPosition)
    setPlayerStorageValue(cid, config.storages.cd, 0)
    if (getPlayerStorageValue(cid, config.storages.cd) - os.time()) <= 0 then
        if getPlayerLevel(cid) > config.level then
            pokemon = doCreateMonster(config.pokemons[math.random(1, #config.pokemons)], getCreaturePosition(cid))
            setPlayerStorageValue(cid, config.storages.cd, os.time() + config.time.cd)
            doConvinceCreature(cid, pokemon)
                 addEvent(function()
         if isPlayer(cid) then
        doPlayerSay(cid, "Eu Escolho Voce. I Choose You.")
       end
     end, 10) 
             addEvent(function()
            if isPlayer(cid) then
            doPlayerSay(cid, "Acabou o Tempo do Guardian. Finished Time Of Guardian.")
           end
    end, 10000)
            doPlayerSay(cid, msg.begin, TALKTYPE_PLAYER_SAY)
            addEvent(removePokemon, config.time.summon*1000, pokemon, cid)
        else
            doPlayerSendCancel(cid, "Voce Nao Tem Level Para Usar o Summon.")
        end
    else
        doPlayerSendCancel(cid, "Desculpe o Item Esta em Coowndown.")
    end
return true
end 
 

Não Esqueçam de Criar o XML do Monster com nome Guardian, e add na lib 

 

O complicado é não entender muito de script e não conseguir ir fundo nesse, complicado. Até hoje não tem um funcionando ;/

  • 2 weeks later...
Postado
local config = {
  -- item que irá usar, nome do monstro, cowdown, remover?
  [19846] = {name = "Guardião1", cd = 2 * 60 * 60, remove = true},
  [19847] = {name = "Guardião2", cd = 2 * 60 * 60, remove = true},
  [19848] = {name = "Guardião3", cd = 2 * 60 * 60, remove = true}
  
  local cdStorage = 53799
function onUse(cid, item, frompos, item2, topos)
	local usedItem = config[item.itemid]
		if usedItem then
			if getPlayerLevel(cid) >= 120 then
			local att = getPlayerStorageValue(cid, cdStorage)
				if att == -1 or os.time() >= tonumber(att)+usedItem.cd or isGod(cid) then
					if getChanceCard(item.uid) >= 1 then
						doCreateNpcWithFocus(usedItem.name, getClosestFreeTile(cid, getCreaturePosition(cid)), cid)
						setPlayerStorageValue(cid, cdStorage, os.time())
						--setPlayerStorageValue(cid, 2152525, 1)
						removeChanceCard(item.uid)
						doSendMsg(cid, "Para mais informações sobre, visite: https://pokerusher.com/c/teste")
					else
						if usedItem.remove then
							doRemoveItem(item.uid, 1)
						end
					end
				else
					stringTime = math.floor(((tonumber(att)+usedItem.cd)-os.time()))
					stringMinOrSec = "segundos"
					if stringTime > 60 then
						stringTime = math.floor(stringTime/60)
						stringMinOrSec = "minutos"
					end
					doPlayerSendCancel(cid, "Você poderá usar novamente em: "..stringTime.." "..stringMinOrSec)
				end
			end
		else
			doPlayerSendCancel(cid, "Você precisa de level 120 para poder este item.")
	end
	return true
end
 

 

Postado
  • Autor
Em 01/07/2021 em 17:17, Tio Rusher disse:

local config = {
  -- item que irá usar, nome do monstro, cowdown, remover?
  [19846] = {name = "Guardião1", cd = 2 * 60 * 60, remove = true},
  [19847] = {name = "Guardião2", cd = 2 * 60 * 60, remove = true},
  [19848] = {name = "Guardião3", cd = 2 * 60 * 60, remove = true}
  
  local cdStorage = 53799
function onUse(cid, item, frompos, item2, topos)
	local usedItem = config[item.itemid]
		if usedItem then
			if getPlayerLevel(cid) >= 120 then
			local att = getPlayerStorageValue(cid, cdStorage)
				if att == -1 or os.time() >= tonumber(att)+usedItem.cd or isGod(cid) then
					if getChanceCard(item.uid) >= 1 then
						doCreateNpcWithFocus(usedItem.name, getClosestFreeTile(cid, getCreaturePosition(cid)), cid)
						setPlayerStorageValue(cid, cdStorage, os.time())
						--setPlayerStorageValue(cid, 2152525, 1)
						removeChanceCard(item.uid)
						doSendMsg(cid, "Para mais informações sobre, visite: https://pokerusher.com/c/teste")
					else
						if usedItem.remove then
							doRemoveItem(item.uid, 1)
						end
					end
				else
					stringTime = math.floor(((tonumber(att)+usedItem.cd)-os.time()))
					stringMinOrSec = "segundos"
					if stringTime > 60 then
						stringTime = math.floor(stringTime/60)
						stringMinOrSec = "minutos"
					end
					doPlayerSendCancel(cid, "Você poderá usar novamente em: "..stringTime.." "..stringMinOrSec)
				end
			end
		else
			doPlayerSendCancel(cid, "Você precisa de level 120 para poder este item.")
	end
	return true
end
 

 

[05/07/2021 14:32:37] [Error - Action Interface] 
[05/07/2021 14:32:37] data/actions/scripts/card.lua:onUse
[05/07/2021 14:32:37] Description: 
[05/07/2021 14:32:37] data/actions/scripts/card.lua:23: attempt to call global 'getChanceCard' (a nil value)
[05/07/2021 14:32:37] stack traceback:
[05/07/2021 14:32:37]     data/actions/scripts/card.lua:23: in function <data/actions/scripts/card.lua:17>

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