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

CreatureEvent Bless reminder! [COOL]

Amiroslo

Excellent OT User
Joined
Jul 28, 2009
Messages
6,767
Solutions
5
Reaction score
769
Check the Images at the end of the thread if you doesnt know what this script does :)

Tested and works on 0.4
Not tested on 0.3.6 (Should work)
Not tested on 0.2

data\creaturescripts\scripts\blesscheck.lua
Lua:
--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
XML:
  <event type="login" name="Bless" event="script" value="blesscheck.lua"/>



Rep++ if helped :D

Screenshot:

Blessed
5tgBqFO.png


Not blessed
VLQT8A2.png


Idea of the script: Naxtie
 
Last edited:
You don't need to register login scripts, good work otherwise. :p
 
haha true. Im just used to it ;p

Edited first post, thanks :D
 
Good script but this:

PHP:
if(getPlayerBlessing(cid, 1)) then 
     doPlayerSendTextMessage(cid,5,'You are blessed.')
else
     doPlayerSendTextMessage(cid,19,'You are not blessed!')
end

Can be added to the file \creaturescipts\scripts\login.lua like so:

PHP:
local accountManager = getPlayerAccountManager(cid)
	if(accountManager == MANAGER_NONE) then
		local lastLogin, str = getPlayerLastLoginSaved(cid), config.loginMessage
		if(lastLogin > 0) then
			doPlayerSendTextMessage(cid, 5, str)
			str = "Your last visit was on " .. os.date("%a %b %d %X %Y", lastLogin) .. "."
		else
			str = str .. " Please choose your outfit."
			doPlayerSendOutfitWindow(cid)
		end

		doPlayerSendTextMessage(cid, 5, str)
			if(getPlayerBlessing(cid, 1)) then 
				doPlayerSendTextMessage(cid,5,'You are blessed.')
			else
				doPlayerSendTextMessage(cid,19,'You are not blessed!')
			end
	elseif(accountManager == MANAGER_NAMELOCK) then
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, it appears that your character has been namelocked, what would you like as your new name?")
	elseif(accountManager == MANAGER_ACCOUNT) then
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, type 'account' to manage your account and if you want to start over then type 'cancel'.")
	else
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, type 'account' to create an account or type 'recover' to recover an account.")
	end


only changes in code were for msg id to match colors in my server.

looks like this: loginmsg.JPGloginmsg2.JPG

*edit ~ only tested in TFS 0.3.6
 
@sharpy
Doesn't really matter, I'd rather keeping it alone instead of having it inside the login file
 
It would be even better if instead of saying just a message saying that I have no blessing. Up a Pop Up saying that I do not have Blessing!

Getting well:
Lua:
function onLogin(cid)
    if(getPlayerBlessing(cid, 1)) then 
        doPlayerSendTextMessage(cid,13,'You are blessed!')
else
--//	doPlayerSendTextMessage(cid,5,'You are not blessed')
	doPlayerPopupFYI(cid, 'You are not blessed!')
end
    return true
end
 
@up
Yes it's possible but i'd be annoying and not everybody can buy blessing. Keeping it the way it is, is better. ;p
 
BUMP, I need this script but I want it to tell me when not blessed when I leave pz'a not login
 
Back
Top