[ACK PATCH] Fixing the touch macro
Posted: Mon Sep 14, 2009 8:27 am
This code patch for the ACK player module (ACK02) is based on the ACK 3.251 release, using the procedure described in a previous post. Warning: given that I do not understand approximately 99% of the code in the ACK source package, it is entirely possible (and in fact quite likely) that modifying your ACK release as detailed below will result in horrific bugs and crashes. I take no responsibility for any aggravation that results from this.
It appears that the touch macro function (runs a macro when a creature scores a melee weapon hit on the player with >0 damage) is broken in the current release. This patch attempts to fix the touch macro.
THE EDITS: In O_PLAY2.PAS, starting around line 787, replace the following code in the 'hitcreature' function:
with the following code:
Also, in O_PLAY3.PAS, replace this code starting around line 562:
with the following code:
Verified that this appears to work using BRIGANDS (after bumping the version up to 3.0 in the config editor):

It appears that the touch macro function (runs a macro when a creature scores a melee weapon hit on the player with >0 damage) is broken in the current release. This patch attempts to fix the touch macro.
THE EDITS: In O_PLAY2.PAS, starting around line 787, replace the following code in the 'hitcreature' function:
Code: Select all
if crc^[rcrc^[who].crcsource].touchm<>0 then
if weapon0t=7 then
if ack.ackversion>=30 then run_macro(crc^[rcrc^[who].crcsource].touchm);
Code: Select all
if crc^[attacker_id].touchm<>0 then
if weapon0t=7 then
if ack.ackversion>=30 then run_macro(crc^[attacker_id].touchm);
Code: Select all
if crc^[rcrc^[who].crcsource].touchm<>0 then
if weapon0t=7 then
if ack.ackversion>=30 then run_macro(crc^[rcrc^[who].crcsource].touchm);
Code: Select all
if crc^[attacker_id].touchm<>0 then
if weapon0t=7 then
if ack.ackversion>=30 then run_macro(crc^[attacker_id].touchm);
