Rayvolution 
Journeyman

Posts: 135
Likes Given: 0
Likes Received: 2 in 2 posts
Joined: Jul 2012
Reputation: 1
Aetharia

|
RE: Knockback - wall check
This is my server's "Knockback" enchantment, written by EXTREME. It works pretty well.
There's 3 levels, Minor, Moderate and Major. All it really does is raise the chance to knockback.
It's designed to be applied to a weapon, so if you just want to apply it to a monster/NPC directly, simplypull the ON=@DAMAGE portion out of the TYPEDEF and stick it on the monster/NPC or it's EVENTS script.
Code:
[TYPEDEF E_WEAPON_ENCHANT_KNOCKBACK_MINOR]
ON=@DAMAGE
IF <R1,10> == 1
SRC.KNOCKBACK <TOPOBJ.DIR>
SRC.EFFECT 3,i_fx_glow_spike,1,17,0
SRC.SOUND 314
ENDIF
[TYPEDEF E_WEAPON_ENCHANT_KNOCKBACK_MODERATE]
ON=@DAMAGE
IF <R1,5> == 1
SRC.KNOCKBACK <TOPOBJ.DIR>
SRC.EFFECT 3,i_fx_glow_spike,1,17,0
SRC.SOUND 314
ENDIF
[TYPEDEF E_WEAPON_ENCHANT_KNOCKBACK_MAJOR]
ON=@DAMAGE
IF <R1,2> == 1
SRC.KNOCKBACK <TOPOBJ.DIR>
SRC.EFFECT 3,i_fx_glow_spike,1,17,0
SRC.SOUND 314
ENDIF
[FUNCTION KNOCKBACK]
IF <ARGS>
LOCAL.DIR <EVAL <ARGS>+4>
IF <dLOCAL.DIR> > 7
LOCAL.DIR -= 8
ENDIF
ELSE
LOCAL.DIR <DIR>
ENDIF
DOSWITCH <dLOCAL.DIR>
BEGIN
IF (<CANMOVE S>)
MOVE S
ENDIF
END
BEGIN
IF (<CANMOVE SW>)
MOVE SW
ENDIF
END
BEGIN
IF (<CANMOVE W>)
MOVE W
ENDIF
END
BEGIN
IF (<CANMOVE NW>)
MOVE NW
ENDIF
END
BEGIN
IF (<CANMOVE N>)
MOVE N
ENDIF
END
BEGIN
IF (<CANMOVE NE>)
MOVE NE
ENDIF
END
BEGIN
IF (<CANMOVE E>)
MOVE E
ENDIF
END
BEGIN
IF (<CANMOVE SE>)
MOVE SE
ENDIF
END
BEGIN
IF (<CANMOVE S>)
MOVE S
ENDIF
END
ENDDO
![[Image: 4_Logo.png]](http://aetharia.com/public/style_images/4_Logo.png)
An MMORPG based on the Ultima Online engine.
Completely Custom Map, GUI, AI, Combat, Skills, Crafts, Art, Music and so much more.
http://aetharia.com - Home of Ambition!
(This post was last modified: 09-10-2012 01:24 PM by Rayvolution.)
|
|
09-10-2012 01:23 PM |
|
|
Rayvolution 
Journeyman

Posts: 135
Likes Given: 0
Likes Received: 2 in 2 posts
Joined: Jul 2012
Reputation: 1
Aetharia

|
RE: Knockback - wall check
hehe, yeah, GMs totally ignore walls/non-passable objects. The only reason GMs even "stop" when they hit a wall is because the client says no, not the server.
So, in the case of GMs, they always pass the "Canmove" check no matter what.
![[Image: 4_Logo.png]](http://aetharia.com/public/style_images/4_Logo.png)
An MMORPG based on the Ultima Online engine.
Completely Custom Map, GUI, AI, Combat, Skills, Crafts, Art, Music and so much more.
http://aetharia.com - Home of Ambition!
|
|
09-12-2012 07:38 AM |
|
|