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

Action Red Gem & Helmet = Helmet of the Ancients

JDB

OtLand Veteran
Joined
Jun 1, 2009
Messages
4,145
Solutions
2
Reaction score
115
Tested and Working on 0.3.6pl1.
I just made this because I was bored and I hope it becomes of use.
Always here to help beginners succeed. :thumbup:

data/actions/actions.xml
Code:
<action uniqueid="1337" event="script" value="full_hota.lua"/>

data/actions/scripts/full_hota.lua
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
	local pos = {
		hota = { x = 94, y = 116, z = 5, stackpos = 1 }, -- Place helmet
		gem = { x = 96, y = 116, z = 5, stackpos = 1 }, -- Place gem
		full = { x = 95, y = 116, z = 5, stackpos = 2 } -- Where FULL HOTA spawns
	}
	local ids = {
		hota_ = 2342, -- Regular HOTA ID
		gem_ = 2156, -- Red Gem ID
		full_ = 2343 -- FULL HOTA ID
	}
	if(item.itemid == 1945) then
		local helmet = getThingFromPos(pos.hota)
		local redgem = getThingFromPos(pos.gem)
		if(helmet.itemid ~= ids.hota_) then
			doPlayerSendCancel(cid, "Place the helmet on the correct spot.")
		elseif(redgem.itemid ~= ids.gem_) then
			doPlayerSendCancel(cid, "Place the red gem on the correct spot.")
		else
			doRemoveItem(helmet.uid, 1)
			doRemoveItem(redgem.uid, 1)
			doCreateItem(ids.full_, pos.full)
			doSendMagicEffect(pos.hota, CONST_ME_POFF)
			doSendMagicEffect(pos.gem, CONST_ME_POFF)
			doSendMagicEffect(pos.full, CONST_ME_ENERGYAREA)
			doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have enchanted your helmet of the ancients!")
			doTransformItem(item.uid, item.itemid + 1)
		end
	elseif(item.itemid == 1946) then
		doTransformItem(item.uid, item.itemid - 1)
		doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)
	end
	return true
end

How it works:
  1. Place helmet on spot and place red gem on spot.
  2. Pull the lever and watch the new helmet appear out of no where!

Good luck and there is no need to flame, just helping newbies.
 
Last edited:
Nice, useful for those who want to make a quest revolving around making a Hota, and wanting to include the "soul ruby" as the final mission, to complete the helmet.

I was actually in the process of mapping 9 pyramids for my helmet of the ancients quest, and it is funny to see this being posted now. (custom of course, not the tombs from rl tibia)

The HOTA quest is something that is sorely overlooked by most OTs,even though it is an obvious quest line up to make.

Hopefully this will encourage more people to think of making an "ancient egpytian" style quest.
 
@Up,
It is for 30 minutes as long as you didn't change it in items.xml. :thumbup:
 
Last edited:
A player can use this only one time?

Code:
	elseif(item.itemid == 1946) then
		doPlayerSendCancel(cid, "Seems to be broken.")
		doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)
	end
	return true
end

unbenanntkd.png



I don't know how to change that.
 
I guess that normal enchanting using ruby will be used more often(included in tfs, most of people will forgot to delete that script so players will use easier way)
But ofc script is good
 
@North,
It was changed. :thumbup:

Updated First Post!
 
I have put in the "x" "y" "z" right in the file, but still it wont work!
The Forgotten Server, version 0.3.6 (Crying Damson)

what am i doing wrong?!
 
its work perfectly, really thanks.

do the transformation of the helmet, the 5 parts (i think its just 5) alone transform in the helmet. :D
 
its work perfectly, really thanks.

do the transformation of the helmet, the 5 parts (i think its just 5) alone transform in the helmet. :D

No problem, I knew someone needed it. :thumbup:
 
Yes I know it exists Chojrak, but some people use multiple enchanting for their servers and this is just another option. :thumbup:
 
BUMP! works perfect but i wish to put more items example work with demon helmet and red gem, dragon scale helmet and red gem?
 
BUMP! works perfect but i wish to put more items example work with demon helmet and red gem, dragon scale helmet and red gem?
From
Lua:
if(item.itemid == 1945) then
It starts calling the Item 1945,
After the peraphs starts elseif, then an "end", finishing it.
After this part, just add again if(item.itemid == ITEM_ID) then
And copy paste same function, just use another names, and add it to the local pos / items at start:
Then follow the code and replace names.
IDK if this gonna work, since i just try making scripts on servers TFS 1.3, but i think is a good start, try it
If, two if(item doesn't work, before the end, add elseif(item.itemid == ID) then.

Code:
local pos = {
        hota = { x = 94, y = 116, z = 5, stackpos = 1 }, -- Place helmet
        gem = { x = 96, y = 116, z = 5, stackpos = 1 }, -- Place gem
        full = { x = 95, y = 116, z = 5, stackpos = 2 }, -- Where FULL HOTA spawns
        dhel = { x = 94, y = 116, z = 5, stackpos = 1},
        rgem = {x = 94, y = 116, z = 5, stackpos = 1},
        fulldh = {x = 94, y = 116, z = 5, stackpos = 2}
    }
    local ids = {
        hota_ = 2342, -- Regular HOTA ID
        gem_ = 2156, -- Red Gem ID
        full_ = 2343 -- FULL HOTA ID
        dhel_ = ID -- Item ID
        rgem_ = ID -- Item ID
        fulldh_ = ID -- Item ID
    }
if(item.itemid == 1945) then
        local helmet = getThingFromPos(pos.hota)
        local redgem = getThingFromPos(pos.gem)
        if(helmet.itemid ~= ids.hota_) then
            doPlayerSendCancel(cid, "Place the helmet on the correct spot.")
        elseif(redgem.itemid ~= ids.gem_) then
            doPlayerSendCancel(cid, "Place the red gem on the correct spot.")
        else
            doRemoveItem(helmet.uid, 1)
            doRemoveItem(redgem.uid, 1)
            doCreateItem(ids.full_, pos.full)
            doSendMagicEffect(pos.hota, CONST_ME_POFF)
            doSendMagicEffect(pos.gem, CONST_ME_POFF)
            doSendMagicEffect(pos.full, CONST_ME_ENERGYAREA)
            doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have enchanted your helmet of the ancients!")
            doTransformItem(item.uid, item.itemid + 1)
        end
    elseif(item.itemid == 1946) then
        doTransformItem(item.uid, item.itemid - 1)
        doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)
    end
if(item.itemid == ID_ITEM) then
        local helmet = getThingFromPos(pos.dhel)
        local redgem = getThingFromPos(pos.rgem)
        if(helmet.itemid ~= ids.dhel_) then
            doPlayerSendCancel(cid, "Place the helmet on the correct spot.")
        elseif(redgem.itemid ~= ids.rgem_) then
            doPlayerSendCancel(cid, "Place the red gem on the correct spot.")
        else
            doRemoveItem(helmet.uid, 1)
            doRemoveItem(redgem.uid, 1)
            doCreateItem(ids.full_, pos.full)
            doSendMagicEffect(pos.hota, CONST_ME_POFF)
            doSendMagicEffect(pos.gem, CONST_ME_POFF)
            doSendMagicEffect(pos.full, CONST_ME_ENERGYAREA)
            doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have enchanted your demon helmet!")
            doTransformItem(item.uid, item.itemid + 1)
        end
    elseif(item.itemid == ID) then
        doTransformItem(item.uid, item.itemid - 1)
        doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)
    end
    return true
end
 
full_ = 2343 -- FULL HOTA ID dhel_ = ID -- Item ID rgem_ = ID -- Item ID fulldh_ = ID -- Item ID


After each ID, add a coma , then the last ID without coma.


full_ = 2343, -- FULL HOTA ID dhel_ = 2343, rgem_ = 2343, fulldh_ = 2343
 
Back
Top