• 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!

How Can I Make An NPC Randomly Change Its Outfits

froie

Expert Mapper
Joined
May 27, 2013
Messages
196
Reaction score
4
Location
Canada
I want An Npc Named (Hunting) that you can not talk to he is just there in the temple and he will randomly change into like 20 different outfits at random to show people this is the hunting tp and these are some monsters found in there he doesn't do anything just sits there and changes his outfits, any way to do this? please help......
 
Last edited:
It's not that hard to do, just create a separate lua file for this npc, and use the function with random colors/outfits from defined range.
 
hmm but im not sure how to do that i have never done it before >.< or to make it so your not able to talk with them can you help me out?
 
Alternatively you could make it a monster that changes outfit/looktype.
Give it no attacks, and have it use the outfit change in defence section.
 
use this line, and simply change the monsters name.
Code:
<defense name="outfit" interval="5000" chance="10" monster="tarantula" duration="4000"/>
3JoKbFu.png
 
Last edited:
so i would use this ling for all 10? just change there name? it seems like only the black sheep, midnight panther, and the draptor are the outfits he changes to and no other one works :s

Code:
<defenses armor="17" defense="23">
        <defense name="outfit" interval="1500" chance="10" monster="war bear" duration="4000">
            <attribute key="areaEffect" value="blueshimmer"/>
        </defense>
        <defense name="outfit" interval="1500" chance="10" monster="black sheep" duration="4000">
            <attribute key="areaEffect" value="blueshimmer"/>
        </defense>
        <defense name="outfit" interval="1500" chance="10" monster="racing bird" duration="4000">
            <attribute key="areaEffect" value="blueshimmer"/>
        </defense>
        <defense name="outfit" interval="1500" chance="10" monster="widow queen" duration="4000">
            <attribute key="areaEffect" value="blueshimmer"/>
        </defense>
        <defense name="outfit" interval="1500" chance="10" monster="midnight panther" duration="4000">
            <attribute key="areaEffect" value="blueshimmer"/>
        </defense>
        <defense name="outfit" interval="1500" chance="10" monster="draptor" duration="4000">
            <attribute key="areaEffect" value="blueshimmer"/>
        </defense>
        <defense name="outfit" interval="1500" chance="10" monster="Titanica" duration="4000">
            <attribute key="areaEffect" value="blueshimmer"/>
        </defense>
        <defense name="outfit" interval="1500" chance="10" monster="tin lizzard" duration="4000">
            <attribute key="areaEffect" value="blueshimmer"/>
        </defense>
        <defense name="outfit" interval="1500" chance="10" monster="Blazebringer" duration="4000">
            <attribute key="areaEffect" value="blueshimmer"/>
        </defense>
        <defense name="outfit" interval="1500" chance="10" monster="rapid boar" duration="4000">
            <attribute key="areaEffect" value="blueshimmer"/>
 
Last edited:
Our server has random monster names.. but yeah just like this..
Code:
  </attacks>
   <defenses armor="0" defense="0">
     <defense name="outfit" interval="5000" chance="10" monster="baby wolf" duration="5000"/>
     <defense name="outfit" interval="5000" chance="10" monster="knight" duration="5000"/>
     <defense name="outfit" interval="5000" chance="10" monster="Ghost Knight" duration="5000"/>
     <defense name="outfit" interval="5000" chance="10" monster="Ghost Rogue" duration="5000"/>
     <defense name="outfit" interval="5000" chance="10" monster="Black Sheep" duration="5000"/>
     <defense name="outfit" interval="5000" chance="10" monster="Necrotic Knight" duration="5000"/>
     <defense name="outfit" interval="5000" chance="10" monster="Necrotic Mage" duration="5000"/>
     <defense name="outfit" interval="5000" chance="10" monster="Necrotic Rogue" duration="5000"/>
     <defense name="outfit" interval="5000" chance="10" monster="rebel orc knight" duration="5000"/>
     <defense name="outfit" interval="5000" chance="10" monster="rebel orc mage" duration="5000"/>
     <defense name="outfit" interval="5000" chance="10" monster="rebel orc rogue" duration="5000"/>
     <defense name="outfit" interval="5000" chance="10" monster="skeleton mage" duration="5000"/>
     <defense name="outfit" interval="5000" chance="10" monster="skeleton rogue" duration="5000"/>
     <defense name="outfit" interval="5000" chance="10" monster="skeleton knight" duration="5000"/>
     <defense name="outfit" interval="5000" chance="10" monster="Frost Troll Knight" duration="5000"/>
     <defense name="outfit" interval="5000" chance="10" monster="Crypt Shambling Elite" duration="5000"/>
     <defense name="outfit" interval="5000" chance="10" monster="Betrayed Rogue" duration="5000"/>
   </defenses>
 
so i would use this ling for all 10? just change there name? it seems like only the black sheep, midnight panther, and the draptor are the outfits he changes to and no other one works :s

Code:
<defenses armor="17" defense="23">
        <defense name="outfit" interval="1500" chance="10" monster="war bear" duration="4000">
            <attribute key="areaEffect" value="blueshimmer"/>
        </defense>
        <defense name="outfit" interval="1500" chance="10" monster="black sheep" duration="4000">
            <attribute key="areaEffect" value="blueshimmer"/>
        </defense>
        <defense name="outfit" interval="1500" chance="10" monster="racing bird" duration="4000">
            <attribute key="areaEffect" value="blueshimmer"/>
        </defense>
        <defense name="outfit" interval="1500" chance="10" monster="widow queen" duration="4000">
            <attribute key="areaEffect" value="blueshimmer"/>
        </defense>
        <defense name="outfit" interval="1500" chance="10" monster="midnight panther" duration="4000">
            <attribute key="areaEffect" value="blueshimmer"/>
        </defense>
        <defense name="outfit" interval="1500" chance="10" monster="draptor" duration="4000">
            <attribute key="areaEffect" value="blueshimmer"/>
        </defense>
        <defense name="outfit" interval="1500" chance="10" monster="Titanica" duration="4000">
            <attribute key="areaEffect" value="blueshimmer"/>
        </defense>
        <defense name="outfit" interval="1500" chance="10" monster="tin lizzard" duration="4000">
            <attribute key="areaEffect" value="blueshimmer"/>
        </defense>
        <defense name="outfit" interval="1500" chance="10" monster="Blazebringer" duration="4000">
            <attribute key="areaEffect" value="blueshimmer"/>
        </defense>
        <defense name="outfit" interval="1500" chance="10" monster="rapid boar" duration="4000">
            <attribute key="areaEffect" value="blueshimmer"/>
Most of these aren't actual monsters.
Those are mount names, not monster names.

Racing bird = Terror bird,
widow queen = wailing widow,
Titanica = crustacea gigantica
et cetera

If you want them to have the saddle, you'll have to make the custom monsters.
 
Ok, now I have another question is there a way to make a monster look like an item? (just one item) and then another monster to shuffle threw a list of say 10 selected items, I tried to make a monster and put its looktype id as the monster and its not working I just got a debug. im using tfs 10.10
 
Code:
typeex="2798"
Code:
<defenses armor="0" defense="0">
     <defense name="outfit" interval="4000" chance="10" monster="barrel" duration="4000"/> -- this is a custom monster
     <defense name="outfit" interval="4000" chance="10" monster="box" duration="4000"/> -- this is also a custom monster
     <defense name="outfit" interval="4000" chance="10" monster="crate" duration="4000"/> -- this is yet another custom monster
   </defenses>
wmLoQI4.png
 
Back
Top