xx Kami xx
Retired.
- Joined
- Dec 29, 2012
- Messages
- 509
- Reaction score
- 20
when ever i kill a boss and go to open chest it doesnt give reward, here is the scripts:
crystalWarzone1
wzchest1
wzchest2
wzchest2
crystalWarzone1
Code:
--- [[ Warzone 1 feito por Yuri Lagrotta ]] ---
local posdotp = {x= 33104, y=31908, z=10} -- Posicao que o tp vai ser criado (Eh o tp que leva pra sala do Deathstriker)
local salaDeathstriker = {x=33101, y=31956, z=10} -- Posicao da sala do Deathstriker (Pos pra onde o player vai qd entrar no tp)
local posDeathstriker = {x=33108, y=31968, z=10} -- Posicao onde o Deathstriker vai nascer.
function removerTp(tp)
local t = getTileItemById(posdotp, 1387)
if t then
doRemoveItem(t.uid, 1)
doSendMagicEffect(posdotp, CONST_ME_POFF)
end
end
function TirarCristal()
local cristal = getTileItemById(posdotp, 17999) -- Id do cristal azul que some para dar lugar ao tp
if cristal then
doRemoveItem(cristal.uid, 1)
end
return true
end
function onUse(cid, item, fromPosition, itemEx, toPosition)
if(getGlobalStorageValue(96973) < 1) then
setGlobalStorageValue(96973, 1)
for i = 1, 6 do
for k = 1, 10 do
creatures = {
"humongous fungus",
"hideous fungus"
}
pos = {x = math.random(33091, 33101), y = math.random(31899, 31916), z = 10}
addEvent(doSummonCreature, i * 20 * 1000, creatures[math.random(1, 2)], pos)
addEvent(doSendMagicEffect, i * 20 * 1000, pos, CONST_ME_TELEPORT)
end
addEvent(doCreatureSay, i * 20 * 1000, cid, "The crystals are charging.", TALKTYPE_ORANGE_1, false, cid, toPosition)
end
doCreatureSay(cid, "The crystals are damaging!", TALKTYPE_ORANGE_1, false, cid, toPosition)
addEvent(doSummonCreature, 62000+6*20*1000, "Deathstrike", posDeathstriker)
addEvent(doSendMagicEffect, 6*20*1000, posDeathstriker, CONST_ME_TELEPORT)
addEvent(TirarCristal, 6*20*1000)
addEvent(doCreateTeleport, 100+6*20*1000, 1387, salaDeathstriker, posdotp)
addEvent(removerTp, 60000+6*20*1000)
addEvent(doCreateItem, 61000+6*20*1000, 17999, posdotp)
addEvent(setGlobalStorageValue, 6*20*1000 + 30*60*1000, 96973, 0)
else
doPlayerSendCancel(cid, "Wait 30 minutes to start again.")
end
return true
end
wzchest1
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
local config = {
storage = 724877,
bstorage = 924877, -- boss storage
hours = 20
}
if getPlayerStorageValue(cid, config.bstorage) < 1 then
return doPlayerSendTextMessage(cid, 19, "Deathstrike defends his belongings and will not let you open his chest.")
end
if getPlayerStorageValue(cid, config.storage) >= os.time() then
return doPlayerSendTextMessage(cid, 19, "Deathstrike defends his belongings and will not let you open his chest.")
end
doPlayerAddItem(cid, 18423, 2) -- 2 major crystalline tokens
doPlayerAddItem(cid, 18402, 750) -- 1 gill necklace
doPlayerAddItem(cid, 18396, 1) -- 1 mucus plug
doPlayerAddItem(cid, 18415, 7) -- 7 green crystal shards
setPlayerStorageValue(cid, config.storage, os.time()+config.hours*3600)
setPlayerStorageValue(cid, config.bstorage,-1)
return doPlayerSendTextMessage(cid,19,"You have found 2 major crystalline tokens, 1 gill necklace, 1 mucus plug and 7 green crystal shards, wait "..config.hours.." hours to use this again.")
end
wzchest2
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
local config = {
storage = 724878,
bstorage = 924878, -- boss storage
hours = 20
}
if getPlayerStorageValue(cid, config.bstorage) < 1 then
return doPlayerSendTextMessage(cid, 19, "Gnomevil defends his belongings and will not let you open his chest.")
end
if getPlayerStorageValue(cid, config.storage) >= os.time() then
return doPlayerSendTextMessage(cid, 19, "Gnomevil defends his belongings and will not let you open his chest.")
end
doPlayerAddItem(cid, 18423, 2) -- 2 major crystalline tokens
doPlayerAddItem(cid, 18407, 750) -- 1 prismatic necklace
doPlayerAddItem(cid, 18396, 1) -- 1 mucus plug
doPlayerAddItem(cid, 18413, 10) -- 10 green crystal shards
setPlayerStorageValue(cid, config.storage, os.time()+config.hours*3600)
setPlayerStorageValue(cid, config.bstorage,-1)
return doPlayerSendTextMessage(cid,19,"You have found 2 major crystalline tokens, 1 prismatic necklace, 1 mucus plug and 10 blue crystal shards, wait "..config.hours.." hours to use this again.")
end
wzchest2
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
local config = {
storage = 724879,
bstorage = 924879, -- boss storage
hours = 20
}
if getPlayerStorageValue(cid, config.bstorage) < 1 then
return doPlayerSendTextMessage(cid, 19, "Abyssador defends his belongings and will not let you open his chest.")
end
if getPlayerStorageValue(cid, config.storage) >= os.time() then
return doPlayerSendTextMessage(cid, 19, "Abyssador defends his belongings and will not let you open his chest.")
end
doPlayerAddItem(cid, 18423, 2) -- 2 major crystalline tokens
doPlayerAddItem(cid, 18408, 1) -- 1 prismatic ring
doPlayerAddItem(cid, 18396, 1) -- 1 mucus plug
doPlayerAddItem(cid, 18414, 12) -- 12 violet crystal shards
setPlayerStorageValue(cid, config.storage, os.time()+config.hours*3600)
setPlayerStorageValue(cid, config.bstorage,-1)
return doPlayerSendTextMessage(cid,19,"You have found 2 major crystalline tokens, 1 prismatic ring, 1 mucus plug and 10 violet crystal shards, wait "..config.hours.." hours to use this again.")
end
Last edited: