o.3.6 8.6 please if u can post all script i will be thankstfs?
storageItem = 32421 --STORAGE TO SAVE
itemAol = 2173
<action itemid="IDITEM" event="script" value="itemAolBless.lua"/>
function onUse(cid, item, fromPos, item2, toPos)
if (getPlayerStorageValue(cid, storageItem) < 1) then
doPlayerSetStorageValue(cid, storageItem, 1)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Congratulations, now you have AOL and BLESS forever.")
doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_BLUE)
doRemoveItem(item.uid)
else
doPlayerSendCancel(cid, "You already have your forever AOL/BLESS active.")
end
return true
end
if (getPlayerStorageValue(cid, storageItem) == 1 and not getPlayerBlessing(cid, 1)) then
doPlayerAddItem(cid, idAol, 1)
for i = 1,5 do
doPlayerAddBlessing(cid, i)
end
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You received free AOL and BLESS.")
doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_BLUE)
end
if (getPlayerStorageValue(cid, storageItem) == 1 and getPlayerBlessing(cid, 1) == false) then
doPlayerAddItem(cid, idAol, 1)
for i = 1,5 do
doPlayerAddBlessing(cid, i)
end
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You received free AOL and BLESS.")
doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_BLUE)
end
no bro i want the player who use that book he got auto bless message when he logged inthey receive aol and bless when die and you want to give them when they login?
function onUse(cid, item, fromPosition, itemEx, toPosition)
if (not exhaustion.check(cid, 18823)) then
local position = getCreaturePosition(cid)
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)
for i = 1, 30 do
doSendDistanceShoot({x = position.x + math.random(-12 ,12), y = position.y + math.random(-12 ,12), z = position.z}, position, 35)
end
doCreatureSay(cid, "You now have Forever blessing and aol!", TALKTYPE_ORANGE_1)
doPlayerPopupFYI(cid, "You must logout!.")
doRemoveItem(item.uid, 1)
doCreatureSetStorage(cid, 77350, 1)
exhaustion.set(cid, 18823, 30)
return true
else
doPlayerSendCancel(cid, "You will be able to use this book again in "..exhaustion.get(cid, 18823).." seconds.")
return false
end
return true
end
<action itemid="xxx" event="script" value="xxxx.lua"/>
local storage = 77350
function onLogin(cid)
if getPlayerStorageValue(cid, storage) == 1 then
doPlayerSendTextMessage(cid,19,'You are The Champion!') -- change it for any msg
doPlayerAddBlessing(cid, 1)
doPlayerAddBlessing(cid, 2)
doPlayerAddBlessing(cid, 3)
doPlayerAddBlessing(cid, 4)
doPlayerAddBlessing(cid, 5)
doPlayerAddItem(cid,2173,1)
end