president vankk
Web Developer & AuraOT Owner
- Joined
- Jul 10, 2009
- Messages
- 5,719
- Solutions
- 9
- Reaction score
- 339
i need one scripter, the player use one item and player win 5 blessings (Infinite)
rep + :wub:
rep + :wub:
local storage = 1212
function onThink(cid, interval)
if getPlayerStoragValue(cid,storage) > -1 then
for i = 1,5 do
if getPlayerBlessing(cid, i) then
return true
end
doPlayerAddBlessing(cid, i)
end
return true
end
local config =
{
b = {1,5},
storage = 1212
}
function onSay(cid, words, param, channel)
if getPlayerStorageValue(cid,storage) > -1 then
if getPlayerBlessing(cid, b) then
doPlayerAddBlessing(cid, b)
end
end
return true
end
if i helped you rep++ me :ninja:Code:local config = { b = {1,5}, storage = 1212 } function onSay(cid, words, param, channel) if getPlayerStorageValue(cid,storage) > -1 then if getPlayerBlessing(cid, b) then doPlayerAddBlessing(cid, b) end end return true end
if getPlayerBlessing(cid, b) then
doPlayerAddBlessing(cid, b)
i need one scripter, the player use one item and player win 5 blessings (Infinite)
function onThink(interval, lastExecution, thinkInterval)
local s = 15712 -- STORAGE VALUE IF PLAYER HAS INFINITE BLESSING.
for _,pid in ipairs(getPlayersOnline()) do
if getPlayerStorageValue(pid,s) > 0 then
for i = 1,5 do
if getPlayerBlessing(pid,i) then
return true
else
doPlayerAddBlessing(pid,i)
end
end
else
return false
end
end
return true
end
make it a globalevent which checks for players in .. seconds.
Code:function onThink(interval, lastExecution, thinkInterval) local s = 15712 -- STORAGE VALUE IF PLAYER HAS INFINITE BLESSING. for _,pid in ipairs(getPlayersOnline()) do if getPlayerStorageValue(pid,s) > 0 then for i = 1,5 do if getPlayerBlessing(pid,i) then return true else doPlayerAddBlessing(pid,i) end end else return false end end return true end
this will add blessing to players who has a certain storage value.
function onUse(cid, item, fromPosition, itemEx, toPosition)
local v,s = getThingPos(cid),15712 -- the number is storage value.
if getPlayerStorageValue(cid,s) < 0 then
setPlayerStorageValue(cid,s,1)
doSendMagicEffect(v,12)
doRemoveItem(item.uid)
doPlayerSendTextMessage(cid,27,'You now have been granted infinite blessing.')
for i = 1,5 do
doPlayerAddBlessing(cid,i)
end
else
doPlayerSendTextMessage(cid,27,'You already have infinite blessing!')
doSendMagicEffect(v,2)
end
return true
end
local storage = 5498
function onUse(cid, item, fromPosition, itemEx, toPosition)
if getPlayerStorageValue(cid, storage) < 0 then
setPlayerStorageValue(cid, storage, 1)
doPlayerSendTextMessage(cid, 16, 'You have now been blessed infinitely.')
doSendMagicEffect(fromPosition, 12)
doRemoveItem(item.uid)
for b = 1,5 do
doPlayerAddBlessing(cid, b)
end
return true
end
return doPlayerSendTextMessage(cid, 16, 'You have already been blessed infinitely.')
end
local storage = 5498
function onLogin(cid)
if getPlayerStorageValue(cid, storage) == 1 then
for b = 1,5 do
doPlayerAddBlessing(cid, b)
end
end
return true
end