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

Slingshot shoots rocks only if you have a rock ?

Cris2387

Member
Joined
Dec 30, 2013
Messages
177
Reaction score
9
Hello, i recently edited the slingshot in my server, and it works pretty nice but i want to make it more complex and i want the slingshot to work kind of like a bow, i want my slingshot to shoot rocks, i already got it to work, but the problem is that it shoots rocks even if you dont have the rock in the arrow slot, i want it to work only if it has the rock in the arrow slot, but i dont want other bows or crossbows to shoot the rock, only the slingshot :l idk if you guys understand me im trying my best.
this is the code i have right now
in items.xml
Code:
  <item id="5907" article="a" name="Slingshot">
     <attribute key="weight" value="1200" />
     <attribute key="attack" value="750" />
     <attribute key="weaponType" value="distance" />
     <attribute key="shootType" value="smallstone" />
     <attribute key="maxHitChance" value="95"/>
     <attribute key="range" value="7" />
     <attribute key="breakChance" value="0" />
   </item>
and in weapons
Code:
  <distance id="5907" level="200" event="function" value="default"> <!-- Slingshot-->
   <vocation id="3"/>
   <vocation id="7" showInDescription="0"/>
   </distance>
please help
 
Code:
    <item id="5907" article="a" name="slingshot">
        <attribute key="weight" value="200"/>
        <attribute key="weaponType" value="distance"/>
        <attribute key="ammoType" value="smallstone"/>
        <attribute key="range" value="6"/>
    </item>

Code:
    <item id="1294" article="a" name="small stone">
        <attribute key="weight" value="145"/>
        <attribute key="attack" value="10"/>
        <attribute key="weaponType" value="ammunition"/>
        <attribute key="shootType" value="smallstone"/>
        <attribute key="range" value="4"/>
        <attribute key="breakChance" value="8"/>
        <attribute key="slotType" value="ammo"/>
        <attribute key="maxHitChance" value="80"/>
        <attribute key="ammoType" value="smallstone"/>
        <attribute key="ammoAction" value="moveback"/>
    </item>

On an old version of my server, I used those two, without editing weapons.xml and it worked perfectly fine... I have no clue what server version you are using, but that should work I think....
 
Code:
    <item id="5907" article="a" name="slingshot">
        <attribute key="weight" value="200"/>
        <attribute key="weaponType" value="distance"/>
        <attribute key="ammoType" value="smallstone"/>
        <attribute key="range" value="6"/>
    </item>

Code:
    <item id="1294" article="a" name="small stone">
        <attribute key="weight" value="145"/>
        <attribute key="attack" value="10"/>
        <attribute key="weaponType" value="ammunition"/>
        <attribute key="shootType" value="smallstone"/>
        <attribute key="range" value="4"/>
        <attribute key="breakChance" value="8"/>
        <attribute key="slotType" value="ammo"/>
        <attribute key="maxHitChance" value="80"/>
        <attribute key="ammoType" value="smallstone"/>
        <attribute key="ammoAction" value="moveback"/>
    </item>

On an old version of my server, I used those two, without editing weapons.xml and it worked perfectly fine... I have no clue what server version you are using, but that should work I think....
okay ill try it buddy
 
Code:
    <item id="5907" article="a" name="slingshot">
        <attribute key="weight" value="200"/>
        <attribute key="weaponType" value="distance"/>
        <attribute key="ammoType" value="smallstone"/>
        <attribute key="range" value="6"/>
    </item>

Code:
    <item id="1294" article="a" name="small stone">
        <attribute key="weight" value="145"/>
        <attribute key="attack" value="10"/>
        <attribute key="weaponType" value="ammunition"/>
        <attribute key="shootType" value="smallstone"/>
        <attribute key="range" value="4"/>
        <attribute key="breakChance" value="8"/>
        <attribute key="slotType" value="ammo"/>
        <attribute key="maxHitChance" value="80"/>
        <attribute key="ammoType" value="smallstone"/>
        <attribute key="ammoAction" value="moveback"/>
    </item>

On an old version of my server, I used those two, without editing weapons.xml and it worked perfectly fine... I have no clue what server version you are using, but that should work I think....
okay, it worked but they miss a lot and it shows that ugly puff thing i dont want that, i just want the rock to shoot straight and without miss
 
here you are !!

items.xml
Code:
<item id="5907" article="a" name="slingshot">
        <attribute key="weight" value="1200" />
    <attribute key="attack" value="105"/>
    <attribute key="hitChance" value="99"/>
        <attribute key="weaponType" value="distance"/>
        <attribute key="shootType" value="LARGEROCK"/>
        <attribute key="range" value="7"/>
        <attribute key="breakChance" value="0"/>
        <attribute key="ammoAction" value="moveback"/>
        <attribute key="description" value="No ammo required with this momma!."/>

weapons.xml
<distance id="5907" level="60" unproperly="1" event="function" value="default"> <!-- Chain Bolter -->
<vocation id="3"/>
<vocation id="7" showInDescription="0"/>
 
Back
Top