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

Solved blessing forever aol

Elgenady

Veteran OT User
Joined
Aug 5, 2011
Messages
1,663
Solutions
36
Reaction score
371
need script for blessing forevr aol that aol when u use get all blessing
 
I gave as much help as I could based on the information you gave.
Give more information. Server, TFS version, a badly crafted script, or even a script you've found that needs to be modified.
If you want someone to create a script for you, ask here
Otherwise, try to create the script on your own.
Find the blessings command in your server files, possibly talkactions, try to break it down, and put it into an action script.
 
Code:
local bless = {1, 2, 3, 4, 5}   
function onDeath(cid, lastHitKiller, mostDamageKiller)
if(getPlayerSlotItem(cid, 2).itemid == 10719) and getPlayerSkullType(cid) >= 0 then
doCreatureSetDropLoot(cid, false)
for i = 1, table.maxn(bless) do
doPlayerAddBlessing(cid, bless)
end
end
return true
end

creaturescript
 
Alright I want to clarify,
Do you want an item that when 'used' will give players blessings?
Or do you want an aol that when a player dies, they gain blessings and lose the aol?
 
data/actions/scripts/aolbless.lua
Code:
local bless = {1, 2, 3, 4, 5}   
function onUse(cid, item, frompos, item2, topos)
   doRemoveItem(item.uid, 1)
   for i = 1, table.maxn(bless) do
     doPlayerAddBlessing(cid, bless)
   end
return true
end
data/actions/actions.xml
Code:
<action itemid="1111111111111111111111" event="script" value="aolbless.lua"/>
Change itemid to the AOL itemid
 
change
Code:
doPlayerAddBlessing(cid, bless)
to this
Code:
doPlayerAddBlessing(cid, bless[i])
Also, remove this line if you don't want the item to be removed when the player uses it.
Code:
doRemoveItem(item.uid, 1)
 
man i have action script to get blessing i need when use aol i get blessing "use = put aol in his slot not action use" sorry my english not good
 
man i have action script to get blessing i need when use aol i get blessing "use = put aol in his slot not action use" sorry my english not good
Alright, so you want the player to receive blessings when the item is equipped?
Or when the AOL is equipped, the player will not lose items, and the aol will never disappear? aka 'infinite AOL'

Edit--
Or when the player dies with the AOL equipped, the aol will give the player blessings, and be removed?
 
Code:
local bless = {1, 2, 3, 4, 5}
function onDeath(cid, lastHitKiller, mostDamageKiller)
if(getPlayerSlotItem(cid, 2).itemid == 10719) and getPlayerSkullType(cid) >= 0 then
doCreatureSetDropLoot(cid, false)
for i = 1, table.maxn(bless) do
doPlayerAddBlessing(cid, bless[i])
end
end
return true
end
 
Is the itemid 10719 correct?
You can remove this btw
Code:
and getPlayerSkullType(cid) >= 0
Skull will always be 0 or more.
 
Back
Top