• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • 2026 staff recruitment is open! Check it out and consider applying!

Lua Death and DOOM

EnzzoCaaue

go ahead
Joined
Nov 29, 2012
Messages
134
Reaction score
4
Location
Brazil
Someone can help-me with this script?

in data/monster/gaz'haragoth.lua
Code:
<?xml version="1.0" encoding="UTF-8"?>
<monster name="Gaz'haragoth" nameDescription="a gaz'haragoth" race="undead" experience="1000000" speed="400" manacost="0" script="gaz'haragoth.lua">
    <health now="350000" max="350000"/>
    <look type="591" head="0" body="94" legs="79" feet="79" corpse="22562"/>
    <targetchange interval="10000" chance="20"/>
    <strategy attack="100" defense="0"/>
    <flags>
        <flag summonable="0"/>
        <flag attackable="1"/>
        <flag hostile="1"/>
        <flag illusionable="0"/>
        <flag convinceable="0"/>
        <flag pushable="0"/>
        <flag canpushitems="1"/>
        <flag canpushcreatures="1"/>
        <flag staticattack="98"/>
        <flag targetdistance="1"/>
        <flag runonhealth="0"/>
    </flags>
    <attacks>
        <attack name="melee" interval="2000" min="0" max="-5000"/>
        <attack name="ice" interval="3000" chance="35" range="7" radius="7" target="1" min="-900" max="-1100">
                <attribute key="shootEffect" value="ice"/>
                <attribute key="areaEffect" value="icearea"/>
        </attack>
        <attack name="melee" interval="1800" chance="40" range="7" radius="5" target="0" min="0" max="-1000">
            <attribute key="areaEffect" value="blackspark"/>
        </attack>
        <attack name="fire" interval="3000" chance="30" length="8" spread="0" min="-4000" max="-6000">
            <attribute key="areaEffect" value="fire"/>
        </attack>
        <attack name="physical" interval="2500" chance="20" range="7" radius="5" target="0" min="-200" max="-480">
            <attribute key="areaEffect" value="greenshimmer"/>
        </attack>
    </attacks>
    <defenses armor="55" defense="65">
        <defense name="healing" interval="3000" chance="35" min="2500" max="3500">
            <attribute key="areaEffect" value="blueshimmer"/>
        </defense>
        <defense name="speed" interval="4000" chance="80" speedchange="500" duration="6000">
            <attribute key="areaEffect" value="redshimmer"/>
        </defense>
    </defenses>
    <elements>
        <element firePercent="50"/>
        <element earthPercent="50"/>
        <element energyPercent="50"/>
        <element deathPercent="50"/>
        <element physicalPercent="50"/>
        <element holyPercent="50"/>
        <element icePercent="50"/>
    </elements>
    <immunities>
        <immunity paralyze="1"/>
        <immunity invisible="1"/>
    </immunities>
    <summons maxSummons="3">
        <summon name="Minion of Gaz'haragoth" interval="4000" chance="33"/>
    </summons>
    <summons maxSummons="3">
        <summon name="Nightmare of Gaz'haragoth" interval="4000" chance="33"/>
    </summons>
    <voices interval="5000" chance="30">
        <voice sentence="Gaz'haragoth begins to channel DEATH AND DOOM into the area! RUN!"/>
        <voice sentence="Minions! Follow my call!" yell="1"/>
        <voice sentence="I've beaten tougher demons then you even know" yell="1"/>
        <voice sentence="You puny humans will be my snacks!" yell="1"/>
        <voice sentence="Gaz'haragoth calls down: DEATH AND DOOM!" yell="1"/>      
    </voices>
    <loot>
        <item id="2152" countmax="50" chance="10000"/>    <!-- Platinum Coin -->
        <item id="2160" countmax="6" chance="10000"/>     <!-- Crystal Coins -->
        <item id="18418" countmax="15" chance="10000"/>    <!-- Blue Crystal Splinter -->
        <item id="7368" countmax="100" chance="10000"/>    <!-- Assassin Star -->
        <item id="22598" countmax="3" chance="10000"/>    <!-- Unrealized Dream -->
        <item id="6500" countmax="2" chance="10000"/>    <!-- Demonic Essence -->
        <item id="8473" countmax="100" chance="10000"/>    <!-- Ultimate Health Potion -->
        <item id="7590" countmax="100" chance="10000"/>    <!-- Great Mana Potions -->
        <item id="8472" countmax="100" chance="10000"/>    <!-- Great Spirit Potions -->
        <item id="22397" countmax="3" chance="10000"/>    <!-- Dream Matter -->
        <item id="18415" countmax="5" chance="10000"/>    <!-- Green Crystal Shard -->
        <item id="22396" countmax="14" chance="10000"/>    <!-- Cluster of Solace -->
        <item id="2158" countmax="2" chance="10000"/>    <!-- Blue Gem -->
        <item id="18416" countmax="10" chance="10000"/>    <!-- Green Crystal Splinter -->
        <item id="18414" countmax="15" chance="10000"/>    <!-- Violet Crystal Shard -->
        <item id="6529" chance="6000"/>    <!-- Infernal Bolt -->
        <item id="22612" chance="6000"/>    <!-- Demonic Tapestry -->
        <item id="5914" chance="6000"/>    <!-- Yellow Piece of Cloth -->
        <item id="5911" chance="6000"/>    <!-- Red Piece of Cloth -->
        <item id="22610" chance="6000"/>    <!-- Dream Warden Mask -->
        <item id="7899" chance="6000"/>    <!-- Magma Coat -->
        <item id="7632" chance="6000"/>    <!-- Giant Shimmering Pearl -->
        <item id="5954" chance="6000"/>    <!-- Demon Horn -->
        <item id="22608" chance="6000"/>    <!-- Nightmare Horn -->
        <item id="2195" chance="6000"/>    <!-- Boots of Haste -->
        <item id="2168" chance="6000"/>    <!-- Life Ring -->
        <item id="22614" chance="6000"/>    <!-- Nightmare Beacon -->
        <item id="22613" chance="6000"/>    <!-- Eye Pod -->
        <item id="22611" chance="6000"/>    <!-- Psychedelic Tapestry -->
        <item id="22398" chance="5000"/>    <!-- Crude Umbral Blade -->
        <item id="22401" chance="5000"/>    <!-- Crude Umbral Slayer -->
        <item id="22404" chance="5000"/>    <!-- Crude Umbral Axe -->
        <item id="22407" chance="5000"/>    <!-- Crude Umbral Chopper -->
        <item id="22413" chance="5000"/>    <!-- Crude Umbral Hammer -->
        <item id="22410" chance="5000"/>    <!-- Crude Umbral Mace -->
        <item id="22416" chance="5000"/>    <!-- Crude Umbral Bow -->
        <item id="22419" chance="5000"/>    <!-- Crude Umbral Crossbow -->
        <item id="22422" chance="5000"/>    <!-- Crude Umbral Spellbook -->
        <item id="22399" chance="5000"/>    <!-- Umbral Blade -->
        <item id="22402" chance="5000"/>    <!-- Umbral Slayer -->
        <item id="22405" chance="4000"/>    <!-- Umbral Axe -->
        <item id="22408" chance="4000"/>    <!-- Umbral Chopper -->
        <item id="22414" chance="4000"/>    <!-- Umbral Hammer -->
        <item id="22411" chance="4000"/>    <!-- Umbral Mace -->
        <item id="22417" chance="4000"/>    <!-- Umbral Bow -->
        <item id="22420" chance="4000"/>    <!-- Umbral Crossbow -->
        <item id="22423" chance="4000"/>    <!-- Umbral Spellbook -->
        <item id="22400" chance="4000"/>    <!-- Umbral Masterblade -->
        <item id="22403" chance="3000"/>    <!-- Umbral Master Slayer -->
        <item id="22406" chance="3000"/>    <!-- Umbral Master Axe -->
        <item id="22409" chance="3000"/>    <!-- Umbral Master Chopper -->
        <item id="22415" chance="3000"/>    <!-- Umbral Master Hammer -->
        <item id="22412" chance="3000"/>    <!-- Umbral Master Mace -->
        <item id="22418" chance="3000"/>    <!-- Umbral Master Bow -->
        <item id="22421" chance="3000"/>    <!-- Umbral Master Crossbow -->
        <item id="22424" chance="3000"/>    <!-- Umbral Master Spellbook -->
        <item id="11262" chance="6000"/>    <!-- Solitude Charm -->
        <item id="11261" chance="6000"/>    <!-- Twin Sun Charm -->
        <item id="11260" chance="6000"/>    <!-- Spiritual Charm -->
        <item id="11259" chance="6000"/>    <!-- Unity Charm -->
        <item id="11258" chance="6000"/>    <!-- Phoenix Charm -->
    </loot>
</monster>


in data/monsters/script/gaz'haragoth.lua
Code:
function onCreatureSay(cid, speak, talktype, text)
    local DoomText ="Gaz'haragoth begins to channel DEATH AND DOOM into the area! RUN!"
    if (text == DoomText and talktype == 35) then
            addEvent(DOOM, 4000, cid)
          
    end
end

DoomArea = createCombatArea{
{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0},
{0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0},
{0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0},
{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0},
{1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1},
{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0},
{0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0},
{0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0},
{0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}
}

function DOOM(cid)
    if getCreatureTarget(cid) ~= 0 then
        doSendDistanceShoot(getCreaturePosition(cid), getCreaturePosition(getCreatureTarget(cid)), 47)
        doAreaCombatHealth(cid, 16, getCreaturePosition(getCreatureTarget(cid)), DoomArea, -30000, -30000, 47)
    end
end

local Running = false

function onThink(cid)
local minimo = (getCreatureHealth(cid)/getCreatureMaxHealth(cid))*100
    if (minimo < 12.5 and not Running) then
    Running = true
    addEvent(Uheal, 1000 * 7, cid)
    end
end

function Uheal(cid)
    Running = false
    doCreatureAddHealth(cid, 300000)
end
 
ok , when the monster say "Gaz'haragoth begins to channel DEATH AND DOOM into the area! RUN!", this mensage load the script but don't do the "doom", just heal itself ;\
 
Back
Top