Ir para conteúdo
Entre para seguir isso  
Ribas1574

Montaria como do Tibia

Recommended Posts

Ribas1574    1
Ribas1574

  • Nome do Sistema: Dominação de Montarias 8.70
  • Autor: ruda (OtLand)
  • Testado em: TFS 0.2.9
  • Descrição(Descrição original): Isto é como o Tibia real, mas não 100% (acho que no tibia global as chances aumentam de acordo com a saúde do monstro. Vou prestar-lhe)
  • Informações Adicionais: Use o item no monstro que deseja dominar(somente do Global), mais... O monstro tem chance de fugir(desaparecer) ou do seu item quebrar(sumir).

Vamos ao que interessa:

Vá em:

Seu Ot\data\actions\scripts

Crie um arquivo .lua e cole isto dentro:

--taming monsters by ruda from otland
local function tameMonster(cid, item, itemEx, tame, run, broken)
n = math.random(100)
if n <= broken then
	doCreatureSay(cid, "Lost item", TALKTYPE_ORANGE_1)
	doRemoveItem(item.uid)
elseif n > broken and n <= (tame+broken) then
	doRemoveItem(item.uid)
	doCreatureSay(cid, "You tamed", TALKTYPE_ORANGE_1)
	doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You tamed "..getCreatureName(itemEx.uid)..".")
	return true
elseif n > (tame+broken) and n <= (tame+broken+run) then
	doCreatureSay(cid, "Fled", TALKTYPE_ORANGE_1)
	doRemoveCreature(itemEx.uid)
else
	doCreatureSay(cid, "Try again", 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 = 13322, name = "wailing widow", id = 1, 			tame=10, run=39, broken=51},
{item = 13313, name = "terror bird", id = 2, 			tame=10, run=39, broken=51},
{item = 5907, name = "bear", id = 3, 				tame=7, run=39, broken=54},
{item = 13310, name = "black sheep", id = 4,		 	tame=7, run=35, broken=58},
{item = 13308, name = "midnight panther", id = 5, 		tame=10, run=39, broken=51},
{item = 13309, name = "draptor", id = 6, 				tame=10, run=39, broken=51},
{item = 13320, name = "crustacea gigantica", id = 7, 	tame=10, run=39, broken=51},
{item = 13262, name = "boar", id = 10, 					tame=10, run=39, broken=51},
{item = 13306, name = "undead cavebear", id = 12, 		tame=10, run=39, broken=51}
}

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

 

Agora abra:

Seu Ot\data\actions\actions.xml

E cole isto dentro:

<action itemid="13310" script="mounts.lua"/> --reins
<action itemid="13309" script="mounts.lua"/> --harness
<action itemid="13308" script="mounts.lua"/> --leather whip
<action itemid="13313" script="mounts.lua"/> --carrot on a stick
<action itemid="13262" script="mounts.lua"/> --hunting horn
<action itemid="13320" script="mounts.lua"/> --Giant Shrimp
<action itemid="13306" script="mounts.lua"/> --Maxilla Maximus
<action itemid="5907" script="mounts.lua"/> --Slingshot
<action itemid="13322" script="mounts.lua"/> --Sweet Smelling Bait

 

  • Algumas coisas básicas para configuração:
    item = itemID necessária para domar o monstro (se você mudar, mude actions.xml também)
    name = nome do monstro (NÃO NOME DA MONTARIA)
    id = ID de montaria (em XML\mounts.xml)
    tame = possibilidade de domar o monstro
    run = possibilidade do monstro correr.
    broken = possibilidade de perda de item.

Agora pra finalizar, os items:

	<item id="13306" name="maxilla maximus" article="a">
	<attribute key="description" value="A hermit near Carlin might be able to tell you more about it." />
	<attribute key="weight" value="200" />
</item>
<item id="13307" name="tin key" article="a">
	<attribute key="description" value="A hermit near Carlin might be able to tell you more about it." />
	<attribute key="weight" value="200" />
</item>
<item id="13308" name="leather whip" article="a">
	<attribute key="description" value="A hermit near Carlin might be able to tell you more about it." />
	<attribute key="weight" value="200" />
</item>
<item id="13309" name="harness" article="a">
	<attribute key="description" value="A hermit near Carlin might be able to tell you more about it." />
	<attribute key="weight" value="200" />
</item>
<item id="13310" name="reins" article="a">
	<attribute key="description" value="A hermit near Carlin might be able to tell you more about it." />
	<attribute key="weight" value="200" />
</item>
<item id="13313" name="carrot on a stick" article="a">
	<attribute key="description" value="A hermit near Carlin might be able to tell you more about it." />
	<attribute key="weight" value="200" />
</item>
<item id="13320" name="giant shrimp" article="a">
	<attribute key="description" value="A hermit near Carlin might be able to tell you more about it." />
	<attribute key="weight" value="200" />
</item>
<item id="13322" name="sweet smelling bait" article="a">
	<attribute key="description" value="A hermit near Carlin might be able to tell you more about it." />
	<attribute key="weight" value="200" />
</item>
<item id="13262" name="hunting horn" article="a">
	<attribute key="description" value="A hermit near Carlin might be able to tell you more about it." />
	<attribute key="weight" value="200" />
</item>

 

Créditos:

Eu - Tradução e formatação

ruda - por fazer o script

 

Gostou ? doe ou clique em Rep+ :meliga:

Compartilhar este post


Link para o post
Dollar    0
Dollar

Aprovado, obrigado pela contribuição.

Tópico remunerado em 25 V$ - Action Intermediária.

Editado por Garou

Compartilhar este post


Link para o post
JhonnyMotta    0
JhonnyMotta

Finalmente saiu, :)

Bom Script, parabens ao criador ! :*

Compartilhar este post


Link para o post
Ribas1574    1
Ribas1574

obg pela aprovação ;]

Compartilhar este post


Link para o post
dxloko    3
dxloko

Script muito bom, bem semelhante ao "origianal, global" so n conseguir intender como configura as chances de domar ou n o bixo seria nessa parte do script

tame=10, run=39, broken=51

 

Valew por trazer pra nós!!

Compartilhar este post


Link para o post
scrath    0
scrath
Script muito bom, bem semelhante ao "origianal, global" so n conseguir intender como configura as chances de domar ou n o bixo seria nessa parte do script

 

 

Valew por trazer pra nós!!

 

 

tame=10, run=39, broken=51

 

10% de chance de você conseguir domar o monstro, 39% de chance de ele fugir e 51% de chance do item quebrar, totalizando 100%.

Compartilhar este post


Link para o post
Ribas1574    1
Ribas1574
tame=10, run=39, broken=51

 

10% de chance de você conseguir domar o monstro, 39% de chance de ele fugir e 51% de chance do item quebrar, totalizando 100%.

isso mesmo (:

Compartilhar este post


Link para o post
Fir3z_    3
Fir3z_

ahh se meu sv fosse 8.70...

Compartilhar este post


Link para o post
iuniX    4
iuniX

Muito bom, eu tentei fazer um desse. Mas não deu muito certo e eu tava com preguiça de pensar em algo melhor.

xD

Compartilhar este post


Link para o post
Ribas1574    1
Ribas1574
ahh se meu sv fosse 8.70...

 

hahaha, mude a versão ué rs

 

@iunix

agr tem um perfeito :]

Compartilhar este post


Link para o post
Apocalipse10    0
Apocalipse10

mano sem maldade fais uma video aula sei lá vlw

Compartilhar este post


Link para o post
LsM    2
LsM

Legal, ainda não tinha visto esse script

 

@Apocalypse10

 

OMG

Compartilhar este post


Link para o post
Apocalipse10    0
Apocalipse10

a mano so novato nessa parte de script =D

Compartilhar este post


Link para o post
alline123    0
alline123

Dúvida... esse script funciona em 8.60?

Compartilhar este post


Link para o post
iuniX    4
iuniX
Dúvida... esse script funciona em 8.60?

Nome do Sistema: Dominação de Montarias 8.70

 

Não existe montarias em 8.6 ...

Compartilhar este post


Link para o post
Gordiinho    0
Gordiinho

bom se eu kizer ele 100% pra pegar e n escapar e n kebrar coloco assim isso?

"tame=100, run=0, broken=0"

Compartilhar este post


Link para o post
iuniX    4
iuniX
bom se eu kizer ele 100% pra pegar e n escapar e n kebrar coloco assim isso?

"tame=100, run=0, broken=0"

sim..

Compartilhar este post


Link para o post
joaozinhoeusoueu    0
joaozinhoeusoueu

pra ativar as montarias eh como no global? via outfit?

Compartilhar este post


Link para o post
LucianoRS    0
LucianoRS

se eu quiser por em um Ot de versão anterior, alem das sprites das montarias, tem mais alguma coisa que tenho que adicionar, tipo um codigo proprio para isso? ou só por o seu e funciona?

Compartilhar este post


Link para o post
Ribas1574    1
Ribas1574
se eu quiser por em um Ot de versão anterior, alem das sprites das montarias, tem mais alguma coisa que tenho que adicionar, tipo um codigo proprio para isso? ou só por o seu e funciona?

 

que eu saiba só pega em 8.70++ ¬¬

 

Nome do Sistema: Dominação de Montarias [color="orange"][size="6"]8.70[/size][/color]

 

pra ativar as montarias eh como no global? via outfit?

 

sim

 

//Patrick Ribas

Compartilhar este post


Link para o post
Visitante
Este tópico está impedido de receber novos posts.
Entre para seguir isso  
  • Quem Está Navegando   0 membros estão online

    Nenhum usuário registrado visualizando esta página.

×