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

help with mod plz

Thorn

Spriting since 2013
Joined
Sep 24, 2012
Messages
2,203
Solutions
1
Reaction score
923
Location
Chile
hiii, i have this mod

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

version="2.0" author="Tommy" contact="[email protected]" enabled="yes">
<config name="inqusitionFunctions"><![CDATA[
config = {
    message = "Go into the teleporter in 3 minutes, else it will disappear.",
    timeToRemove = 180, -- seconds
    teleportId = 1387,
    MonStor = 48000,
    bosses = { -- Monster Name, Teleport To Position, Teleport Position, UID
        ["God of the Forest"] = { ptp={ x=857, y=552, z=6}, pp={ x=865, y=568, z=7, stackpos=1 }, uid=49100 },
        ["God of the Desert"] = { ptp={ x=856, y=554, z=5 }, pp={ x=862, y=567, z=6, stackpos=1 }, uid=49200 },
        ["God of Poison"] = { ptp={ x=857, y=554, z=4 }, pp={ x=868, y=569, z=5, stackpos=1 }, uid=49300 },
        ["God of Ice"] = { ptp={ x=897, y=599, z=3}, pp={ x=867, y=570, z=4, stackpos=1 }, uid=49400 },
        ["Supreme God"] = { ptp={ x=452, y=164, z=6 }, pp={ x=452, y=162, z=6, stackpos=1 }, uid=49500 },
            }
}
 
    function removal(position)
    if getThingfromPos(position).itemid == config.teleportId then
        doRemoveItem(getThingfromPos(position).uid)
    end
    return TRUE
end]]></config>

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

    <event type="kill" name="Inquisition" event="script"><![CDATA[
function onKill(cid, target, lastHit)
    if(config.bosses[getCreatureName(target)]) then
        local t = config.bosses[getCreatureName(target)]
        local teleport = doCreateTeleport(config.teleportId, t.ptp, t.pp)
        local position = t.pp
        doItemSetAttribute(teleport, "uid", t.uid)
        doCreatureSay(cid, config.message, TALKTYPE_ORANGE_1)
        addEvent(removal, config.timeToRemove * 1000, position)
    end
    return TRUE
end]]></event>


         <action fromuid="1301" touid="1311" event="script"><![CDATA[
        domodlib('inqusitionFunctions')
    local storage = 50301
    local inquisitionRewards = {
        [9988] = 8890, --a robe of the underworld
        [9989] = 8918, --a spellbook of dark mysteries
        [9990] = 8881, --a fireborn giant armor
        [9991] = 8888, --a master archer's armor
        [9992] = 8851, --a royal crossbow
        [9993] = 7435, --an executioner
        [9994] = 8929, --the stomper
        [9995] = 7417, --a runed sword
        [9996] = 8854, --a warsinger bow
        [9997] = 8903, --a spellbook of lost souls
        [9998] = 2508, --a mystical armor
        [9999] = 8905 --a rainbow shield
    }
    
    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)
                                addPlayerRep(cid, 5, TEXTCOLOR_LIGHTBLUE)
        else
            doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "It is empty.") 
        end
    end
    
    return true
]]></action>
</mod>

but im only using the part where you kill a boss and a teleport appears, well is only working with the first boss and the last boss :S and no errors in console, plzz help me guys :(
 
Last edited:
this is what i have:

XML:
<?xml version="1.0" encoding="UTF-8"?>
<mod name="Inquisition"
version="2.0" author="Tommy" contact="[email protected]" enabled="yes">
<config name="inqusitionFunctions"><=!=[=C=D=A=T=A=[
 
 
local config = {
        timeToRemove = 180, -- seconds
        message = "Go into the teleporter in 3 minutes, else it will disappear.",
        teleportId = 1387,
        MonStor = 48000,
        bosses = { -- Monster Name,  Teleport Position
                ["God of the Forest"] = {  pos={ x=857, y=552, z=6, stackpos=1 }, aid=49100 },
                ["God of the Desert"] = {  pos={ x=856, y=554, z=5, stackpos=1 }, aid=49200}, 
                ["God of Poison"] = {  pos={ x=857, y=554, z=4, stackpos=1 }, aid=49300}, 
                ["God of Ice"] = {  pos={ x=897, y=599, z=3, stackpos=1 }, aid=49400},
                ["Supreme God"] = {  pos={ x=452, y=164, z=6, stackpos=1 }, aid=49500},
            }
}
 
    local function removal(position)
    doRemoveThing(getTileItemById(position, config.teleportId).uid, 1) 
 
    return TRUE
end ]=]=></config>
 
        <event type="login" name="inquisitionRegister" event="script"><=!=[=C=D=A=T=A=[
        domodlib('inqusitionFunctions')
        function onLogin(cid)
    registerCreatureEvent(cid, "Inquisition")
        return true
end]=]=></event>
 
    <event type="kill" name="Inquisition" event="script"><=!=[=C=D=A=T=A=[
function onKill(cid, target, lastHit)
    if(config.bosses[getCreatureName(target)]) then
        local t = config.bosses[getCreatureName(target)]
        local teleport = doCreateTeleport(config.teleportId, t.ptp, t.pp)
        local position = t.pp
        doItemSetAttribute(teleport, "aid", t.aid)
        doCreatureSay(cid, config.message, TALKTYPE_ORANGE_1)
        addEvent(removal, config.timeToRemove * 1000, position)
    end
    return TRUE
end]=]=></event>
 
 
         <action fromuid="1301" touid="1311" event="script"><=!=[=C=D=A=T=A=[
        domodlib('inqusitionFunctions')
    local storage = 50301
    local inquisitionRewards = {
        [9988] = 8890, --a robe of the underworld
        [9989] = 8918, --a spellbook of dark mysteries
        [9990] = 8881, --a fireborn giant armor
        [9991] = 8888, --a master archer's armor
        [9992] = 8851, --a royal crossbow
        [9993] = 7435, --an executioner
        [9994] = 8929, --the stomper
        [9995] = 7417, --a runed sword
        [9996] = 8854, --a warsinger bow
        [9997] = 8903, --a spellbook of lost souls
        [9998] = 2508, --a mystical armor
        [9999] = 8905 --a rainbow shield
    }
 
    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)
                                addPlayerRep(cid, 5, TEXTCOLOR_LIGHTBLUE)
        else
            doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "It is empty.") 
        end
    end
 
    return true
    end
]=]=></action>
</mod>
 
LUA:
<?xml version="1.0" encoding="UTF-8"?>
<mod name="Inquisition"
version="2.0" author="Tommy" contact="[email protected]" enabled="yes">
<config name="inqusitionFunctions"><=!=[=C=D=A=T=A=[
 
 
local config = {
        timeToRemove = 180, -- seconds
        message = "Go into the teleporter in 3 minutes, else it will disappear.",
        teleportId = 1387,
        MonStor = 48000,
        bosses = { -- Monster Name,  Teleport Position
 ["God of the Forest"] = { pos={ x=857, y=552, z=6, stackpos=1 }, aid=49100 },
 ["God of the Desert"] = { pos={ x=856, y=554, z=5, stackpos=1 }, aid=49200}, 
 ["God of Poison"] = { pos={ x=857, y=554, z=4, stackpos=1 }, aid=49300}, 
 ["God of Ice"] = { pos={ x=897, y=599, z=3, stackpos=1 }, aid=49400},
 ["Supreme God"] = { pos={ x=452, y=164, z=6, stackpos=1 }, aid=49500},
 }
}
 
    local function removal(position)
    doRemoveThing(getTileItemById(position, config.teleportId).uid, 1) 
 
    return TRUE
end ]=]=></config>
 
        <event type="login" name="inquisitionRegister" event="script"><=!=[=C=D=A=T=A=[
        domodlib('inqusitionFunctions')
        function onLogin(cid)
    registerCreatureEvent(cid, "Inquisition")
        return true
end]=]=></event>
 
    <event type="kill" name="Inquisition" event="script"><=!=[=C=D=A=T=A=[
function onKill(cid, target, lastHit)
    if(config.bosses[getCreatureName(target)]) then
        local t = config.bosses[getCreatureName(target)]
        local teleport = doCreateTeleport(config.teleportId, t.ptp, t.pp)
        local position = t.pp
        doItemSetAttribute(teleport, "aid", t.aid)
        doCreatureSay(cid, config.message, TALKTYPE_ORANGE_1)
        addEvent(removal, config.timeToRemove * 1000, position)
    end
    return TRUE
end]=]=></event>
 
 
         <action fromuid="1301" touid="1311" event="script"><=!=[=C=D=A=T=A=[
        domodlib('inqusitionFunctions')
    local storage = 50301
    local inquisitionRewards = {
 [9988] = 8890, --a robe of the underworld
 [9989] = 8918, --a spellbook of dark mysteries
 [9990] = 8881, --a fireborn giant armor
 [9991] = 8888, --a master archer's armor
        [9992] = 8851, --a royal crossbow
        [9993] = 7435, --an executioner
        [9994] = 8929, --the stomper
        [9995] = 7417, --a runed sword
        [9996] = 8854, --a warsinger bow
        [9997] = 8903, --a spellbook of lost souls
        [9998] = 2508, --a mystical armor
        [9999] = 8905 --a rainbow shield
    }
 
    if inquisitionRewards[item.uid] and 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)
                                addPlayerRep(cid, 5, TEXTCOLOR_LIGHTBLUE)
        else
            doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "It is empty.") 
        end
    end
 
    return true
    end
]=]=></action>
</mod>

