Ir para conteúdo
  • Cadastre-se

(Resolvido)Não permite matar player dentro do evento


Ir para solução Resolvido por JcA,

Posts Recomendados

Algum erro não esta permitindo que o player morra dentro do evento, sempre que você poe o target, "sorry no possible".

 

-- DUCA EVENTO by luanluciano93

DUCA = {
	EVENT_MINUTES = 15,
	TELEPORT_POSITION = {x = 1102, y = 987, z = 7},
	STORAGE_TEAM = 27000,
	TOTAL_PONTOS = 27001,
	TOTAL_PLAYERS = 27003, -- global storage
	LEVEL_MIN = 300,
	REWARD_FIRST = {11773, 1},
	REWARD_SECOND = {9971, 15},

	TEAMS = {
		[1] = {color = "Black", temple = {x = 2248, y = 1251, z = 7}},
		[2] = {color = "White", temple = {x = 2206, y = 1192, z = 7}},
		[3] = {color = "Red"},
		[4] = {color = "Green"},
    }, 
}

local conditioBlack = createConditionObject(CONDITION_OUTFIT)
setConditionParam(conditioBlack, CONDITION_PARAM_TICKS, -1)
addOutfitCondition(conditioBlack, {lookType = 128, lookHead = 114, lookBody = 114, lookLegs = 114, lookFeet = 114})

local conditioWhite = createConditionObject(CONDITION_OUTFIT)
setConditionParam(conditioWhite, CONDITION_PARAM_TICKS, -1)
addOutfitCondition(conditioWhite, {lookType = 128, lookHead = 19, lookBody = 19, lookLegs = 19, lookFeet = 19})

local conditioRed = createConditionObject(CONDITION_OUTFIT)
setConditionParam(conditioRed, CONDITION_PARAM_TICKS, -1)
addOutfitCondition(conditioRed, {lookType = 134, lookHead = 94, lookBody = 94, lookLegs = 94, lookFeet = 94})

local conditioGreen = createConditionObject(CONDITION_OUTFIT)
setConditionParam(conditioGreen, CONDITION_PARAM_TICKS, -1)
addOutfitCondition(conditioGreen, {lookType = 134, lookHead = 101, lookBody = 101, lookLegs = 101, lookFeet = 101})

-- function DUCA.teleportCheck()
DUCA.teleportCheck = function()
	local item = getTileItemById(DUCA.TELEPORT_POSITION, 1387).uid
	if item > 0 then
		doRemoveItem(item)
		DUCA.finishEvent()

		print(">>> Duca Event was finished. <<<")
	else		
		doBroadcastMessage("Duca Event was started and will close in ".. DUCA.EVENT_MINUTES .." minutes.")
		print(">>> Duca Event was started. <<<")

		local teleport = doCreateItem(1387, 1, DUCA.TELEPORT_POSITION)
		doItemSetAttribute(teleport, "aid", 48000)

		setGlobalStorageValue(DUCA.TOTAL_PLAYERS, 0)
		addEvent(DUCA.teleportCheck, DUCA.EVENT_MINUTES * 60 * 1000)
	end
end

-- function DUCA.addPlayerinTeam(cid, team)
DUCA.addPlayerinTeam = function(cid, team)
	doRemoveCondition(cid, CONDITION_OUTFIT)
	doRemoveCondition(cid, CONDITION_INVISIBLE)
	if team == 1 then
		doAddCondition(cid, conditioBlack)
	elseif team == 2 then
		doAddCondition(cid, conditioWhite)
	elseif team == 3 then
		doAddCondition(cid, conditioRed)
	elseif team == 4 then
		doAddCondition(cid, conditioGreen)
	end
	setPlayerStorageValue(cid, DUCA.STORAGE_TEAM, team)
	doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You will join the " .. DUCA.TEAMS[team].color .. " Team.")
	doCreatureAddHealth(cid, getCreatureMaxHealth(cid))
	doCreatureAddMana(cid, getCreatureMaxMana(cid))
end


-- function DUCA.balanceTeam()
DUCA.balanceTeam = function()
	local time1, time2 = 0, 0
	for _, cid in pairs(getPlayersOnline()) do
		if getPlayerStorageValue(cid, DUCA.STORAGE_TEAM) == 1 then
			time1 = time1 + 1
		elseif getPlayerStorageValue(cid, DUCA.STORAGE_TEAM) == 2 then
			time2 = time2 + 1
		end
	end

	return (time1 <= time2) and 1 or 2
