• 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 Tp/signs/tiles for TFS 0.3+

works for me, how to make effects random?

Change:
Lua:
        for _, area in pairs(effects) do
                doSendMagicEffect({x=area.pos[1],y=area.pos[2],z=area.pos[3]},area.effect[1])
        end
to..
Lua:
        for _, area in pairs(effects) do
                doSendMagicEffect({x=area.pos[1],y=area.pos[2],z=area.pos[3]},math.random(01,255))
        end

And new effect config:
Lua:
        local effects = {
        --X pos,Y pos, Z pos, text
        [1] = {pos = {1095,1217,7}, effect = {18}},
        [2] = {pos = {1096,1217,7}, effect = {19}},
        [3] = {pos = {1097,1217,7}, effect = {21}},
        [4] = {pos = {1098,1217,7}, effect = {22}}
        }
change to..
Lua:
        local effects = {
        --X pos,Y pos, Z pos, text
        [1] = {pos = {1095,1217,7}},
        [2] = {pos = {1096,1217,7}},
        [3] = {pos = {1097,1217,7}},
        [4] = {pos = {1098,1217,7}}
        }
 
Would this work?

Lua:
local positions = {
	{ x=100, y=100, x=7 }, text = {"Text"},
	{ x=100, y=100, x=7 }, text = {"Text"},
	{ x=100, y=100, x=7 }, text = {"Text"},
	{ x=100, y=100, x=7 }, text = {"Text"},
	{ x=100, y=100, x=7 }, text = {"Text"}
    }

function onThink(interval, lastExecution)
    for i = #positions do	
        doSendAnimatedText(positions(pos[i]), positions[i].text)
	doSendMagicEffect(positions(pos[i]), math.random(CONST_ME_LAST))
	return true
    end
end
 
Last edited:
@JDB:
Code:
math.random(CONST_ME_LAST)
Please :d
 
Like that? :eek:

Talk to you later on msn!
 
Why it didnt work, me?
Code:
--[[
        Talking Tp/signs/tiles for TFS 0.3+
        by Maxi (Shawak)
]]--

        local text = {
        --X pos,Y pos, Z pos, text
        [1] = {pos = {999,995,7}, text = {"Exp"}},
        [2] = {pos = {997,995,7}, text = {"Depo"}},
        [3] = {pos = {1001,995,7}, text = {"Sklepy"}},
        [4] = {pos = {1003,995,7}, text = {"Questy"}},
        [5] = {pos = {1063,1004,7}, text = {"Back"}},
        [6] = {pos = {998,1004,7}, text = {"Wars RED"}},
        [7] = {pos = {998,1005,7}, text = {"Wars GREEN"}},
        [8] = {pos = {1002,1004,7}, text = {"Bomberman"}},
        [9] = {pos = {1002,1005,7}, text = {"Bomberman"}},
        [10] = {pos = {996,999,7}, text = {"-=VIP=-"}},
        [11] = {pos = {1060,978,7}, text = {"Back"}},
        [12] = {pos = {994,1000,7}, text = {"Free VIp"}}
        }

        local effects = {
        --X pos,Y pos, Z pos, text
        [1] = {pos = {999,995,7}, effect = {18}},
        [2] = {pos = {997,995,7}, effect = {19}},
        [3] = {pos = {1001,995,7}, effect = {21}},
        [4] = {pos = {1003,995,7}, effect = {21}},
        [5] = {pos = {1063,1004,7}, effect = {21}},
        [6] = {pos = {998,1004,7}, effect = {21}},
        [7] = {pos = {998,1005,7}, effect = {21}},
        [8] = {pos = {1002,1004,7}, effect = {21}},
        [9] = {pos = (1002,1005,7}, effect = {21}},
        [10] = {pos = {996,999,7}, effect = {21}},
        [11] = {pos = {1060,978,7}, effect = {21}},
        [12] = {pos = {994,1000,7}, effect = {22}}
        }

function onThink(interval, lastExecution)
        for _, area in pairs(text) do
                doSendAnimatedText({x=area.pos[1],y=area.pos[2],z=area.pos[3]},area.text[1], math.random(01,255))
        end
        for _, area in pairs(effects) do
                doSendMagicEffect({x=area.pos[1],y=area.pos[2],z=area.pos[3]},area.effect[1])
        end
        return TRUE
end


? :)
 
In engine? Yup, here's SS
11c8plk.jpg

http://pl.tinypic.com/r/11c8plk/5
Can u fix it? :)) Shawak :)

I think, that error is from that script. I didnt see any effect, and notes up at Teleports ;( Nothing!
 
its works for me great but how i remove that things come from the tp i only want the text!
 
Working now:

Code:
--[[ 
        Talking Tp/signs/tiles for TFS 0.3+
        by Maxi (Shawak)
]]--

        local text = {
        --X pos,Y pos, Z pos, text
        [1] = {pos = {768,433,8}, text = {"Behemoths"}},
        [2] = {pos = {768,435,8}, text = {"Cyclops"}},
        [3] = {pos = {768,437,8}, text = {"Demons"}},
        [4] = {pos = {768,439,8}, text = {"Nightmares"}},
        [5] = {pos = {768,442,8}, text = {"Black Knights"}},
        [6] = {pos = {768,445,8}, text = {"Heroes"}},
        [7] = {pos = {768,447,8}, text = {"Necromancers"}},
        [8] = {pos = {783,433,8}, text = {"Warlocks"}},
        [9] = {pos = {783,435,8}, text = {"Minotaurs"}},
        [10] = {pos = {783,437,8}, text = {"Dragons"}},
        [11] = {pos = {783,439,8}, text = {"Hydras"}},
        [12] = {pos = {783,442,8}, text = {"Vampires"}},
        [13] = {pos = {783,445,8}, text = {"Training Zone"}},
        [14] = {pos = {783,447,8}, text = {"Depot"}},
        [15] = {pos = {438,509,7}, text = {"Teleports"}}        
        }


function onThink(interval, lastExecution)
        for _, area in pairs(text) do
                doSendAnimatedText({x=area.pos[1],y=area.pos[2],z=area.pos[3]},area.text[1], math.random(01,255))
        end
        return TRUE
end
 
Back
Top