Ir para conteúdo

Featured Replies

Postado

precisa de uma ajuda aqui nesse script, preciso que o player só consiga usar a barrinha pra transformar de novo após 15 segundos 

 

Spoiler

	elseif opcode == opcodes.OPCODE_DITTO_MEMORY then
		 local item = getPlayerSlotItem(cid, 8)
			if item.uid == 0 then doSendMsg(cid, "Put your shiny ditto in correct place.") return true end
		 local pokeName = getItemAttribute(item.uid, "poke")
			if pokeName ~= "Shiny Ditto" then return true end
			if isInArray({"saveMemory1", "saveMemory2", "saveMemory3"}, buffer) then
			   local copyName = getItemAttribute(item.uid, "copyName")
			   if pokeName == copyName then doSendMsg(cid, "Transform your Ditto.") return true end
			   if isPokeInSlots(getItemAttribute(item.uid, "memoryDitto"), doCorrectString(copyName)) then doSendMsg(cid, "This copy is already saved in a slot.") return true end
				   if buffer == "saveMemory1" then
					   doItemSetAttribute(item.uid, "memoryDitto", saveSlot(getItemAttribute(item.uid, "memoryDitto"), 1, getItemInfo(fotos[doCorrectString(copyName)]).clientId)) -- getPortraitClientID(doCorrectString(copyName))))
				   elseif buffer == "saveMemory2" then
					   doItemSetAttribute(item.uid, "memoryDitto", saveSlot(getItemAttribute(item.uid, "memoryDitto"), 2, getItemInfo(fotos[doCorrectString(copyName)]).clientId))
				   elseif buffer == "saveMemory3" then
					   doItemSetAttribute(item.uid, "memoryDitto", saveSlot(getItemAttribute(item.uid, "memoryDitto"), 3, getItemInfo(fotos[doCorrectString(copyName)]).clientId))
				   end
			elseif isInArray({"clearSlot1", "clearSlot2", "clearSlot3"}, buffer) then
				  if buffer == "clearSlot1" then
					   doItemSetAttribute(item.uid, "memoryDitto", saveSlot(getItemAttribute(item.uid, "memoryDitto"), 1, "?"))
				   elseif buffer == "clearSlot2" then
					   doItemSetAttribute(item.uid, "memoryDitto", saveSlot(getItemAttribute(item.uid, "memoryDitto"), 2, "?"))
				   elseif buffer == "clearSlot3" then
					   doItemSetAttribute(item.uid, "memoryDitto", saveSlot(getItemAttribute(item.uid, "memoryDitto"), 3, "?"))
				   end
				   
			elseif isInArray({"use1", "use2", "use3"}, buffer) then
				  local summons = getCreatureSummons(cid)
				  if #summons < 1 then doSendMsg(cid, "Call your ditto.") return true end
				  local pokeToTransform = getSlot(getItemAttribute(item.uid, "memoryDitto"), tonumber(buffer:explode("use")[1]))
				  doCopyPokemon(summons[1], pokeToTransform, true)
			end
			   
			   
			local memory = getItemAttribute(item.uid, "memoryDitto")
				  if not memory or memory == nil then
					 doItemSetAttribute(item.uid, "memoryDitto", "?|?|?")
					 memory = getItemAttribute(item.uid, "memoryDitto")
				  end
			local memoryOne, memoryTwo, memoryTree = memory:explode("|")[1], memory:explode("|")[2], memory:explode("|")[3]
			
			local str = memoryOne .. "-".. memoryTwo .."-" .. memoryTree
				  doSendPlayerExtendedOpcode(cid, opcodes.OPCODE_DITTO_MEMORY, str)

 

 

 

alguém consegue me ajudar nisso?

Participe da conversa

Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.

Visitante
Responder

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Conteúdo Similar

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.6k

Informação Importante

Confirmação de Termo