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

tfs 0.4

Chava

New Member
Joined
Jul 6, 2009
Messages
280
Reaction score
0
this inq mod is working with tfs 0.3.6 but not with 0.4, does anyone know why ? ;p

Code:
<?xml version="1.0" encoding="UTF-8"?>
<mod name="Inquisition"

version="1.0" author="None" contact=".com" enabled="yes">

        <event type="login" name="inquisitionRegister" event="script"><![CDATA[
        function onLogin(cid)
    registerCreatureEvent(cid, "Inquisition")
        return true
end]]></event>

    <event type="kill" name="Inquisition" event="script"><![CDATA[
local config = {

    message = "You have 3 minutes to enter the teleporter after that it will disappear.",

    timeToRemove = 180, -- seconds

    teleportId = 1387,

    bosses = { -- Monster Name, Teleport To Position, Teleport Position

        ["Ushuriel"] = { { x=1176, y=1140, z=12 }, { x=1105, y=1214, z=12, stackpos=1 } },

        ["Annihilon"] = { { x=1248, y=1297, z=12 }, { x=1187, y=1206, z=12, stackpos=1 } },

        ["Hellgorak"] = { { x=1064, y=1308, z=13 }, { x=1192, y=1248, z=12, stackpos=1 } },

        ["Madareth"] = { { x=1044, y=1203, z=13 }, { x=1112, y=1248, z=12, stackpos=1 } },

        ["Zugurosh"] = { { x=1128, y=1151, z=12 }, { x=1138, y=1213, z=12, stackpos=1 } },

        ["Latrivan"] = { { x=1154, y=1195, z=13 }, { x=1147, y=1249, z=12, stackpos=1 } }

    }

}



local function removal(position)

    if getThingfromPos(position).itemid == config.teleportId then

        doRemoveItem(getThingfromPos(position).uid)

    end

    return TRUE

end



function onKill(cid, target, lastHit)
if lastHit == true then

    local position = getCreaturePosition(target)

    for name, pos in pairs(config.bosses) do

        if name == getCreatureName(target) then

            teleport = doCreateTeleport(config.teleportId, pos[1], pos[2])

            doCreatureSay(cid, config.message, TALKTYPE_ORANGE_1)

            addEvent(removal, config.timeToRemove * 1000, pos[2])
            doSendMagicEffect(pos[2], 10)

        end

    end
end

    return TRUE

end]]></event>

</mod>
 
The script works on 0.3.6 tfs but not on 0.4 tfs. My script is in the: tfs 0.4/mods/inq.xml

When I kill the boss and go to tp he teleports to the exit of the quest and does not pass the boss.

The engine does not show error..

It looks like this:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<mod name="Inquisition"

version="1.0" author="Tommy" contact="[email protected]" enabled="yes">

        <event type="login" name="inquisitionRegister" event="script"><![CDATA[
        function onLogin(cid)
    registerCreatureEvent(cid, "Inquisition")
        return true
end]]></event>

    <event type="kill" name="Inquisition" event="script"><![CDATA[
local config = {

    message = "Go into the teleporter in 3 minutes, else it will disappear.",

    timeToRemove = 180, -- seconds

    teleportId = 1387,

    bosses = { -- Monster Name, Teleport To Position, Teleport Position

        ["Ushuriel"] = { { x=2028, y=2393, z=5 }, { x=1952, y=2469, z=5, stackpos=1 } },

        ["Annihilon"] = { { x=2100, y=2552, z=5 }, { x=2042, y=2469, z=5, stackpos=1 } },

        ["Hellgorak"] = { { x=1919, y=2563, z=6 }, { x=2047, y=2511, z=5, stackpos=1 } },

        ["Madareth"] = { { x=1900, y=2460, z=6 }, { x=1967, y=2509, z=5, stackpos=1 } },

        ["Zugurosh"] = { { x=1983, y=2406, z=5 }, { x=1984, y=2469, z=5, stackpos=1 } },

        ["Latrivan"] = { { x=2007, y=2450, z=6 }, { x=2002, y=2509, z=5, stackpos=1 } }

    }

}



local function removal(position)

    if getThingfromPos(position).itemid == config.teleportId then

        doRemoveItem(getThingfromPos(position).uid)

    end

    return TRUE

end



function onKill(cid, target, lastHit)
if lastHit == true then
local position = getCreaturePosition(target)
for name, pos in pairs(config.bosses) do
if name == getCreatureName(target) then
teleport = doCreateTeleport(config.teleportId, pos[1], pos[2])
doCreatureSay(cid, config.message, TALKTYPE_ORANGE_1)
addEvent(removal, config.timeToRemove * 1000, pos[2])
doSendMagicEffect(pos[2], 10)

        end

    end
end

    return TRUE

end]]></event>

         <action fromuid="1300" touid="1308" event="script"><![CDATA[
    local storage = 36667
    local inquisitionRewards = {
        [1300] = 8890, --a Robe Of The Underworld
        [1301] = 8918, --a Spellbook of Dark Mysteries
        [1302] = 8881, --a Fireborn Giant Armor
        [1303] = 8888, --a Master Archer's Armor
        [1304] = 8851, --a Royal Crossbow
        [1305] = 8924, --a Hellforged Axe
        [1306] = 8928, --a Obsidian Truncheon
        [1307] = 8930, --a Emerald Sword
        [1308] = 8854, --a Warsinger Bow
    }
 
    if inquisitionRewards[item.uid] then
        if getPlayerStorageValue(cid, storage) < 1 then
            doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have found " .. getItemArticleById(inquisitionRewards[item.uid]) .. " " .. getItemNameById(inquisitionRewards[item.uid]) .. ".")
            doPlayerAddItem(cid, inquisitionRewards[item.uid], 1)
            setPlayerStorageValue(cid, storage, 1)
        else
            doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "It is empty.")
        end
    end
 
    return true
]]></action>
</mod>
 
Back
Top