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

Text/teleport effects ( Help Please )

salty

New Member
Joined
Mar 20, 2013
Messages
14
Reaction score
0
Hey,
So i have decided to make an 8.7 otserv. Im fairly new to it, but im making progress. :p
But im stuck on trying to get text effect to appear over a teleport.

[8.7] The Forgotten Server v0.2.10 (Mystic Spirit)
Im using this one.

globalevents/scripts/effectile.lua

PHP:
local config = {
positions = {
["Teleports"] = { x = 993, y = 996, z = 7 },
["Deport"] = { x = 1006, y = 996, z = 7 },

},

effects = {
CONDITION_PARAM_DELAYED



}
}

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

globalevents/globalevents.xml
PHP:
<globalevent name="EffectTile" interval="3" script="effectile.lua"/>

I have tried it on a 8.6 server and it works fine there, but i just cant get it to work on an 8.7.

Can anyone help me please? :/
 
Take mine should work fine for your server

Data/globalevents/scripts/effects.lua

Lua:
function onThink(interval, lastExecution)

local texts =
{
		-- Nova
        ["Trainers!"] = {{x=999, y=996, z=7}, CONST_ME_YELLOW_RINGS, TEXTCOLOR_DARKYELLOW},
        ["Events!"] = {{x=998, y=996, z=7}, CONST_ME_YELLOW_RINGS, TEXTCOLOR_DARKYELLOW},
		["Warzone!"] = {{x=1000, y=996, z=7}, CONST_ME_YELLOW_RINGS, TEXTCOLOR_DARKYELLOW},
		["LMS!"] = {{x=1126, y=510, z=7}, CONST_ME_MAGIC_BLUE, TEXTCOLOR_GREEN},
		["Zombies!"] = {{x=1126, y=506, z=7}, CONST_ME_MAGIC_BLUE, TEXTCOLOR_GREEN}
		
}

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

data/globalevents/globalevents.xml

Lua:
<globalevent name="effects" interval="1000" event="script" value="effects.lua"/>

just remember to change the X,Y,Z to where you want them and the names :) the rest is straight foward tbh

if you dont know what
Code:
CONST_ME_MAGIC_BLUE,
just remove that line and put in either 1 to 67 you can check your the looks with "/z 1~67" command in your ot


Hope this helps
 
Take mine should work fine for your server

Data/globalevents/scripts/effects.lua

Lua:
function onThink(interval, lastExecution)

local texts =
{
		-- Nova
        ["Trainers!"] = {{x=999, y=996, z=7}, CONST_ME_YELLOW_RINGS, TEXTCOLOR_DARKYELLOW},
        ["Events!"] = {{x=998, y=996, z=7}, CONST_ME_YELLOW_RINGS, TEXTCOLOR_DARKYELLOW},
		["Warzone!"] = {{x=1000, y=996, z=7}, CONST_ME_YELLOW_RINGS, TEXTCOLOR_DARKYELLOW},
		["LMS!"] = {{x=1126, y=510, z=7}, CONST_ME_MAGIC_BLUE, TEXTCOLOR_GREEN},
		["Zombies!"] = {{x=1126, y=506, z=7}, CONST_ME_MAGIC_BLUE, TEXTCOLOR_GREEN}
		
}

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

data/globalevents/globalevents.xml

Lua:
<globalevent name="effects" interval="1000" event="script" value="effects.lua"/>

just remember to change the X,Y,Z to where you want them and the names :) the rest is straight foward tbh

if you dont know what
Code:
CONST_ME_MAGIC_BLUE,
just remove that line and put in either 1 to 67 you can check your the looks with "/z 1~67" command in your ot


Hope this helps

This function
Lua:
doSendAnimatedText
doesn't exsist on 8.7+ versions! <-- i think!

Try this by Summ:
http://otland.net/f82/9-1-talking-signs-174622/

Tried both, none worked. :/ Been trying to get it to work for hours lol, feels like im missing something.
Maybe a stupid question, but do i need to do anything else? or say something? to get it to work.

Cuz i know with 8.6 you just had to put those in and then it would work. :eek:
 
Hey,

Try Mine one. :)

Globalevents - Scripts - Tiles.lua

PHP:
local config = {
positions = {
    ["Text Here"] = { x = 1000, y = 1000, z = 7 },	
},

effects = {
CONDITION_PARAM_DELAYED
}
}

function onThink(cid, interval, lastExecution)
    for text, pos in pairs(config.positions) do
	doSendMagicEffect(pos, math.random(10,30)) 
        doSendAnimatedText(pos, text, math.random(30, 134))
    end
    return TRUE
end

Globalevents.xml

PHP:
<globalevent name="Tiles" interval="-1" script="tiles.lua" />
 
Nope, didnt work either. I know theres one that should work for 8.7.. i just cant find it/get it to work.


Hey,

Try Mine one. :)

Globalevents - Scripts - Tiles.lua

PHP:
local config = {
positions = {
    ["Text Here"] = { x = 1000, y = 1000, z = 7 },	
},

effects = {
CONDITION_PARAM_DELAYED
}
}

function onThink(cid, interval, lastExecution)
    for text, pos in pairs(config.positions) do
	doSendMagicEffect(pos, math.random(10,30)) 
        doSendAnimatedText(pos, text, math.random(30, 134))
    end
    return TRUE
end

Globalevents.xml

PHP:
<globalevent name="Tiles" interval="-1" script="tiles.lua" />
 
Back
Top