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

GlobalEvent Talking teleports and signs v 2.0

Mock

Mock the bear (MTB)
Joined
Jul 29, 2008
Messages
619
Reaction score
106
Location
Brazil
Talking tp/tiles/signs with 9+ characters (V 3.0)

Lock this thread please, or delete.
 
Last edited:
Screen shoot >>
all.bmp
 
Nice idea, but it can be done much easier and cleaner. Also, raids with globalevents are lame, better choice is raidevent in TFS.
 
this looks better for me :p

globalevents.xml
Code:
<globalevent name="effect" interval="1" event="script" value="welcomen.lua"/>


welcomen.lua
Code:
function onThink(interval, lastExecution)

local pos = {x=160, y=50, z=7, stackpos=1}
	doSendMagicEffect(pos, 30)
	doSendAnimatedText(pos, "Welcome", 140)
	return TRUE
end

^^ :p
 
ReFormAtted pls

Code:
local texts = {
	{{x=100,y=110,z=7}, 'Dragons'},
	{{x=520,y=610,z=7}, 'Temple'},
	{{x=424,y=424,z=2}, 'NPCs'}
}

function onThink(interval, lastExecution)
	for _, text in ipairs(texts) do
		doSendAnimatedText(text[1], text[2], math.random(0, 255))
	end
	return TRUE
end
 
I think its better :

Code:
local config = {
    positions = {
        ["Depo"] = { x = 1269, y = 1375, z = 3 },
        ["Trainers"] = { x = 1272, y = 1374, z = 6 }
    },
    
    effects = {
        CONST_ME_MORTAREA,
        CONST_ME_HITBYFIRE,
        CONST_ME_GIFTWRAPS,
        CONST_ME_STUN
    }
}

function onThink(cid, interval, lastExecution)
    for text, pos in pairs(config.positions) do
        doSendMagicEffect(pos, math.random(1, #config.effects))
        doSendAnimatedText(pos, text, math.random(1, 255))
    end
    
    return TRUE
end

In globalevents :]
 
@Himad

I think TFS 0.2 don't have GlobalEvents.

@killak

Change math.random(01,255) to the name of the color that you want. Example TEXTCOLOR_RED.

@Mefiu

I think this is better!.

Lua:
function onThink(interval, lastExecution)

local texts = 
{
	["Trainer"] = {{x=96, y=118, z=7}, CONST_ME_MAGIC_GREEN, TEXTCOLOR_YELLOW},
	["Temple"] = {{x=95, y=117, z=7}, CONST_ME_MAGIC_RED, TEXTCOLOR_BLUE},
	["Teleport"] = {{x=92, y=118, z=7}, CONST_ME_MAGIC_BLUE, TEXTCOLOR_RED}
}

	for text, param in pairs(texts) do
		doSendAnimatedText(param[1], text, param[3])
		doSendMagicEffect(param[1], param[2])
	end
	return TRUE
end
 
Last edited:
@Himad

I think TFS 0.2 don't have GlobalEvents.

@killak

Change math.random(01,255) to the name of the color that you want. Example TEXTCOLOR_RED.

@Mefiu

I think this is better!.

Lua:
function onThink(interval, lastExecution)

local texts = 
{
	["Trainer"] = {{x=96, y=118, z=7}, CONST_ME_MAGIC_GREEN, TEXTCOLOR_YELLOW},
	["Temple"] = {{x=95, y=117, z=7}, CONST_ME_MAGIC_RED, TEXTCOLOR_BLUE},
	["Teleport"] = {{x=92, y=118, z=7}, CONST_ME_MAGIC_BLUE, TEXTCOLOR_RED}
}

	for text, param in pairs(texts) do
		doSendAnimatedText(param[1], text, param[3])
		doSendMagicEffect(param[1], param[2])
	end
	return TRUE
end

i have tryed that and nothin i guess ill just keep playing around with it idk
 
Back
Top