• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Solved add new mount don't work

Thorn

Spriting since 2013
Joined
Sep 24, 2012
Messages
2,203
Solutions
1
Reaction score
923
Location
Chile
Hi, well i've been trying the whole day to make the shock head mount work, but i can't, so as my last resource i ask for help here plz.
Check my scripts
OTX version 2.52-1557

Item ID is 21415

Actions (lua)
Code:
local function tameMonster(cid, item, itemEx, tame, run, broken)
    n = math.random(100)
    if n <= broken then
        doCreatureSay(cid, "Su item se rompio", TALKTYPE_ORANGE_1)
        doRemoveItem(item.uid)
    elseif n > broken and n <= (tame+broken) then
        doRemoveItem(item.uid)
        doCreatureSay(cid, "Capturado con exito", TALKTYPE_ORANGE_1)
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "usted domo un "..getCreatureName(itemEx.uid)..".")
        return true
    elseif n > (tame+broken) and n <= (tame+broken+run) then
        doCreatureSay(cid, "O monstro escapou", TALKTYPE_ORANGE_1)
        doRemoveCreature(itemEx.uid)
    else
        doCreatureSay(cid, "Intente de nuevo", TALKTYPE_ORANGE_1)
    end
    return false
end

local function inArray(table, value)
    for i,v in pairs(table) do
        if (v.name == string.lower(value)) then
            return i
        end
    end
    return 0
end

local mounts = {
{item = 13307, name = "wailing widow", id = 1, tame=60, run=20, broken=20},
{item = 13298, name = "terror bird", id = 2, tame=40, run=20, broken=40},
{item = 5907, name = "bear", id = 3, tame=90, run=5, broken=5},
{item = 13295, name = "black sheep", id = 4, tame=40, run=30, broken=30},
{item = 13293, name = "midnight panther", id = 5, tame=60, run=20, broken=20},
{item = 13538, name = "panda", id = 19, tame=50, run=25, broken=25},
{item = 13539, name = "enraged white deer", id = 18, tame=70, run=15, broken=15},
{item = 13294, name = "draptor", id = 6, tame=60, run=20, broken=20},
{item = 13537, name = "donkey", id =13, tame=40, run=30, broken=30},
{item = 13305, name = "crustacea gigantica", id = 7, tame=80, run=10, broken=10},
{item = 13536, name = "crystal wolf", id = 16, tame=60, run=20, broken=20},
{item = 13247, name = "boar", id = 10, tame=80, run=10, broken=10},
{item = 13498, name = "sandstone scorpion", id = 21, tame=70, run=10, broken=20},
{item = 13508, name = "slug", id = 14, tame=60, run=20, broken=20},
{item = 13535, name = "dromedary", id = 20, tame=60, run=20, broken=20},
{item = 13291, name = "undead cavebear", id = 12, tame=70, run=10, broken=20},
{item = 13939, name = "fire horse", id = 22, tame=60, run=20, broken=20},
{item = 13939, name = "gray horse", id = 29, tame=60, run=20, broken=20},
{item = 13939, name = "brown war horse", id = 17, tame=60, run=20, broken=20},
{item = 15546, name = "lady bug", id = 27, tame=70, run=10, broken=20},
{item = 15545, name = "manta", id = 28, tame=60, run=20, broken=20},
{item = 13938, name = "uniwheel", id = 15, tame=70, run=15, broken=15},
{item = 13292, name = "tin lizzard", id = 8, tame=70, run=15, broken=15},
{item = 15546, name = "lady bug", id = 27, tame=70, run=15, broken=15},
{item = 15545, name = "manta ray", id = 28, tame=70, run=15, broken=15},
{item = 18447, name = "ironblight", id = 30, tame=70, run=15, broken=15},
{item = 18448, name = "magma crawler", id = 31, tame=70, run=15, broken=15},
{item = 18449, name = "dragonling", id = 32, tame=70, run=15, broken=15},
{item = 18516, name = "gnarlhound", id = 33, tame=70, run=15, broken=15},
{item = 21415, name = "Shock Head", id = 48, tame=70, run=15, broken=15},

}

function onUse(cid, item, fromPosition, itemEx, toPosition)
if isCreature(itemEx.uid) then
if inArray(mounts, getCreatureName(itemEx.uid)) > 0 then
i = inArray(mounts, getCreatureName(itemEx.uid))
if item.itemid == mounts[i].item and not getPlayerMount(cid, mounts[i].id) then
if tameMonster(cid, item, itemEx, mounts[i].tame, mounts[i].run, mounts[i].broken) then
doSendMagicEffect(fromPosition, CONST_ME_MAGIC_BLUE)
doRemoveCreature(itemEx.uid)
doPlayerAddMount(cid, mounts[i].id)
else
doSendMagicEffect(toPosition, CONST_ME_POFF)
end
end
end
end
return true
end

actions.xml

Code:
<!--Mounts-->
     <action itemid="13292;13306" script="tinlizzard.lua"/> --tin lizzard
     <action itemid="13295" script="mounts.lua"/> --reins
     <action itemid="13294" script="mounts.lua"/> --harness
     <action itemid="13293" script="mounts.lua"/> --leather whip
     <action itemid="13298" script="mounts.lua"/> --carrot on a stick
     <action itemid="13247" script="mounts.lua"/> --hunting horn
     <action itemid="13305" script="mounts.lua"/> --giant Shrimp
     <action itemid="13291" script="mounts.lua"/> --maxilla maximus
     <action itemid="5907" script="mounts.lua"/> --slingshot
     <action itemid="13307" script="mounts.lua"/> --sweet smelling bait
     <action itemid="13537" script="mounts.lua"/> --bag of apple slices
     <action itemid="13535" script="mounts.lua"/> --fist on a stick
     <action itemid="13536" script="mounts.lua"/> --diapason
     <action itemid="13538" script="mounts.lua"/> --bamboo leaves
     <action itemid="13539" script="mounts.lua"/> --golden fir cone
     <action itemid="13498" script="mounts.lua"/> --scorpion sceptre
     <action itemid="13508" script="mounts.lua"/> --slug drug
     <action itemid="13939" script="mounts.lua"/> --sugar oat
     <action itemid="15545" script="mounts.lua"/> --fox tail
     <action itemid="15546" script="mounts.lua"/> --four leaf clover
     <action itemid="18449" script="mounts.lua"/> --decorative ribbow
     <action itemid="18448" script="mounts.lua"/> --glow wine
     <action itemid="18447" script="mounts.lua"/> --iron loadstone
     <action itemid="18516" script="mounts.lua"/> --golem wrench
     <action itemid="13938;13937" script="uniwheel.lua"/> --can golden of oil
        <action itemid="21415" script="mounts.lua"/> --Nightmare Horn

and this is my mounts.xml at xml folder


Code:
<?xml version="1.0" encoding="UTF-8"?>
<mounts>
    <mount id="1" clientid="368" name="Widow Queen" speed="25" premium="no"/>
    <mount id="2" clientid="369" name="Racing Bird" speed="25" premium="no"/>
    <mount id="3" clientid="370" name="War Bear" speed="20" premium="no"/>
    <mount id="4" clientid="371" name="Black Sheep" speed="30" premium="no"/>
    <mount id="5" clientid="372" name="Midnight Panther" speed="30" premium="no"/>
    <mount id="6" clientid="373" name="Draptor" speed="30" premium="no"/>
    <mount id="7" clientid="374" name="Titanica" speed="25" premium="no"/>
    <mount id="8" clientid="375" name="Tin Lizzard" speed="20" premium="no"/>
    <mount id="9" clientid="376" name="Blazebringer" speed="35" premium="no"/>
    <mount id="10" clientid="377" name="Rapid Boar" speed="20" premium="no"/>
    <mount id="11" clientid="378" name="Stampor" speed="25" premium="no"/>
    <mount id="12" clientid="379" name="Undead Cavebear" speed="30" premium="no"/>
    <mount id="13" clientid="387" name="Mule" speed="20" premium="no"/>
    <mount id="14" clientid="388" name="Tiger Slug" speed="20" premium="no"/>
    <mount id="15" clientid="389" name="Uniwheel" speed="25" premium="no"/>
    <mount id="16" clientid="390" name="Crystal Wolf" speed="25" premium="no"/>
    <mount id="17" clientid="392" name="Brown War Horse" speed="20" premium="no"/>
    <mount id="18" clientid="401" name="Kingly Deer" speed="20" premium="no"/>
    <mount id="19" clientid="402" name="Tamed Panda" speed="20" premium="no"/>
    <mount id="20" clientid="405" name="Dromedary" speed="25" premium="no"/>
    <mount id="21" clientid="406" name="Sandstone Scorpion" speed="15" premium="no"/>
    <mount id="22" clientid="426" name="Fire War Horse" speed="15" premium="no"/>
    <mount id="23" clientid="427" name="War Draptor" speed="30" premium="no"/>
    <mount id="24" clientid="219" name="Tarantula" speed="15" premium="no"/>
    <mount id="25" clientid="3" name="War Wolf" speed="20" premium="no"/>
    <mount id="27" clientId="447" name="Ladybug" speed="20" premium="no"/>
    <mount id="28" clientId="450" name="Manta" speed="20" premium="no"/>
    <mount id="29" clientId="437" name="Gray Horse" speed="20" premium="no"/>
    <mount id="30" clientId="502" name="Ironblight" speed="20" premium="no" />
    <mount id="31" clientId="503" name="Magma Crawler" speed="20" premium="no" />
    <mount id="32" clientId="506" name="Dragonling" speed="40" premium="no" />
    <mount id="33" clientId="515" name="Gnarlhound" speed="20" premium="no" />
    <mount id="34" clientid="521" name="Red Manta" speed="20" premium="no" />
    <mount id="35" clientid="522" name="Mechanical Bird" speed="20" premium="no" />
    <mount id="36" clientid="526" name="Water Buffalo" speed="20" premium="no" />
        <mount id="37" clientid="611" name="Cow" speed="40" premium="yes" />
        <mount id="38" clientid="614" name="Blue Horse" speed="40" premium="yes" />
        <mount id="39" clientid="608" name="Venosaur" speed="40" premium="yes" />
        <mount id="40" clientid="609" name="Pura Sangre" speed="40" premium="yes" />
        <mount id="41" clientid="695" name="Rizard" speed="40" premium="yes" />
        <mount id="42" clientid="639" name="Sacred Fox" speed="40" premium="yes" />
        <mount id="43" clientid="551" name="Yellow Syntox" speed="40" premium="yes" />
        <mount id="44" clientid="641" name="Black Syntox" speed="40" premium="yes" />
        <mount id="45" clientid="643" name="Punk Black Syntox" speed="40" premium="yes" />
        <mount id="46" clientid="642" name="Punk Yellow Syntox" speed="40" premium="yes" />
        <mount id="47" clientid="843" name="Hellserker" speed="40" premium="yes" />
        <mount id="48" clientid="552" name="Shock Head" speed="40" premium="no" />
        <mount id="49" clientid="856" name="Tauros" speed="40" premium="no" />
        <mount id="50" clientid="854" name="sacred tiger" speed="40" premium="no" />
