• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Blessed Forever Aol

This is not my script but i found in one of my ots so dont give me any credits, and i dont know if its working but try:
forever aol.lua
Code:
function onPrepareDeath(cid, lastHitKiller, mostDamageKiller)
	if(getPlayerSlotItem(cid, 2).itemid == 2196) and getPlayerSkullType(cid) >= 0 then
		doCreatureSetDropLoot(cid, false)
		doPlayerAddBlessing(cid, i)
	end
return true
end

login.lua
Code:
registerCreatureEvent(cid, "onPrepareDeath")

creaturescripts.xml
Code:
<event type="preparedeath" name="onPrepareDeath" event="script" value="preparedeath.lua"/>

Change forever aol id line 2 in forever aol.lua
 
Himii, doPlayerAddBlessing(cid, i) wont work :S Since there is nothing which define i.

LUA:
local bless = {1, 2, 3, 4, 5}		
function onPrepareDeath(cid, lastHitKiller, mostDamageKiller)
	if(getPlayerSlotItem(cid, 2).itemid == 2196) and getPlayerSkullType(cid) >= 0 then
		doCreatureSetDropLoot(cid, false)
		for i = 1, table.maxn(bless) do
			doPlayerAddBlessing(cid, bless[i])
		end
	end
return true
end
 
No problem.

Also i like that you used search at not the requester. Because almost everything can be founded, but they are just lazy to search before making a request.
 
Himii, doPlayerAddBlessing(cid, i) wont work :S Since there is nothing which define i.

LUA:
local bless = {1, 2, 3, 4, 5}		
function onPrepareDeath(cid, lastHitKiller, mostDamageKiller)
	if(getPlayerSlotItem(cid, 2).itemid == 2196) and getPlayerSkullType(cid) >= 0 then
		doCreatureSetDropLoot(cid, false)
		for i = 1, table.maxn(bless) do
			doPlayerAddBlessing(cid, bless[i])
		end
	end
return true
end


tyrft
 
Back
Top