edited his script so it works "just fixed the error"
 
XML:
[20/08/2013 16:59:42] > Loading inquisition.xml...[Error - ScriptingManager::loadFromXml] Cannot load mod mods/inquisition.xml
[20/08/2013 16:59:42] Line: 66, Info: StartTag: invalid element name


[20/08/2013 16:59:42]  failed!

don't work :(
 
LUA:
<?xml version="1.0" encoding="UTF-8"?>
<mod name="Inquisition"
version="2.0" author="Tommy" contact="[email protected]" enabled="yes">
<config name="inqusitionFunctions"><=!=[=C=D=A=T=A=[
 
 
local config = {
        timeToRemove = 180, -- seconds
        message = "Go into the teleporter in 3 minutes, else it will disappear.",
        teleportId = 1387,
        MonStor = 48000,
        bosses = { -- Monster Name,  Teleport Position
 ["God of the Forest"] = { pos={ x=857, y=552, z=6, stackpos=1 }, aid=49100 },
 ["God of the Desert"] = { pos={ x=856, y=554, z=5, stackpos=1 }, aid=49200}, 
 ["God of Poison"] = { pos={ x=857, y=554, z=4, stackpos=1 }, aid=49300}, 
 ["God of Ice"] = { pos={ x=897, y=599, z=3, stackpos=1 }, aid=49400},
 ["Supreme God"] = { pos={ x=452, y=164, z=6, stackpos=1 }, aid=49500},
 }
}
 
    local function removal(position)
    doRemoveThing(getTileItemById(position, config.teleportId).uid, 1) 
 
    return TRUE
end ]=]=></config>
 
        <event type="login" name="inquisitionRegister" event="script"><=!=[=C=D=A=T=A=[
        domodlib('inqusitionFunctions')
        function onLogin(cid)
    registerCreatureEvent(cid, "Inquisition")
        return true
end]=]=></event>
</mod>

removed this part as u said u didnt use it try this now
 
:/ not working
XML:
[22/08/2013 15:48:18] > Loading inquisition.xml...[Error - ScriptingManager::loadFromXml] Cannot load mod mods/inquisition.xml
[22/08/2013 15:48:18] Line: 27, Info: StartTag: invalid element name
 
add this to ur login.lua

LUA:
function onLogin(cid)
    registerCreatureEvent(cid, "Inquisition")
        return true
end


and change the mod to

XML:
<?xml version="1.0" encoding="UTF-8"?>
<mod name="Inquisition"
version="2.0" author="Tommy" contact="[email protected]" enabled="yes">
<config name="inqusitionFunctions"><=!=[=C=D=A=T=A=[
 
 
local config = {
        timeToRemove = 180, -- seconds
        message = "Go into the teleporter in 3 minutes, else it will disappear.",
        teleportId = 1387,
        MonStor = 48000,
        bosses = { -- Monster Name,  Teleport Position
 ["God of the Forest"] = { pos={ x=857, y=552, z=6, stackpos=1 }, aid=49100 },
 ["God of the Desert"] = { pos={ x=856, y=554, z=5, stackpos=1 }, aid=49200}, 
 ["God of Poison"] = { pos={ x=857, y=554, z=4, stackpos=1 }, aid=49300}, 
 ["God of Ice"] = { pos={ x=897, y=599, z=3, stackpos=1 }, aid=49400},
 ["Supreme God"] = { pos={ x=452, y=164, z=6, stackpos=1 }, aid=49500},
 }
}
 
    local function removal(position)
    doRemoveThing(getTileItemById(position, config.teleportId).uid, 1) 
 
    return TRUE
end ]=]=></config>
 
    <event type="kill" name="Inquisition" event="script"><=!=[=C=D=A=T=A=[
function onKill(cid, target, lastHit)
    if(config.bosses[getCreatureName(target)]) then
        local t = config.bosses[getCreatureName(target)]
        local teleport = doCreateTeleport(config.teleportId, t.ptp, t.pp)
        local position = t.pp
        doItemSetAttribute(teleport, "aid", t.aid)
        doCreatureSay(cid, config.message, TALKTYPE_ORANGE_1)
        addEvent(removal, config.timeToRemove * 1000, position)
    end
    return TRUE
end]=]=></event>
 
:/ problem here
XML:
> Loading inquisition.xml...[Error - ScriptingManager::loadFromXml] Cannot load mod mods/inquisition.xml
[22/08/2013 21:37:09] Line: 38, Info: Premature end of data in tag mod line 2
 
Back
Top