Ir para conteúdo

[Talkaction]System Moves [15/151]


meubk

Posts Recomendados

Queria Uma Ajuda Para Fazer o Water Gun , Q Sao Varios Efeitos , Como Poso Faze-lo No Seu Script , o Mesmo Com o Flamethower Q Cada Efeito e 1 Lado Diferent [ Esquerda , Direita , ...]

 

Obrg Quem Responder .

Link para o comentário
Compartilhar em outros sites

Azak9

VOU TI ADJUDAR É FACINHO

 

VAI EM

"\data\talkactions\talkactions.xlm"

 

Coloque o seguinte codigo

<talkaction words="m2" hide="yes" event="script" value="m2.lua"/>

 

Pronto provalvelmente resolvido

 

OBS: para criar o função m2 vc tera que criar um novo ".lua" com o nome "m2"

 

SE AJUDER ++ ^^

Link para o comentário
Compartilhar em outros sites

uma dica :

 

function SolarBeam(position, direction) --  Function by miih

if(direction == 0) then
    doSendMagicEffect({x=position.x, y=position.y -1, z=position.z},94)
    doSendMagicEffect({x=position.x, y=position.y -2, z=position.z},93)
    doSendMagicEffect({x=position.x, y=position.y -3, z=position.z},95)
elseif(direction == 1) then
    doSendMagicEffect({x=position.x+1, y=position.y, z=position.z},86)
    doSendMagicEffect({x=position.x+2, y=position.y, z=position.z},88)
    doSendMagicEffect({x=position.x+3, y=position.y, z=position.z},87)
elseif(direction == 2) then
    doSendMagicEffect({x=position.x, y=position.y+1, z=position.z},91)
    doSendMagicEffect({x=position.x, y=position.y+2, z=position.z},93)
    doSendMagicEffect({x=position.x, y=position.y+3, z=position.z},92)
elseif(direction == 3) then
    doSendMagicEffect({x=position.x-1, y=position.y, z=position.z},89)
    doSendMagicEffect({x=position.x-2, y=position.y, z=position.z},88)
    doSendMagicEffect({x=position.x-3, y=position.y, z=position.z},90)
end

return position
end

 

outra dica :

 

if x.attackname == "Solar Beam" then

 

ja fooi a dica, fuii

Editado por xotservx
Link para o comentário
Compartilhar em outros sites

uma dica :

 

function SolarBeam(position, direction) --  Function by miih

if(direction == 0) then
    doSendMagicEffect({x=position.x, y=position.y -1, z=position.z},94)
    doSendMagicEffect({x=position.x, y=position.y -2, z=position.z},93)
    doSendMagicEffect({x=position.x, y=position.y -3, z=position.z},95)
elseif(direction == 1) then
    doSendMagicEffect({x=position.x+1, y=position.y, z=position.z},86)
    doSendMagicEffect({x=position.x+2, y=position.y, z=position.z},88)
    doSendMagicEffect({x=position.x+3, y=position.y, z=position.z},87)
elseif(direction == 2) then
    doSendMagicEffect({x=position.x, y=position.y+1, z=position.z},91)
    doSendMagicEffect({x=position.x, y=position.y+2, z=position.z},93)
    doSendMagicEffect({x=position.x, y=position.y+3, z=position.z},92)
elseif(direction == 3) then
    doSendMagicEffect({x=position.x-1, y=position.y, z=position.z},89)
    doSendMagicEffect({x=position.x-2, y=position.y, z=position.z},88)
    doSendMagicEffect({x=position.x-3, y=position.y, z=position.z},90)
end

return position
end

 

outra dica :

 

if x.attackname == "Solar Beam" then

 

ja fooi a dica, fuii

 

N Sou 1 Scripter Mais Estou Entendendo Aos Poucos .

Saquei Ale Q e o SolarBeam As Direçoes e o Efeitos de Cada Direçao , Mais Como Colocar No Scripter , So Tenho Essa Duvida.

Link para o comentário
Compartilhar em outros sites

m1.lua:105: ambiguous syntax (function call x new statement) near '('

 

to com esse problema alguem me dis como resolver

 

pelo que entendi ta faltando (

 

mas usei um programa pra verificar isso e não ta faltando nem ta sobrando...

 

não sei mais o que fazer me ajudem por favor

Link para o comentário
Compartilhar em outros sites

- System M1 -

 

Autor : XotservX

Testado : TFS 0.3.6 , 8.54

 

 

Olá hoje venho trazer o sistema de moves de pokemon ,



por talk, feito por min, e ja vow manda

um tutorial de editar :)

 

function isSummon(uid)
return uid ~= getCreatureMaster(uid) or false
end

function doSendMagicEffectInArea(pos,effect,area,cid) -- Function by mock
local centro = {}
centro.y = math.floor(table.getn(area)/2)+1
for y = 1, table.getn(area) do
	for x = 1, table.getn(area[y]) do
		if area[y][x] > 0 then
			centro.x = math.floor(table.getn(area[y])/2)+1
			if type(effect) == 'table' then
				doSendMagicEffect({x=pos.x+x-centro.x,y=pos.y+y-centro.y,z= pos.z},(effect[area[y][x]] or 0),cid)
			else
				doSendMagicEffect({x=pos.x+x-centro.x,y=pos.y+y-centro.y,z= pos.z},effect or 0,cid)
			end
		end
	end
end
return true
end

function getTime(s) -- by : Mkalo.
local n = math.floor(s / 60)
s = s - (60 * n)
return n, s
end

-- AREAS --
local arr1 = {
{1, 1, 1},
{1, 0, 1},
{1, 1, 1},
}

-- M1 System, by: XotserX. --

local pokes = {
["Bulbasaur"] = {attackname = "Quick Attack", level = 20, storage = 2000, cd = 5, atkmin = 20, atkmax = 40, range = 1, typeattack = "intarget", effecta = 111, type = COMBAT_PHYSICALDAMAGE}
}


function onSay(cid, words, param, target)

	if #getCreatureSummons(cid) == 0 then
		return doPlayerSendCancel(cid, "You do not have any pokemon.")
	end

	if getPlayerStorageValue(cid, 102032) == 1 then
		doPlayerSendCancel(cid, "Your pokemon is exhausted.")
		doSendMagicEffect(getCreaturePosition(cid), 2)
	return true
	end

       for i,x in pairs(pokes) do

        	local storage = x.storage
        	local cd = x.cd


				     if getCreatureSummons(cid) ~= 0 then
				       if not getTilePzInfo(getPlayerPosition(cid)) then
                             if getCreatureName(getCreatureSummons(cid)[1]) == i then
                          	if getCreatureTarget(cid) ~= 0 then
                               if not isSummon(getCreatureTarget(cid)) or not isPlayer(getCreatureTarget(cid)) then
                              	if getPlayerLevel(cid) >= x.level then
						                          if os.time()-getPlayerStorageValue(cid, storage) <= cd then
												minutes,seconds = getTime(cd-(os.time()-getPlayerStorageValue(cid, storage)))
												return doPlayerSendTextMessage(cid, 27, "You need to wait ".. seconds .. " seconds to use " ..x.attackname..".")
												end

						              if x.typeattack == "distance" then
								     if getDistanceBetween(getCreaturePosition(getCreatureSummons(cid)[1]), getCreaturePosition(getCreatureTarget(cid))) <= x.range then
								       doSendDistanceShoot(getCreaturePosition(getCreatureSummons(cid)[1]), getCreaturePosition(getCreatureTarget(cid)), x.effectd)
								       doSendMagicEffect(getCreaturePosition(getCreatureTarget(cid)), x.effecta)
								       doAreaCombatHealth(getCreatureSummons(cid)[1], x.type, getCreaturePosition(getCreatureTarget(cid)), x.arr, -(x.atkmin+getPlayerLevel(cid)), -(x.atkmax+getPlayerLevel(cid)),  x.effecta)
								       doCreatureSay(cid, ""..i..", "..x.attackname..".", 1)
								       setPlayerStorageValue(cid, storage, os.time()+cd)
								       setPlayerStorageValue(cid, 102032, 1)
								       addEvent(setPlayerStorageValue, 1*1000, cid, 102032, -1)
						             else
						               doPlayerSendCancel(cid, "Target is far away.")
								       doSendMagicEffect(getCreaturePosition(cid), 2)
                                    	end
                                      	return true
                                  	end

                                  	if x.typeattack == "area" then
                                    	if getDistanceBetween(getCreaturePosition(getCreatureSummons(cid)[1]), getCreaturePosition(getCreatureTarget(cid))) <= x.range then
                                      	doSendMagicEffectInArea(getCreaturePosition(getCreatureSummons(cid)[1]),x.effecta,x.arr)
								       doAreaCombatHealth(getCreatureSummons(cid)[1], x.type, getCreaturePosition(getCreatureTarget(cid)), x.arr, -(x.atkmin+getPlayerLevel(cid)), -(x.atkmax+getPlayerLevel(cid)),  x.effecta)
								              doCreatureSay(cid,""..i..", "..x.attackname..".", 1)
								       setPlayerStorageValue(cid, storage, os.time()+cd)
										setPlayerStorageValue(cid, 102032, 1)
								       addEvent(setPlayerStorageValue, 1*1000, cid, 102032, -1)
                                    	else
						               doPlayerSendCancel(cid, "Target is far away.")
								       doSendMagicEffect(getCreaturePosition(cid), 2)
                                    	end
                                  	return true
                                  	end

                                  	if x.typeattack == "direcion" then
                                       if getDistanceBetween(getCreaturePosition(getCreatureSummons(cid)[1]), getCreaturePosition(getCreatureTarget(cid))) <= x.range then
                                    	if getCreatureLookDir(getCreatureSummons(cid)[1]) == 0 then
                                           doSendMagicEffect(getPositionByDirection(getCreaturePosition(getCreatureSummons(cid)[1]), 0, 1),x.effectdir0)
                                           doAreaCombatHealth(getCreatureSummons(cid)[1], x.type, getCreaturePosition(getCreatureTarget(cid)), x.arr, -(x.atkmin+getPlayerLevel(cid)), -(x.atkmax+getPlayerLevel(cid)),  x.effecta)
										setPlayerStorageValue(cid, storage, os.time()+cd)
								           	doCreatureSay(cid,""..i..", "..x.attackname..".", 1)
										setPlayerStorageValue(cid, 102032, 1)
								       addEvent(setPlayerStorageValue, 1*1000, cid, 102032, -1)
                                    	elseif getCreatureLookDir(getCreatureSummons(cid)[1]) == 1 then
                                           doSendMagicEffect(getPositionByDirection(getCreaturePosition(getCreatureSummons(cid)[1]), 1, 1),x.effectdir1)
                                           doAreaCombatHealth(getCreatureSummons(cid)[1], x.type, getCreaturePosition(getCreatureTarget(cid)), x.arr, -(x.atkmin+getPlayerLevel(cid)), -(x.atkmax+getPlayerLevel(cid)),  x.effecta)
										setPlayerStorageValue(cid, storage, os.time()+cd)
								           	doCreatureSay(cid,""..i..", "..x.attackname..".", 1)
										setPlayerStorageValue(cid, 102032, 1)
								       addEvent(setPlayerStorageValue, 1*1000, cid, 102032, -1)
                                    	elseif getCreatureLookDir(getCreatureSummons(cid)[1]) == 2 then
                                           doSendMagicEffect(getPositionByDirection(getCreaturePosition(getCreatureSummons(cid)[1]), 2, 1),x.effectdir2)
                                           doAreaCombatHealth(getCreatureSummons(cid)[1], x.type, getCreaturePosition(getCreatureTarget(cid)), x.arr, -(x.atkmin+getPlayerLevel(cid)), -(x.atkmax+getPlayerLevel(cid)),  x.effecta)
										setPlayerStorageValue(cid, storage, os.time()+cd)
								           	doCreatureSay(cid,""..i..", "..x.attackname..".", 1)
										setPlayerStorageValue(cid, 102032, 1)
								       addEvent(setPlayerStorageValue, 1*1000, cid, 102032, -1)
                                    	elseif getCreatureLookDir(getCreatureSummons(cid)[1]) == 3 then
                                           doSendMagicEffect(getPositionByDirection(getCreaturePosition(getCreatureSummons(cid)[1]), 3, 1),x.effectdir3)
                                           doAreaCombatHealth(getCreatureSummons(cid)[1], x.type, getCreaturePosition(getCreatureTarget(cid)), x.arr, -(x.atkmin+getPlayerLevel(cid)), -(x.atkmax+getPlayerLevel(cid)),  x.effecta)
										setPlayerStorageValue(cid, storage, os.time()+cd)
                                           doCreatureSay(cid,""..i..", "..x.attackname..".", 1)
										setPlayerStorageValue(cid, 102032, 1)
								       addEvent(setPlayerStorageValue, 1*1000, cid, 102032, -1)
                                    	end
                                     else
						               doPlayerSendCancel(cid, "Target is far away.")
								       doSendMagicEffect(getCreaturePosition(cid), 2)
                                    	end
                                  	return true
                                  	end

                                  	if x.typeattack == "intarget" then
                                         if getDistanceBetween(getCreaturePosition(getCreatureSummons(cid)[1]), getCreaturePosition(getCreatureTarget(cid))) <= x.range then
                                      	doSendMagicEffect(getCreaturePosition(getCreatureTarget(cid)), x.effecta)
								       doAreaCombatHealth(getCreatureSummons(cid)[1], x.type, getCreaturePosition(getCreatureTarget(cid)), x.arr, -(x.atkmin+getPlayerLevel(cid)), -(x.atkmax+getPlayerLevel(cid)),  x.effecta)
								       doCreatureSay(cid, ""..i..", "..x.attackname..".", 1)
								       setPlayerStorageValue(cid, storage, os.time()+cd)
								       setPlayerStorageValue(cid, 102032, 1)
								       addEvent(setPlayerStorageValue, 1*1000, cid, 102032, -1)
						             else
						               doPlayerSendCancel(cid, "Target is far away.")
								       doSendMagicEffect(getCreaturePosition(cid), 2)
                                    	end
                                  	return true
                                  	end



                                   else
                                               doPlayerSendTextMessage(cid, 27, "You need level "..x.level.." to use " ..x.attackname..".")
									    	doSendMagicEffect(getCreaturePosition(cid), 2)
                                               return true
                                   end
                               else
                                           doPlayerSendCancel(cid, "Invalid Target.")
										doSendMagicEffect(getCreaturePosition(cid), 2)
                                      	return true
                               end
                          	else
                                           doPlayerSendCancel(cid, "Target not is avalied.")
										doSendMagicEffect(getCreaturePosition(cid), 2)
                                      	return true
                               end
					  	end
                           else
                                   doPlayerSendCancel(cid, "Do not Attack in Protection Zone.")
								doSendMagicEffect(getCreaturePosition(cid), 2)
                                	return true
                           end
					else
                        	doPlayerSendCancel(cid, "You need pokemon to use attacks.")
					     doSendMagicEffect(getCreaturePosition(cid), 2)
                        	return true
			    	end

       end
return true
end

 

Configurando :

 

1° para adicionar mais ataques é simples na parte de loca pokes = {

vcs vão adicionar a magia..

 

Se o Ataque for de distancia :

["Bulbasaur"] = {attackname = "Quick Attack", level = 20, storage = 2000, cd = 5, atkmin = 20, atkmax = 40, range = 8, typeattack = "distance", effecta = 0 , effectd = 0, type = COMBAT_PHYSICALDAMAGE} -- distancia

se for de area :

["Bulbasaur"] = {attackname = "Quick Attack", level = 20, storage = 2000, cd = 5, atkmin = 20, atkmax = 40, range = 8, typeattack = "area", arr = arr1, effecta = 0, type = COMBAT_PHYSICALDAMAGE} -- area

se for de direção :

["Bulbasaur"] = {attackname = "Quick Attack", level = 20, storage = 2000, cd = 5, atkmin = 20, atkmax = 40, range = 1, typeattack = "direcion", effectdir0 = 0, effectdir1 = 0, effectdir2 = 0, effectdir3 = 0, type = COMBAT_PHYSICALDAMAGE} -- direcão

se for de ataque em cima do target :

["Bulbasaur"] = {attackname = "Quick Attack", level = 20, storage = 2000, cd = 5, atkmin = 20, atkmax = 40, range = 1, typeattack = "intarget", effecta = 111, type = COMBAT_PHYSICALDAMAGE}

 

Adicionando + areas

para adicionar mais areas só colocar :

local arr1 = {
{1, 1, 1},
{1, 0, 1},
{1, 1, 1},
}

local arr2 = {
{1, 1, 1},
{1, 0, 1},
{1, 1, 1},
}

 

sempre aumentando 1 , e depois na tag do ataque pra usar é só configurar no

arr = arr1

ou

arr = arr2

...

 

Storage e Cd

 

lembrando que na tabela

storage = 2000

cada attack tem que ter uam storage diferente

e o

cd = 5

é o coldoown pra cada attack, sendo 5 em segundos.

 

Dano

 

para configurar o dano é simples atkmin e atk max...

 

Range

 

range é a distancia ki pode tar pra faser o attaque, sendo 1 para intarget, e o numero de cada sqm do lado para area.

 

attacktype

possiveis tipos : "area", "distance", "intarget", "direcion" -- como assima.

 

 

tá ai, se alguem for capaz de configurar ele, :), seja feliz...

para adicionar + m1 m2 m3 m4 , só copiar e colar

 

tag :

<talkaction words="m1" hide="yes" event="script" value="m1.lua"/>

 

#Créditos

Mock , pela função doSendMagicEffectInArea

MatheusMkalo pela função getTime(s)

 

 

 

Fuiii...

 

Ajudei REP+

 

brow se possivel me passa a talkaction do solar beam cara ja tentei de tudo so que não sou scripts nem tenho conhecimento na aria

 

 

 

Link para o comentário
Compartilhar em outros sites

×
×
  • Criar Novo...