1
Scripting Chat / Please help with my auto discord script snippet.
« on: June 04, 2014, 11:21:46 AM »
Hi,
Am trying to get this script snippet to scan the journal so that when disco fails it'll loop back and try again but if disco succeeds it'll stop trying to disco the target. I got the first part to work but the second part when disco succeeds the script won't stop and continue to disco the target even though the target is already discorded. I'm not well versed in scanjournal so maybe that's where my problem is. Please advise; again the goal is to keep looping when disco failed but stop looping when disco succeeds. Thanks.
Am trying to get this script snippet to scan the journal so that when disco fails it'll loop back and try again but if disco succeeds it'll stop trying to disco the target. I got the first part to work but the second part when disco succeeds the script won't stop and continue to disco the target even though the target is already discorded. I'm not well versed in scanjournal so maybe that's where my problem is. Please advise; again the goal is to keep looping when disco failed but stop looping when disco succeeds. Thanks.
Code: [Select]
Set %discord #false
heal:
If #FINDCNT > 0 && #HITS > 81 && #MANA > 50 && %PETS_KILL = #TRUE && %Cast_Wait_Timer <= #sCnt2
{
cmppix 1 f
{
Event macro 15 28 ; cast Greater Heal
Target 5s
click 1412 736
wait 10
}
}
If #FINDCNT > 0 && %PETS_KILL = #TRUE && %DISCORD = #FALSE
{
SET #LTARGETID %TARGET_FOUND
Event macro 13 15 ; use skill Discordance
Target 5s
Event macro 22 0 ; last target
scanjournal 1
if fail in #journal
{
deleteJournal
wait 2s
goto heal
}
if another_skill in #journal
{
deleteJournal
wait 2s
goto heal
}
if your_target's_strength in #journal
{
deleteJournal
Set %DISCORD #TRUE
wait 1s
goto heal
}
if that_creature_is_already_in_discord in #journal
{
deleteJournal
Set %DISCORD #TRUE
wait 1s
goto heal
}
}