Serginov
Onkonkoronkonk
Fixed ;p
Now I only get an error "Couldn't execute event Immortality effects", even though the globalevent works ;s
The config
The globalevent in the mod
and around line 42, I don't know if it's 42 it mean, but here it is anyway
Line 35-50
Now I only get an error "Couldn't execute event Immortality effects", even though the globalevent works ;s
The config
Code:
<config name="config"><![CDATA[
[COLOR=Red]kills = 1000[/COLOR]
deaths = 1001
channel = 11
useExplode = true
exlode.effect = CONST_ME_FIREATTACK
exlode.damage = 500 -- How much damage will the explosion do when you die.
exlode.reqKills = 5 -- If you have 5 kills or more you will explode on death if explodeOnDeath is true.
exlode.area = {5, 5} -- How many sqms will the bomb cover? default 5x5. x, y.
-- Replenish - Talkaction: !restore
useReplenish = true -- true/false. If true: Will restore X health and X mana.
replenish.useCharges = false -- true if you want to use charges on the skill, false if you want the skill to have unlimited charges.
replenish.healthAmount = math.random(350,700) -- (min, max) How much health will be restored when used.
replenish.manaAmount = math.random(250,550) -- (min, max) How much mana will be restored when used.
replenish.cooldown = 40 -- How long you have to wait until you can use it again, in seconds.
replenish.charges = 5 -- How many times you can restore your health and mana.
replenish.reqKills = 7 -- How many kills you need to be able to use !restore.
replenish.chargeStorage = 1002 -- Storage needed to store charges.
replenish.alreadyGiven = 1003 -- storage
replenish.onCooldown = 1004 -- storage
-- Immortality -- Talkaction: !immortal
useImmortality = true -- true/false. If true: You can activate immortality, makes you invulnerable against incoming damage for X seconds.
immortal.useEffect = true -- true/false. If true: An effect will appear on the player who is immortal.
immortal.useCharges = false -- true if you want to use charges on the skill, false if you want the skill to have unlimited charges.
immortal.effect = CONST_ME_HOLYAREA -- If immortal.useEffect = true then you will get this effect on a immortal player every X seconds(scroll down to the global event to set how often)
immortal.reqKills = 10 -- How many kills you need to be able to activate immortality. immortal.time = 25 -- How long you will be immortal, in seconds.
immortal.cooldown = 240 -- How long you must wait until you can make yourself immortal again, in seconds.
immortal.charges = 2 -- How many times you can use immortality. put false if you want infinite charges
immortal.chargeStorage = 1005 -- Storage for charges.
immortal.storageActive = 1006 -- Storage when you are immortal
immortal.alreadyGiven = 1007 -- storage
immortal.onCooldown = 1008 -- storage
-- Stealth - Talkaction: !stealth
useStealth = true -- true/false. If true: Will make you invisible for X seconds. Invisible to EVERYTHING, even players.
stealth.useCharges = false -- true if you want to use charges on the skill, false if you want the skill to have unlimited charges.
stealth.reqKills = 10 -- How many kills you need to be able to use the invisibility skill.
stealth.time = 25 -- How long you will be invisible, in seconds.
stealth.charges = 2 -- How many times you can make yourself invisible.
stealth.cooldown = 180 -- How long you will have to wait until you can use the invisibility skill again.
stealth.timeStorage = 1009 -- storage
stealth.chargeStorage = 1010 -- storage
stealth.alreadyGiven = 1011 -- storage
stealth.onCooldown = 1012 -- storage
-- Sentry gun - Talkaction: !sentry
useSentryGun = true -- true/false. If true: Will spawn a Sentry gun at your location, shooting everyone who you target.
sentry.useCharges = false -- true if you want to use charges on the skill, false if you want the skill to have unlimited charges.
sentry.reqKills = 10 -- How many kills you need to be able to spawn the sentry gun.
sentry.time = 25 -- How long the sentry gun will be spawned.
sentry.charge = 2 -- How many times you can spawn the sentry gun.
sentry.cooldown = 120 -- How long you will have to wait until you can spawn the sentry gun again.
sentry.timeStorage = 1013 -- storage
sentry.chargeStorage = 1014 -- storage
sentry.alreadyGiven = 1015 -- storage
sentry.onCooldown = 1016 -- storage
kstreak = {
lastKills = 8, -- How many kills you need for the last message
-- [kills]= {kills, "Message"} -- Yes kills two times..
[1] = {1, ""},
[2] = {2, "Double Kill!"},
[3] = {3, "Triple Kill!"},
[4] = {4, "Quad Kill!", ""},
[5] = {5, "M-M-M-Monster Kill!!"},
[6] = {6, "BLOODBATH!"},
[7] = {7, "UNSTOPPABLE!"},
[8] = {8, "GODLIKE!!"}} -- Will be sent if you got this much kills or more.
function removeStealth(cid)
doCreatureExecuteTalkAction(cid, "/ghost", true)
setPlayerGroupId(cid, 1)
end
function stealthCooldown(cid)
setPlayerStorageValue(cid, stealth.onCooldown, 0)
doPlayerSendTextMessage(cid, MESSAGE_EVENT_DESCR, "You are ready to use the stealth ability again.")
end
function replenishCooldown(cid)
setPlayerStorageValue(cid, replenish.onCooldown, 0)
doPlayerSendTextMessage(cid, MESSAGE_EVENT_DESCR, "You are ready to use the replenish ability again.")
end
function immortalCooldown(cid)
setPlayerStorageValue(cid, immortal.onCooldown, 0)
doPlayerSendTextMessage(cid, MESSAGE_EVENT_DESCR, "You are ready to use the immortal ability again.")
end
function removeImmortal(cid)
setPlayerStorageValue(cid, immortal.storageActive, 0)
doPlayerSendTextMessage(cid, MESSAGE_EVENT_DESCR, "You are not immortal anymore.")
end
function sentryCooldown(cid)
setPlayerStorageValue(cid, sentry.onCooldown, 0)
doPlayerSendTextMessage(cid, MESSAGE_EVENT_DESCR, "You are ready to set up the sentry gun again.")
end
function removeSentry(cid)
local s = getCreatureSummons(cid)
for _, summons in ipairs(s) do
doRemoveCreature(summons)
doPlayerSendTextMessage(cid, MESSAGE_EVENT_DESCR, "Your sentry gun have been destroyed.")
end
end
]]></config>
Code:
<globalevent name="Immortality Effects" interval="5" event="script"><![CDATA[
domodlib("config")
if immortal.useEffect then
for _, tid in ipairs(getPlayersOnline()) do
if getPlayerStorageValue(tid, immortal.storage) >= 1 then
doSendMagicEffect(getPlayerPosition(tid), immortal.effect)
end
end
end
]]></globalevent>
Line 35-50
Code:
35. immortal.chargeStorage = 1005 -- Storage for charges.
36. immortal.storageActive = 1006 -- Storage when you are immortal
37. immortal.alreadyGiven = 1007 -- storage
38. immortal.onCooldown = 1008 -- storage
39.
40. -- Stealth - Talkaction: !stealth
41. useStealth = true -- true/false. If true: Will make you invisible for X seconds. Invisible to EVERYTHING, even players.
42. stealth.useCharges = false, -- true if you want to use charges on the skill, false if you want the skill to have unlimited charges.
43. stealth.reqKills = 10 -- How many kills you need to be able to use the invisibility skill.
44. stealth.time = 25 -- How long you will be invisible, in seconds.
45. stealth.charges = 2 -- How many times you can make yourself invisible.
46. stealth.cooldown = 180 -- How long you will have to wait until you can use the invisibility skill again.
47. stealth.timeStorage = 1009 -- storage
48. stealth.chargeStorage = 1010 -- storage
49. stealth.alreadyGiven = 1011 -- storage
50. stealth.onCooldown = 1012 -- storage
Last edited: