Ir para conteúdo

Featured Replies

  • Respostas 8
  • Visualizações 832
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • @gokulord Creio que não são em todos os Books que você pode adicionar um texto. Exemplo:       Nesse ai eu consigo editar mas nesse abaixo não:     isso signific

  • @gokulord   Vai até o xml do mostro e adiciona essa tag : <loot> <item id="8983" countmax="1" chance="100"/><!-- Book --> </loot> onde :          item id="

  • Acredito q oq está pedidindo seria feito por creaturescritp, vou ver se consigo aqui.   Pronto. Dei um a simplificada. em livro = id do livro, text = "texto do tamanho q quiser", c

Posted Images

Postado

Acredito q oq está pedidindo seria feito por creaturescritp, vou ver se consigo aqui.

 

Pronto.

Dei um a simplificada.

em livro = id do livro, text = "texto do tamanho q quiser", chance = porcentagem de drop

sempre que adicionar uma nova linha lembre de colocar virgula

 

adiciona esse script no seu creaturescripts/scripts com o nome de livroloot.lua

-- by Naze to tibia king
local config = {
			{livro = 1950, text = "texto1", chance = 80}, -- ID DO LIVRO, TEXTO DO LIVRO, CHANCE DE DROP 
			{livro = 1955, text = "texto2", chance = 80},
			{livro = 1960, text = "texto3", chance = 80},
			{livro = 1961, text = "texto4", chance = 80}
}

function onDeath(cid, corpse, killers)
	if isMonster(cid) then
	local result = config[math.random(1, #config)]
	if math.random(1,100) <= result.chance then
	local corps = doAddContainerItem(corpse.uid, result.livro, 1)
	doSetItemText(corps, result.text)
	end
	end
return true
end

e essa tag em seu creatuscripts.xml 

 

<event type="death" name="livroloot" event="script" value="livroloot.lua"/>

Agora todos monstro que quiser que dropa ele você tem q adicionar essa tag no final de seu scripts, MAS ANTES DO </monsters>

 

  <script>
  <event name="livroloot"/>
  </script>

 

Por exemplo adicionei no Demon.xml, tem q ficar assim:

Spoiler

<?xml version="1.0" encoding="UTF-8"?>
<monster name="Demon" nameDescription="a demon" race="fire" experience="6000" speed="275" manacost="10000">
  <health now="8200" max="8200"/>
  <look type="35" corpse="5995"/>
  <targetchange interval="5000" chance="8"/>
  <strategy attack="90" defense="10"/>
  <flags>
    <flag summonable="0"/>
    <flag attackable="1"/>
    <flag hostile="1"/>
    <flag illusionable="0"/>
    <flag convinceable="0"/>
    <flag pushable="0"/>
    <flag canpushitems="1"/>
    <flag canpushcreatures="1"/>
    <flag targetdistance="1"/>
    <flag staticattack="90"/>
    <flag runonhealth="0"/>
  </flags>
  <attacks>
    <attack name="melee" interval="2000" skill="100" attack="110"/>
    <attack name="manadrain" interval="2000" chance="13" range="7" min="0" max="-120"/>
    <attack name="fire" interval="2000" chance="30" range="7" radius="7" target="1" min="-150" max="-250">
		<attribute key="shootEffect" value="fire"/>
		<attribute key="areaEffect" value="firearea"/>
	</attack>
    <attack name="firefield" interval="2000" chance="12" range="7" radius="1" target="1">
		<attribute key="shootEffect" value="fire"/>
	</attack>
    <attack name="lifedrain" interval="1000" chance="12" length="8" spread="0" min="-300" max="-467">
		<attribute key="areaEffect" value="purpleenergy"/>
	</attack>
	<attack name="speed" interval="2000" chance="15" target="1" speedchange="-750" duration="30000">
		<attribute key="shootEffect" value="suddendeath"/>
	</attack>
	<attack name="energy" interval="3000" chance="10" range="1" target="1" min="-210" max="-300">
		<attribute key="areaEffect" value="purpleenergy"/>
	</attack>
  </attacks>
  <defenses armor="55" defense="55">
    <defense name="healing" interval="2000" chance="15" min="130" max="240">
      <attribute key="areaEffect" value="blueshimmer"/>
    </defense>
	<defense name="speed" interval="1000" chance="8" speedchange="290" duration="5000">
      <attribute key="areaEffect" value="redshimmer"/>
    </defense>
  </defenses>
	<elements>
		<element physicalPercent="30"/>
		<element energyPercent="50"/>
		<element earthPercent="20"/>
		<element icePercent="-15"/>
		<element holyPercent="-15"/>
		<element deathPercent="20"/>
	</elements>
  <immunities>
    <immunity fire="1"/>
    <immunity drown="1"/>
    <immunity paralyze="1"/>
    <immunity invisible="1"/>
  </immunities>
  <summons maxSummons="1">
    <summon name="fire elemental" interval="1000" chance="12"/>
  </summons>
  <voices interval="5000" chance="10">
    <voice sentence="MUHAHAHAHA!" yell="1"/>
    <voice sentence="I SMELL FEEEEEAAAR!" yell="1"/>
    <voice sentence="CHAMEK ATH UTHUL ARAK!" yell="1"/>
    <voice sentence="Your resistance is futile!"/>
    <voice sentence="Your soul will be mine!" yell="0"/>
  </voices>
  <loot>
 	<item id="2148" countmax="100" chance1="100000" chancemax="0"/> -- gold coins
 	<item id="2148" countmax="100" chance1="100000" chancemax="0"/> -- gold coins
	<item id="2152" countmax="3" chance1="33333" chancemax="2000"/> --Plat
 	<item id="2514" chance="4200"/> --mastermind shield
 	<item id="2472" chance="2000"/> --magic plate armor
	<item id="2795" countmax="6" chance1="7500"/> --Fire Mushroom
 	<item id="5906" countmax="1" chance="2000"/> -- demon dust
	<item id="5954" countmax="1" chance="2345"/> -- demon horn
    <item id="2164" chance="2100"/> --might ring
    <item id="2176" chance="3500"/> --orb
	<item id="1982" chance="1300"/> --purpel tome
    <item id="2165" chance="2300"/> --stealth ring
	<item id="7591" chance="4500"/> -- GHP
 	<item id="1987" chance="100000">
		<inside>
		 	<item id="2393" chance="3800"/> --giantsword
		 	<item id="2432" chance="3800"/> --fire axe
		    <item id="2112" chance="1000"/> --addon doll
			<item id="2396" chance="2600"/> --ice rapier
			<item id="2179" chance="1100"/> --golden ring
			<item id="2795" countmax="6" chance1="13000"/> --fire mushroom
			<item id="2678" countmax="3" chance1="10000" chancemax="0"/> --coconut
			<item id="2148" countmax="100" chance1="100000" chancemax="0"/> -- gold coin
			<item id="2151" countmax="4" chance1="5500" chancemax="0"/>
			<item id="2462" chance="3200"/> --devil helmet
			<item id="2149" countmax="3" chance1="11000" chancemax="0"/>
			<item id="2171" chance="2200"/> --platinum amulet
			<item id="2387" chance="32000"/> --double axe
			<item id="2470" chance="2350"/> --golden legs
			<item id="7382" chance="300"/> -- Demonrage Sword
			<item id="7393" chance="1700"/> -- Demon Trophy
			<item id="2520" chance="4000"/> --demon shield
			<item id="2418" chance="1500"/> --golden sickle
			<item id="2377" chance="6666"/> --two-handed sword
		</inside>
 	</item>
</loot>
  <script>
  <event name="livroloot"/>
  </script>
</monster>

 

 

Editado por Naze
simplificado (veja o histórico de edições)

  • 2 weeks later...

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.

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.6k

Informação Importante

Confirmação de Termo