• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Monster Monster changing appearance to all creatures - Tibia 10.36~

Moj mistrz

Monster Creator
Joined
Feb 1, 2008
Messages
932
Solutions
10
Reaction score
295
Location
Poland
Hello, today I present you a monster which changes outfit to all monster types(good for a teleport server).
Create a file named - "creatures.xml" and paste this inside and save(remember to add this monster to MONSTERS.XML):
Code:
<?xml version="1.0" encoding="UTF-8"?>
<monster name="Creatures" nameDescription="creatures" race="blood" experience="0" speed="0" manacost="0">
    <health now="100" max="100"/>
    <look type="2" head="95" body="94" legs="94" feet="19" corpse="0"/>
    <targetchange interval="2000" chance="0"/>
    <strategy attack="100" defense="0"/>
    <flags>
        <flag summonable="0"/>
        <flag attackable="0"/>
        <flag hostile="0"/>
        <flag illusionable="0"/>
        <flag convinceable="0"/>
        <flag pushable="0"/>
        <flag canpushitems="0"/>
        <flag canpushcreatures="0"/>
        <flag targetdistance="0"/>
        <flag staticattack="90"/>
        <flag runonhealth="0"/>
    </flags>
      <defenses armor="0" defense="0">
            <defense name="all outfits" interval="1000" chance="100"/>
      </defenses>
</monster>
Create a file named - "all outfits.lua" to data/spells/scripts/monster and paste this inside and save:
Code:
function onCastSpell(cid, var)
local chance = math.random(2, 596)

   local creature = Creature(cid)
   local position = creature:getPosition()
   local lookType = tonumber(chance)
   if lookType >= 0 and lookType ~= 1 and lookType ~= 75 and (lookType <= 125 or lookType >= 192) and (lookType <= 250 or lookType >= 253) and (lookType <= 265 or lookType >= 271) and lookType ~= 273 and (lookType <= 277 or lookType >= 280) and (lookType <= 287 or lookType >= 290) and lookType ~= 302 and (lookType <= 323 or lookType >= 326) and (lookType <= 326 or lookType >= 330) and (lookType <= 330 or lookType >= 333) and (lookType <= 334 or lookType >= 337) and (lookType <= 365 or lookType >= 380) and (lookType <= 385 or lookType >= 391) and lookType ~= 392 and (lookType <= 400 or lookType >= 403) and (lookType <= 404 or lookType >= 407) and lookType ~= 411 and lookType ~= 415 and (lookType <= 420 or lookType >= 423) and lookType ~= 424 and (lookType <= 425 or lookType >= 428) and (lookType <= 429 or lookType >= 434) and (lookType <= 436 or lookType >= 441) and lookType ~= 447 and lookType ~= 450 and lookType ~= 459 and (lookType <= 462 or lookType >= 467) and lookType ~= 468 and lookType ~= 469 and (lookType <= 470 or lookType >= 473) and (lookType < 474 or lookType > 485) and lookType ~= 493 and (lookType <= 500 or lookType >= 504) and  lookType ~= 506 and lookType ~= 507 and (lookType <= 511 or lookType >= 517) and (lookType <= 517 or lookType >= 523) and (lookType <= 523 or lookType >= 527) and lookType ~= 536 and (lookType <= 539 or lookType >= 544) and (lookType <= 546 or lookType >= 550) and lookType ~= 559 and lookType ~= 571 and lookType ~= 572 and (lookType <= 573 or lookType >= 579) and lookType ~= 576 and lookType ~= 580 and lookType ~= 581 and lookType ~= 582 and lookType <= 596 then
     local creatureOutfit = creature:getOutfit()
     creatureOutfit.lookType = lookType
     creature:setOutfit(creatureOutfit)
     position:sendMagicEffect(CONST_ME_MAGIC_GREEN)
   else
   return false
end
end
Paste this line to spells.xml and save:
Code:
    <instant name="all outfits" words="###all outfits" aggressive="0" blockwalls="1" needtarget="0" needlearn="1" script="monster/all outfits.lua"/>

And here you are - a monster which changes outfits to all creatures(not included player outftits and gms).
YgrPguU.png
 
Last edited:
Code:
[21:28:39.643] [Error - Spell Interface]
[21:28:39.644] data/spells/scripts/monster/all outfits.lua:onCastSpell
[21:28:39.644] Description:
[21:28:39.644] data/spells/scripts/monster/all outfits.lua:4: attempt to call global 'Creature' (a nil value)
[21:28:39.644] stack traceback:
[21:28:39.645]  data/spells/scripts/monster/all outfits.lua:4: in function <data/spells/scripts/monster/all outfits.lua:1>
:(
 
Back
Top