end

-- function DUCA.removePlayer(cid)
DUCA.removePlayer = function(cid)
	doRemoveCondition(cid, CONDITION_OUTFIT)
	--doRemoveCondition(cid, CONDITION_HUNTING)
	--doRemoveCondition(cid, CONDITION_INFIGHT)
	--doRemoveCondition(cid, CONDITIONID_COMBAT)
	doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You are dead in Duca Event and your Duca points is set to 0!")
	doCreatureAddHealth(cid, getCreatureMaxHealth(cid))
	doCreatureAddMana(cid, getCreatureMaxMana(cid))	
	setPlayerStorageValue(cid, DUCA.STORAGE_TEAM, 0)
	setPlayerStorageValue(cid, DUCA.TOTAL_PONTOS, 0)
	unregisterCreatureEvent(cid, "Duca-Death")
	unregisterCreatureEvent(cid, "Duca-Combat")
	doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)))

	setGlobalStorageValue(DUCA.TOTAL_PLAYERS, getGlobalStorageValue(DUCA.TOTAL_PLAYERS) - 1)
end

-- function DUCA.updateRank()
DUCA.updateRank = function()
	local participantes = {}
	for _, uid in pairs(getPlayersOnline()) do
		if getPlayerStorageValue(uid, DUCA.STORAGE_TEAM) > 0 then
			table.insert(participantes, uid)
		end
	end

	table.sort(participantes, function(a, b) return getPlayerStorageValue(a, DUCA.TOTAL_PONTOS) > getPlayerStorageValue(b, DUCA.TOTAL_PONTOS) end)
	
	for x = 1, #participantes do
		if getPlayerStorageValue(participantes[x], DUCA.STORAGE_TEAM) >= 3 then
			DUCA.addPlayerinTeam(participantes[x], DUCA.balanceTeam())
		end
	end
	
	if (#participantes >= 1) then
		DUCA.addPlayerinTeam(participantes[1], 4)
	end
    
    	if (#participantes >= 11) then
    		for i = 2, 11 do
			DUCA.addPlayerinTeam(participantes[i], 3)
		end
	end
end

-- function DUCA.finishEvent()
DUCA.finishEvent = function()
	DUCA.updateRank()
	for _, uid in pairs(getPlayersOnline()) do
		if getPlayerStorageValue(uid, DUCA.STORAGE_TEAM) == 4 then
			local winner = getCreatureName(uid)
			doBroadcastMessage("Congratulation ".. winner .."!! Duca Event is finish. ".. winner .." win reward.")
			doPlayerAddItem(uid, DUCA.REWARD_FIRST[1], DUCA.REWARD_FIRST[2])
		elseif getPlayerStorageValue(uid, DUCA.STORAGE_TEAM) == 3 then
			doPlayerAddItem(uid, DUCA.REWARD_SECOND[1], DUCA.REWARD_SECOND[2])
		end

		if getPlayerStorageValue(uid, DUCA.STORAGE_TEAM) > 0 then
			DUCA.removePlayer(uid)
		end
	end
end

 

 

--[[
	<!-- DUCA Event -->
	<event type="login" name="Duca-Login" event="script" value="DUCA_creaturescript.lua"/>
	<event type="logout" name="Duca-Logout" event="script" value="DUCA_creaturescript.lua"/>
	<event type="preparedeath" name="Duca-Death" event="script" value="DUCA_creaturescript.lua"/>
	<event type="combat" name="Duca-Combat" event="script" value="DUCA_creaturescript.lua"/>
]]--
	
dofile('data/lib/DUCA.lua')

function onLogin(cid)
	if getPlayerStorageValue(cid, DUCA.STORAGE_TEAM) > 0 then
		DUCA.removePlayer(cid)
	end
	return true
end

function onLogout(cid)
	if getPlayerStorageValue(cid, DUCA.STORAGE_TEAM) > 0 then
		doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You can not logout now!")
		return false
	end
	return true
end

function onPrepareDeath(cid, deathList, lastHitKiller, mostDamageKiller)

	local pontos = {[1] = 1, [2] = 1, [3] = 10, [4] = 30,}

	if getPlayerStorageValue(cid, DUCA.STORAGE_TEAM) > 0 then
		local pontos_ganhos = pontos[getPlayerStorageValue(cid, DUCA.STORAGE_TEAM)]
		setPlayerStorageValue(deathList[1], DUCA.TOTAL_PONTOS, getPlayerStorageValue(deathList[1], DUCA.TOTAL_PONTOS) + pontos_ganhos)
		doPlayerSendTextMessage(deathList[1], MESSAGE_STATUS_CONSOLE_BLUE, "You have ".. getPlayerStorageValue(deathList[1], DUCA.TOTAL_PONTOS) .." duca points.")
		DUCA.removePlayer(cid)
		DUCA.updateRank()
	end
	return false
end

function onCombat(cid, target)
	if isPlayer(cid) and isPlayer(target) then
		if getPlayerStorageValue(cid, DUCA.STORAGE_TEAM) > 0 then
			if getPlayerStorageValue(cid, DUCA.STORAGE_TEAM) == getPlayerStorageValue(target, DUCA.STORAGE_TEAM) then
				return false
			end
		end
	end
	return true
end

 

Link para o post
Compartilhar em outros sites

Se eles forem do mesmo time, não poderá atacar. Como está demonstrado na parte do script:

 

function onCombat(cid, target)
	if isPlayer(cid) and isPlayer(target) then
		if getPlayerStorageValue(cid, DUCA.STORAGE_TEAM) > 0 then
			if getPlayerStorageValue(cid, DUCA.STORAGE_TEAM) == getPlayerStorageValue(target, DUCA.STORAGE_TEAM) then
				return false
			end
		end
	end
	return true
end

 

Contato:

 

Link para o post
Compartilhar em outros sites
9 horas atrás, Dwarfer disse:

Se eles forem do mesmo time, não poderá atacar. Como está demonstrado na parte do script:

 


function onCombat(cid, target)
	if isPlayer(cid) and isPlayer(target) then
		if getPlayerStorageValue(cid, DUCA.STORAGE_TEAM) > 0 then
			if getPlayerStorageValue(cid, DUCA.STORAGE_TEAM) == getPlayerStorageValue(target, DUCA.STORAGE_TEAM) then
				return false
			end
		end
	end
	return true
end

 

 

E de outro time, eu não ia fazer uma pergunta assim ne kkkkkkkk

Link para o post
Compartilhar em outros sites
22 horas atrás, Tauzyu disse:

É entra pelo mapa editor na area do evento cooloca no-pvp.

 

Também não é isso, e coloquei o pvp tile.

 

23 horas atrás, Enzo Caue disse:

Eu não acredito que seja um erro no script e sim no mapa.

 

Também não é isso

 

21 horas atrás, Dwarfer disse:

Se eles forem do mesmo time, não poderá atacar. Como está demonstrado na parte do script:

 


function onCombat(cid, target)
	if isPlayer(cid) and isPlayer(target) then
		if getPlayerStorageValue(cid, DUCA.STORAGE_TEAM) > 0 then
			if getPlayerStorageValue(cid, DUCA.STORAGE_TEAM) == getPlayerStorageValue(target, DUCA.STORAGE_TEAM) then
				return false
			end
		end
	end
	return true
end

 

 

È o time adversário

 

Link para o post
Compartilhar em outros sites
1 hora atrás, JcA disse:

 

Também não é isso, e coloquei o pvp tile.

 

 

Também não é isso

 

 

È o time adversário

 

então, mas mesmo que vc coloque o pvp tile, se tiver um npvp em baixo nao vai funcionar.. mas se vc diz que nao é, ok.

deixo para os scripters de plantão.

Link para o post
Compartilhar em outros sites
9 horas atrás, Enzo Caue disse:

então, mas mesmo que vc coloque o pvp tile, se tiver um npvp em baixo nao vai funcionar.. mas se vc diz que nao é, ok.

deixo para os scripters de plantão.

 

Não é isso, ja testei

Link para o post
Compartilhar em outros sites

É como o @Dwarfer  disse, o script ta para não atacar somente quem for do mesmo time...

 

Troca isto:

 

Spoiler

function onCombat(cid, target)
	if isPlayer(cid) and isPlayer(target) then
		if getPlayerStorageValue(cid, DUCA.STORAGE_TEAM) > 0 then
			if getPlayerStorageValue(cid, DUCA.STORAGE_TEAM) == getPlayerStorageValue(target, DUCA.STORAGE_TEAM) then
				return false
			end
		end
	end
	return true
end

 

 

 

Por isto, e seja feliz:

 

Spoiler

function onCombat(cid, target)
	if isPlayer(cid) and isPlayer(target) and getPlayerStorageValue(cid, DUCA.STORAGE_TEAM) > 0 and getPlayerStorageValue(target, DUCA.STORAGE_TEAM) > 0 then
				return false
	end
	return true
end

 

 

 

-- EDIT

 

PS:.. se for reputar alguém, repute o @Dwarfer, pois ele foi quem já tinha visto isto que falei, eu praticamente não tive trabalho nenhum.

Editado por antharaz (veja o histórico de edições)
Link para o post
Compartilhar em outros sites
40 minutos atrás, antharaz disse:

É como o @Dwarfer  disse, o script ta para não atacar somente quem for do mesmo time...

 

Troca isto:

 

  Ocultar conteúdo


function onCombat(cid, target)
	if isPlayer(cid) and isPlayer(target) then
		if getPlayerStorageValue(cid, DUCA.STORAGE_TEAM) > 0 then
			if getPlayerStorageValue(cid, DUCA.STORAGE_TEAM) == getPlayerStorageValue(target, DUCA.STORAGE_TEAM) then
				return false
			end
		end
	end
	return true
end

 

 

 

Por isto, e seja feliz:

 

  Ocultar conteúdo


function onCombat(cid, target)
	if isPlayer(cid) and isPlayer(target) and getPlayerStorageValue(cid, DUCA.STORAGE_TEAM) > 0 and getPlayerStorageValue(target, DUCA.STORAGE_TEAM) > 0 then
				return false
	end
	return true
end

 

 

 

-- EDIT

 

PS:.. se for reputar alguém, repute o @Dwarfer, pois ele foi quem já tinha visto isto que falei, eu praticamente não tive trabalho nenhum.

 

 

Ainda sim não funciona, tentou atacar e não deixa

 

--[[
	<!-- DUCA Event -->
	<event type="login" name="Duca-Login" event="script" value="DUCA_creaturescript.lua"/>
	<event type="logout" name="Duca-Logout" event="script" value="DUCA_creaturescript.lua"/>
	<event type="preparedeath" name="Duca-Death" event="script" value="DUCA_creaturescript.lua"/>
	<event type="combat" name="Duca-Combat" event="script" value="DUCA_creaturescript.lua"/>
]]--
	
dofile('data/lib/DUCA.lua')

function onLogin(cid)
	if getPlayerStorageValue(cid, DUCA.STORAGE_TEAM) > 0 then
		DUCA.removePlayer(cid)
	end
	return true
end

function onLogout(cid)
	if getPlayerStorageValue(cid, DUCA.STORAGE_TEAM) > 0 then
		doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You can not logout now!")
		return false
	end
	return true
end

function onPrepareDeath(cid, deathList, lastHitKiller, mostDamageKiller)

	local pontos = {[1] = 1, [2] = 1, [3] = 10, [4] = 30,}

	if getPlayerStorageValue(cid, DUCA.STORAGE_TEAM) > 0 then
		local pontos_ganhos = pontos[getPlayerStorageValue(cid, DUCA.STORAGE_TEAM)]
		setPlayerStorageValue(deathList[1], DUCA.TOTAL_PONTOS, getPlayerStorageValue(deathList[1], DUCA.TOTAL_PONTOS) + pontos_ganhos)
		doPlayerSendTextMessage(deathList[1], MESSAGE_STATUS_CONSOLE_BLUE, "You have ".. getPlayerStorageValue(deathList[1], DUCA.TOTAL_PONTOS) .." duca points.")
		DUCA.removePlayer(cid)
		DUCA.updateRank()
	end
	return false
end

function onCombat(cid, target)
	if isPlayer(cid) and isPlayer(target) and getPlayerStorageValue(cid, DUCA.STORAGE_TEAM) > 0 and getPlayerStorageValue(target, DUCA.STORAGE_TEAM) > 0 then
				return false
	end
	return true
end

 

Link para o post
Compartilhar em outros sites

@JcA 

 

Mil perdões, entendi errado, entendi que você queria que o player não atacasse pessoas de qualquer time haha, a modificação correta seria trocar o return false do onPrepareDeath para return true. O correto ficará assim:

 

Spoiler

--[[
	<!-- DUCA Event -->
	<event type="login" name="Duca-Login" event="script" value="DUCA_creaturescript.lua"/>
	<event type="logout" name="Duca-Logout" event="script" value="DUCA_creaturescript.lua"/>
	<event type="preparedeath" name="Duca-Death" event="script" value="DUCA_creaturescript.lua"/>
	<event type="combat" name="Duca-Combat" event="script" value="DUCA_creaturescript.lua"/>
]]--
	
dofile('data/lib/DUCA.lua')

function onLogin(cid)
	if getPlayerStorageValue(cid, DUCA.STORAGE_TEAM) > 0 then
		DUCA.removePlayer(cid)
	end
	return true
end

function onLogout(cid)
	if getPlayerStorageValue(cid, DUCA.STORAGE_TEAM) > 0 then
		doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You can not logout now!")
		return false
	end
	return true
end

function onPrepareDeath(cid, deathList, lastHitKiller, mostDamageKiller)

	local pontos = {[1] = 1, [2] = 1, [3] = 10, [4] = 30,}

	if getPlayerStorageValue(cid, DUCA.STORAGE_TEAM) > 0 then
		local pontos_ganhos = pontos[getPlayerStorageValue(cid, DUCA.STORAGE_TEAM)]
		setPlayerStorageValue(deathList[1], DUCA.TOTAL_PONTOS, getPlayerStorageValue(deathList[1], DUCA.TOTAL_PONTOS) + pontos_ganhos)
		doPlayerSendTextMessage(deathList[1], MESSAGE_STATUS_CONSOLE_BLUE, "You have ".. getPlayerStorageValue(deathList[1], DUCA.TOTAL_PONTOS) .." duca points.")
		DUCA.removePlayer(cid)
		DUCA.updateRank()
	end
	return true
end

function onCombat(cid, target)
	if isPlayer(cid) and isPlayer(target) then
		if getPlayerStorageValue(cid, DUCA.STORAGE_TEAM) > 0 then
			if getPlayerStorageValue(cid, DUCA.STORAGE_TEAM) == getPlayerStorageValue(target, DUCA.STORAGE_TEAM) then
				return false
			end
		end
	end
	return true
end

 

 

Link para o post
Compartilhar em outros sites
19 minutos atrás, antharaz disse:

@JcA 

 

Mil perdões, entendi errado, entendi que você queria que o player não atacasse pessoas de qualquer time haha, a modificação correta seria trocar o return false do onPrepareDeath para return true. O correto ficará assim:

 

  Mostrar conteúdo oculto


--[[
	<!-- DUCA Event -->
	<event type="login" name="Duca-Login" event="script" value="DUCA_creaturescript.lua"/>
	<event type="logout" name="Duca-Logout" event="script" value="DUCA_creaturescript.lua"/>
	<event type="preparedeath" name="Duca-Death" event="script" value="DUCA_creaturescript.lua"/>
	<event type="combat" name="Duca-Combat" event="script" value="DUCA_creaturescript.lua"/>
]]--
	
dofile('data/lib/DUCA.lua')

function onLogin(cid)
	if getPlayerStorageValue(cid, DUCA.STORAGE_TEAM) > 0 then
		DUCA.removePlayer(cid)
	end
	return true
end

function onLogout(cid)
	if getPlayerStorageValue(cid, DUCA.STORAGE_TEAM) > 0 then
		doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You can not logout now!")
		return false
	end
	return true
end

function onPrepareDeath(cid, deathList, lastHitKiller, mostDamageKiller)

	local pontos = {[1] = 1, [2] = 1, [3] = 10, [4] = 30,}

	if getPlayerStorageValue(cid, DUCA.STORAGE_TEAM) > 0 then
		local pontos_ganhos = pontos[getPlayerStorageValue(cid, DUCA.STORAGE_TEAM)]
		setPlayerStorageValue(deathList[1], DUCA.TOTAL_PONTOS, getPlayerStorageValue(deathList[1], DUCA.TOTAL_PONTOS) + pontos_ganhos)
		doPlayerSendTextMessage(deathList[1], MESSAGE_STATUS_CONSOLE_BLUE, "You have ".. getPlayerStorageValue(deathList[1], DUCA.TOTAL_PONTOS) .." duca points.")
		DUCA.removePlayer(cid)
		DUCA.updateRank()
	end
	return true
end

function onCombat(cid, target)
	if isPlayer(cid) and isPlayer(target) then
		if getPlayerStorageValue(cid, DUCA.STORAGE_TEAM) > 0 then
			if getPlayerStorageValue(cid, DUCA.STORAGE_TEAM) == getPlayerStorageValue(target, DUCA.STORAGE_TEAM) then
				return false
			end
		end
	end
	return true
end

 

 

Não ataca ainda, só para tomar ciencia, o script não bloqueia para atacar entre mc né? Pelo menos não identifiquei nd, enfim, complicado

Link para o post
Compartilhar em outros sites

Só pode ser conflito entre storages. Defina novos valores de storages para o evento e teste ...

 

E caso tenha problemas com este evento crie um "issue" no meu git: https://github.com/luanluciano93/ESTUDOS/tree/master/LUA/DUCA

Editado por luanluciano93 (veja o histórico de edições)
Link para o post
Compartilhar em outros sites

@JcA 

 

Acho que já nãoe ntendi mais nada do q vc qria asdhuiasdhuihuiasd, uma hora entendi que queria uma coisa, depois que você queria que morresse normal, agr qr q ataque >.<

 

acho melhor o autor do sistema te ajudar msm porque não to sabendo o que você ta querendo. :X

Link para o post
Compartilhar em outros sites
  • Solução
25 minutos atrás, antharaz disse:

@JcA 

 

Acho que já nãoe ntendi mais nada do q vc qria asdhuiasdhuihuiasd, uma hora entendi que queria uma coisa, depois que você queria que morresse normal, agr qr q ataque >.<

 

acho melhor o autor do sistema te ajudar msm porque não to sabendo o que você ta querendo. :X

 

 

 

O problema é o seguinte. o evento em si funciona, o problema é que não da para matar ng dps q entra no evento, nada mais alem disso.

Graças ao Anthraz, funcionou com isso aqui:

 

--[[
	<!-- DUCA Event -->
	<event type="login" name="Duca-Login" event="script" value="DUCA_creaturescript.lua"/>
	<event type="logout" name="Duca-Logout" event="script" value="DUCA_creaturescript.lua"/>
	<event type="preparedeath" name="Duca-Death" event="script" value="DUCA_creaturescript.lua"/>
	<event type="combat" name="Duca-Combat" event="script" value="DUCA_creaturescript.lua"/>
]]--
	
dofile('data/lib/DUCA.lua')

function onLogin(cid)
	if tonumber(getPlayerStorageValue(cid, DUCA.STORAGE_TEAM)) > 0 then
		DUCA.removePlayer(cid)
	end
	return true
end

function onLogout(cid)
	if tonumber(getPlayerStorageValue(cid, DUCA.STORAGE_TEAM)) > 0 then
		doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You can not logout now!")
		return false
	end
	return true
end

function onPrepareDeath(cid, deathList, lastHitKiller, mostDamageKiller)

	local pontos = {[1] = 1, [2] = 1, [3] = 10, [4] = 30,}

	if tonumber(getPlayerStorageValue(cid, DUCA.STORAGE_TEAM)) > 0 then
		local pontos_ganhos = pontos[getPlayerStorageValue(cid, DUCA.STORAGE_TEAM)]
		setPlayerStorageValue(deathList[1], DUCA.TOTAL_PONTOS, getPlayerStorageValue(deathList[1], DUCA.TOTAL_PONTOS) + pontos_ganhos)
		doPlayerSendTextMessage(deathList[1], MESSAGE_STATUS_CONSOLE_BLUE, "You have ".. getPlayerStorageValue(deathList[1], DUCA.TOTAL_PONTOS) .." duca points.")
		DUCA.removePlayer(cid)
		DUCA.updateRank()
	end
	return false
end

function onCombat(cid, target)
	if isPlayer(cid) and isPlayer(target) then
		if tonumber(getPlayerStorageValue(cid, DUCA.STORAGE_TEAM)) > 0 then
			if tonumber(getPlayerStorageValue(cid, DUCA.STORAGE_TEAM)) == tonumber(getPlayerStorageValue(cid, DUCA.STORAGE_TEAM)) then
				return true
			end
		end
	end
	return true
end

 

Editado por JcA (veja o histórico de edições)
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.

×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo