Creditos : Mock
Tps/placas/pisos Falantes
name="show" interval="1" script="show.lua"/>
Feito isso crie o arquivo show.lua e nele ponha isso:----------------------------
--------Talkting TPS 3.0 ---
---------- By mock ---------
--dont remove the credists--
----------------------------
clolortypes = {
{kind=2,chance=100,{x=100,y=100,z=7},'Haha i can say ma ny words with this script ;D ---By mock ',255}, -- kind (text), chance 100%,pos,Text,color
{kind=3,chance=98,{x=100,y=100,z=7},{x=102,y=102,z=7},CONST_ANI_SPEAR}, -- kind(distance), chance 98%, frompos, topos, distance
{kind=4,chance=10,function() --- kind(function), chance 10%, function
local pos = {x=110,y=110,z=7,stackpos=255}
local a = getThingfromPos(pos)
if isPlayer(a.uid) == TRUE then
doTeleportThing(a.uid, {x=100,y=100,z=7})
end
end},
{kind=1,chance=20,{x=100,y=100,z=7},CONST_ME_WATERCREATURE}, -- kind (effect), chance 20%, pos, effecttype
}
function animatedTextBig(pos,letters,color)-- by Mock
local pos2 = {x=pos.x,y=pos.y,z=pos.z}
local m = 10
local c = math.floor(#letters/m)
local ac = 0
for i=1,c+1 do
ac = i
local l1 = ((i-1)*m)
local l2 = (m*(i))-1
doSendAnimatedText(pos2,letters:sub(l1,l2), color)
pos2.x = pos2.x+1
end
return ac
end
function run_it()
for i=1,#clolortypes do
if clolortypes[i].kind == 1 then
if clolortypes[i].chance >= math.random(1,100) then
doSendMagicEffect(clolortypes[i][1],clolortypes[i][2])
end
elseif clolortypes[i].kind == 2 then
if clolortypes[i].chance >= math.random(1,100) then
animatedTextBig(clolortypes[i][1],clolortypes[i][2],clolortypes[i][3])
end
elseif clolortypes[i].kind == 3 then
if clolortypes[i].chance >= math.random(1,100) then
doSendDistanceShoot(clolortypes[i][1],clolortypes[i][2],clolortypes[i][3])
end
elseif clolortypes[i].kind == 4 then
if clolortypes[i].chance >= math.random(1,100) then
xpcall(clolortypes[i][1](),false) --- para nao parar o evento
end
end
end
end
function onThink(interval, lastExecution)
run_it()
return TRUE
end
Terminado? entao pronto ^^
Configuarando
E facil d++++++++ configurar
--- Config animatex text.
você deve adcionar uma estrutura de tabela como esse na tabela clolortypes:
{kind=[COLOR="Red"]2[/COLOR],chance=%,pos,text,color},
2 é uma constante do script, se vc mudar e deixar esses parametros vai dar problemas.Chance vai de 1 a 100
pos: {x=...}
Text = 'OMG eu posso falar coisas grandes com esse script :D --- by mock '
Color = TEXTCOLOR_YELLOW ou 210 (0-255)
--- Config magic effect.
você deve adcionar uma estrutura de tabela como esse na tabela clolortypes:
{kind=1,chance=%,pos,type},
2 é uma constante do script, se vc mudar e deixar esses parametros vai dar problemas.
Chance vai de 1 a 100
pos: {x=...}
type = CONST_ME_WATERCREATURE
--- Config distance shoot.
você deve adcionar uma estrutura de tabela como esse na tabela clolortypes:
{kind=[COLOR="Red"]3[/COLOR],chance=%,frompos,topos,type},
3 é uma constante do script, se vc mudar e deixar esses parametros vai dar problemas.Chance vai de 1 a 100
frompos: {x=...}
topos: {x=...}
type: CONST_ANI_SPEAR (ou o numero :p no caso 1)
--- Config functions.
você deve adcionar uma estrutura de tabela como esse na tabela clolortypes:
{kind=[COLOR="Red"]4[/COLOR],chance=10,function},
4 é uma constante do script, se vc mudar e deixar esses parametros vai dar problemas.Chance vai de 1 a 100
deve ser +/- assim na tabela:
function() print('hail') end
Ou ja pronto assim: {kind=4,chance=10,function()
local pos = {x=110,y=110,z=7,stackpos=255}
local a = getThingfromPos(pos)
if isPlayer(a.uid) == TRUE then
doTeleportThing(a.uid, {x=100,y=100,z=7})
end
end},
0 comentários: