• 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 Make an item attack?

ond

Veteran OT User
Joined
Mar 24, 2008
Messages
2,775
Solutions
25
Reaction score
483
Location
Sweden
Is it possible to make an item attack Players? (by script)

In my case, ID: 1560 to attack like this:

Lua:
  <attacks>
    <attack name="melee" interval="2000" skill="1" attack="1"/>
    <attack name="poison" interval="1000" chance="100" range="7" min="-50" max="-100">
      <attribute key="shootEffect" value="energy"/>
      <attribute key="areaEffect" value="yellowspark"/>
    </attack>
  </attacks>
 
its not that hard to make a item that attack ppl like on rl tibia that lavahole that atk ppl. just make a monster.xml then change the id and make it not moveble.

<look typeex="2160" corpse="8307"/>
if you want it item then use Typeex=ItemID
Examp 2160 = Crystal Coin.
for monster body use type.

XML:
<?xml version="1.0" encoding="UTF-8"?>
<monster name="Test Dummy" nameDescription="a Test Dummy" race="blood" experience="500" speed="-500" manacost="0">
  <health now="10000" max="10000"/>
  <look typeex="2160" corpse="8307"/>
  <targetchange interval="5000" chance="70"/>
  <strategy attack="100" defense="0"/>
  <flags>
    <flag summonable="0"/>
    <flag attackable="0"/>
    <flag hostile="1"/>
    <flag illusionable="0"/>
    <flag convinceable="0"/>
    <flag pushable="0"/>
    <flag canpushitems="1"/>
    <flag canpushcreatures="1"/>
    <flag targetdistance="0"/>
    <flag staticattack="90"/>
    <flag runonhealth="0"/>
  </flags>
  <attacks>
	<attack name="melee" interval="2000" skill="75" attack="60"/>
	<attribute key="shootEffect" value="etherealspear"/>
     	<attribute key="areaEffect" value="watersplash"/>
-- Addd your attacks
		</attacks>
  <defenses armor="30" defense="90">
    <defense name="healing" interval="3000" chance="100" min="42" max="3000">
    </defense>
  </defenses>
  <elements>
	<element earthPercent="100"/>
	<element energyPercent="100"/>
	<element icePercent="100"/>
	<element deathPercent="100"/>
	<element physicalPercent="100"/>
	<element firePercent="100"/>
	<element holyPercent="100"/>
  </elements>
  <immunities>
    <immunity invisible="1"/>
  </immunities>
  <loot>
  </loot>
</monster>
 
Last edited:
its not that hard to make a item that attack ppl like on rl tibia that lavahole that atk ppl. just make a monster.xml then change the id and make it not moveble.

XML:
<?xml version="1.0" encoding="UTF-8"?>
<monster name="Test Dummy" nameDescription="a Test Dummy" race="blood" experience="500" speed="-500" manacost="0">
  <health now="10000" max="10000"/>
  <look typeex="4330" corpse="8307"/>
  <targetchange interval="5000" chance="70"/>
  <strategy attack="100" defense="0"/>
  <flags>
    <flag summonable="0"/>
    <flag attackable="0"/>
    <flag hostile="1"/>
    <flag illusionable="0"/>
    <flag convinceable="0"/>
    <flag pushable="0"/>
    <flag canpushitems="1"/>
    <flag canpushcreatures="1"/>
    <flag targetdistance="0"/>
    <flag staticattack="90"/>
    <flag runonhealth="0"/>
  </flags>
  <attacks>
	<attack name="melee" interval="2000" skill="75" attack="60"/>
	<attribute key="shootEffect" value="etherealspear"/>
     	<attribute key="areaEffect" value="watersplash"/>
-- Addd your attacks
		</attacks>
  <defenses armor="30" defense="90">
    <defense name="healing" interval="3000" chance="100" min="42" max="3000">
    </defense>
  </defenses>
  <elements>
	<element earthPercent="100"/>
	<element energyPercent="100"/>
	<element icePercent="100"/>
	<element deathPercent="100"/>
	<element physicalPercent="100"/>
	<element firePercent="100"/>
	<element holyPercent="100"/>
  </elements>
  <immunities>
    <immunity invisible="1"/>
  </immunities>
  <loot>
  </loot>
</monster>

read the thread about health?
 
lol u cant atk the monster/item so the health is not importent o,O
and i did readed the thread
he want an item 1560 to attack ppl but ppl not to attack the item/monster so wahts the probleem?
<flag attackable="0"/>
 
Uhm? Well, the whole thread is (even if it's not written in the main post) about making an item attack by script. Reason? I don't want the health or name to be shown, but then I got help with fixing it in another way so now it's cool !
 
I'm not an advanced lua scripter. But just find the script for the magic throwers and copy and edit it for the item you want. Idk if this will help :)
 
Back
Top