• 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!

Inquisition script problem [REP+++]

arturhaddad

Member
Joined
Aug 14, 2010
Messages
217
Reaction score
8
My inquisition script is just not working, i don't know what is the problem.
When you kill the boss nothing happens, you just open the loot but doesn't appear any teleport to go next room.

This is the script:
Lua:
local config = {
        timeToRemove = 180, -- seconds
        message = "You now have 3 minutes to exit this room through the teleporter. It will bring you to the next room only during his time or the teleporter will disappear",
        teleportId = 9773,
        bosses = { -- Monster Name,  Teleport Position
                ["Ushuriel"] = {  pos={ x=33157, y=31725, z=11, stackpos=1 }, aid=1001 },
                ["Zugurosh"] = {  pos={ x=33123, y=31689, z=11, stackpos=1 }, aid=1002},
                ["Madareth"] = {  pos={ x=33194, y=31768, z=11, stackpos=1 }, aid=1003},
                ["Annihilon"] = {  pos={ x=33200, y=31704, z=11, stackpos=1 }, aid=1005},
                ["Hellgorak"] = {  pos={ x=33107, y=31735, z=11, stackpos=1 }, aid=1006}
                },
        brothers ={
        ["Golgordan"] = {pos={ x=33235, y=31734, z=11, stackpos=1 },aid=1004, brother = "Latrivan"},
        ["Latrivan"] = {pos={ x=33235, y=31734, z=11, stackpos=1 },aid=1004, brother = "Golgordan"},
        brothersArea ={
                fromPos = {x = 33224, y = 31722, z = 11},
                toPos = {x = 33240, y = 31734, z = 11}    }    }
}
local function removal(position)
    doRemoveThing(getTileItemById(position, config.teleportId).uid, 1)
    return TRUE
end

function onKill(cid, target, lastHit)
    if(config.bosses[getCreatureName(target)]) then
        local t = config.bosses[getCreatureName(target)]
        local teleport = doCreateItem(config.teleportId, t.pos)
        local position = t.pos
        doItemSetAttribute(teleport, "aid", t.aid)
        doCreatureSay(cid, config.message, TALKTYPE_ORANGE_1)
        addEvent(removal, config.timeToRemove * 1000, position)
    elseif(config.brothers[getCreatureName(target)]) then
        local t = config.brothers[getCreatureName(target)]
        local brother = getCreatureByName(t.brother)
        if(isMonster(brother) == true) then
            if(isInRange(getCreaturePosition(brother), config.brothers.brothersArea.fromPos, config.brothers.brothersArea.toPos) == true) then
                return TRUE
            end
        else
            local teleport = doCreateItem(config.teleportId, t.pos)
            local position = t.pos
            doItemSetAttribute(teleport, "aid", t.aid)
            doCreatureSay(cid, config.message, TALKTYPE_ORANGE_1)
            addEvent(removal, config.timeToRemove * 1000, position)
        end
    end
    return TRUE
end

In creaturescripts.xml:
XML:
    <event type="kill" name="inquisitionPortals" script="Inquisition.lua"/>


Also an inquisition boss example:
XML:
<?xml version="1.0" encoding="UTF-8"?>
<monster name="Ushuriel" nameDescription="ushuriel" race="blood" experience="10000" speed="400" manacost="0">
  <health now="40000" max="40000"/>
  <look type="12" head="1" body="76" legs="0" feet="132" corpse="6068"/>
  <targetchange interval="10000" chance="15"/>
  <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="90"/>
    <flag targetdistance="1"/>
    <flag runonhealth="0"/>
  </flags>
<script> 
    <event name="inquisitionPortals"/> 
</script>
<attacks>
        <attack name="melee" interval="2000" min="-0" max="-1028"/> 
    <attack name="physical" interval="1000" chance="10" length="10" spread="0" min="-250" max="-500">
        <attribute key="areaEffect" value="mortarea"/>
    </attack>
    <attack name="death" interval="1000" chance="8" radius="5" target="0" min="-30" max="-760">
        <attribute key="areaEffect" value="mortarea"/>
        <attribute key="shootEffect" value="death"/>
    </attack>
    <attack name="earth" interval="2000" chance="9" length="8" spread="0" min="-200" max="-585">
        <attribute key="areaEffect" value="smallplants"/>
    </attack>
    <attack name="ice" interval="1000" chance="8" target="0" radius="6" min="0" max="-430">
        <attribute key="areaEffect" value="icetornado"/>
    </attack>
    <attack name="drunk" interval="2000" chance="11" radius="6" target="0">
        <attribute key="areaEffect" value="purplenote"/>
    </attack>
    <attack name="energycondition" interval="1500" chance="15" radius="4" target="0" min="-250" max="-250">
        <attribute key="areaEffect" value="energy"/>
    </attack>
</attacks>

<defenses armor="50" defense="45">
    <defense name="healing" interval="1000" chance="12" min="400" max="600">
        <attribute key="areaEffect" value="greenshimmer"/>
    </defense>
    <defense name="speed" interval="1000" chance="4" speedchange="400" duration="7000">
        <attribute key="areaEffect" value="blueshimmer"/>
    </defense>
</defenses>
<elements>
        <element energyPercent="30"/>
        <element earthPercent="80"/>
        <element icePercent="15"/>
        <element holyPercent="-10"/>
        <element deathPercent="20"/>
        <element firePercent="-10"/>
</elements>
  <immunities>
    <immunity physical="0"/>
    <immunity energy="0"/>
    <immunity fire="0"/>
    <immunity poison="0"/>
    <immunity lifedrain="1"/>
    <immunity paralyze="1"/>
    <immunity outfit="1"/>
    <immunity drunk="1"/>
    <immunity invisible="1"/>
    <immunity death="1"/>
  </immunities>
  <voices interval="5000" chance="10">
    <voice sentence="You will run out of resources soon enough!"/>
    <voice sentence="One little mistake and your all are mine!"/>
    <voice sentence="I sense your strength fading!"/>
  </voices>

<loot>
<item id="2148" chance="100000" countmax="100" />
<item id="2148" chance="100000" countmax="100" />
<item id="2152" chance="100000" countmax="30" /> --
<item id="2150" chance="18000" countmax="3"/> -- 
<item id="2145" chance="8000" countmax="3"/> -- 
<item id="2146" chance="7000" countmax="8"/> -- 
<item id="2144" chance="6000" countmax="14"/> -- 
<item id="2149" chance="7000" countmax="6"/> -- 
<item id="2143" chance="6000" countmax="14"/> -- 
<item id="2150" chance="9000" countmax="17"/> -- 
<item id="7591" chance="12000" countmax="2"/> -- great health
<item id="7590" chance="5000" /> --
<item id="8473" chance="6000" /> --
<item id="7365" chance="9000" countmax="8"/> -- great health
<item id="2789" chance="12000" countmax="30"/> -- great health
<item id="5954" chance="6000" countmax="2"/> -- great health
<item id="7385" chance="2000" /> --crimson sword
<item id="5880" chance="5000" countmax="10"/> -- iron ore
<item id="5925" chance="4000" countmax="20"/> -- hardened bone
<item id="2176" chance="5000" /> -- orb
<item id="2185" chance="3000" /> --necrotic rod
<item id="2182" chance="2500" /> --snakebite
<item id="2387" chance="3000" /> --doublr axe
<item id="2178" chance="999" /> --mind stone
<item id="2163" chance="1500" /> --magic light wand
<item id="6301" chance="8000" /> -- death ring
<item id="2167" chance="5000" /> --energy ring
<item id="2165" chance="5000" /> --stealth ring
<item id="2179" chance="4000" /> --gold ring
<item id="9971" chance="4000" countmax="5"/> -- gold ingot
<item id="2402" chance="8000" /> --silver dagger
<item id="2177" chance="5600" /> --life crystal
<item id="2170" chance="3500" /> --silver amulet
<item id="2200" chance="3000" /> --protection amulet
<item id="2462" chance="3500" /> --devil helmet
<item id="2164" chance="2500" /> --might ring
<item id="2197" chance="6000" /> --ssa
<item id="2396" chance="10000" /> --ice rapier
<item id="2214" chance="8000" /> --roh
<item id="6500" chance="10000" /> --demonic essence

<item id="1987" chance="1000000" > --
<inside>
<item id="2188" chance="4000" /> --wand of decay
<item id="2186" chance="3400" /> --moonlight rod
<item id="2432" chance="1800" /> --fire axe
<item id="2520" chance="1600" /> --demon shield
<item id="2393" chance="1400" /> --giant sword
<item id="2195" chance="1200" /> --boots of haste
<item id="5891" chance="2000" /> --enchanted chicken wing
<item id="5669" chance="3500" /> --voodoo skull
<item id="2155" chance="2000" /> --green gem
<item id="2158" chance="2000" /> --blue gem
<item id="2498" chance="1000" /> --royal helmet
<item id="5741" chance="3500" /> --skull helmet
<item id="2491" chance="4000" /> --crown helmet
<item id="2475" chance="1000" /> --warrior helmet
<item id="7391" chance="2300" /> --thaian sword
<item id="5892" chance="2000" /> --chuck of crude iron
<item id="5884" chance="3100" /> --fighting spirit
<item id="5885" chance="1800" /> --warriors sweat
<item id="2383" chance="10000" /> --spike sword
<item id="2392" chance="3000" /> --fire sword
<item id="5884" chance="2000" /> --fighting spirit
<item id="9810" chance="8000" /> --rusty armor
<item id="7402" chance="2500" /> --dragon slayer
<item id="6103" chance="900" /> --unholy book
<item id="7417" chance="1300" /> --runed sword
</inside>
</item>
</loot>

</monster>


THANKS :$:$
 
Back
Top