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

Lua Soul regenerate item attribute

Aradz

New Member
Joined
Sep 19, 2013
Messages
51
Reaction score
1
Hello there, any clue how to add soul regeneration to item ?
 
actions/actions.xml

Code:
<action itemid="xxxx" event="script" value="soulpoints.lua"/>


actions/scripts/
soulpoints.lua


Code:
function onUse(cid, item, frompos, item2, topos)
    soulMax = 200 -- max soul poitns
    removeItem = true -- true to remove item // false no remove item

    if(getPlayerSoul(cid) <= soulMax) then
        if(removeItem == true) then
            doPlayerRemoveItem(cid, item.itemid, 1)
        end       
        doPlayerAddSoul(cid, soulMax - getPlayerSoul(cid))
        doPlayerSendTextMessage(cid,26,"You receive "..soulMax.." soul points.")
        doSendMagicEffect(topos,11)
    else
        doPlayerSendTextMessage(cid,26,"Not possible use, you have "..getPlayerSoul(cid).." soul points.")
        doSendMagicEffect(frompos,2)
    end
    return true
end
 
I want to add attribute to item. such as mana regeneration per second, but i want to add soul not mana is there a attribute like this ?
 
Back
Top