ME

Storage Somente Para Quem Esta Na Party

Por Menoxcide, 08 de fev. de 2012 em Scripts

script
13
1.8k
MenoxcideM
08 de fevereiro de 2012 às 20:52

Eu ja tentei o script do Vodkard + o dele só da para o "player" q ganha mais experiencia e nao para quem esta na party.

 

Gostaria de um q desse o storage pro time q esta na party q ganhou mais exp do bixo...

 

AJUDA AE GALERA !!!

bepokemonB
08 de fevereiro de 2012 às 21:04

Manda o script do Vodka aí que eu adapto.

MenoxcideM
08 de fevereiro de 2012 às 21:16

ake esta ele:

 

function onDeath(cid, corpse, killer)

 

local monstName = "The Overlord"

local Storage = 45000

 

if isMonster(cid) then

if string.lower(getCreatureName(cid)) == string.lower(monstName) then

setPlayerStorageValue(killer[1], Storage, 11)

doCreatureSay(cid, "Your team won the reward!!.", TALKTYPE_ORANGE_1)

end

end

return true

end

bepokemonB
08 de fevereiro de 2012 às 21:29
function onDeath(cid, corpse, killer)
if isMonster(cid) then
if getCreatureName(cid) == "The Overlord" then
for _,member in pairs(getPartyMembers(getPlayerParty(killer[1]))) do
setPlayerStorageValue(member, 45000, 11)
end
doCreatureSay(cid, getCreatureName(killer[1]).."'s party won the reward!", TALKTYPE_ORANGE_1)
end
end
return true
end

MenoxcideM
08 de fevereiro de 2012 às 22:25

Ow nao deu certo, nao esta dando o storage e tb nao esta mandando a msg...

bepokemonB
08 de fevereiro de 2012 às 22:30

Tenta isso então:

 

function onDeath(cid, corpse, killer)
local firstkiller
for _,creature in ipairs(killer) do
if isPlayer(creature) then
firstkiller = creature
break
end
end
if isMonster(cid) then
if getCreatureName(cid) == "The Overlord" then
for _,member in pairs(getPartyMembers(getPlayerParty(firstkiller.uid))) do
setPlayerStorageValue(member, 45000, 11)
end
doCreatureSay(cid, getCreatureName(firstkiller).."'s party won the reward!", TALKTYPE_ORANGE_1)
end
end
return true
end

Editado Fevereiro 8 por Byerne

MenoxcideM
08 de fevereiro de 2012 às 22:53

agr ta dando erro no distro na linha 7

bepokemonB
08 de fevereiro de 2012 às 22:58

Tenta denovo ... ._.

VodkartV
08 de fevereiro de 2012 às 23:06

tente

 

 

--

retirado

Editado Fevereiro 10 por Vodkart

bepokemonB
08 de fevereiro de 2012 às 23:21

 

Verdade, é LID não PID ._. HAHAH Merda :(

MenoxcideM
09 de fevereiro de 2012 às 19:59

Onti tive q sair entao nao deu pra testa, ai testei hj e continuo nao dando certo...nao esta dando o storage e tb nao ta mandando a msg ;x

 

No distro nao da nenhum erro e nem quando termina de mata, eu ja colokei o eventname nos monster.xml e colokei no login tb ja...tenta arruma aew ^^

 

Vlws

VodkartV
09 de fevereiro de 2012 às 21:46

desculpe erro meu,o cid em questão é pro monster ._.

ou sejá estava checando se o monstro estava na party rsrsrs

 

function onDeath(cid, corpse, killer)
local monstName = "The Overlord"
local Storage = 45000

if isMonster(cid) and string.lower(getCreatureName(cid)) == string.lower(monstName) then
 if isInParty(killer[1]) == TRUE then
                          local players = getPartyMembers(getPartyLeader(killer[1]))
 for i, k in ipairs(players) do
 setPlayerStorageValue(k, Storage, 1)
 end
                          doCreatureSay(cid, "Your team won the reward!!.", TALKTYPE_ORANGE_1)
end
end
return TRUE
end

 

abraços

MenoxcideM
10 de fevereiro de 2012 às 15:42

fmz eu to na lan quando chega em casa eu testo...