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
data/actions/scripts/full_hota.lua
How it works:
Good luck and there is no need to flame, just helping newbies.
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:
- Place helmet on spot and place red gem on spot.
- 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: