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

Requesting 3 Scripts

Alyhide

Banned User
Joined
Aug 21, 2010
Messages
1,945
Reaction score
55
Location
Switzerland
Hello, I am requesting 3 simple scripts, the definition of them is below :


Script 1 : When a player gains a level, it says the words "Level Up!" above the player, but not just a plain, Level Up! It would be where it scrolls upwards, its kind of hard to explain, it's the same as unline.org if you've ever played that. like, it spells out Level Up! every letter at a time.

Script 2 : When a player gains any skill, including magic level, it says the words "SkillNameHere Up!"

Script 3 : Whenever the player is created and spawns for the first time, a message it said.

if you could do those, i would love you forever.
Thanks in advance and..
Rep++

:)
 
scripts 1 & 2 & 3:
XML:
<event type="login" name="message" event="script" value="script.lua"/>
<event type="advance" name="advanced" event="script" value="script.lua"/>
LUA:
local table = {
    [SKILL_FIST] = 'Level',
    [SKILL_CLUB] = 'Club',
    [SKILL_SWORD] = 'Sword',
    [SKILL_AXE] = 'Axe',
    [SKILL_DISTANCE] = 'Dist',
    [SKILL_SHIELD] = 'Shield',
    [SKILL_FISHING] = 'Fish',
    [SKILL__MAGLEVEL] = 'ML',
    [SKILL__LEVEL] = 'Level'
}

local storage = 6789
local message = 'Welcome Player!'

function onAdvance(cid, skill, oldLevel, newLevel)
    doSendAnimatedText(getThingPos(cid), table[skill]..' Up!', math.random(255))
    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
 
Last edited:
scripts 1 & 2 & 3:
XML:
<event type="login" name="message" event="script" value="script.lua"/>
<event type="advance" name="advanced" event="script" value="script.lua"/>
LUA:
local table = {
    [SKILL_FIST] = 'Level',
    [SKILL_CLUB] = 'Club',
    [SKILL_SWORD] = 'Sword',
    [SKILL_AXE] = 'Axe',
    [SKILL_DISTANCE] = 'Dist',
    [SKILL_SHIELD] = 'Shield',
    [SKILL_FISHING] = 'Fish',
    [SKILL__MAGLEVEL] = 'ML',
    [SKILL__LEVEL] = 'Level'
}

local storage = 6789
local message = 'Welcome Player!'

function onAdvance(cid, skill, oldLevel, newLevel)
    doSendAnimatedText(getThingPos(cid), table[skill]..' Up!', math.random(255))
    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

Creaturescript?
 
script 3:
creaturescripts.xml
LUA:
<event type="login" name="msg" event="script" value="msg.lua"/>
and in msg.lua
LUA:
function onLogin(cid)
	if getPlayerStorageValue(cid, 50000) < 0 then
		doPlayerSendTextMessage(cid, "msg here")
		setPlayerStorageValue(cid, 50000, 1)
	end
return TRUE
end
haven't tested it but it should work as a charm ;)
 
Well the "Level Up" one isn't what I wanted exactly.
I was wanting.. Whenever a player levels up, it has scrolling text in his position saying,

L
E
V
E
L

U
P
!

in orange and red.
and also send like fireworks around him in random locations
 
scripts 1 & 2 & 3:
XML:
<event type="login" name="message" event="script" value="script.lua"/>
<event type="advance" name="advanced" event="script" value="script.lua"/>
LUA:
local table = {
    [SKILL_FIST] = 'Level',
    [SKILL_CLUB] = 'Club',
    [SKILL_SWORD] = 'Sword',
    [SKILL_AXE] = 'Axe',
    [SKILL_DISTANCE] = 'Dist',
    [SKILL_SHIELD] = 'Shield',
    [SKILL_FISHING] = 'Fish',
    [SKILL__MAGLEVEL] = 'ML',
    [SKILL__LEVEL] = 'Level'
}

local storage = 6789
local message = 'Welcome Player!'

function onAdvance(cid, skill, oldLevel, newLevel)
    doSendAnimatedText(getThingPos(cid), table[skill]..' Up!', math.random(255))
    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

It's not what he wants.
 
here, masterized script with everything you asked:
LUA:
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 Player!'

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

advance creaturescript solo:
LUA:
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","!"}
}

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")
    return true
end
XML:
<event type="login" name="_advanced" event="script" value="advanced.lua"/>
<event type="advance" name="advanced" event="script" value="advanced.lua"/>
 
Last edited:
no, it just says..

Level UP! [13]
lol use the new one, look
tfsp.jpg

this is the new script: http://otland.net/f132/requesting-3-scripts-110427/index2.html#post1099512

here, masterized script with everything you asked:
LUA:
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 Player!'

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
 
Back
Top