A blessing custom

nefinoo

Carnage.flv
Joined
Sep 11, 2010
Messages
155
Reaction score
10
Location
Lo Mochis, Sinaloa
a blessing that when you have bought it do not lose lvl and skill, but when you do not buy lose only level.
0.3.6 8.6
 

Zell

Intermediate OT User
Joined
Oct 23, 2010
Messages
100
Reaction score
38
You can do it ondeath checking if player has X storage (bless) then setLossPercent.

Im on the phone, on home I try put a script.


Here:

function onDie(cid)

-- Add this
if getPlayerStorageValue(cid,6000) == 1 then -- (or your bless function checks)
doPlayerSetLossPercent(cid, 0, percent) -- I dont remember exactly id of exp and skills, but test it.
setPlayerStorageValue(cid,6000, -1) -- (or your bless function checks)
end

-- Add this on npc bless seller when players buy it
setPlayerStorageValue(cid,6000, 1) -- (or your bless function checks)
doPlayerSetLossPercent(cid, 0, percent)
doPlayerSetLossPercent(cid, 1, 0)

When player buy it and die then lose just that you add on this lines
and then when dies checks if it has the bless and then remove that.
 
Last edited:
Top