Ir para conteúdo
  • Cadastre-se

Normal Vocação para usar action!


Posts Recomendados

Olá galera do Tk, tenho o seguinte script:

local function tameMonster(cid, item, itemEx, tame, run, broken)
        n = math.random(100)
           if n <= broken then
		doCreatureSay(cid, "O item quebrou! :@", TALKTYPE_ORANGE_1)
		doRemoveItem(item.uid)
	elseif n > broken and n <= (tame+broken) then
		doRemoveItem(item.uid)
		doCreatureSay(cid, "Montado com sucesso! :D", TALKTYPE_ORANGE_1)
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Voce domou com sucesso "..getCreatureName(itemEx.uid)..".")
		return true
	elseif n > (tame+broken) and n <= (tame+broken+run) then
		doCreatureSay(cid, "O monstro escapou", TALKTYPE_ORANGE_1)
		doRemoveCreature(itemEx.uid)
	else
		doCreatureSay(cid, "Tente denovo!! :(", TALKTYPE_ORANGE_1)
	end
	return false
end

local function inArray(table, value)
	for i,v in pairs(table) do
		if (v.name == string.lower(value)) then
			return i
		end
	end
	return 0
end

 local mounts = {
 {item = 13307, name = "wailing widow", id = 1, tame=60, run=20, broken=20},
 {item = 13298, name = "terror bird", id = 2, tame=40, run=20, broken=40},
 {item = 5907, name = "bear", id = 3, tame=90, run=5, broken=5},
 {item = 13295, name = "black sheep", id = 4, tame=40, run=30, broken=30},
 {item = 13293, name = "midnight panther", id = 5, tame=60, run=20, broken=20},
 {item = 13538, name = "panda", id = 19, tame=50, run=25, broken=25},
 {item = 13539, name = "enraged white deer", id = 18, tame=70, run=15, broken=15},
 {item = 13294, name = "draptor", id = 6, tame=60, run=20, broken=20},
 {item = 13537, name = "donkey", id =13, tame=40, run=30, broken=30},
 {item = 13305, name = "crustacea gigantica", id = 7, tame=80, run=10, broken=10},
 {item = 13536, name = "crystal wolf", id = 16, tame=60, run=20, broken=20},
 {item = 13247, name = "boar", id = 10, tame=80, run=10, broken=10},
 {item = 13498, name = "sandstone scorpion", id = 21, tame=70, run=10, broken=20},
 {item = 13508, name = "slug", id = 14, tame=60, run=20, broken=20},
 {item = 13535, name = "dromedary", id = 20, tame=60, run=20, broken=20},
 {item = 13291, name = "undead cavebear", id = 12, tame=70, run=10, broken=20},
 {item = 13939, name = "fire horse", id = 22, tame=60, run=20, broken=20},
 {item = 13939, name = "gray horse", id = 29, tame=60, run=20, broken=20},
 {item = 13939, name = "brown war horse", id = 17, tame=60, run=20, broken=20},
 {item = 15546, name = "lady bug", id = 27, tame=70, run=10, broken=20},
 {item = 15545, name = "manta", id = 28, tame=60, run=20, broken=20},
 {item = 13938, name = "uniwheel", id = 15, tame=70, run=15, broken=15},
 {item = 13292, name = "tin lizzard", id = 8, tame=70, run=15, broken=15},
 {item = 15546, name = "lady bug", id = 27, tame=70, run=15, broken=15},
 {item = 15545, name = "manta ray", id = 28, tame=70, run=15, broken=15},
 {item = 18447, name = "ironblight", id = 30, tame=70, run=15, broken=15},
 {item = 18448, name = "magma crawler", id = 31, tame=70, run=15, broken=15},
 {item = 18449, name = "dragonling", id = 32, tame=70, run=15, broken=15},
 {item = 18516, name = "gnarlhound", id = 33, tame=70, run=15, broken=15},

 }
 

 function onUse(cid, item, fromPosition, itemEx, toPosition)
 if isCreature(itemEx.uid) then
 if inArray(mounts, getCreatureName(itemEx.uid)) > 0 then
 i = inArray(mounts, getCreatureName(itemEx.uid))
 if item.itemid == mounts[i].item and not getPlayerMount(cid, mounts[i].id) then
 if tameMonster(cid, item, itemEx, mounts[i].tame, mounts[i].run, mounts[i].broken) then
 doSendMagicEffect(fromPosition, CONST_ME_MAGIC_BLUE)
 doRemoveCreature(itemEx.uid)
 doPlayerAddMount(cid, mounts[i].id)
 else
 doSendMagicEffect(toPosition, CONST_ME_POFF)
 end
 end
 end
 end
 return true
 end

Gostaria de deixa-lo para apenas determinadas vocações usarem, ex: só paladin e knight podem domar, obrigado desde já!

Link para o post
Compartilhar em outros sites
23 minutos atrás, sanf disse:

Olá galera do Tk, tenho o seguinte script:


local function tameMonster(cid, item, itemEx, tame, run, broken)
        n = math.random(100)
           if n <= broken then
		doCreatureSay(cid, "O item quebrou! :@", TALKTYPE_ORANGE_1)
		doRemoveItem(item.uid)
	elseif n > broken and n <= (tame+broken) then
		doRemoveItem(item.uid)
		doCreatureSay(cid, "Montado com sucesso! :D", TALKTYPE_ORANGE_1)
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Voce domou com sucesso "..getCreatureName(itemEx.uid)..".")
		return true
	elseif n > (tame+broken) and n <= (tame+broken+run) then
		doCreatureSay(cid, "O monstro escapou", TALKTYPE_ORANGE_1)
		doRemoveCreature(itemEx.uid)
	else
		doCreatureSay(cid, "Tente denovo!! :(", TALKTYPE_ORANGE_1)
	end
	return false
end

local function inArray(table, value)
	for i,v in pairs(table) do
		if (v.name == string.lower(value)) then
			return i
		end
	end
	return 0
end

 local mounts = {
 {item = 13307, name = "wailing widow", id = 1, tame=60, run=20, broken=20},
 {item = 13298, name = "terror bird", id = 2, tame=40, run=20, broken=40},
 {item = 5907, name = "bear", id = 3, tame=90, run=5, broken=5},
 {item = 13295, name = "black sheep", id = 4, tame=40, run=30, broken=30},
 {item = 13293, name = "midnight panther", id = 5, tame=60, run=20, broken=20},
 {item = 13538, name = "panda", id = 19, tame=50, run=25, broken=25},
 {item = 13539, name = "enraged white deer", id = 18, tame=70, run=15, broken=15},
 {item = 13294, name = "draptor", id = 6, tame=60, run=20, broken=20},
 {item = 13537, name = "donkey", id =13, tame=40, run=30, broken=30},
 {item = 13305, name = "crustacea gigantica", id = 7, tame=80, run=10, broken=10},
 {item = 13536, name = "crystal wolf", id = 16, tame=60, run=20, broken=20},
 {item = 13247, name = "boar", id = 10, tame=80, run=10, broken=10},
 {item = 13498, name = "sandstone scorpion", id = 21, tame=70, run=10, broken=20},
 {item = 13508, name = "slug", id = 14, tame=60, run=20, broken=20},
 {item = 13535, name = "dromedary", id = 20, tame=60, run=20, broken=20},
 {item = 13291, name = "undead cavebear", id = 12, tame=70, run=10, broken=20},
 {item = 13939, name = "fire horse", id = 22, tame=60, run=20, broken=20},
 {item = 13939, name = "gray horse", id = 29, tame=60, run=20, broken=20},
 {item = 13939, name = "brown war horse", id = 17, tame=60, run=20, broken=20},
 {item = 15546, name = "lady bug", id = 27, tame=70, run=10, broken=20},
 {item = 15545, name = "manta", id = 28, tame=60, run=20, broken=20},
 {item = 13938, name = "uniwheel", id = 15, tame=70, run=15, broken=15},
 {item = 13292, name = "tin lizzard", id = 8, tame=70, run=15, broken=15},
 {item = 15546, name = "lady bug", id = 27, tame=70, run=15, broken=15},
 {item = 15545, name = "manta ray", id = 28, tame=70, run=15, broken=15},
 {item = 18447, name = "ironblight", id = 30, tame=70, run=15, broken=15},
 {item = 18448, name = "magma crawler", id = 31, tame=70, run=15, broken=15},
 {item = 18449, name = "dragonling", id = 32, tame=70, run=15, broken=15},
 {item = 18516, name = "gnarlhound", id = 33, tame=70, run=15, broken=15},

 }
 

 function onUse(cid, item, fromPosition, itemEx, toPosition)
 if isCreature(itemEx.uid) then
 if inArray(mounts, getCreatureName(itemEx.uid)) > 0 then
 i = inArray(mounts, getCreatureName(itemEx.uid))
 if item.itemid == mounts[i].item and not getPlayerMount(cid, mounts[i].id) then
 if tameMonster(cid, item, itemEx, mounts[i].tame, mounts[i].run, mounts[i].broken) then
 doSendMagicEffect(fromPosition, CONST_ME_MAGIC_BLUE)
 doRemoveCreature(itemEx.uid)
 doPlayerAddMount(cid, mounts[i].id)
 else
 doSendMagicEffect(toPosition, CONST_ME_POFF)
 end
 end
 end
 end
 return true
 end

Gostaria de deixa-lo para apenas determinadas vocações usarem, ex: só paladin e knight podem domar, obrigado desde já!

local function tameMonster(cid, item, itemEx, tame, run, broken)
        n = math.random(100)
           if n <= broken then
		doCreatureSay(cid, "O item quebrou! :@", TALKTYPE_ORANGE_1)
		doRemoveItem(item.uid)
	elseif n > broken and n <= (tame+broken) then
		doRemoveItem(item.uid)
		doCreatureSay(cid, "Montado com sucesso! :D", TALKTYPE_ORANGE_1)
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Voce domou com sucesso "..getCreatureName(itemEx.uid)..".")
		return true
	elseif n > (tame+broken) and n <= (tame+broken+run) then
		doCreatureSay(cid, "O monstro escapou", TALKTYPE_ORANGE_1)
		doRemoveCreature(itemEx.uid)
	else
		doCreatureSay(cid, "Tente denovo!! :(", TALKTYPE_ORANGE_1)
	end
	return false
end

local function inArray(table, value)
	for i,v in pairs(table) do
		if (v.name == string.lower(value)) then
			return i
		end
	end
	return 0
end

 local mounts = {
 {item = 13307, name = "wailing widow", id = 1, tame=60, run=20, broken=20},
 {item = 13298, name = "terror bird", id = 2, tame=40, run=20, broken=40},
 {item = 5907, name = "bear", id = 3, tame=90, run=5, broken=5},
 {item = 13295, name = "black sheep", id = 4, tame=40, run=30, broken=30},
 {item = 13293, name = "midnight panther", id = 5, tame=60, run=20, broken=20},
 {item = 13538, name = "panda", id = 19, tame=50, run=25, broken=25},
 {item = 13539, name = "enraged white deer", id = 18, tame=70, run=15, broken=15},
 {item = 13294, name = "draptor", id = 6, tame=60, run=20, broken=20},
 {item = 13537, name = "donkey", id =13, tame=40, run=30, broken=30},
 {item = 13305, name = "crustacea gigantica", id = 7, tame=80, run=10, broken=10},
 {item = 13536, name = "crystal wolf", id = 16, tame=60, run=20, broken=20},
 {item = 13247, name = "boar", id = 10, tame=80, run=10, broken=10},
 {item = 13498, name = "sandstone scorpion", id = 21, tame=70, run=10, broken=20},
 {item = 13508, name = "slug", id = 14, tame=60, run=20, broken=20},
 {item = 13535, name = "dromedary", id = 20, tame=60, run=20, broken=20},
 {item = 13291, name = "undead cavebear", id = 12, tame=70, run=10, broken=20},
 {item = 13939, name = "fire horse", id = 22, tame=60, run=20, broken=20},
 {item = 13939, name = "gray horse", id = 29, tame=60, run=20, broken=20},
 {item = 13939, name = "brown war horse", id = 17, tame=60, run=20, broken=20},
 {item = 15546, name = "lady bug", id = 27, tame=70, run=10, broken=20},
 {item = 15545, name = "manta", id = 28, tame=60, run=20, broken=20},
 {item = 13938, name = "uniwheel", id = 15, tame=70, run=15, broken=15},
 {item = 13292, name = "tin lizzard", id = 8, tame=70, run=15, broken=15},
 {item = 15546, name = "lady bug", id = 27, tame=70, run=15, broken=15},
 {item = 15545, name = "manta ray", id = 28, tame=70, run=15, broken=15},
 {item = 18447, name = "ironblight", id = 30, tame=70, run=15, broken=15},
 {item = 18448, name = "magma crawler", id = 31, tame=70, run=15, broken=15},
 {item = 18449, name = "dragonling", id = 32, tame=70, run=15, broken=15},
 {item = 18516, name = "gnarlhound", id = 33, tame=70, run=15, broken=15},

 }
 

 function onUse(cid, item, fromPosition, itemEx, toPosition)
	 if isCreature(itemEx.uid) then
		if isPaladin(cid) or isKnight(cid) then
			 if inArray(mounts, getCreatureName(itemEx.uid)) > 0 then
			 i = inArray(mounts, getCreatureName(itemEx.uid))
				 if item.itemid == mounts[i].item and not getPlayerMount(cid, mounts[i].id) then
					 if tameMonster(cid, item, itemEx, mounts[i].tame, mounts[i].run, mounts[i].broken) then
						doSendMagicEffect(fromPosition, CONST_ME_MAGIC_BLUE)
						doRemoveCreature(itemEx.uid)
						doPlayerAddMount(cid, mounts[i].id)
					 else
						doSendMagicEffect(toPosition, CONST_ME_POFF)
					 end
				 end
			 end
		else
			doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, "Somente knights e paladins podem usar o item.")
		end
	 end
 return true
 end

 

asdukeeh.jpg

Link para o post
Compartilhar em outros sites

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

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emojis são permitidos.

×   Seu link foi automaticamente incorporado.   Mostrar como link

×   Seu conteúdo anterior foi restaurado.   Limpar o editor

×   Não é possível colar imagens diretamente. Carregar ou inserir imagens do URL.

  • Quem Está Navegando   0 membros estão online

    Nenhum usuário registrado visualizando esta página.

  • Conteúdo Similar

    • Por Jaurez
      .
    • Por Cat
      Em alguns casos, o tibia 8.60 comum não abre de jeito nenhum no map editor, mesmo desmarcando check file signatures e configurando o path corretamente.
       
      Este é o client 8.60 adaptado para o Remere's Map Editor. Resolvi postar já que ele foi removido do site oficial do RME. (ficou apenas a versão para linux lá)
      Se estiver tendo problemas para abrir a versão 8.60, tente utilizar este.
                                                                                                                     
      Baixar o Tibia Client 8.60 que funciona no Remere’s Map Editor
      Essa versão do Tibia 8.60 client resolve o erro unsupported client version ou Could not locate tibia.dat and/or tibia.spr, please navigate to your tibia 8.60 installation folder.
       
      Downloads
      https://tibiaking.com/applications/core/interface/file/attachment.php?id=47333

      Scan: https://www.virustotal.com/gui/file/333e172ac49ba2028db9eb5889994509e7d2de28ebccfa428c04e86defbe15cc
       
    • Por danilo belato
      Fala Galera To Com um problema aki 
       
      quero exporta umas sprites de um server para colocar em outro 
       
      eu clico na sprites ai aparece tds a forma delas do lado de la >>
       
      ai eu clico nela e ponho a opiçao de export mais quando salvo a sprite ela n abri 
       
      aparece isso quando tento vê-la 
       
      visualização não disponível ( no formatos png e bitmap)
       
      Agora no formato idc fala que o paint n pode ler 
       
      me ajudem ae...
    • Por Vitor Bicaleto
      Galera to com o script do addon doll aqui, quando eu digito apenas "!addon" ele aparece assim: Digite novamente, algo está errado!"
      quando digito por exemplo: "!addon citizen" ele não funciona e não da nenhum erro
       
      mesma coisa acontece com o mount doll.. 
    • Por Ayron5
      Substitui uma stone no serve, deu tudo certo fora  esse  erro ajudem  Valendo  Rep+  Grato  

      Erro: data/actions/scripts/boost.lua:557: table index is nil
       [Warning - Event::loadScript] Cannot load script (data/actions/scripts/boost.lua)

      Script:
×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo