Ir para conteúdo

Featured Replies

  • Respostas 36
  • Visualizações 1.6k
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • #REMOVIDO CÓDIGO BUGADO   Só não esqueça na arena de colocar PVP TOOL e AREA NO LOGOUT

  • o meu bloco de notas bugou o código, apareceu uns caracteres especiais "?" dentro do código.   tenta assim:   <?xml version="1.0" encoding="ISO-8859-1"?> <mod name="Guild F

  • Faz no action um script de tempo também, digamos que você possa ficar no máximo 10 min na arena. Esse script é tipo do battlefield, a diferença que não precisaria colocar storage para diferenciar

Posted Images

Postado

blz vou pegar o seu e ir mudando aqui me da uns 30minutos.

Postado
1 hora atrás, mullino disse:

Tranquilo brother tenha preça nao faz na calma ae kk

seu script funfava????

 

Spoiler

local config = {
	
	positions = {
		{{x=535, y=1597, z=4}, {x=535, y=2000, z=4}},
		{{x=535, y=1597, z=4}, {x=535, y=2000, z=4}},
		{{x=535, y=1597, z=4}, {x=535, y=2000, z=4}},
		{{x=535, y=1597, z=4}, {x=535, y=2000, z=4}},
	},

	positions2 = {
		{{x=535, y=1597, z=4}, {x=535, y=2000, z=4}},
		{{x=535, y=1597, z=4}, {x=535, y=2000, z=4}},
		{{x=535, y=1597, z=4}, {x=535, y=2000, z=4}},
		{{x=535, y=1597, z=4}, {x=535, y=2000, z=4}},
	},
	
	storageTime1 = 10045,
	storageTime2 = 10046,
	money = 500,-- em k
}

function onUse(cid, item, fromPosition, item2, toPosition)

	-- Checando posições 1
	for i = 1, #config.positions do
		local creature = { getTopCreature(config.positions[i][1]).uid, getTopCreature(config.positions2[i][1]).uid}
		
		if not isPlayer(creature[1]) or not isPlayer(creature[2])then
			return doPlayerSendCancel(cid, "Nao existe players em todas as posições.") and doSendMagicEffect(getThingPos(cid), 2)
		end

		local guild1 = getPlayerGuildId(getTopCreature(config.positions[i][1]).uid) -- não sei se vai funcionar aki
		local guild2 = getPlayerGuildId(getTopCreature(config.positions2[i][1]).uid) -- não sei se vai funcionar aki
		if getPlayerGuildId(creature[1]) ~= guild1 or getPlayerGuildId(creature[2]) ~= guild2 then
			return doPlayerSendCancel(cid, "Algum player não é da guild correta.") and doSendMagicEffect(getThingPos(cid), 2)
		end
		
		if getPlayerMoney(creature[1]) < (config.money * 1000) or getPlayerMoney(creature[2]) < (config.money * 1000) then
			return doPlayerSendCancel(cid, "Algum player não tem "..config.money.."k.") and doSendMagicEffect(getThingPos(cid), 2)
		end
	end

	doBroadcastMessage("Começou uma batalha entre ".. getPlayerGuildName(getTopCreature(config.positions[1][1]).uid) .." e ".. getPlayerGuildName(getTopCreature(config.positions2[1][1]).uid) ..".")

	-- Teleportando posições 1
	for z = 1, #config.positions do
		local creat = { getTopCreature(config.positions[z][1]).uid ,getTopCreature(config.positions2[z][1]).uid }
		doTeleportThing(creat[1], config.positions[z][1])
		doTeleportThing(creat[2], config.positions[z][2])
		doPlayerSendTextMessage(creat[1], 27, "You started the quest.")
		doPlayerSendTextMessage(creat[2], 27, "You started the quest.")
		doSendMagicEffect(getThingPos(creat[1]), 33)
		doSendMagicEffect(getThingPos(creat[2]), 33)
		doPlayerRemoveMoney(creat[1], (config.money * 1000))
		doPlayerRemoveMoney(creat[2], (config.money * 1000))
		setPlayerStorageValue(creat[1], config.storageTime1, 1)
		setPlayerStorageValue(creat[2], config.storageTime2, 1)
	end
return true
end

 

 

tem como ver se funciona? e da retorno?

Postado
  • Autor
3 horas atrás, kbpaulo disse:

seu script funfava????

 

  Mostrar conteúdo oculto


local config = {
	
	positions = {
		{{x=535, y=1597, z=4}, {x=535, y=2000, z=4}},
		{{x=535, y=1597, z=4}, {x=535, y=2000, z=4}},
		{{x=535, y=1597, z=4}, {x=535, y=2000, z=4}},
		{{x=535, y=1597, z=4}, {x=535, y=2000, z=4}},
	},

	positions2 = {
		{{x=535, y=1597, z=4}, {x=535, y=2000, z=4}},
		{{x=535, y=1597, z=4}, {x=535, y=2000, z=4}},
		{{x=535, y=1597, z=4}, {x=535, y=2000, z=4}},
		{{x=535, y=1597, z=4}, {x=535, y=2000, z=4}},
	},
	
	storageTime1 = 10045,
	storageTime2 = 10046,
	money = 500,-- em k
}

function onUse(cid, item, fromPosition, item2, toPosition)

	-- Checando posições 1
	for i = 1, #config.positions do
		local creature = { getTopCreature(config.positions[i][1]).uid, getTopCreature(config.positions2[i][1]).uid}
		
		if not isPlayer(creature[1]) or not isPlayer(creature[2])then
			return doPlayerSendCancel(cid, "Nao existe players em todas as posições.") and doSendMagicEffect(getThingPos(cid), 2)
		end

		local guild1 = getPlayerGuildId(getTopCreature(config.positions[i][1]).uid) -- não sei se vai funcionar aki
		local guild2 = getPlayerGuildId(getTopCreature(config.positions2[i][1]).uid) -- não sei se vai funcionar aki
		if getPlayerGuildId(creature[1]) ~= guild1 or getPlayerGuildId(creature[2]) ~= guild2 then
			return doPlayerSendCancel(cid, "Algum player não é da guild correta.") and doSendMagicEffect(getThingPos(cid), 2)
		end
		
		if getPlayerMoney(creature[1]) < (config.money * 1000) or getPlayerMoney(creature[2]) < (config.money * 1000) then
			return doPlayerSendCancel(cid, "Algum player não tem "..config.money.."k.") and doSendMagicEffect(getThingPos(cid), 2)
		end
	end

	doBroadcastMessage("Começou uma batalha entre ".. getPlayerGuildName(getTopCreature(config.positions[1][1]).uid) .." e ".. getPlayerGuildName(getTopCreature(config.positions2[1][1]).uid) ..".")

	-- Teleportando posições 1
	for z = 1, #config.positions do
		local creat = { getTopCreature(config.positions[z][1]).uid ,getTopCreature(config.positions2[z][1]).uid }
		doTeleportThing(creat[1], config.positions[z][1])
		doTeleportThing(creat[2], config.positions[z][2])
		doPlayerSendTextMessage(creat[1], 27, "You started the quest.")
		doPlayerSendTextMessage(creat[2], 27, "You started the quest.")
		doSendMagicEffect(getThingPos(creat[1]), 33)
		doSendMagicEffect(getThingPos(creat[2]), 33)
		doPlayerRemoveMoney(creat[1], (config.money * 1000))
		doPlayerRemoveMoney(creat[2], (config.money * 1000))
		setPlayerStorageValue(creat[1], config.storageTime1, 1)
		setPlayerStorageValue(creat[2], config.storageTime2, 1)
	end
return true
end

 

 

tem como ver se funciona? e da retorno?

Nao testei ele como eu disse eu cheei ele aki no TK Era o mais Proximo do que eu queria mas nao testei mas vou tertar ele aki

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

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