RO
dúvida

Script Simples REP++

Por rodrygosos, 14 de dez. de 2012 em Scripts

script
8
1.1k
rodrygososR
14 de dezembro de 2012 às 20:55
function onDeath(cid, corpse, deathList)

local config = {

onlypremium = true, -- se precisa ser premium para não perder nada

exp = true, -- se ao morrer o jogador irá perder exp

skills = false, -- se ao morrer vai perder skills

magic = false, -- se vai perder magic level

loot = false, -- se ao morrer o jogador irá perder o loot

level = 50 -- até que level irá proteger o player

}

if isPlayer(cid) and getPlayerLevel(cid) <= config.level then

if config.onlypremium == true and not isPremium(cid) then return TRUE end

if config.loot == false then doCreatureSetDropLoot(cid, false) end

if config.magic == false then doPlayerSetLossPercent(cid, PLAYERLOSS_MANA, 0) end

if config.skills == false then doPlayerSetLossPercent(cid, PLAYERLOSS_SKILLS, 0) end

if config.exp == false then doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, 0) end

return TRUE end return TRUE end

 

Galera preciso que alguem bote esse script para quando o cara for pk ou pk red esse script n funcione para ele, esse script é de protected level postado pelo Vodkat (não sei se o nome ta certo), mas então to precisando disso, o problema ta que quando o cara é pk red ele n perde nada quando morre até o level q esta configurado por esse script, meu ot é 9.70

Editado Dezembro 14 por TkSamer

manelkscoutoM
14 de dezembro de 2012 às 21:36

Gostei (Nem Li)

Yan OliveiraY
14 de dezembro de 2012 às 21:43

Gostei (Nem Li)

 

Este tipo de comentario é considerado Flood, leia as regras, considere como ultimo aviso.

VodkartV
14 de dezembro de 2012 às 21:46
function onDeath(cid, corpse, deathList)
local config = {
onlypremium = true, -- se precisa ser premium para não perder nada
exp = true, -- se ao morrer o jogador irá perder exp
skills = false, -- se ao morrer vai perder skills
magic = false, -- se vai perder magic level
loot = false, -- se ao morrer o jogador irá perder o loot
level = 50 -- até que level irá proteger o player
}
if isPlayer(cid) and getPlayerLevel(cid) <= config.level then
if getPlayerSkullType(cid) >= 4 then return TRUE end
if config.onlypremium == true and not isPremium(cid) then return TRUE end
if config.loot == false then doCreatureSetDropLoot(cid, false) end
if config.magic == false then doPlayerSetLossPercent(cid, PLAYERLOSS_MANA, 0) end
if config.skills == false then doPlayerSetLossPercent(cid, PLAYERLOSS_SKILLS, 0) end
if config.exp == false then doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, 0) end
return TRUE end return TRUE end

OneshotO
14 de dezembro de 2012 às 21:49

@ManelksCouto

 

Também gostei de te reportar :)

 

@TkSamer

 

local config = {
premium = "yes",
protectionLevel = 50,
var = {
	[PLAYERLOSS_EXPERIENCE] = "yes",
	[PLAYERLOSS_MANA] = "no",
	[PLAYERLOSS_SKILLS] = "no",
	[PLAYERLOSS_CONTAINERS] = "no",
	[PLAYERLOSS_ITEMS] = "no"
}
}


function onDeath(cid, corpse, deathList)
if getPlayerLevel(cid) > config.protectionLevel then
	return true
end

if getBooleanFromString(config.premium) == true and not isPremium(cid) then
	return true
end

if getCreatureSkullType(cid) > 3 then
	return true
end

for type, enabled in pairs(config.var) do
	enabled = getBooleanFromString(enabled)
	if enabled == true then
		doPlayerSetLossPercent(cid, type, 0)
	end
end
return true
end

 


 

Ah, nem vi que o Vodkart postou. Eu gosto de refazer scripts, aí eu demoro.

Editado Dezembro 14 por Oneshot

rodrygososR
15 de dezembro de 2012 às 01:30

Vlw amigos, problema resolvido ^^

AkatsukyiA
15 de dezembro de 2012 às 01:36

Resolvido & Reportado

SkyDangerousS
15 de dezembro de 2012 às 01:40

Obrigado mayzin por reportar.

Movido para dúvidas sanadas.