small mac

Anything

Anytime!
Joined
Apr 3, 2006
Messages
232
Reaction score
0
Points
0
Location
Chico, Ca.
Code:
|08/02/06 by Rusty
#include Ninjadvloot.inc 

Sub Main
/declare spawnname string outer "unknown"
/if (${Defined[Param0]}) { 
/varset spawnname ${Param0} 
} else { 
/echo No spawn selected! /macro farmer spawnname
/endmac
} 

/Echo ============================= 
/Echo AFK Farmer "${spawnname}" V1.4 
/Echo ============================= 

/call SetupAdvLootVars

:loop
/if (${Me.Sitting}) /stand
/if (${Spawn[gm].ID}) /call Gm
/if (${Me.PctHPs}<=30) /call Fade
/call Kill
/goto :loop

Sub Kill
/target id ${NearestSpawn[npc ${spawnname}].ID} 
/delay 1s
/If (!${Target.ID}) /call Wait
/If (${Target.ID}) /call Warp
/If (${Target.ID}) /call Combat
/return

Sub Warp
/stick 10
/delay 1s
/return

Sub Combat
/if (${Me.PctHPs}<=30) /return
/stick 10 
:Kill
/if (${Target.Distance} < ${Target.MaxRangeTo} && !${Me.Combat})  /attack on 
/if (${Target.ID}) /goto :Kill
/squelch /stick off
/delay 1s
/call CheckAdds
/doability "Mend"
/delay 1s
/call LootMobs
/return

Sub Gm
/camp
/endmac
/return

Sub Wait
/echo no ${spawnname} waiting two min
/delay 2m 
/return

Sub Pc
:pc
/if (${SpawnCount[pc]}==1) /return
/echo another player in zone waiting till they leave
/delay 5m
/goto :pc
/return

Sub Fade
/echo FDing and waiting due to low hp

/if (${Me.Class.Name.Equal[Monk]}) {
          /doability "Feign Death"
    }
/return
/delay 1m    
:Wait
/if (${Me.PctHPs}<=75) /goto :Wait
/return 

Sub CheckAdds
     /declare s int local 
     /declare i int local 
     /for i 1 to 3 
       /varset s ${NearestSpawn[${i},npc].ID} 
       /if (${Spawn[${s}].Type.Equal["Corpse"]} || !${Spawn[${s}].LineOfSight}) /next i 
       /if (${Spawn[${s}].Distance} <  50 && ${Spawn[${s}].LineOfSight}) { 
         /squelch /target id ${s} 
         /goto :Got_Add 
       } 
     /next i  
     /return 
     :Got_Add   
     /call Combat
     /delay 1s 
   /return

im having trouble with the fade sub, it wants to still attack while im FD and im not getting it to stand after recovering enough HP to continue??

Sub Fade
/echo FDing and waiting due to low hp

/if (${Me.Class.Name.Equal[Monk]}) {
/doability "Feign Death"
}
/return
/delay 1m
:Wait
/if (${Me.PctHPs}<=75) /goto :Wait
/return
 
Sub Fade
/echo FDing and waiting due to low hp

/if (${Me.Class.Name.Equal[Monk]}) {
/doability "Feign Death"
}
/return
/delay 1m
:Wait
/if (${Me.PctHPs}<=75) /goto :Wait
/return

Change to

Code:
Sub Fade
/echo FDing and waiting due to low hp

/if (${Me.Class.Name.Equal[Monk]}) {
          /doability "Feign Death"
    }
/return
:Wait
/delay 1m    
/if (${Me.PctHPs}<!=75) /goto :Wait
/stand
/return
 
Madelyn said:
/if (${Me.PctHPs}<!=75) /goto :Wait

Red part is invalid code. It can be <= or != but not both

Give this a shot. Problem was two-fold. First it was /return'ing immediatly after using FD. Second it didn't have a /stand command after getting above 75%.

Code:
Sub Fade
/echo FDing and waiting due to low hp

/if (${Me.Class.Name.Equal[Monk]}) {
          /doability "Feign Death"
    } else {
/return
}
/delay 1m    
:Wait
/delay 2s
/if (${Me.PctHPs}<=75) /goto :Wait
/stand
/return