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

Warning if no bless

Sirion_Mido

Experienced Member
Joined
Jul 22, 2012
Messages
579
Reaction score
43
Location
E-G-Y-P-T
i want that script
if anyone can help me so do that :p
now if i no have bless when i enter out pz text come warning me that i no have bless every 1 mintues.
 
Not tested but should work.

At creaturescrips/creautrescripts.xml paste these lines below:
XML:
<event type="login" name="BlessOn" event="script" value="bless.lua"/>
<event type="logout" name="BlessOff" event="script" value="bless.lua"/>

At creaturescripts/scripts login.lua and "function onLogin(cid)" paste these code below:
Lua:
registerCreatureEvent(cid, "BlessOn")

Now at creaturescripts/scripts create new lua and name it "bless.lua" and paste the script below:

Lua:
local cyko = {
    bless = {1, 2, 3, 4, 5},
    storage = 9999,
    msg = "You have no blessing left",
    time = 60 -- 60 Seconds = 1min!
}
 
function BWarning(cid)
	if isPlayer(cid) then
		for b = 1, table.maxn(cyko.bless) do
		if(not getPlayerBlessing(cid, cyko.bless[b])) then
			doPlayerSendTextMessage(cid,19, cyko.msg)
			bless = addEvent(BWarning, time*1000, cid)
		else
			return true
			end
		end
	end
end
 
function onLogin(cid)
    bless = addEvent(BWarning, time*1000, cid)
    return true
end

function onLogout(cid)
    stopEvent(bless)
    return true
end

Enjoy!
 
Last edited:
Not tested but should work.

At creaturescrips/creautrescripts.xml paste these lines below:
XML:
<event type="login" name="BlessOn" event="script" value="bless.lua"/>
<event type="logout" name="BlessOff" event="script" value="bless.lua"/>

At creaturescripts/scripts login.lua and "function onLogin(cid)" paste these code below:
Lua:
registerCreatureEvent(cid, "BlessOn")

Now at creaturescripts/scripts create new lua and name it "bless.lua" and paste the script below:

Lua:
local cyko = {
    bless = {1, 2, 3, 4, 5},
    storage = 9999,
    msg = "You have no blessing left",
    time = 60 -- 60 Seconds = 1min!
}
 
function BWarning(cid)
	if isPlayer(cid) then
		for b = 1, table.maxn(cyko.bless) do
		if(not getPlayerBlessing(cid, cyko.bless[b])) then
			doPlayerSendTextMessage(cid,19, cyko.msg)
			bless = addEvent(BWarning, time*1000, cid)
		else
			return true
			end
		end
	end
end
 
function onLogin(cid)
    bless = addEvent(BWarning, time*1000, cid)
    return true
end

Enjoy!

function onLogout(cid)
    stopEvent(bless)
    return true
end
thank you cyko :*
i will test it
I Rep++
xd
 
Not tested but should work.

At creaturescrips/creautrescripts.xml paste these lines below:
XML:
<event type="login" name="BlessOn" event="script" value="bless.lua"/>
<event type="logout" name="BlessOff" event="script" value="bless.lua"/>

At creaturescripts/scripts login.lua and "function onLogin(cid)" paste these code below:
Lua:
registerCreatureEvent(cid, "BlessOn")

Now at creaturescripts/scripts create new lua and name it "bless.lua" and paste the script below:

Lua:
local cyko = {
    bless = {1, 2, 3, 4, 5},
    storage = 9999,
    msg = "You have no blessing left",
    time = 60 -- 60 Seconds = 1min!
}

function BWarning(cid)
if isPlayer(cid) then
for b = 1, table.maxn(cyko.bless) do
if(not getPlayerBlessing(cid, cyko.bless[B])) then
doPlayerSendTextMessage(cid,19, cyko.msg)
bless = addEvent(BWarning, time*1000, cid)
else
return true
end
end
end
end

function onLogin(cid)
    bless = addEvent(BWarning, time*1000, cid)
    return true
end

function onLogout(cid)
    stopEvent(bless)
    return true
end

Enjoy![/B]
I know that this is old, but may you fix so it's only when you leave pz'a it's warn you? not every 1 minute out of pz'a

Kind regards, freddzor11
 
Get this !

data\creaturescripts\scripts\blesscheck.lua

PHP:
--Script by Amiroslo
function onLogin(cid)
if(getPlayerBlessing(cid, 1)) then
doPlayerSendTextMessage(cid,13,'You are blessed!')
else
doPlayerSendTextMessage(cid,5,'You are not blessed')
end
return true
end

Add in creaurescripts.xml
Code:
 <event type="login" name="Bless" event="script" value="blesscheck.lua"/>

Reminds you everytime you login should be enough or ?:eek:
 
Back
Top