</mounts>

plz guys help i really can't solve it :/
if anyone need me to post something else just say :)
 
Last edited:
sure, here it is
Code:
<?xml version="1.0" encoding="UTF-8"?>
<monster name="Shock Head" nameDescription="a Shock Head" race="blood" experience="4700" speed="250" manacost="0">
  <health now="5800" max="5800"/>
  <look type="553" corpse="20800"/>
  <targetchange interval="4000" chance="10"/>
  <strategy attack="100" defense="0"/>
  <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="80"/>
    <flag runonhealth="0"/>
  </flags>
   <attacks>
        <attack name="melee" interval="2000" skill="100" attack="145"/>
          <attack name="death" interval="2000" chance="15" length="5" spread="2" target="1" min="-200" max="-300">
            <attribute key="areaEffect" value="blacksmoke"/>
        </attack>
        <attack name="speed" interval="2000" chance="15" length="8" spread="3" target="1" speedchange="-800" duration="7500">
            <attribute key="areaEffect" value="purpleenergy"/>
        </attack>
        <attack name="physical" interval="2000" chance="20" radius="4" target="1" min="-0" max="-350">
         <attribute key="shootEffect" value="earth"/>
            <attribute key="areaEffect" value="stones"/>
        </attack>
            </attacks>
    <defenses armor="30" defense="30">
        <defense name="healing" interval="2000" chance="15" min="250" max="350">
            <attribute key="areaEffect" value="insects"/>
        </defense> 
    </defenses>
    <elements>           
        <element physicalPercent="-5"/>   
        <element deathPercent="30"/>   
        <element energyPercent="30"/>   
        <element icePercent="5"/>   
    </elements>
    <immunities>
        <immunity earth="1"/>
        <immunity fire="1"/>
        <immunity paralyze="1"/>
        <immunity invisible="1"/>
    </immunities>
    <voices interval="5000" chance="10">
        <voice sentence="brrzz"/>
        <voice sentence="Thun... Thun... THUNDER!"/>
    </voices>    
    <loot>
        <item id="2148"  countmax="100"  chance="43000"/> <!-- gold coin -->
        <item id="2148"  countmax="87"  chance="50000"/> <!-- gold coin -->
        <item id="2146"  chance="5000"/> <!-- small sapphire -->
        <item id="2498"  chance="270"/> <!-- royal helmet -->
        <item id="22539"  chance="10000"/> <!-- goosebump leather -->
    </loot>
</monster>

and in monsters.xml
Code:
<monster name="Shock Head" file="Spriteados/Shock Head.xml"/>
 

Similar threads

Back
Top