DU

Exiva...

Por duda123, 03 de mar. de 2007 em Actions e Talkactions

12
3k
duda123D
03 de março de 2007 às 10:40

Estava em outro fórum quando vi um request de exiva por talkactions... Então resolvi fazê-lo ;)

Espero que gostem...

 

@pekeboi

CRÉDITOS 100% PARA MIM!

--

 

Aqui está:

 

-- Ignore all the errors on Console Screen. --

function onSay(cid, words, param)

msg = {eastl="is to the east.", westl="is to the west.", northl="is to the north.", southl="is to the south.", northel="is to the north-east.", northwl="is to the north-west.", southel="is to the south-east.", southwl="is to the south-west.", easta="is on a higher level to the east.", westa="is on a higher level to the west.", northa="is on a higher level to the north.", southa="is on a higher level to the south.", northea="is on a higher level to the north-east.", northwa="is on a higher level to the north-west.", southea="is on a higher level to the south-east.", southwa="is on a higher level to the south-west.", eastu="is on a lower level to the east.", westu="is on a lower level to the west.", northu="is on a lower level to the north.", southu="is on a lower level to the south.", northeu="is on a lower level to the north-east.", northwu="is on a lower level to the north-west.", southeu="is on a lower level to the south-east.", southwu="is on a lower level to the south-west.", above="is above you.", below="is below you.", near="is standing next to you."}

neardistance = 2 -- How many sqms to be near?

manawaste = 20 -- How many mana does it cost?

soulwaste = 0 -- How many soul does it cost?

np = 0 -- Dont change

near = false -- Dont change

ppos = getPlayerPosition(cid)

if getPlayerByName(param) ~= 0 then

targ = getPlayerByName(param)
targpos = getPlayerPosition(targ)

-- Checking Z --

if targpos.z == ppos.z then

above = false
under = false

elseif targpos.z > ppos.z then

above = false
under = true

elseif targpos.z < ppos.z then

above = true
under = false

else

doPlayerSendCancel(cid,'Something is bugged. Please report to a GM.')

end

-- End Checking Z --

-- Checking X,Y --

if targpos.x > ppos.x+neardistance then

if targpos.y > ppos.y+neardistance then

np = south-east

elseif targpos.y < ppos.y-neardistance then

np = north-east

else

np = east

end

elseif targpos.x < ppos.x-neardistance then

if targpos.y > ppos.y+neardistance then

np = south-west

elseif targpos.y < ppos.y-neardistance then

np = north-west

else

np = west

end

else

if targpos.y > ppos.y+neardistance then

np = south

elseif targpos.y < ppos.y-neardistance then

np = north

else

near = true

end

end

-- End Checking X,Y --

-- Check and Send Msgs --

if near == true then

if above == true then

send = ""..param.." "..msg.above..""

doPlayerSendTextMessage(cid,22,send)

elseif under == true then

send = ""..param.." "..msg.below..""

doPlayerSendTextMessage(cid,22,send)

else

send = ""..param.." "..msg.near..""

doPlayerSendTextMessage(cid,22,send)

end

elseif near == false then

if np == north then

if above == true then

send = ""..param.." "..msg.northa..""

doPlayerSendTextMessage(cid,22,send)

elseif under == true then

send = ""..param.." "..msg.northu..""

doPlayerSendTextMessage(cid,22,send)

else

send = ""..param.." "..msg.northl..""

doPlayerSendTextMessage(cid,22,send)

end

elseif np == south then

if above == true then

send = ""..param.." "..msg.southa..""

doPlayerSendTextMessage(cid,22,send)

elseif under == true then

send = ""..param.." "..msg.southu..""

doPlayerSendTextMessage(cid,22,send)

else

send = ""..param.." "..msg.southl..""

doPlayerSendTextMessage(cid,22,send)

end

elseif np == east then

if above == true then

send = ""..param.." "..msg.easta..""

doPlayerSendTextMessage(cid,22,send)

elseif under == true then

send = ""..param.." "..msg.eastu..""

doPlayerSendTextMessage(cid,22,send)

else

send = ""..param.." "..msg.eastl..""

doPlayerSendTextMessage(cid,22,send)

end

elseif np == west then

if above == true then

send = ""..param.." "..msg.westa..""

doPlayerSendTextMessage(cid,22,send)

elseif under == true then

send = ""..param.." "..msg.westu..""

doPlayerSendTextMessage(cid,22,send)

else

send = ""..param.." "..msg.westl..""

doPlayerSendTextMessage(cid,22,send)

end

elseif np == north-east then

if above == true then

send = ""..param.." "..msg.northea..""

doPlayerSendTextMessage(cid,22,send)

elseif under == true then

send = ""..param.." "..msg.northeu..""

doPlayerSendTextMessage(cid,22,send)

else

send = ""..param.." "..msg.northel..""

doPlayerSendTextMessage(cid,22,send)

end

elseif np == north-west then

if above == true then

send = ""..param.." "..msg.northwa..""

doPlayerSendTextMessage(cid,22,send)

elseif under == true then

send = ""..param.." "..msg.northwu..""

doPlayerSendTextMessage(cid,22,send)

else

send = ""..param.." "..msg.northwl..""

doPlayerSendTextMessage(cid,22,send)

end

elseif np == south-east then

if above == true then

send = ""..param.." "..msg.southwa..""

doPlayerSendTextMessage(cid,22,send)

elseif under == true then

send = ""..param.." "..msg.southwu..""

doPlayerSendTextMessage(cid,22,send)

else

send = ""..param.." "..msg.southwl..""

doPlayerSendTextMessage(cid,22,send)

end

elseif np == south-west then

if above == true then

send = ""..param.." "..msg.southwa..""

doPlayerSendTextMessage(cid,22,send)

elseif under == true then

send = ""..param.." "..msg.southwu..""

doPlayerSendTextMessage(cid,22,send)

else

send = ""..param.." "..msg.southwl..""

doPlayerSendTextMessage(cid,22,send)

end

else

doPlayerSendCancel(cid,'Something is bugged. Please report to a GM.')

end

end

doPlayerAddMana(cid,-manawaste)

doPlayerAddSoul(cid,-soulwaste)

doSendMagicEffect(ppos,12)

-- End Checking X,Y --

else

doPlayerSendCancel(cid,'A player with this name is not online.')

doSendMagicEffect(ppos,2)

end

end

Editado Março 3 por duda123

Felipe MoraesF
03 de março de 2007 às 10:42

ate q ficou bem legal...isso ai funfa em todas as versoes?

e os creditos?coloque os creditos de quem postou...so o nome da pessoa,nada de nome de forum...

duda123D
03 de março de 2007 às 10:46

@pekeboi,

 

Créditos no tópico original.

 

Funciona em qualquer versão 7.92. :D

Felipe MoraesF
03 de março de 2007 às 11:16

vlw aew amigo por responder minha duvida...e por colocar os creditos...

a proposito...so uma parte q eu nao entendi...vc estava passando por um forum,e encontrou esse script?ou encontrou comentando sobre o script?

XPauloX
03 de março de 2007 às 11:21

Muito bom,

ctrl + c e ctrl + v,

mas o que importa e que fico bom.

soulblasterS
03 de março de 2007 às 11:44

@XPaulo

 

tenho uma perguna para voce:

como que voce tem tanta certeza de que isso foi um control + c, control + v e nao foi ele que fez???

NUNCA fale o que realmente nao sabe... (isso vale a todos do forum)

ou voce tem problema nos olhos e nao leu a pagina principal, ou vc fez isso para ganhar posts...

SE ele diz que foi ele. Nos temos que acreditar nele. A nao ser que alguem prove o contrario.

 

@duda123

 

script longo, mais bem bolado ^^

cya... ^_^

tibiaa4eT
03 de março de 2007 às 12:02

lgl + inutil :S

ja q todos os ot com talkactions tem exiva

axo + facil mexer no c++

 

+ foi bem bolado e parabens msm

 

flws

duda123D
03 de março de 2007 às 13:57

O script é meu. Todos os 3 forums que estão com esse script fui eu quem postei. Está em inglês porque postei em um forum gringo. Eu resolvi fazer esse script porque vi um cara que tava querendo... Não sei pra que ele queria se, como já disse o tibiaa4e, todos os OTS mais novos já tem o exiva... Como tava sem fazer nada eu fiz o script =)

LordfireL
03 de março de 2007 às 14:06

é meio inutil

ja que todos os ots tem

ots bons pelo menos

nao va baixar um qualquer que dai vai ter que pega o exiva aki

suborasS
04 de março de 2007 às 00:30

Se nao serve para a versao usada, ja q a msm ja possuiu o comando nas soucers, Serve para estudo... -.^

 

@duda123

 

Mt bom msm o code, parabens... ;)

XPauloX
04 de março de 2007 às 01:41

Eu disse que era ctrl +c e ctrl +v, porque existe isso em vários ots.

 

Se lhe ofendi desculpe-me não era minha intenção.

duda123D
04 de março de 2007 às 11:20

Não me ofendeu... Acontece que em todos os OTs são feitos por C++... Nunca vi nenhum que fosse feito por talkaction ;)