Felipe93
Ghost Member
this is the original script used to work in tfs 1.3
this is the revscript
Now is useable
this was missing, but there are still problems, the mana is infiite (not decaying) and can be used anywhere on the map does not matter where and doe snot created the fluid
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
if toPosition.x == 65535 or toPosition.x == 0 then
return true
end
local used = function(splash)
doChangeTypeItem(item.uid, item.type - 1)
if splash then
doDecayItem(doCreateItem(2025, 7, toPosition))
end
return true, fromPosition.x == 65535 and doPlayerAddItem(cid, 6000, 1) or doCreateItem(6000, 1, fromPosition)
end
if getTopCreature(toPosition).uid ~= cid then
return used(true)
end
doPlayerAddMana(cid, 300)
doSendMagicEffect(toPosition, CONST_ME_MAGIC_BLUE)
doPlayerSay(cid, "Aaaah...", TALKTYPE_SAY)
return used(false)
end
Lua:
local manafluid_stackable = Action()
function manafluid_stackable.onUse(player, item, fromPosition, target, toPosition, isHotkey)
if toPosition.x == 65535 or toPosition.x == 0 then
return true
end
local used = function(splash)
doChangeTypeItem(item.aid, item.type - 1)
if splash then
doDecayItem(doCreateItem(2025, 7, toPosition))
end
return true, fromPosition.x == 65535 and doPlayerAddItem(cid, 6000, 1) or doCreateItem(6000, 1, fromPosition)
end
if getTopCreature(toPosition).aid ~= cid then
return used(true)
end
doPlayerAddMana(cid, 300)
doSendMagicEffect(toPosition, CONST_ME_MAGIC_BLUE)
doPlayerSay(cid, "Aaaah...", TALKTYPE_SAY)
return used(false)
end
--manafluid_stackable:type("onuse")
manafluid_stackable:aid(8777)
manafluid_stackable:register()
Now is useable
Lua:
manafluid_stackable:id(5603)
Last edited: