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

Lua Monster Script

cuba

New Member
Joined
Feb 24, 2015
Messages
136
Reaction score
2
hello otland all know the monster.xml scripts and all know monster can change his own outfit every 1 sec but i want that monster change his own outfit every second to item id not to look type
Understand?

-thanks
 
I'm assuming what @whitevo is implying is..

This is the line that changes the monsters looktype.
Code:
<defense name="outfit" interval="5000" chance="10" monster="Bear" duration="4000"/>
This part of the monster defines most everything that a player will notice immediately upon encountering a monster..
Code:
<monster name="War Bear" nameDescription="a war bear" race="blood" experience="0" speed="100" manacost="0">
   <health now="995000" max="995000"/>
   <look type="16" corpse="5968"/>
Inside of this section contains this piece of code.
Code:
type="16"
If you change/add this.., to this..
Code:
typeex="16"
You will then be able to put in itemID's as opposed to monster sprite id's.
Now, If you look at these two concepts together, you'll simply have to make custom monsters with the itemID that your looking for the monster to replicate.
So if your looking for a Deadly Bloodherb, look no further. :p

wmLoQI4.png


Xikini
 
Last edited:
you gotta make a spell to monster.

I haven't done outfit changing on anything with LUA script yet, but i assume it goes something like this:
Monster(cid):setOutfit():lookTypeEx(item.itemid)

and to make it switch every second: just make the mosnter cast spell every second..
 
you gotta make a spell to monster.

I haven't done outfit changing on anything with LUA script yet, but i assume it goes something like this:
Monster(cid):setOutfit():lookTypeEx(item.itemid)

and to make it switch every second: just make the mosnter cast spell every second..
bro i want the monster change his outfit every 1 sec not to 1 monster i want it change for all monsters
 
can i make it 1 monster only change his outfit to all monster?
make his spell to take all monster metavalues around him with getSpecatators function.
and then push the outfits on them using the metavalues you got.
 
Code:
<?xml version="1.0" encoding="UTF-8"?>
<monster name="fluffy" nameDescription="a fluffy" race="blood" experience="4000" speed="460" manacost="0">
    <health now="4100" max="4100"/>
    <look typeex="12358"/>
    <targetchange interval="5000" chance="8"/>
    <strategy attack="100" defense="0"/>
    <flags>
        <flag summonable="0"/>
        <flag attackable="1"/>
        <flag hostile="1"/>
        <flag illusionable="1"/>
        <flag convinceable="0"/>
        <flag pushable="0"/>
        <flag canpushitems="1"/>
        <flag canpushcreatures="1"/>
        <flag targetdistance="1"/>
        <flag staticattack="60"/>
        <flag runonhealth="0"/>
    </flags>
    <attacks>
        <attack name="melee" interval="2000" skill="50" attack="170"/>
        <attack name="physical" interval="2000" chance="17" range="7" min="-140" max="-200">
            <attribute key="shootEffect" value="throwingstar"/>
        </attack>
        <attack name="melee" interval="1000" chance="15" range="7" radius="3" target="0" min="-115" max="-155">
            <attribute key="areaEffect" value="blackspark"/>
        </attack>
        <attack name="melee" interval="3000" chance="30" length="8" spread="0" min="-300" max="-420">
            <attribute key="areaEffect" value="redspark"/>
        </attack>
        <attack name="physical" interval="1000" chance="25" range="7" min="-170" max="-200">
            <attribute key="shootEffect" value="snowball"/>
            <attribute key="areaEffect" value="poff"/>
        </attack>
    </attacks>
    <defenses armor="25" defense="30">
        <defense name="healing" interval="1000" chance="25" min="180" max="290">
            <attribute key="areaEffect" value="blueshimmer"/>
        </defense>
        <defense name="outfit" interval="1000" chance="50" typeex="2538" duration="1000">
                    <attribute key="areaEffect" value="energy"/>
        </defense>
        <defense name="outfit" interval="1000" chance="40" typeex="5809" duration="1000">
                    <attribute key="areaEffect" value="energy"/>
        </defense>
    </defenses>
    <elements>
        <element firePercent="100"/>
        <element icePercent="40"/>
        <element holyPercent="40"/>
        <element deathPercent="-20"/>
        <element energyPercent="-20"/>
        <element earthPercent="-15"/>
        <element physicalPercent="-10"/>
    </elements>
    <immunities>
        <immunity paralyze="1"/>
    <immunity invisible="1"/>
    </immunities>
    <voices interval="3000" chance="30">
        <voice sentence="Ahhhhrrrr!"/>
        <voice sentence="Waaaaah!"/>
        <voice sentence="Carnage!"/>
    </voices>
    <loot>
        <item id="2148" countmax="90" chance="43000"/><!-- gold coin -->
        <item id="2148" countmax="75" chance="43000"/><!-- gold coin -->
        <item id="2148" countmax="65" chance="43000"/><!-- gold coin -->
        <item id="6558" countmax="3" chance="25000"/><!-- concentrated demonic blood -->
        <item id="6500" chance="22500"/><!-- demonic essence -->
        <item id="2470" chance="450"/><!-- golden legs -->
        <item id="7591" chance="10000"/><!-- great health potion-->
        <item id="2666" chance="25000"/><!-- meat -->
        <item id="7456" chance="1800"/><!-- noble axe -->
        <item id="5022" countmax="3" chance="1300"/><!-- orichalcum pearl -->
        <item id="2152" countmax="3" chance="2000"/><!-- platinum coin -->
        <item id="5911" chance="3650"/><!-- red piece of cloth -->
        <item id="1987" chance="100000"><!-- bag -->
            <inside>
        <item id="9813" chance="11000"/><!-- rusty legs -->
        <item id="2120" countmax="3" chance="6000"/><!-- small amethyst -->
        <item id="5944" chance="21500"/><!-- soul orb -->
        <item id="2645" chance="1000"/><!-- steel boots -->
        <item id="2181" chance="20000"/><!-- terra rod -->
        <item id="7404" chance="100"/><!-- assassin dagger -->
        <item id="2487" chance="500"/><!-- crown armor -->
        <item id="5944" chance="7368"/><!-- assassin star -->
        <item id="2124" chance="750"/><!-- crystal ring-->
        <item id="2156" chance="900"/><!-- red gem -->
            </inside>
        </item>
    </loot>
</monster>

to add alot outfit items add this

<defense name="outfit" interval="1000" chance="40" typeex="5809" duration="1000">
<attribute key="areaEffect" value="energy"/>
</defense>

and chnage number 5809 to number outfit u need and change balance lie first one will be 20 second one 35 and and
 
thanks bro but how can i make the item no Repeated only items after item you understand because your script make the item repeated 4 time doubleheader
 
Back
Top