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

Add soul item

Blue Mary

New Member
Joined
Feb 10, 2012
Messages
11
Reaction score
0
[video=youtube;pJR0DUEWpgc]http://www.youtube.com/watch?v=pJR0DUEWpgc&feature=player_embedded[/video]

help-me script add soul.. plis
 
Here you go bro!

Code:
local soul = 1 --- Here edit how much soul gain onuse!
local max = 100 -- Max soul

function onUse(cid, item, frompos, item2, topos)
if isPlayer(cid) then
doPlayerAddSoul(cid,soul)
doSendAnimatedText(getCreaturePosition(cid), "SOUL!", TEXTCOLOR_RED)
doPlayerSendTextMessage(cid, 27, "You have recived "..soul.." soul point.")
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_FIREWORK_RED)
return true
end
if getPlayerSoul(cid, max) then
doPlayerSendCancel(cid, "Sorry, but you cant gain more than "..max.." soul points.")
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)
end
return true
end
 
PHP:
function onUse(cid, item, fromPosition, itemEx, toPosition)
		if(getPlayerSoul(cid) > 200) then
            doPlayerSendCancel(cid, "Tienes el Maximo de Soul.")
         else
            doPlayerAddSoul(cid, 50)
            doRemoveItem(item.uid, 1)
            doPlayerSendTextMessage(cid, 19, "Tu Soul Ahora es ".. getPlayerSoul(cid) ..".")
         end
        return true
end
 
Back
Top