Ir para conteúdo

Script


Relmans

Posts Recomendados

Ola pessoal estou montando um otserv 8.54 e preciso de uma script que o monstro ataca os players mais os players não poderão atacar o monstro.

 

Se caso isso for possivel serei totalmente grato.

Link para o comentário
Compartilhar em outros sites

Nao e um script mais

 

nimguem consiguira hitar nesse mostro

 

<?xml version="1.0" encoding="UTF-8"?>
<monster name="Nome do bixo" nameDescription="a Nome do bixo" race="venom" experience="650000" speed="1000" manacost="0">
<health now="500000" max="500000"/>
<look type="303" head="20" body="30" legs="40" feet="50" corpse="9780"/>
<targetchange interval="5000" chance="8"/>
<strategy attack="80" defense="20"/>
<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="85"/>
<flag runonhealth="0"/>
</flags>
<attacks>
<attack name="melee" interval="2000" skill="25" attack="30"/>
</attacks>
<defenses armor="35" defense="45"/>
<elements>
<element icePercent="1"/>
<element energyPercent="1"/>
<element deathPercent="1"/>
</elements>
<immunities>
   <immunity physical="1"/>
   <immunity holy="1"/>
   <immunity energy="1"/>
   <immunity fire="1"/>
   <immunity death="1"/>
   <immunity earth="1"/>
   <immunity ice="1"/>
   <immunity poison="1"/>
   <immunity lifedrain="1"/>
   <immunity paralyze="0"/>
   <immunity outfit="1"/>
   <immunity drunk="1"/>
   <immunity invisible="1"/>
</immunities>
<voices interval="5000" chance="10">
<voice sentence="Ahhnn? human? kill everyone? or let live? I am wrong? I am Confused!" yell="1"/>
<voice sentence="where is my leader? Is he on the cover of a book? I am Confused..." yell="1"/>
</voices>
<loot>
<item id="2148" count="100" chance="100000"/> --Gold
<item id="2148" count="50" chance="100000"/> -- Gold
<item id="2152" countmax="6" chance1="80000" chancemax="10000"/> --Platinum
<item id="2144" countmax="28" chance1="7777"/> --Black Pearls
<item id="7440" chance="17000"/> --Mastermind potion
<item id="2323" chance="4500"/> --hat of the made
<item id="8925" chance="4400"/> --Solar axe
<item id="1987" chance="100000">
<inside>
<item id="2151" countmax="13" chance1="6500" chancemax="0"/> --Talons
<item id="8892" chance="6555"/> --ethno coat
<item id="8918" chance="8200"/> --Spellbook of dark mysteries
</inside>
</item>
</loot>
</monster>

 

Se ajudei rep+

Link para o comentário
Compartilhar em outros sites

NOME DO SEU SCRIPT.lua

 


function onCombat(cid, target) 
local monstName = "Rat"  -- nome do monstro
  if (isPlayer(cid) and isMonster(target)) then 
     if string.lower(getCreatureName(target)) == string.lower(monstName) then
        doPlayerSendDefaultCancel(cid, RETURNVALUE_YOUMAYNOTATTACKTHISCREATURE) 
        return FALSE
     else
       return TRUE 
     end
  end 
  return TRUE 
end

 

login.lua adc

 

registerCreatureEvent(cid, "MobNoAttack")

 

creaturescript.xml

<event type="combat" name="MobNoAttack" event="script" value="NOME DO SEU SCRIPT.lua"/>

Link para o comentário
Compartilhar em outros sites

×
×
  • Criar Novo...