• 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 Monsters Attacking Other Monsters (How to?)

TheGodOfLegends

New Member
Joined
Aug 30, 2012
Messages
13
Reaction score
1
Hello!
I've been scripting since 2004

but was never really into editing sources
i just wanna know if this is possible, without editing the sources:


I Use


OTX Server is based on:
The Forgotten Server Version: 0.3.7 - Crying Damson.
10.31

i've tried many ways/ monsters with diffrent flags..
set targets..
but nothing works yet.

With this script problem solved i might create an MoBa
heroes and spells already scripted...just need the creeps working okey.

Any information please contact:

https://www.facebook.com/james.hazeth

Thank you.
 
I don't think that is possible without source editing since you have to change monster's behaviour and that is all in monsters.cpp
 
It's possible to rework monster's attacks using "doTargetCombatHealth" and some callbacks to make monsters targetIn AI.
It's hard to make without source editing once onTarget works only for players.

Anyway, its possible. I've already done something similar, I can sent to you if u want, only have to check where is it.

Depending on how you will use it, your server may lag.
 
You have to edit a few files to get this working "correctly" in the source.

You could "ghetto" rig monster vs monster combat. (I've done it before, before I started editing sources)

#1 Option - Make the monsters you want to be attacked summons of a player. Then add custom AI to the monster in the form of onThink creaturescripts or custom spells.

#2 Option - Make the monsters non-hostile (so they don't target anyone), then make custom AI scripts (onThink or Spells) that have them follow creatures, and then cast spells on them.

#3 Option - Actually edit the source, which is actually pretty easy, and maybe I'll make a tutorial of how I did it.
(My creatures attack each other and can be allied to certain players as you can see in the below video at around 1:30 seconds)
 
#Option4 rework monsters attack AI by lua. It's possible to do exactly the same thing that you showed.
However, it's a lot of work.
I've been done it so far.

Anyways, if its possible to change your source, do it. I'm not in the mood to do, since it never works for me.
 
Back
Top