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

Request (Simple Script)

Ns Sparkz

Just a Normal Ns King
Joined
Mar 6, 2011
Messages
466
Reaction score
25
Location
Egypt
When Logged in, book Opens.
And "Bla bla bla is Written"
Then ok.
It's like pressing on A Book.
But i want when A new Player is logs in The note pops out.

Secondly

A Script.
If Someone Lvls 200
he WIll Recieve 50c.
 
1.
LUA:
local message = "Bla bla bla is Written"
function onLogin(cid)
	return doPlayerPopupFYI(cid, message)
end
2.
LUA:
function onAdvance(cid, skill, oldLevel, newLevel)
	local config = {
		storage = 29213, -- Storage which player get after advance 200 lvl
		level = 200, -- Which level player needs to get reward
		cash = {2160, 50}, -- {ID of Item, Amount of Item}
		text = "You reached 200 lvl, blalablabl" -- Text after advance
	}
	if(skill == SKILL__LEVEL and newLevel >= config.level) then
		if(getPlayerStorageValue(cid, config.storage) ~= 1) then
			doSendMagicEffect(getCreaturePosition(cid), CONST_ME_HOLYAREA)
			doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, config.text)
			doPlayerAddItem(cid, config.cash[1], config.cash[2])
			setPlayerStorageValue(cid, config.storage, 1)
			return true
		end
		return true
	end
	return true
end
 
u should put the both in creaturescripts with these lines

1-
Code:
<event type="login" name="xxxx" script="xxxx.lua"/>

2-
Code:
<event type="advance" name="xxxx" event="script" value="xxxx.lua"/>

and register the both in login.lua
 
@GarQet
Read before scripting
But i want when A new Player is logs in The note pops out.

A new player not every single time i log in :P
 
LUA:
local message = "Bla bla bla is Written"
	function onLogin(cid)
		if getPlayerLastLoginSaved(cid) < 1
	return doPlayerPopupFYI(cid, message)
	end
end

forgot about the edit post button sorry for double post
 
Back
Top