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

Request for Login Words

  • Thread starter Thread starter Deleted member 49793
  • Start date Start date
D

Deleted member 49793

Guest
Can someone make the words that pop up when you login the first time into the server
Code:
local storage = 6789
local message = 'Welcome to our server!'
 
function send(pos, letter, color)
	return doSendAnimatedText(pos, letter, color)
end
Can someone make this so it pops up everytime someone logs in?
Code:
function doChoose(...)
	local arg = {...}
	return arg[math.random(1, table.maxn(arg))]
end
 
function doSendMagicEffectInArea(pos,area) -- Function by mock
	local center = {}
	center.y = math.floor(table.getn(area)/2)+1
	for y = 1, table.getn(area) do
		for x = 1, table.getn(area[y]) do
			if area[y][x] > 0 then
				center.x = math.floor(table.getn(area[y])/2)+1
				doSendMagicEffect({x=pos.x+x-center.x,y=pos.y+y-center.y,z= pos.z},doChoose(28,29,30),cid)
			end
		end
	end
	return true
end
 
local area = {
	{0, 1, 1, 1, 0},
	{1, 1, 1, 1, 1},
	{1, 1, 1, 1, 1},
	{1, 1, 1, 1, 1},
	{0, 1, 1, 1, 0}
}
 
local advance = {
    [SKILL_FIST] = {"F","I","S","T","U","P","!"},
    [SKILL_CLUB] = {"C","L","U","B","U","P","!"},
    [SKILL_SWORD] = {"S","W","O","R","D","U","P","!"},
    [SKILL_AXE] = {"A","X","E","U","P","!"},
    [SKILL_DISTANCE] = {"D","I","S","T","A","N","C","E","U","P","!"},
    [SKILL_SHIELD] = {"S","H","I","E","L","D","U","P","!"},
    [SKILL_FISHING] = {"F","I","S","H","I","N","G","U","P","!"},
    [SKILL__MAGLEVEL] = {"M","A","G","I","C","U","P","!"},
    [SKILL__LEVEL] = {"L","E","V","E","L","U","P","!"}
}
local storage = 6789
local message = 'Welcome to our server!'
 
function send(pos, letter, color)
	return doSendAnimatedText(pos, letter, color)
end
 
function onAdvance(cid, skill, oldLevel, newLevel)
	local data = advance[skill]
	doSendMagicEffectInArea(getThingPos(cid),area)
	for i = 1, #data do
		addEvent(send, i * 150, getThingPos(cid), data[i], math.mod(i,2) == 0 and TEXTCOLOR_RED or TEXTCOLOR_ORANGE)
	end
    return true
end
 
function onLogin(cid)
    registerCreatureEvent(cid, "advanced")
    if getCreatureStorage(cid, storage) == EMPTY_STORAGE then
        doPlayerPopupFYI(cid, message)
        doCreatureSetStorage(cid, storage, 1)
    end
    return true
end
 
LUA:
local m = {'W','e','l','c','o','m','e','t','o','o','u','r','s','e','r','v','e','r','!'} 

function send(pos, letter, color)
    return doSendAnimatedText(pos, letter, color)
end

function onLogin(cid)
    if getCreatureStorage(cid, 23443) == EMPTY_STORAGE then
        doCreatureSetStorage(cid, 23443, 1)
        for i = 1, #m do
            addEvent(send, i*150, getThingPos(cid), m[i], i%2 == 0 and TEXTCOLOR_RED or TEXTCOLOR_ORANGE)
        end
    end
    return true
end
 
LUA:
local m = 'Welcometoourserver!'

function onLogin(cid)
	if getCreatureStorage(cid, 23443) < 1 then
		doCreatureSetStorage(cid, 23443, 1)
		local pos = getThingPos(cid)
		for i = 1, #m do
			addEvent(doSendAnimatedText, i*150, pos, m:sub(i,i), i%2 == 0 and TEXTCOLOR_RED or TEXTCOLOR_ORANGE)
		end
	end
	return true
end
 
Back
Top