massuco
Brazilian, sorry for my bad english XD
I was trying to make vials stackable on 7.72 and I preferred to add 2 new items, one manafluid and one empty vial and I got this action script that works like a manafluid, all is working good. but...
The problem is that player can use mana fluid on each other, how i can make it no usable on other player? to check if is not a player, make splash on the ground, and I need to add the empty vial to the player also. when he use the manafluid, the manafluid (id 5998) transform in a empty vial (id 6000)
The problem is that player can use mana fluid on each other, how i can make it no usable on other player? to check if is not a player, make splash on the ground, and I need to add the empty vial to the player also. when he use the manafluid, the manafluid (id 5998) transform in a empty vial (id 6000)
Lua:
function onUse(cid, item, frompos, item2, topos)
addmanapos = topos
addmanapos.stackpos = 253
playeraddmana = getThingfromPos(addmanapos)
if getPlayerMagLevel(cid) >= 0 then
if playeraddmana.itemid > 0 then
random_number = math.random(300,300)
doSendMagicEffect(topos,12)
doPlayerAddMana(playeraddmana.uid,random_number)
doPlayerSay(cid,"Aaaah...",1)
if item.type > 1 then
doChangeTypeItem(item.uid,item.type-1)
else
doRemoveItem(item.uid,1)
end
else
doSendMagicEffect(frompos,2)
return false
end
else
doSendMagicEffect(frompos,2)
doPlayerSendCancel(cid,"You don't have the required magic level to use that rune.")
end
return true
end
Last edited: