Ironworks Moderator 
Join Date: June 10, 2001
Location: Pasir Ris, Singapore
Age: 42
Posts: 11,063
|
Introducing... Melf's Acid Arrow.
This one caters to six targets, and takes the scroll into account too. Note that some spells, like Magic Missile has twice the coding due to its' ability to get rid of Mirror Image( selective casting so to speak).
WARNING - Excessive Text,
code:
// Melfs Acid Arrow
IF
ActionListEmpty()
See([ENEMY])
CheckStat(NearestEnemyOf(Myself),0,162) // Target has no Spell Turning
CheckStat(NearestEnemyOf(Myself),0,MINORGLOBE)
!CheckStatGT(Myself,40,SPELLFAILUREMAGE)
!CheckStatGT(NearestEnemyOf(Myself),75,RESISTACID)
!CheckStatGT(NearestEnemyOf(Myself),40,RESISTMAGIC )
!GlobalTimerNotExpired("RoundTimer","LOCALS")
!HasItem("DEMILICH" ,NearestEnemyOf(Myself))
!HasItem("LICH" ,NearestEnemyOf(Myself))
!HasItem("MAGEAMUL" ,NearestEnemyOf(Myself))
!HasItem("RAKRING" ,NearestEnemyOf(Myself))
!StateCheck(NearestEnemyOf(Myself),STATE_CHARMED)
!StateCheck(NearestEnemyOf(Myself),STATE_HELPLESS)
!StateCheck(NearestEnemyOf(Myself),STATE_INVISIBLE )
!StateCheck(NearestEnemyOf(Myself),STATE_IMPROVEDI NVISIBILITY)
HaveSpell(2211)
THEN
RESPONSE #100
SetGlobalTimer("RoundTimer","LOCALS",6)
Spell(NearestEnemyOf(Myself),2211)
END
IF
ActionListEmpty()
See([ENEMY])
CheckStat(SecondNearestEnemyOf(Myself),0,162) // Target has no Spell Turning
CheckStat(SecondNearestEnemyOf(Myself),0,MINORGLOB E)
!CheckStatGT(Myself,40,SPELLFAILUREMAGE)
!CheckStatGT(SecondNearestEnemyOf(Myself),75,RESIS TACID)
!CheckStatGT(SecondNearestEnemyOf(Myself),40,RESIS TMAGIC)
!GlobalTimerNotExpired("RoundTimer","LOCALS")
!HasItem("DEMILICH" ,SecondNearestEnemyOf(Myself))
!HasItem("LICH" ,SecondNearestEnemyOf(Myself))
!HasItem("MAGEAMUL" ,SecondNearestEnemyOf(Myself))
!HasItem("RAKRING" ,SecondNearestEnemyOf(Myself))
!StateCheck(SecondNearestEnemyOf(Myself),STATE_CHA RMED)
!StateCheck(SecondNearestEnemyOf(Myself),STATE_HEL PLESS)
!StateCheck(SecondNearestEnemyOf(Myself),STATE_INV ISIBLE)
!StateCheck(SecondNearestEnemyOf(Myself),STATE_IMP ROVEDINVISIBILITY)
HaveSpell(2211)
THEN
RESPONSE #100
SetGlobalTimer("RoundTimer","LOCALS",6)
Spell(SecondNearestEnemyOf(Myself),2211)
END
IF
ActionListEmpty()
See([ENEMY])
CheckStat(ThirdNearestEnemyOf(Myself),0,162) // Target has no Spell Turning
CheckStat(ThirdNearestEnemyOf(Myself),0,MINORGLOBE )
!CheckStatGT(Myself,40,SPELLFAILUREMAGE)
!CheckStatGT(ThirdNearestEnemyOf(Myself),75,RESIST ACID)
!CheckStatGT(ThirdNearestEnemyOf(Myself),40,RESIST MAGIC)
!GlobalTimerNotExpired("RoundTimer","LOCALS")
!HasItem("DEMILICH" ,ThirdNearestEnemyOf(Myself))
!HasItem("LICH" ,ThirdNearestEnemyOf(Myself))
!HasItem("MAGEAMUL" ,ThirdNearestEnemyOf(Myself))
!HasItem("RAKRING" ,ThirdNearestEnemyOf(Myself))
!StateCheck(ThirdNearestEnemyOf(Myself),STATE_CHAR MED)
!StateCheck(ThirdNearestEnemyOf(Myself),STATE_HELP LESS)
!StateCheck(ThirdNearestEnemyOf(Myself),STATE_INVI SIBLE)
!StateCheck(ThirdNearestEnemyOf(Myself),STATE_IMPR OVEDINVISIBILITY)
HaveSpell(2211)
THEN
RESPONSE #100
SetGlobalTimer("RoundTimer","LOCALS",6)
Spell(ThirdNearestEnemyOf(Myself),2211)
END
IF
ActionListEmpty()
See([ENEMY])
CheckStat(FourthNearestEnemyOf(Myself),0,162) // Target has no Spell Turning
CheckStat(FourthNearestEnemyOf(Myself),0,MINORGLOB E)
!CheckStatGT(Myself,40,SPELLFAILUREMAGE)
!CheckStatGT(FourthNearestEnemyOf(Myself),75,RESIS TACID)
!CheckStatGT(FourthNearestEnemyOf(Myself),40,RESIS TMAGIC)
!GlobalTimerNotExpired("RoundTimer","LOCALS")
!HasItem("DEMILICH" ,FourthNearestEnemyOf(Myself))
!HasItem("LICH" ,FourthNearestEnemyOf(Myself))
!HasItem("MAGEAMUL" ,FourthNearestEnemyOf(Myself))
!HasItem("RAKRING" ,FourthNearestEnemyOf(Myself))
!StateCheck(FourthNearestEnemyOf(Myself),STATE_CHA RMED)
!StateCheck(FourthNearestEnemyOf(Myself),STATE_HEL PLESS)
!StateCheck(FourthNearestEnemyOf(Myself),STATE_INV ISIBLE)
!StateCheck(FourthNearestEnemyOf(Myself),STATE_IMP ROVEDINVISIBILITY)
HaveSpell(2211)
THEN
RESPONSE #100
SetGlobalTimer("RoundTimer","LOCALS",6)
Spell(FourthNearestEnemyOf(Myself),2211)
END
IF
ActionListEmpty()
See([ENEMY])
CheckStat(FifthNearestEnemyOf(Myself),0,162) // Target has no Spell Turning
CheckStat(FifthNearestEnemyOf(Myself),0,MINORGLOBE )
!CheckStatGT(Myself,40,SPELLFAILUREMAGE)
!CheckStatGT(FifthNearestEnemyOf(Myself),75,RESIST ACID)
!CheckStatGT(FifthNearestEnemyOf(Myself),40,RESIST MAGIC)
!GlobalTimerNotExpired("RoundTimer","LOCALS")
!HasItem("DEMILICH" ,FifthNearestEnemyOf(Myself))
!HasItem("LICH" ,FifthNearestEnemyOf(Myself))
!HasItem("MAGEAMUL" ,FifthNearestEnemyOf(Myself))
!HasItem("RAKRING" ,FifthNearestEnemyOf(Myself))
!StateCheck(FifthNearestEnemyOf(Myself),STATE_CHAR MED)
!StateCheck(FifthNearestEnemyOf(Myself),STATE_HELP LESS)
!StateCheck(FifthNearestEnemyOf(Myself),STATE_INVI SIBLE)
!StateCheck(FifthNearestEnemyOf(Myself),STATE_IMPR OVEDINVISIBILITY)
HaveSpell(2211)
THEN
RESPONSE #100
SetGlobalTimer("RoundTimer","LOCALS",6)
Spell(FifthNearestEnemyOf(Myself),2211)
END
IF
ActionListEmpty()
See([ENEMY])
CheckStat(SixthNearestEnemyOf(Myself),0,162) // Target has no Spell Turning
CheckStat(SixthNearestEnemyOf(Myself),0,MINORGLOBE )
!CheckStatGT(Myself,40,SPELLFAILUREMAGE)
!CheckStatGT(SixthNearestEnemyOf(Myself),75,RESIST ACID)
!CheckStatGT(SixthNearestEnemyOf(Myself),40,RESIST MAGIC)
!GlobalTimerNotExpired("RoundTimer","LOCALS")
!HasItem("DEMILICH" ,SixthNearestEnemyOf(Myself))
!HasItem("LICH" ,SixthNearestEnemyOf(Myself))
!HasItem("MAGEAMUL" ,SixthNearestEnemyOf(Myself))
!HasItem("RAKRING" ,SixthNearestEnemyOf(Myself))
!StateCheck(SixthNearestEnemyOf(Myself),STATE_CHAR MED)
!StateCheck(SixthNearestEnemyOf(Myself),STATE_HELP LESS)
!StateCheck(SixthNearestEnemyOf(Myself),STATE_INVI SIBLE)
!StateCheck(SixthNearestEnemyOf(Myself),STATE_IMPR OVEDINVISIBILITY)
HaveSpell(2211)
THEN
RESPONSE #100
SetGlobalTimer("RoundTimer","LOCALS",6)
Spell(SixthNearestEnemyOf(Myself),2211)
END
// Melfs Acid Arrow Scroll
IF
ActionListEmpty()
See([ENEMY])
CheckStat(Myself,0,165) // Not in a state of Improved Alacrity
CheckStat(NearestEnemyOf(Myself),0,162) // Target has no Spell Turning
CheckStat(NearestEnemyOf(Myself),0,MINORGLOBE)
!CheckStatGT(Myself,40,SPELLFAILUREMAGE)
!CheckStatGT(NearestEnemyOf(Myself),75,RESISTACID)
!CheckStatGT(NearestEnemyOf(Myself),40,RESISTMAGIC )
!GlobalTimerNotExpired("RoundTimer","LOCALS")
!HasItem("DEMILICH" ,NearestEnemyOf(Myself))
!HasItem("LICH" ,NearestEnemyOf(Myself))
!HasItem("MAGEAMUL" ,NearestEnemyOf(Myself))
!HasItem("RAKRING" ,NearestEnemyOf(Myself))
!StateCheck(NearestEnemyOf(Myself),STATE_CHARMED)
!StateCheck(NearestEnemyOf(Myself),STATE_HELPLESS)
!StateCheck(NearestEnemyOf(Myself),STATE_INVISIBLE )
!StateCheck(NearestEnemyOf(Myself),STATE_IMPROVEDI NVISIBILITY)
HasItemEquiped("SCRL95",Myself)
THEN
RESPONSE #100
SetGlobalTimer("RoundTimer","LOCALS",6)
UseItem("SCRL95",NearestEnemyOf(Myself))
END
IF
ActionListEmpty()
See([ENEMY])
CheckStat(Myself,0,165) // Not in a state of Improved Alacrity
CheckStat(SecondNearestEnemyOf(Myself),0,162) // Target has no Spell Turning
CheckStat(SecondNearestEnemyOf(Myself),0,MINORGLOB E)
!CheckStatGT(Myself,40,SPELLFAILUREMAGE)
!CheckStatGT(SecondNearestEnemyOf(Myself),75,RESIS TACID)
!CheckStatGT(SecondNearestEnemyOf(Myself),40,RESIS TMAGIC)
!GlobalTimerNotExpired("RoundTimer","LOCALS")
!HasItem("DEMILICH" ,SecondNearestEnemyOf(Myself))
!HasItem("LICH" ,SecondNearestEnemyOf(Myself))
!HasItem("MAGEAMUL" ,SecondNearestEnemyOf(Myself))
!HasItem("RAKRING" ,SecondNearestEnemyOf(Myself))
!StateCheck(SecondNearestEnemyOf(Myself),STATE_CHA RMED)
!StateCheck(SecondNearestEnemyOf(Myself),STATE_HEL PLESS)
!StateCheck(SecondNearestEnemyOf(Myself),STATE_INV ISIBLE)
!StateCheck(SecondNearestEnemyOf(Myself),STATE_IMP ROVEDINVISIBILITY)
HasItemEquiped("SCRL95",Myself)
THEN
RESPONSE #100
SetGlobalTimer("RoundTimer","LOCALS",6)
UseItem("SCRL95",SecondNearestEnemyOf(Myself))
END
IF
ActionListEmpty()
See([ENEMY])
CheckStat(Myself,0,165) // Not in a state of Improved Alacrity
CheckStat(ThirdNearestEnemyOf(Myself),0,162) // Target has no Spell Turning
CheckStat(ThirdNearestEnemyOf(Myself),0,MINORGLOBE )
!CheckStatGT(Myself,40,SPELLFAILUREMAGE)
!CheckStatGT(ThirdNearestEnemyOf(Myself),75,RESIST ACID)
!CheckStatGT(ThirdNearestEnemyOf(Myself),40,RESIST MAGIC)
!GlobalTimerNotExpired("RoundTimer","LOCALS")
!HasItem("DEMILICH" ,ThirdNearestEnemyOf(Myself))
!HasItem("LICH" ,ThirdNearestEnemyOf(Myself))
!HasItem("MAGEAMUL" ,ThirdNearestEnemyOf(Myself))
!HasItem("RAKRING" ,ThirdNearestEnemyOf(Myself))
!StateCheck(ThirdNearestEnemyOf(Myself),STATE_CHAR MED)
!StateCheck(ThirdNearestEnemyOf(Myself),STATE_HELP LESS)
!StateCheck(ThirdNearestEnemyOf(Myself),STATE_INVI SIBLE)
!StateCheck(ThirdNearestEnemyOf(Myself),STATE_IMPR OVEDINVISIBILITY)
HasItemEquiped("SCRL95",Myself)
THEN
RESPONSE #100
SetGlobalTimer("RoundTimer","LOCALS",6)
UseItem("SCRL95",ThirdNearestEnemyOf(Myself))
END
IF
ActionListEmpty()
See([ENEMY])
CheckStat(Myself,0,165) // Not in a state of Improved Alacrity
CheckStat(FourthNearestEnemyOf(Myself),0,162) // Target has no Spell Turning
CheckStat(FourthNearestEnemyOf(Myself),0,MINORGLOB E)
!CheckStatGT(Myself,40,SPELLFAILUREMAGE)
!CheckStatGT(FourthNearestEnemyOf(Myself),75,RESIS TACID)
!CheckStatGT(FourthNearestEnemyOf(Myself),40,RESIS TMAGIC)
!GlobalTimerNotExpired("RoundTimer","LOCALS")
!HasItem("DEMILICH" ,FourthNearestEnemyOf(Myself))
!HasItem("LICH" ,FourthNearestEnemyOf(Myself))
!HasItem("MAGEAMUL" ,FourthNearestEnemyOf(Myself))
!HasItem("RAKRING" ,FourthNearestEnemyOf(Myself))
!StateCheck(FourthNearestEnemyOf(Myself),STATE_CHA RMED)
!StateCheck(FourthNearestEnemyOf(Myself),STATE_HEL PLESS)
!StateCheck(FourthNearestEnemyOf(Myself),STATE_INV ISIBLE)
!StateCheck(FourthNearestEnemyOf(Myself),STATE_IMP ROVEDINVISIBILITY)
HasItemEquiped("SCRL95",Myself)
THEN
RESPONSE #100
SetGlobalTimer("RoundTimer","LOCALS",6)
UseItem("SCRL95",FourthNearestEnemyOf(Myself))
END
IF
ActionListEmpty()
See([ENEMY])
CheckStat(Myself,0,165) // Not in a state of Improved Alacrity
CheckStat(FifthNearestEnemyOf(Myself),0,162) // Target has no Spell Turning
CheckStat(FifthNearestEnemyOf(Myself),0,MINORGLOBE )
!CheckStatGT(Myself,40,SPELLFAILUREMAGE)
!CheckStatGT(FifthNearestEnemyOf(Myself),75,RESIST ACID)
!CheckStatGT(FifthNearestEnemyOf(Myself),40,RESIST MAGIC)
!GlobalTimerNotExpired("RoundTimer","LOCALS")
!HasItem("DEMILICH" ,FifthNearestEnemyOf(Myself))
!HasItem("LICH" ,FifthNearestEnemyOf(Myself))
!HasItem("MAGEAMUL" ,FifthNearestEnemyOf(Myself))
!HasItem("RAKRING" ,FifthNearestEnemyOf(Myself))
!StateCheck(FifthNearestEnemyOf(Myself),STATE_CHAR MED)
!StateCheck(FifthNearestEnemyOf(Myself),STATE_HELP LESS)
!StateCheck(FifthNearestEnemyOf(Myself),STATE_INVI SIBLE)
!StateCheck(FifthNearestEnemyOf(Myself),STATE_IMPR OVEDINVISIBILITY)
HasItemEquiped("SCRL95",Myself)
THEN
RESPONSE #100
SetGlobalTimer("RoundTimer","LOCALS",6)
UseItem("SCRL95",FifthNearestEnemyOf(Myself))
END
IF
ActionListEmpty()
See([ENEMY])
CheckStat(Myself,0,165) // Not in a state of Improved Alacrity
CheckStat(SixthNearestEnemyOf(Myself),0,162) // Target has no Spell Turning
CheckStat(SixthNearestEnemyOf(Myself),0,MINORGLOBE )
!CheckStatGT(Myself,40,SPELLFAILUREMAGE)
!CheckStatGT(SixthNearestEnemyOf(Myself),75,RESIST ACID)
!CheckStatGT(SixthNearestEnemyOf(Myself),40,RESIST MAGIC)
!GlobalTimerNotExpired("RoundTimer","LOCALS")
!HasItem("DEMILICH" ,SixthNearestEnemyOf(Myself))
!HasItem("LICH" ,SixthNearestEnemyOf(Myself))
!HasItem("MAGEAMUL" ,SixthNearestEnemyOf(Myself))
!HasItem("RAKRING" ,SixthNearestEnemyOf(Myself))
!StateCheck(SixthNearestEnemyOf(Myself),STATE_CHAR MED)
!StateCheck(SixthNearestEnemyOf(Myself),STATE_HELP LESS)
!StateCheck(SixthNearestEnemyOf(Myself),STATE_INVI SIBLE)
!StateCheck(SixthNearestEnemyOf(Myself),STATE_IMPR OVEDINVISIBILITY)
HasItemEquiped("SCRL95",Myself)
THEN
RESPONSE #100
SetGlobalTimer("RoundTimer","LOCALS",6)
UseItem("SCRL95",SixthNearestEnemyOf(Myself))
END [/QUOTE]
[ 06-04-2003, 12:20 PM: Message edited by: Dundee Slaytern ]
|