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

[Script] Welcome Message

Synergy

New Member
Joined
Nov 24, 2011
Messages
334
Reaction score
0
Hello OTLanders!!


I don't know what section of scripts this one goes to..

So I'm requesting right away this one:

When you log in a message pops up in a box

Like this:

Welcome to the Quest Of Valora
Blablablab...
blablabla..
blablabla...




And only first time you login and after that you will be unable to see it..
But it comes on each character so yes.. use storage


Thx!
 
create a creaturescript with the function "onLogin"

Edit:
LUA:
function onLogin(cid)
	local str = 199 -- empty storage
	local string = "Welcome to SAS"
	
	if(getPlayerStorageValue(cid, str) < 0) then
		setPlayerStorageValue(cid, str, 1)
		doPlayerSendTextMessage(cid, 19, string)
	end
	return true
end
 
When you log in a message pops up in a box
LUA:
function onLogin(cid)

	if (getPlayerLastLoginSaved(cid) <= 0) then
		doPlayerPopupFYI(cid, "Example message")
	end
	return true
end
 
LUA:
function onLogin(cid)
local storage = 7674
if getAccountNumberByName(getCreatureName(cid)) ~= 1 then
if getPlayerStorageValue(cid, storage) == -1 then
setPlayerStorageValue(cid, storage, 1)
doShowTextDialog(cid, 1984, "Welcome to ....")
end
end
return true
end
 
LUA:
function onLogin(cid)

    if (getPlayerLastLoginSaved(cid) <= 0) then
        doPlayerPopupFYI(cid, "Example message")
    end
    return true
end


imo use this one, so much more simple and doesn't require the storage value, just checks the database if the player had a last login.
 
Back
Top