Eu peguei um zombie event aqui no xtibia e funcionou perfeitamente, mas eu gostaria de fazer umas mudanças nele:
local config = {
playerCount = 2001, -- Global storage for counting the players left/entered in the event
goblet = 5805, -- id of the gold goblet you'll get when finishing the event.
rewards = {2159}, -- You will get this + a gold goblet with your name on.
-- {moneyId, count, using? 1 for using moneyReward, 0 for not using.}
moneyReward = {2159, 10, 1},
-- Should be same as in the globalevent!
-- The zombies will spawn randomly inside this area
fromPosition = {x = 1150, y = 1024, z = 7}, -- top left cornor of the playground
toPosition = {x = 1178, y = 1040, z = 7}, -- bottom right cornor of the playground
}
function onStatsChange(cid, attacker, type, combat, value)
if isPlayer(cid) and isMonster(attacker) then
if isInArea(getPlayerPosition(cid), config.fromPosition, config.toPosition) then
if getGlobalStorageValue(config.playerCount) >= 2 then
doBroadcastMessage(getPlayerName(cid) .. " have been eated by Zombies!", MESSAGE_STATUS_CONSOLE_RED)
local corpse = doCreateItem(3058, 1, getPlayerPosition(cid))
doItemSetAttribute(corpse, "description", "You recognize " .. getCreatureName(cid) .. ". He was killed by "..(isMonster(attacker) and "a "..string.lower(getCreatureName(attacker)) or isCreature(attacker) and getCreatureName(attacker) or "a field item")..".")
elseif getGlobalStorageValue(config.playerCount) == 1 then
if isInArea(getPlayerPosition(cid), config.fromPosition, config.toPosition) then
doBroadcastMessage(getPlayerName(cid) .. " won the Zombie event! Congratulations!", MESSAGE_STATUS_WARNING)
local goblet = doPlayerAddItem(cid, config.goblet, 1)
doItemSetAttribute(goblet, "description", "Awarded to " .. getPlayerName(cid) .. " for winning the Zombie event.")
local corpse = doCreateItem(3058, 1, getPlayerPosition(cid))
doItemSetAttribute(corpse, "description", "You recognize " .. getCreatureName(cid) .. ". He was killed by "..(isMonster(attacker) and "a "..string.lower(getCreatureName(attacker)) or isCreature(attacker) and getCreatureName(attacker) or "a field item")..".")
for x = config.fromPosition.x, config.toPosition.x do
for y = config.fromPosition.y, config.toPosition.y do
for z = config.fromPosition.z, config.toPosition.z do
areapos = {x = x, y = y, z = z, stackpos = 253}
getMonsters = getThingfromPos(areapos)
if isMonster(getMonsters.uid) then
doRemoveCreature(getMonsters.uid)
end
end
end
end
end
return false
end
end
return true
end
Nesse script ai, quando o evento acaba, o player vencedor recebe uns premios e um trófeu de ouro com o nome dele, o problema é que a quantia em event coins (moeda vip do meu server) ta vindo num numero exato e eu queria que ela variasse entre 10~14, outra coisa que eu queria também é que o segundo/terceiro player também recebessem esses coins e troféis.
Alguem conseguiria modificar isso pra mim? agradeço
@Esse script que eu coloquei é apenas o creaturescript, onde pelo menos eu acho que é o lugar onde se deve fazer essas mudanças, caso precise mudar outra coisa no script todo o link do zombie event tá aqui.
Pergunta
180319mu 0
Eu peguei um zombie event aqui no xtibia e funcionou perfeitamente, mas eu gostaria de fazer umas mudanças nele:
local config = {
Link para o comentário
Compartilhar em outros sites
11 respostass a esta questão
Posts Recomendados