Skip to content

Commit 3fc525b

Browse files
committed
Refactor boolean checks and improve code readability
- Removed unnecessary Bool[] wrappers around boolean expressions in various scripts to simplify conditions. - Updated spell checking logic in xiris_casting.inc to directly use IDs instead of Bool[]. - Cleaned up event handling in xiris_events_raid_epic.inc and xiris_events_raid_god.inc by removing redundant Bool[] checks. - Enhanced pet handling logic in xiris_pets.inc by streamlining pet checks. - Removed commented-out code and unnecessary delays in movement handling in xiris_movement.inc. - Improved clarity in healing and curing scripts by directly checking IDs instead of using Bool[]. - General code cleanup across multiple files for better maintainability and performance.
1 parent d6bba80 commit 3fc525b

20 files changed

+89
-166
lines changed

bot_clr.mac

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ Sub MGBCelestialRegeneration
194194
/return
195195

196196
Sub EVENT_DivineInterventionRequest(_line, _sender, _eventParams)
197-
/if (${Bool[${Me.Spell[Divine Intervention].ID}]}) {
197+
/if (${Me.Spell[Divine Intervention].ID}) {
198198
/if (${Me.SpellReady[Divine Intervention]}) {
199199
/declare tid int local ${Spawn[pc ${_sender}].ID}
200200
/if (${Target.ID} != ${tid}) {

xiris_class_ini/BOT_BER_Ophetia.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
h2h=NULL
3030

3131
[DOWNFLAGS]
32-
downflagCount=1
32+
downflagCount=3
3333
downflag1=Form of Endurance III|47292 item
3434
downflag2=Savage Guard|68784 item
3535
downflag3=Taelosian Guard|69131 item

xiris_common/xiris_buffing.inc

Lines changed: 12 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ Sub cmbtBuffMT
196196
/delay 20 ${DanNet.Query.Received}
197197
/varset bDuration ${DanNet.Q}
198198

199-
/if (!${Bool[${bDuration}]} ) {
199+
/if (!${bDuration} ) {
200200
/call TrueTarget ${Spawn[pc =${str_MTName}].ID}
201201
/call MQ2Cast "${bSpell}" ${bGem}
202202
/if (${Cast.Result.Equal[CAST_SUCCESS]}) {
@@ -254,16 +254,10 @@ Sub cmbtBuffGRP
254254
/dquery ${gName} -q "Me.Buff[${buffSpell}].Duration.TotalSeconds"
255255
/delay 20 ${DanNet.Query.Received}
256256
/varcalc bDuration ${DanNet.Q}
257-
/echo cmbtBuffGRP: \aw${gName} -q \ag"Me.Buff[${buffSpell}].Duration" == \ar ${bDuration} \awbool \ag${Bool[${bDuration}]}
258-
/if (${Bool[${bDuration}]} ) {
259-
260-
/if (${bDuration} < 3 ) {
261-
/echo \awbDuration: \ay${bDuration} \aw<3s, \agrecasting
262-
/goto :castCMBTBuff
263-
} else {
264-
/echo \awDuration: \ay${bDuration} \aw>= 3s, \aoskipping
265-
/goto :nextGroupMember
266-
}
257+
/echo cmbtBuffGRP: \aw${gName} -q \ag"Me.Buff[${buffSpell}].Duration" == \ar ${bDuration} \awbool \ag${bDuration}
258+
/if (${bDuration} < 3) {
259+
/echo \awbDuration: \ay${bDuration} \aw<3s, \agrecasting
260+
/goto :castCMBTBuff
267261
} else {
268262
/goto :castCMBTBuff
269263
}
@@ -313,7 +307,7 @@ Sub doGroupBuffOnTarget(string tgt)
313307
/delay 10
314308

315309
/for i 1 to ${int_oocBuffTotal}
316-
/varset buffUse ${Bool[${OOCBUFF_${i}_Use}]}
310+
/varset buffUse ${OOCBUFF_${i}_Use}
317311
/if (!${buffUse}) /goto :NextGB
318312
/varset buffSpell ${OOCBUFF_${i}}
319313
/varcalc buffDuration ${Spell[${OOCBUFF_${i}}].Duration.TotalSeconds}
@@ -650,10 +644,10 @@ Sub RemoveBuff(_badBuff)
650644
/declare buffName ${_badBuff.Replace[|,']}
651645
/echo \agRemoving Buff \ao${buffName} (was ${_badBuff})
652646
/for i 0 to 24
653-
/if (${Bool[${Window[BuffWindow].Child[BW_Buff${i}_Button].Tooltip}]} && ${Window[BuffWindow].Child[BW_Buff${i}_Button].Tooltip.Find[${buffName}]}) {
647+
/if (${Window[BuffWindow].Child[BW_Buff${i}_Button].Tooltip} && ${Window[BuffWindow].Child[BW_Buff${i}_Button].Tooltip.Find[${buffName}]}) {
654648
/varset buffName ${Window[BuffWindow].Child[BW_Buff${i}_Button].Tooltip.Arg[1,(]}
655649
/varset buffName ${buffName.Left[${Math.Calc[${buffName.Length}-1]}]}
656-
/if (${Bool[${buffName}]}) /nomodkey /notify BuffWindow Buff${Math.Calc[${Me.Buff[${buffName}].ID}-1].Int} leftmouseup
650+
/if (${buffName}) /nomodkey /notify BuffWindow Buff${Math.Calc[${Me.Buff[${buffName}].ID}-1].Int} leftmouseup
657651
}
658652
/next i
659653
/return
@@ -717,16 +711,9 @@ Sub chkATTKBuffs
717711
/if (${SpawnCount[pc ${bTarget}]} == 0 || ${Spawn[pc ${bTarget}].Distance3D} > 100) /goto :nextATTKTarget
718712
/dquery ${bTarget} -q "Me.Buff[${ATTK_1_Spell}].Duration.TotalSeconds"
719713
/delay 20 ${DanNet.Query.Received}
720-
/varcalc bDuration ${DanNet.Q}
721-
|/echo chkATTKBuffs: \aw${bTarget} -q \ag"Me.Buff[${ATTK_1_Spell}].Duration" == \ar ${bDuration} \awbool \ag${Bool[${bDuration}]}
722-
/if (${Bool[${bDuration}]} ) {
723-
/if (${bDuration} < 3 ) {
724-
|/echo \arbDuration < 3! casting!
725-
/goto :castATTKBuff
726-
} else {
727-
|/echo \aghas duration, skipping
728-
/goto :nextATTKTarget
729-
}
714+
/varcalc bDuration ${DanNet.Q}
715+
/if (${bDuration} < 3 ) {
716+
/goto :castATTKBuff
730717
} else {
731718
/goto :castATTKBuff
732719
}
@@ -738,7 +725,7 @@ Sub chkATTKBuffs
738725
/goto :return
739726
740727
:castATTKBuff
741-
/echo castATTKBuff: \aw${bTarget} -q \ag"Me.Buff[${ATTK_1_Spell}].Duration" == \ar ${bDuration} \awbool \ag${Bool[${bDuration}]}
728+
/echo castATTKBuff: \aw${bTarget} -q \ag"Me.Buff[${ATTK_1_Spell}].Duration" == \ar ${bDuration} \awbool \ag${bDuration}
742729
/call TrueTarget ${Spawn[pc =${bTarget}].ID}
743730
/call MQ2Cast "${ATTK_1_Spell}"
744731
/if (${Cast.Result.Equal[CAST_SUCCESS]}) {

xiris_common/xiris_burn.inc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ Sub chkBurn
176176
| Item
177177
| Check to see if burn == item && useable && (item in inventory && there is no timer) && (I am not Casting || I am a bard)
178178
| ---------------
179-
} else /if (${BURN_${i}_Type.Equal[item]} && ${BURN_${i}_Use} && (${Bool[${FindItem[${BURN_${i}}].ID}]} && ${FindItem[=${BURN_${i}}].TimerReady} == 0) && (!${Bool[${Me.Casting.ID}]} || ${Me.Class.ShortName.Equal[BRD]})) {
179+
} else /if (${BURN_${i}_Type.Equal[item]} && ${BURN_${i}_Use} && (${FindItem[${BURN_${i}}].ID} && ${FindItem[=${BURN_${i}}].TimerReady} == 0) && (!${Me.Casting.ID} || ${Me.Class.ShortName.Equal[BRD]})) {
180180
/if (${Spell[${FindItem[${BURN_${i}}].Clicky}].SpellType.Equal[BENEFICIAL]} && !${Me.FreeBuffSlots}) /goto :nextBurn
181181
/echo \awBurn_\ag${i} \ao${BURN_${i}} \awType:\ag${BURN_${i}_Type} \awUse:\ag${BURN_${i}_Use} \awAfter:\ag${BURN_${i}_AfterIndex} \awMGB:\ag${BURN_${i}_MGB}
182182
/echo \aoBurn is item type, trying ${BURN_${i}}
@@ -415,7 +415,7 @@ Sub CreateBurnLineup
415415
416416
417417
/declare i int local
418-
/if (${Bool[${BURN_Total}]}) {
418+
/if (${BURN_Total}) {
419419
/for i 1 to ${BURN_Total}
420420
/call AddBurnToLineup BURN ${i} ${Ini[INI_CHAR,BURN,BURN_${i}]}
421421
/next i
@@ -429,7 +429,7 @@ Sub CreateAALineup
429429
/declare AA_Total int outer ${Ini[INI_CHAR,AA,AA_Total,0]}
430430
431431
/declare i int local
432-
/if (${Bool[${AA_Total}]}) {
432+
/if (${AA_Total}) {
433433
/for i 1 to ${AA_Total}
434434
/call AddAAToLineup AA ${i} ${Ini[INI_CHAR,AA,AA_${i}]}
435435
/next i
@@ -444,7 +444,7 @@ Sub CreateClickyLineup
444444
/declare CLICKY_Total int outer ${Ini[INI_CHAR,CLICKY,CLICKY_Total,0]}
445445
446446
/declare i int local
447-
/if (${Bool[${CLICKY_Total}]}) {
447+
/if (${CLICKY_Total}) {
448448
/for i 1 to ${CLICKY_Total}
449449
/call AddClickyToLineup CLICKY ${i} ${Ini[INI_CHAR,CLICKY,CLICKY_${i}]}
450450
/next i

xiris_common/xiris_casting.inc

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -641,7 +641,7 @@ Sub Event_ChkHasSpell(_line, _sender, _eventParams)
641641
Sub chkHasSpell(string _clz, string _spell)
642642
/echo checking spell _clz: ${_clz} _spell:${_spell}
643643
/if (${Me.Class.ShortName.Equal[${_clz}]}) {
644-
/if (${Bool[${Me.Spell[${_spell}].ID}]}) {
644+
/if (${Me.Spell[${_spell}].ID}) {
645645
/docommand /${announceChannel} ${_spell} Found.
646646
}
647647
}
@@ -660,35 +660,35 @@ Sub ResetCastTimers
660660

661661
/declare i int local
662662
:nuke
663-
/if (!${Bool[${NUKE_Total}]}) /goto :return
663+
/if (!${NUKE_Total}) /goto :return
664664
/varset NUKE_HasCastOnce FALSE
665665
/for i 1 to ${NUKE_Total}
666666
/varset NUKE_${i}_HasCastOnce FALSE
667667
/next i
668668

669669
:qnuke
670-
/if (!${Bool[${QNUKE_Total}]}) /goto :return
670+
/if (!${QNUKE_Total}) /goto :return
671671
/varset QNUKE_HasCastOnce FALSE
672672
/for i 1 to ${QNUKE_Total}
673673
/varset QNUKE_${i}_HasCastOnce FALSE
674674
/next i
675675

676676
:stuns
677-
/if (!${Bool[${STUN_Total}]}) /goto :return
677+
/if (!${STUN_Total}) /goto :return
678678
/varset STUN_HasCastOnce FALSE
679679
/for i 1 to ${STUN_Total}
680680
/varset STUN_${i}_HasCastOnce FALSE
681681
/next i
682682

683683
:QDOT
684-
/if (!${Bool[${QDOT_Total}]}) /goto :return
684+
/if (!${QDOT_Total}) /goto :return
685685
/varset QDOT_HasCastOnce FALSE
686686
/for i 1 to ${QDOT_Total}
687687
/varset QDOT_${i}_HasCastOnce FALSE
688688
/next i
689689

690690
:DoT
691-
/if (!${Bool[${DOT_Total}]}) /goto :return
691+
/if (!${DOT_Total}) /goto :return
692692
/varset DOT_HasCastOnce FALSE
693693
/for i 1 to ${DOT_Total}
694694
/varset DOT_${i}_HasCastOnce FALSE
@@ -853,7 +853,7 @@ Sub CreateCastingLineup
853853
/declare NUKE_StopHP int outer ${Ini[INI_CHAR,NUKE,NUKE_StopHP,5]}
854854
/declare NUKE_StartHPIfNamed int outer ${Ini[INI_CHAR,NUKE,NUKE_StartHPIfNamed,100]}
855855
/declare NUKE_StopHPIfNamed int outer ${Ini[INI_CHAR,NUKE,NUKE_StopHPIfNamed,0]}
856-
/if (${Bool[${NUKE_Total}]}) {
856+
/if (${NUKE_Total}) {
857857
/for i 1 to ${NUKE_Total}
858858
/call AddSpellToLineup NUKE ${i} ${Ini[INI_CHAR,NUKE,NUKE_${i}]}
859859
/next i
@@ -866,7 +866,7 @@ Sub CreateCastingLineup
866866
/declare AENUKE_Mana_Minimum int outer ${Ini[INI_CHAR,AENUKE,AENUKE_Mana_Minimum,10]}
867867
/declare AENUKE_StartHP int outer ${Ini[INI_CHAR,AENUKE,AENUKE_StartHP,98]}
868868
/declare AENUKE_StopHP int outer ${Ini[INI_CHAR,AENUKE,AENUKE_StopHP,0]}
869-
/if (${Bool[${AENUKE_Total}]}) {
869+
/if (${AENUKE_Total}) {
870870
/for i 1 to ${AENUKE_Total}
871871
/call AddSpellToLineup AENUKE ${i} ${Ini[INI_CHAR,AENUKE,AENUKE_${i}]}
872872
/next i
@@ -883,7 +883,7 @@ Sub CreateCastingLineup
883883
/declare QNUKE_StopHP int outer ${Ini[INI_CHAR,QNUKE,QNUKE_StopHP,0]}
884884
/declare QNUKE_StartHPIfNamed int outer ${Ini[INI_CHAR,QNUKE,QNUKE_StartHPIfNamed,100]}
885885
/declare QNUKE_StopHPIfNamed int outer ${Ini[INI_CHAR,QNUKE,QNUKE_StopHPIfNamed,0]}
886-
/if (${Bool[${QNUKE_Total}]}) {
886+
/if (${QNUKE_Total}) {
887887
/for i 1 to ${QNUKE_Total}
888888
/call AddSpellToLineup QNUKE ${i} ${Ini[INI_CHAR,QNUKE,QNUKE_${i}]}
889889
/next i
@@ -895,7 +895,7 @@ Sub CreateCastingLineup
895895
/declare STUN_HasCastOnce bool outer FALSE
896896
/declare STUN_Mana_Minimum int outer ${Ini[INI_CHAR,STUN,STUN_Mana_Minimum,0]}
897897
/declare STUN_UseLocking bool outer FALSE
898-
/if (${Bool[${STUN_Total}]}) {
898+
/if (${STUN_Total}) {
899899
/for i 1 to ${STUN_Total}
900900
/call AddSpellToLineup STUN ${i} ${Ini[INI_CHAR,STUN,STUN_${i}]}
901901
/next i
@@ -913,7 +913,7 @@ Sub CreateCastingLineup
913913
/declare QDOT_StopHP int outer ${Ini[INI_CHAR,QDOT,QDOT_StopHP,10]}
914914
/declare QDOT_StartHPIfNamed int outer ${Ini[INI_CHAR,QDOT,QDOT_StartHPIfNamed,100]}
915915
/declare QDOT_StopHPIfNamed int outer ${Ini[INI_CHAR,QDOT,QDOT_StopHPIfNamed,5]}
916-
/if (${Bool[${QDOT_Total}]}) {
916+
/if (${QDOT_Total}) {
917917
/for i 1 to ${QDOT_Total}
918918
/call AddSpellToLineup QDOT ${i} ${Ini[INI_CHAR,QDOT,QDOT_${i}]}
919919
/next i
@@ -930,7 +930,7 @@ Sub CreateCastingLineup
930930
/declare DOT_StopHP int outer ${Ini[INI_CHAR,DOT,DOT_StopHP,10]}
931931
/declare DOT_StartHPIfNamed int outer ${Ini[INI_CHAR,DOT,DOT_StartHPIfNamed,100]}
932932
/declare DOT_StopHPIfNamed int outer ${Ini[INI_CHAR,DOT,DOT_StopHPIfNamed,0]}
933-
/if (${Bool[${DOT_Total}]}) {
933+
/if (${DOT_Total}) {
934934
/for i 1 to ${DOT_Total}
935935
/call AddSpellToLineup DOT ${i} ${Ini[INI_CHAR,DOT,DOT_${i}]}
936936
/next i
@@ -951,7 +951,7 @@ Sub chkCastTarget
951951
|/echo \awchkCastTarget corpse? \ag${Target.Name.Find[s_corpse]} \awstop? \ag${int_temp_stopCastPoint}
952952
| I'm no longer casting, or no longer need to stop it ie, target is MT
953953
/call RunRapidEvents
954-
/if (!${Bool[${Me.Casting.ID}]}) /goto :return
954+
/if (!${Me.Casting.ID}) /goto :return
955955
956956
| If the Target is Dead... stop
957957
/if (${Target.Name.Find[s_corpse]}) /goto :interrupt

xiris_common/xiris_casting_resists.ini

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,3 @@ vangl=cold|poison|magic|fire
1010
muram=magic
1111

1212
[Resists.arena]
13-
14-
/if (${Bool[${Target.CleanName.Find[xxx]}]})

xiris_common/xiris_charm.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ Sub CreateCharmLineup
203203
204204
/echo CHARM_Total: ${CHARM_Total}
205205
206-
/if (${Bool[${CHARM_Total}]}) {
206+
/if (${CHARM_Total}) {
207207
/for i 1 to ${CHARM_Total}
208208
/call addSpellToLineup CHARM ${i} ${Ini[INI_CHAR,CHARM,CHARM_${i}]}
209209
/declare CHARM_${i}_Type string outer ${Ini[INI_CHAR,CHARM,CHARM_${i}_Type,NORMAL]}

xiris_common/xiris_common.inc

Lines changed: 14 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ Sub xbot_initialize(string _tank1Name, string _tank2Name, string _tank3Name, int
303303
/declare int_defAssistAt int outer ${Ini[INI_CHAR,DEFAULT_SETTINGS,assistAt,98]}
304304
/declare int_assistAt int outer ${int_defAssistAt}
305305
/if (${_assistArgs.Length}) {
306-
/varset bln_autoAssist ${Bool[${_assistArgs.Token[1,,]}]}
306+
/varset bln_autoAssist ${_assistArgs.Token[1,,]}
307307
/varset int_assistAt ${_assistArgs.Token[2,,]}
308308
}
309309
/echo \ayAuto Assist settings: \awAuto?\ag${bln_autoAssist} \awAt?\ag${int_assistAt} \awArgs:\ag${_assistArgs}
@@ -543,14 +543,14 @@ Sub chkTargetStatus
543543
:chkTargetValid
544544
| Assumes bln_engaged == true
545545
| Check for target being corpse or non-existant
546-
/if ((!${Bool[SpawnCount npc id ${int_targetID}]} || ${Spawn[id ${int_targetID}].Type.Equal[corpse]} || ${Spawn[id ${int_targetID}].Name.Find[s_corpse]})) {
546+
/if ((!${SpawnCount[npc id ${int_targetID}]} || ${Spawn[id ${int_targetID}].Type.Equal[corpse]} || ${Spawn[id ${int_targetID}].Name.Find[s_corpse]})) {
547547
/echo \awNo Targets with ID(\ay${int_targetID}\aw) or is a CORPSE \aoDisengaging!
548548
/varset reason TARGET_IS_CORPSE
549549
/goto :disengage
550550
}
551551

552552
| Check to see if my target is NPC and there is no NPCs around
553-
/if (${Bool[${Target.ID}]} && ${Target.ID} == ${int_MTID} && (!${SpawnCount[npc id ${int_targetID} radius 200]} || ${Zone.ShortName.Equal[${Me.BoundLocation[0]}]})) {
553+
/if (${Target.ID} && ${Target.ID} == ${int_MTID} && (!${SpawnCount[npc id ${int_targetID} radius 200]} || ${Zone.ShortName.Equal[${Me.BoundLocation[0]}]})) {
554554
/echo \awTarget is MT, and No NPC in radius 200 (or at bind) \aoDisengaging!
555555
/varset reason TARGETMT_or_ATBIND
556556
/goto :disengage
@@ -564,7 +564,7 @@ Sub chkTargetStatus
564564
}
565565

566566
| If there is something on XTarget, and its over 400 away, ignore it.
567-
/if (${Bool[${Me.XTarget}]} && (!${SpawnCount[npc radius 400]} || ${Zone.ShortName.Equal[${Me.BoundLocation[0]}]})) {
567+
/if (${Me.XTarget} && (!${SpawnCount[npc radius 400]} || ${Zone.ShortName.Equal[${Me.BoundLocation[0]}]})) {
568568
/echo \awNo Targets within 400, even if they are on XTarget \aoDisengaging!
569569
/varset reason NOTARGETWITHIN400_AND_HASXTARGET
570570
/goto :disengage
@@ -675,8 +675,6 @@ Sub Disengage
675675
/if (${str_classArchetype.Equal[MELEE_END]} || ${str_classArchetype.Equal[MELEE_MANA]} || ${str_classArchetype.Equal[TANK]}) {
676676
/echo \ag Disengage: Attack Off
677677
/squelch /attack off
678-
/delay 5
679-
/squelch /attack off
680678
/stick off
681679
}
682680
/if (${Pet.ID}) /pet back off
@@ -717,11 +715,11 @@ Sub TrueTarget(int _targetID)
717715
**|
718716
Sub chkMTAlive(bool _setAsTarget)
719717
|--MT is a live and ID is correct
720-
/if (${Bool[${SpawnCount[PC ${str_MTName}]}]} && (${int_MTID} == ${Spawn[PC ${str_MTName}].ID})) /goto :return
718+
/if (${SpawnCount[PC ${str_MTName}]} && (${int_MTID} == ${Spawn[PC ${str_MTName}].ID})) /goto :return
721719

722720
|--MT, ST, and TT are not in zone or dead!
723-
/if (${Bool[${SpawnCount[PC ${str_MTName}]}]} && ${Bool[${SpawnCount[PC ${str_STName}]}]} && ${Bool[${SpawnCount[PC ${str_TTName}]}]}) {
724-
/if (${Bool[${Me.Casting.ID}]}) /call Interrupt
721+
/if (!${SpawnCount[PC ${str_MTName}]} && !${SpawnCount[PC ${str_STName}]} && !${SpawnCount[PC ${str_TTName}]}) {
722+
/if (${Me.Casting.ID}) /call Interrupt
725723
/echo \arALL TANKS ARE DEAD!
726724
/call getMTbyPrecedence
727725
/varset int_MTID ${Spawn[PC ${Macro.Return}].ID}
@@ -730,15 +728,15 @@ Sub chkMTAlive(bool _setAsTarget)
730728
}
731729

732730
|--MT is alive but ID is wrong;
733-
/if (${Bool[${SpawnCount[PC ${str_MTName}]}]} && (${int_MTID} != ${Spawn[PC ${str_MTName}].ID})) {
731+
/if (${SpawnCount[PC ${str_MTName}]} && (${int_MTID} != ${Spawn[PC ${str_MTName}].ID})) {
734732
/echo \ay MT ${str_MTName} is alive, and my MTID ${int_MTID} is wrong
735733
/varset int_MTID ${Spawn[${str_MTName}].ID}
736734
/goto :hasChanged
737735
}
738736

739737
|--ST is still alive;
740-
/if (${Bool[${SpawnCount[PC ${str_STName}]}]} && (${int_MTID} != ${Spawn[PC ${str_STName}].ID})) {
741-
/if (${Bool[${Me.Casting.ID}]}) /call Interrupt
738+
/if (${SpawnCount[PC ${str_STName}]} && (${int_MTID} != ${Spawn[PC ${str_STName}].ID})) {
739+
/if (${Me.Casting.ID}) /call Interrupt
742740
/echo \ao ST is still alive, switching!
743741
/varset str_MTName ${str_STName}
744742
/varset str_STName ${str_TTName}
@@ -747,8 +745,8 @@ Sub chkMTAlive(bool _setAsTarget)
747745
}
748746

749747
|--TT is still alive;
750-
/if (${Bool[${SpawnCount[PC ${str_TTName}]}]} && (${int_MTID} != ${Spawn[PC ${str_TTName}].ID})) {
751-
/if (${Bool[${Me.Casting.ID}]}) /call Interrupt
748+
/if (${SpawnCount[PC ${str_TTName}]} && (${int_MTID} != ${Spawn[PC ${str_TTName}].ID})) {
749+
/if (${Me.Casting.ID}) /call Interrupt
752750
/echo \ao TT is still alive, switching!
753751
/varset str_MTName ${str_TTName}
754752
/varset int_MTID ${Spawn[${str_TTName}].ID}
@@ -763,7 +761,7 @@ Sub chkMTAlive(bool _setAsTarget)
763761

764762
|-- If set as target, target the new MT immediately
765763
/if (${_setAsTarget} && (${Target.ID} != ${int_MTID})) {
766-
/if (${Bool[${Me.Casting.ID}]}) /call Interrupt
764+
/if (${Me.Casting.ID}) /call Interrupt
767765
/call TrueTarget ${int_MTID}
768766
}
769767
:return
@@ -1354,9 +1352,8 @@ Sub Event_CheckNaked
13541352
/return
13551353
13561354
Sub chkNaked
1357-
|/echo chkNaked ${Bool[${Me.Inventory[2].Name}]} ${timer_naked}
13581355
/doevents flush chkNaked
1359-
/if (!${Bool[${Me.Inventory[2].Name}]} && !${timer_naked}) {
1356+
/if (!${Me.Inventory[2].ID} && !${timer_naked}) {
13601357
/docommand /${announceChannel} I am NAKED.
13611358
/varset bln_naked TRUE
13621359
/varset timer_naked 30s

xiris_common/xiris_curing.inc

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ Sub chkNeedCure
326326
/if (${str_myCurer.Equal[${Me.Name}]}) {
327327
/call handleCureRequest ${Me.Name} ${Me.ID} ${cureType} ${counters} ${forceCure}
328328
} else {
329-
/if (${Bool[${Spawn[pc ${str_myCurer}].ID}]}) {
329+
/if (${Spawn[pc ${str_myCurer}].ID}) {
330330
/echo \aoCurer:\ag${str_myCurer} \aoDist:\ag${Spawn[pc ${str_myCurer}].Distance3D} \aoRange:\ag${cureRange}
331331
/if (${Spawn[pc ${str_myCurer}].Distance3D} < ${cureRange}) {
332332
/echo \aoCURE REQUESTED:\ay Counters:\ag${counters} \ayType:\ag${cureType} \ayForced:\ag${forceCure}
@@ -721,9 +721,7 @@ Sub handleCureMarkOfDeath(string _name, int _id, bool _group, int _dCount)
721721
/shout Already cured ${_name} ${_id}
722722
/return
723723
}
724-
} else {
725-
/dgge /warp id ${Me.ID}
726-
}
724+
}
727725
/call castCure ${_name} ${_id} "${str_cureToUse}" ${int_finalCount} disease ${_dCount} TRUE
728726
/call TrueTarget ${int_MTID}
729727
/return

0 commit comments

Comments
 (0)