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

I need this script please

ralke

(҂ ͠❛ ෴ ͡❛)ᕤ
Joined
Dec 17, 2011
Messages
1,541
Solutions
28
Reaction score
875
Location
Santiago - Chile
GitHub
ralke23
Twitch
ralke23
i need a script that does the following thing:
Code:
when you reach lvl 40, you get teleported to cords "1000, 1000, 7" and get a message that say "Now, choose your city."

if you can do that,
thanks really :*
 
Lua:
local t = {
	level = 40,
	storage = 1234,
	pos = {x = 1000, y = 1000, z = 7}
}
function onAdvance(cid, skill, oldLevel, newLevel)
	if skill == SKILL__LEVEL then
		if newLevel >= t.level and getPlayerStorageValue(cid, t.storage) < 1 then
			doTeleportThing(cid, t.pos)
			setPlayerStorageValue(cid, t.storage, 1)
			doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "CONGRATULATIONS! You've reached level " .. t.level .. ", choose your city.")
		end
	end
	return true
end

add the respective line to creaturescripts.xml and register it on login
take care.
 
ty a lot, but i need to know what i have to add exactly on creaturescript.xml?
i added:
Code:
<event type="login" name="Time to Go" event="script" value="timetogo.lua"/>

but seems not correct :(
thanks again

and on login i have to add:
Code:
 registerCreatureEvent(cid, "TimetoGo")

?
 
Last edited:
Back
Top