Ir para conteúdo

[Encerrado] Erro no move1.lua


tentando helder

Posts Recomendados

[11/09/2018 03:10:24] [Error - TalkAction Interface] 
[11/09/2018 03:10:24] data/talkactions/scripts/move1.lua:onSay
[11/09/2018 03:10:24] Description: 
[11/09/2018 03:10:24] (luaDoItemSetAttribute) Item not found

 

o erro ocorre depois que  usa  a mega stone no pokemon e  transforma ele  em mega.

 

 

meu script    //////////////////////////////////////////////////////////////////////////

move1.lua

7 horas atrás, tentando helder disse:

Versão do Servidor: TFS - 0.3.5

Versão do Servidor: TFS - 0.3.6 <-> na vdd  mas o fórum não permite  poh.

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

local msgs = {"use ", ""}

function doAlertReady(cid, id, movename, n, cd)
	if not isCreature(cid) then return true end
	local myball = getPlayerSlotItem(cid, 8)
	if myball.itemid > 0 and getItemAttribute(myball.uid, cd) == "cd:"..id.."" then
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, getPokeballName(myball.uid).." - "..movename.." (m"..n..") is ready!")
	return true
	end
	local p = getPokeballsInContainer(getPlayerSlotItem(cid, 3).uid)
	if not p or #p <= 0 then return true end
	for a = 1, #p do
		if getItemAttribute(p[a], cd) == "cd:"..id.."" then
			doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, getPokeballName(p[a]).." - "..movename.." (m"..n..") is ready!")
		return true
		end
	end
end

function onSay(cid, words, param, channel)
	if param ~= "" then return true end
	
	if string.len(words) > 3 then return true end
	
	if #getCreatureSummons(cid) == 0 then
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You need a pokemon to use moves.")
		return 0
	end
                      --alterado v1.5
	local mypoke = getCreatureSummons(cid)[1]
	local item = getPlayerSlotItem(cid, 8)
	if not item then return false end
	
	if getCreatureCondition(cid, CONDITION_EXHAUST) then return true end
	
	if getCreatureName(mypoke) == "Evolution" then return true end
	
	local name = getItemAttribute(item.uid, "poke")
	local copy = getItemAttribute(item.uid, "copyName") or ""
	
	if isInArray({"ditto", "shiny ditto"}, copy:lower()) then
	   return true
	end
	
    if getItemAttribute(item.uid, "copyName") then -- ditto system
        name = getItemAttribute(item.uid, "copyName")
	elseif  isMega(mypoke) then  --alterado v1.9
	    name = getPlayerStorageValue(mypoke, storages.isMega)
    end  
	
    --local name = getCreatureName(mypoke) == "Ditto" and getPlayerStorageValue(mypoke, 1010) or getCreatureName(mypoke)

	local it = string.sub(words, 2, 3)
	local tablemove = movestable[name]

	--------------SMEARGLETABLE
	if name == "Smeargle" then
	local move1 = getItemAttribute(item.uid, "Sketch1")
	local move2 = getItemAttribute(item.uid, "Sketch2")
	local move3 = getItemAttribute(item.uid, "Sketch3")
	local move4 = getItemAttribute(item.uid, "Sketch4")
	local move5 = getItemAttribute(item.uid, "Sketch5")
	local move6 = getItemAttribute(item.uid, "Sketch6")
	local move7 = getItemAttribute(item.uid, "Sketch7")
	local move8 = getItemAttribute(item.uid, "Sketch8")

	local movename1, movecd1, moveforce1, movetype1, movetarget1, movelevel1, movedist1 = string.explode(move1, "|")[1], string.explode(move1, "|")[2], string.explode(move1, "|")[3], string.explode(move1, "|")[4], string.explode(move1, "|")[5], string.explode(move1, "|")[6], string.explode(move1, "|")[7]
	local movename2, movecd2, moveforce2, movetype2, movetarget2, movelevel2, movedist2 = string.explode(move2, "|")[1], string.explode(move2, "|")[2], string.explode(move2, "|")[3], string.explode(move2, "|")[4], string.explode(move2, "|")[5], string.explode(move2, "|")[6], string.explode(move2, "|")[7]
	local movename3, movecd3, moveforce3, movetype3, movetarget3, movelevel3, movedist3 = string.explode(move3, "|")[1], string.explode(move3, "|")[2], string.explode(move3, "|")[3], string.explode(move3, "|")[4], string.explode(move3, "|")[5], string.explode(move3, "|")[6], string.explode(move3, "|")[7]
	local movename4, movecd4, moveforce4, movetype4, movetarget4, movelevel4, movedist4 = string.explode(move4, "|")[1], string.explode(move4, "|")[2], string.explode(move4, "|")[3], string.explode(move4, "|")[4], string.explode(move4, "|")[5], string.explode(move4, "|")[6], string.explode(move4, "|")[7]
	local movename5, movecd5, moveforce5, movetype5, movetarget5, movelevel5, movedist5 = string.explode(move5, "|")[1], string.explode(move5, "|")[2], string.explode(move5, "|")[3], string.explode(move5, "|")[4], string.explode(move5, "|")[5], string.explode(move5, "|")[6], string.explode(move5, "|")[7]
	local movename6, movecd6, moveforce6, movetype6, movetarget6, movelevel6, movedist6 = string.explode(move6, "|")[1], string.explode(move6, "|")[2], string.explode(move6, "|")[3], string.explode(move6, "|")[4], string.explode(move6, "|")[5], string.explode(move6, "|")[6], string.explode(move6, "|")[7]
	local movename7, movecd7, moveforce7, movetype7, movetarget7, movelevel7, movedist7 = string.explode(move7, "|")[1], string.explode(move7, "|")[2], string.explode(move7, "|")[3], string.explode(move7, "|")[4], string.explode(move7, "|")[5], string.explode(move7, "|")[6], string.explode(move7, "|")[7]
	local movename8, movecd8, moveforce8, movetype8, movetarget8, movelevel8, movedist8 = string.explode(move8, "|")[1], string.explode(move8, "|")[2], string.explode(move8, "|")[3], string.explode(move8, "|")[4], string.explode(move8, "|")[5], string.explode(move8, "|")[6], string.explode(move8, "|")[7]


	local smeargletable = {move1 = {name = movename1, level = tonumber(movelevel1), cd = tonumber(movecd1), dist = tonumber(movedist1), target = tonumber(movetarget1), f = tonumber(moveforce1), t = movetype1},
			 move2 = {name = movename2, level = tonumber(movelevel2), cd = tonumber(movecd2), dist = tonumber(movedist2), target = tonumber(movetarget2), f = tonumber(moveforce2), t = movetype2},
			 move3 = {name = movename3, level = tonumber(movelevel3), cd = tonumber(movecd3), dist = tonumber(movedist3), target = tonumber(movetarget3), f = tonumber(moveforce3), t = movetype3},
			 move4 = {name = movename4, level = tonumber(movelevel4), cd = tonumber(movecd4), dist = tonumber(movedist4), target = tonumber(movetarget4), f = tonumber(moveforce4), t = movetype4},
			 move5 = {name = movename5, level = tonumber(movelevel5), cd = tonumber(movecd5), dist = tonumber(movedist5), target = tonumber(movetarget5), f = tonumber(moveforce5), t = movetype5},
			 move6 = {name = movename6, level = tonumber(movelevel6), cd = tonumber(movecd6), dist = tonumber(movedist6), target = tonumber(movetarget6), f = tonumber(moveforce6), t = movetype6},
			 move7 = {name = movename7, level = tonumber(movelevel7), cd = tonumber(movecd7), dist = tonumber(movedist7), target = tonumber(movetarget7), f = tonumber(moveforce7), t = movetype7},
			 move8 = {name = movename8, level = tonumber(movelevel8), cd = tonumber(movecd8), dist = tonumber(movedist8), target = tonumber(movetarget8), f = tonumber(moveforce8), t = movetype8},
			  }
			  tablemove =smeargletable
	end
	--------------SMEARGLETABLE



	if not tablemove then 
		doSendMsg(cid, "Este pokémon não tem spell.")
		return true 
	end

	local move = tablemove.move1
	if getPlayerStorageValue(mypoke, 212123) >= 1 then
	   cdzin = "cm_move"..it..""
	else
	   cdzin = "move"..it..""       --alterado v1.5
	end

	if it == "2" then
		move = tablemove.move2
	elseif it == "3" then
		move = tablemove.move3
	elseif it == "4" then
		move = tablemove.move4
	elseif it == "5" then
		move = tablemove.move5
	elseif it == "6" then
		move = tablemove.move6
	elseif it == "7" then
		move = tablemove.move7
	elseif it == "8" then
		move = tablemove.move8
	elseif it == "9" then
		move = tablemove.move9
	elseif it == "10" then
		move = tablemove.move10
	elseif it == "11" then
		move = tablemove.move11
	elseif it == "12" then
		move = tablemove.move12
	elseif it == "13" then
		move = tablemove.move13
	end

	local heldy = getItemAttribute(item.uid, "yHeldItem")
	if not move or (string.find(move.name, "- ") and not (heldy and string.find(heldy, "MEGA"))) then
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Your pokemon doesn't recognize this move.")
	return true
	end
	
	if not string.find(move.name, "Mega ") then
		if getPlayerLevel(cid) < move.level then
		   doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You need be atleast level "..move.level.." to use this move.")
		   return true
		end

		if getPlayerGroupId(cid) < 4 and getCD(item.uid, cdzin) > 0 and getCD(item.uid, cdzin) < (move.cd + 2) then
			doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have to wait "..getCD(item.uid, cdzin).." seconds to use "..move.name.." again.")
		return true
		end

		if getTileInfo(getThingPos(mypoke)).protection then
			doPlayerSendCancel(cid, "Your pokemon cannot use moves while in protection zone.")
		return true
		end
		
	   if getPlayerStorageValue(mypoke, 3894) >= 1 then
		  return doPlayerSendCancel(cid, "You can't attack because you is with fear") --alterado v1.3
	   end
	end
	                              --alterado v1.6                  
	if (move.name == "Team Slice" or move.name == "Team Claw") and #getCreatureSummons(cid) < 2 then       
	    doPlayerSendCancel(cid, "Your pokemon need be in a team for use this move!")
    return true
    end
	
	if move.passive and move.passive == "sim" then
		return true
	end
         


	if move.target == 1 then

		if not isCreature(getCreatureTarget(cid)) then
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You don\'t have any targets.")
		return 0
		end

		if getCreatureCondition(getCreatureTarget(cid), CONDITION_INVISIBLE) then
		return 0
		end

		if getCreatureHealth(getCreatureTarget(cid)) <= 0 then
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Your have already defeated your target.")
		return 0
		end

		if not isCreature(getCreatureSummons(cid)[1]) then
		return true
		end

		if getDistanceBetween(getThingPos(getCreatureSummons(cid)[1]), getThingPos(getCreatureTarget(cid))) > move.dist then
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Get closer to the target to use this move.")
		return 0
		end

		if not isSightClear(getThingPos(getCreatureSummons(cid)[1]), getThingPos(getCreatureTarget(cid)), false) then
		return 0
		end
	end

	local newid = 0
	
        if isSleeping(mypoke) or isSilence(mypoke) then  --alterado v1.5
			doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Sorry you can't do that right now.")
			return 0
		else
			newid = setCD(item.uid, cdzin, move.cd)
		end
		
	if string.find(move.name, "- ") then
	  doCreatureSay(cid, ""..getPokeName(mypoke)..",  MEGA EVOLUCIONA!!", TALKTYPE_ORANGE_1)
	else
	  doCreatureSay(cid, ""..getPokeName(mypoke)..", "..msgs[math.random(#msgs)]..""..move.name.."!", TALKTYPE_ORANGE_1)
	end
	
    local summons = getCreatureSummons(cid) --alterado v1.6

	--addEvent(doAlertReady, move.cd * 1000, cid, newid, move.name, it, cdzin)
	
	for i = 2, #summons do
       if isCreature(summons[i]) then
          docastspell(summons[i], move.name)        --alterado v1.6
       end
    end 
    docastspell(mypoke, move.name)
	doCreatureAddCondition(cid, playerexhaust)

	if useKpdoDlls then
		doUpdateCooldowns(cid)
	end

return 0
end

 

Link para o comentário
Compartilhar em outros sites

8 minutos atrás, Crypter disse:

@tentando helder Esse é o teu, teste e me diga se está funcionando

[11/09/2018 04:39:18] [Warning - Event::loadScript] Cannot load script (data/talkactions/scripts/move1.lua)
[11/09/2018 04:39:18] data/talkactions/scripts/move1.lua:1: '=' expected near '

 

 

puis pelo bloco de notas, tem algo a ver? se sim qual vc recomenda que uso C++ ?

Link para o comentário
Compartilhar em outros sites

agora foi, porém continua.

[11/09/2018 05:07:13] [Error - TalkAction Interface] 
[11/09/2018 05:07:13] data/talkactions/scripts/move1.lua:onSay
[11/09/2018 05:07:13] Description: 
[11/09/2018 05:07:13] (luaDoItemSetAttribute) Item not found

 

mas descobrir que isso acontece quando uso o atk para o poke  virar mega.

Link para o comentário
Compartilhar em outros sites

7 horas atrás, tentando helder disse:

agora foi, porém continua.

[11/09/2018 05:07:13] [Error - TalkAction Interface] 
[11/09/2018 05:07:13] data/talkactions/scripts/move1.lua:onSay
[11/09/2018 05:07:13] Description: 
[11/09/2018 05:07:13] (luaDoItemSetAttribute) Item not found

 

mas descobrir que isso acontece quando uso o atk para o poke  virar mega.

O Problema está no move e não no move1.lua, pois não tem nenhum doItemSetAttribute no arquivo move1.lua, veja como está a script desse move e poste aqui

Link para o comentário
Compartilhar em outros sites

  • 5 months later...
A questão neste suporte foi encerrada por falta de respostas. Este tópico está fechado e foi movido para Suporte - Tópicos Sem Resposta.

+ Caso a dúvida não tenha sido resolvida você poderá criar outro tópico solicitando ajuda.
* Lembre-se que é permitido dar UP no tópico a cada 24 horas para assim o destacar e manter movimentado.
Link para o comentário
Compartilhar em outros sites

Visitante
Este tópico está impedido de receber novos posts.
  • Quem Está Navegando   0 membros estão online

    • Nenhum usuário registrado visualizando esta página.
×
×
  • Criar Novo...