Help with Monk code
Posted: Sat Jun 19, 2004 4:12 pm
i recently needed to convert some rogue helper code to be usuable by monks. what i wanted to accomplish is for them to, instead of backstabbing, kick, which i did correctly. But i also wanted him to FD once he got to his anchor location or his anchor person. i got it to work but it acts up. what happens is everytime it updates the text message in the MQ window with the "moving closer to target.... # feet away" he fd's and stands back up. this i dont get seeing that i put a /if only if he gets to his target to fd, here check it out. I could be half the zone away from my anchor character and on the way to him it would FD and stand back up immediately all the way to him everytime it would update the message.
the first section is if the anchor is a location (that part works fine) the second part is if they are following a person thats the part that is messin up. im kinda new at this so if im missin something obvious warn me 8)
Code: Select all
/if (${doLeash} && !${strikeReady}) {
/if (${leashholder.Equal[Nobody]} && (${Math.Distance[${Me.Y},${Me.X}:${stakeY},${stakeX}]}>20)) {
/if (!${Me.Standing}) /stand
/echo Moving closer to the Stake... ${Math.Distance[${Me.Y},${Me.X}:${stakeY},${stakeX}]} ft. away
/face nolook loc ${stakeY},${stakeX}
/keypress forward hold
/delay 1s ${Math.Distance[${Me.Y},${Me.X}:${stakeY},${stakeX}]}<20
/keypress forward
/if (${Math.Distance[${Me.Y},${Me.X}:${stakeY},${stakeX}]}<20) {
/echo Arrived near the Stake, Flopping.
/if (${Me.AbilityReady["Feign Death"]}) {
/doability "Feign Death"
} else {
/delay 5
/doability "Feign Death"
}
/face fast nolook away loc ${stakeY},${stakeX}
}
}
/if (!${leashholder.Equal[Nobody]} && ${Spawn[${leashholder}].ID} && (${Spawn[${leashholder}].Distance}>21)) {
/if (!${Me.Standing}) /stand
/echo Moving closer to ${leashholder}... ${Spawn[${leashholder}].Distance} ft. away
/if (${Target.ID}!=${Spawn[${leashholder}].ID}) /target id ${Spawn[${leashholder}].ID}
/if (${Me.Combat}) /attack off
/face nolook
/keypress forward hold
/delay 1s ${Spawn[${leashholder}].Distance}<21
/keypress forward
/if (${Spawn[${leashholder}].Distance}<21) { /echo Arrived near Master (${leashholder}) , Flopping.
/if (${Me.AbilityReady["Feign Death"]}) {
/doability "Feign Death"
}
}
}
|- Broken leash check
/if (!${leashholder.Equal[Nobody]} && !${Spawn[${leashholder}].ID}) {
/echo ** Master DEAD or ZONED! Leash is BROKEN!
/varset doLeash FALSE
/varset leashholder Nobody
/ini "RHSettings.ini" "General" "Leashing" "${doLeash}"
/ini "RHSettings.ini" "General" "LeashHolder" "${leashholder}"
}
}
the first section is if the anchor is a location (that part works fine) the second part is if they are following a person thats the part that is messin up. im kinda new at this so if im missin something obvious warn me 8)