• 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!
  • New resources must be posted under Resources tab. A discussion thread will be created automatically, you can't open threads manually anymore.

CreatureEvent A Tutorial when LOGIN!

Zonet

Web Developer
Joined
Sep 1, 2008
Messages
4,393
Reaction score
52
Location
Tibia VS RL-life, guess whos back?
Hello, today i tried new functions and i saw a useful script ;)

This works only on The forgotten server 0.3

Here is it.

under
Lua:
function onLogin(cid)

Write
Lua:
	if getPlayerStorageValue(cid, 2000) == -1 then
		doPlayerSendTutorial(cid, 1)
		setPlayerStorageValue(cid, 2000, 1)
	return TRUE
end

This will show you a tutorial when you login(Only one time)

Lua:
doPlayerSendTutorial(cid, 1)
You can change the id "1" to another id and many more tutorials will popup.

You can also make a mission with this like the RL Tibia.

A Picture for when you login.
tutuo6.jpg
 
Last edited:
Well, only player is logging in, so why adding this check?
 
if isPlayer, you dont need it in onLogin function.
 
@up

No problem ;)

@mamon_2
Tutorial about donations?

Make like this

PHP:
onSay or if you want onLogin.

local text = "Your Text here" -- xD
doPlayerPopupFYI(cid, text)
 
Last edited:
nevere forget the return TRUE at the end, otherwise u won't log in ^^:

@muriloww check out:
Code:
function onLogin(cid)

if getPlayerStorageValue(cid, 2000) == -1 then
local text = "Test."
local text1 = "test1"
local text2 = "test2"
local text3 = "test3"
doPlayerPopupFYI(cid, text)
doPlayerPopupFYI(cid, text1)
doPlayerPopupFYI(cid, text2)
doPlayerPopupFYI(cid, text3)
setPlayerStorageValue(cid, 2000, 1)
end 
	return TRUE -- important!
end

then in creature scripts

Code:
	<event type="login" name="Tutorial" script="tuto.lua"/>

done ^^, and don't make it too long, or u get CLIENT DEBUG.
 
Last edited:
Back
Top