GR
talkaction

[Talkaction] !tp, 1 Veiz Só!

Por grigacuin, 19 de ago. de 2011 em Actions e Talkactions

script
9
1.7k
grigacuinG
19 de agosto de 2011 às 09:47

Oi gente, eu criei esse script hoje, só para acalmar XD,

 

Noob[8]: Pra q serve esse script? ¬¬"

Viciadorlz[61857: Pra ser teleportado pro templo, más ele so funciona 1 veiz!! cuidado ae XD

-----------------------------------------------------------------------------------

Let's GO!!

Primeiro, crie qualqr arquivo .lua e renomeie para tp1,

coloque isso dentro:

function onSay(cid, words, param)
  		tp = getPlayerStorageValue(cid,9995)
  		if tp == -1 then
           pos = getTownTemplePosition(pos)
               doTeleportThing(cid, pos)
	doSendMagicEffect(pos, CONST_ME_TELEPORT)
  		setPlayerStorageValue(cid,9995,1)
  		else
  			doPlayerSendTextMessage(cid,23,"Voce ja usou esse comando.")
end
end

Feche e salve, agora abra o Talkactions.XML e coloque isso XD

<talkaction words="!tp" script="tp1.lua"/>

Para adicionar outro !tp é só fazer isso,criar outro .lua com o nome tp2 e colocar isso dentro XD:

function onSay(cid, words, param)
  		tp = getPlayerStorageValue(cid,9996)
  		if tp == -1 then
           pos = getTownTemplePosition(pos)
               doTeleportThing(cid, pos)
	doSendMagicEffect(pos, CONST_ME_TELEPORT)
  		setPlayerStorageValue(cid,9996,1)
  		else
  			doPlayerSendTextMessage(cid,23,"Essa e a sua segunda e ultima chance!")
end
end

e adicionar isso no talkactions.XML

<talkaction words="!tp2" script="tp2.lua"/>

e vá fazendo XD

Te ajudei?

REP+

Comentem ae gente XD

Edit~

Aqui funciono, espero que funcione ae, vlws e flws.

Editado Agosto 19 por Viciadorlz

YondaimeBRGY
21 de agosto de 2011 às 13:02

vlw!

22 de agosto de 2011 às 03:13

tipo quero colocar isso pra se teleportar para uma hunt especial, tem como trocar as cordenadas ?

grigacuinG
22 de agosto de 2011 às 09:27

Tem sim o script ficaria +/- assim:

 

function onSay(cid, words, param)

tp = getPlayerStorageValue(cid,9995)

if tp == -1 then

pos = {x=160, y=54, z=7}

doTeleportThing(cid, pos)

doSendMagicEffect(pos, CONST_ME_TELEPORT)

setPlayerStorageValue(cid,9995,1)

else

doPlayerSendTextMessage(cid,23,"Voce ja usou esse comando.")

end

end

Aqui voce muda pra position que voce qr, e pronto xD

:XTibia_smile:

:weight_lift:

adelso10A
25 de agosto de 2011 às 20:25

kara tem como fazer um q possa usa direto ?

so q so lvl 20+ possa usa ?

grigacuinG
26 de agosto de 2011 às 08:57

Sem Storage ID:

Com Level,

Veja se funciona, nao testei por falta de tempo.

 

function onSay(cid, words, param)

getPlayerLevel(itemEx.uid) < 130) and getPlayerCustomFlagValue(itemEx.uid, PlayerCustomFlag_GamemasterPrivileges) == FALSE) then

doCreatureSay(itemEx.uid, "Para usar esse comando voce prescisa ser nivel maior ou igual a 20!", TALKTYPE_ORANGE_1)

 

pos = {x=160, y=54, z=7}

doTeleportThing(cid, pos)

doSendMagicEffect(pos, CONST_ME_TELEPORT)

end

end

Aqui voce pode mudar,

Espero ter ajudado,

Se ajudei, REP+ :button_ok:

 

:weight_lift: "Trabalhando duro, nós chegamos lá! :sarcastic:

Editado Agosto 26 por Viciadorlz

1 mês depois...
adelso10A
17 de setembro de 2011 às 19:11

n deu mais obg

grigacuinG
17 de setembro de 2011 às 21:35

Entao tente este:

 

function onSay(cid)
getPlayerLevel < 20) then
doCreatureSay(itemEx.uid, "Para usar esse comando voce prescisa ser nivel maior ou igual a 20!", TALKTYPE_ORANGE_1)

pos = {x=160, y=54, z=7}
doTeleportThing(cid, pos)
doSendMagicEffect(pos, CONST_ME_TELEPORT)
end
end

Espero ter ajudado.

 

 

Ajudei? REP+

VodkartV
17 de setembro de 2011 às 22:05
function onSay(cid, words, param)
if getPlayerLevel(cid) < 20 then
return doPlayerSendTextMessage(cid,23,"Voce não tem level suficiente.")
end
return doTeleportThing(cid, {x=160, y=54, z=7})
end