castin macro

Status
Not open for further replies.

justin

Spammer
Joined
Jun 13, 2006
Messages
80
Reaction score
0
Points
0
Hey i took apart tarons seru macro a little to try to add the pchold to the casting macro. If u start the macro with someone in zone it doesnt do or say anything when they zone it starts. but then they zone back in it keeps casting was wondering if anyone could tell me what im missing. heres what i have .

Code:
|--- Macro Castskills.mac
|--- Work your casting skills while AFK
|--- or while on the toon being PLed
|---
|--- usage /mac Castskills
|--- Park yourself in a safe place - 
|--- I like PoK .. you don't take damage from casting nukes on yourself

#include spell_routines.inc
#turbo

#Event Zoned "#*#You have entered#*#"
#Event Mana "#*#Insufficient Mana#*#"

|--- Set for spells to be in slots 1 -5
|--- one spell for each ability you want to work
|--- Ensure you save the spell set as CS or edit line 13 to your spellset name
Sub Main

|-------------------------------------------------------------------------------
|- Set this to 1 if you want to pause macro when GM zones in (Instead of ending)
|-------------------------------------------------------------------------------
 /declare WaitonGM  int outer 1

|----------------------------------------------------------------------
|- Set this to 1 if you want to pause macro when somebody else zones in
|----------------------------------------------------------------------
 /declare InZone    int outer 1
 

/call RealMacro
/return


Sub RealMacro
        
     
|----------------------------------------|
|- Hold macro if others are in the zone -|
|----------------------------------------|

:PCHolding
/doevents
/varset InZone ${SpawnCount[PC]}
 /if (${Me.Grouped}) {
   /for loopcount 0 to 5
     /if (${Spawn[${Group.Member[${loopcount}]}].ID}) {
       /varcalc InZone ${InZone}-1
     }
   /next loopcount
   /varcalc InZone ${InZone}+1
 }
/if ((${InZone}>1) && ${WaitonPC}==1) /goto :PCHolding
 
|------------------------------------------------------|
|- Make sure there is no GM, or KoS mobs near our guy -|
|------------------------------------------------------|  

:Start
/if (${Spawn[gm].ID}) /call Event_GMAlert
/doevents     
        /memspellset CS
        /delay 20s
	:begin
 	/target myself
	/call cast "${Me.Gem[1]}" gem1
        /delay 5s
        /autoinventory
        /doevents
        /call cast "${Me.Gem[2]}" gem2
        /delay 5s
        /autoinventory
        /doevents
        /call cast "${Me.Gem[3]}" gem3
        /delay 5s
        /autoinventory
        /doevents
        /call cast "${Me.Gem[4]}" gem4
        /delay 5s
        /autoinventory
        /doevents
        /call cast "${Me.Gem[5]}" gem5
        /delay 5s
        /autoinventory
        /doevents
	/goto :PCHolding

/return


Sub Event_Zoned 
       /echo died or instanced ended.. time to go 
       /twist off  
       /circle off  
       /delay 5s  
       /sit  
       /camp desk  
       /endmac 
/return

Sub Event_Mana
       	/sit
       	:loop
	/delay 15S
       	/echo checking my mana 
       	/if ( ${Me.PctMana}==100 ) /return
     	/goto :loop
:endloop
/return


Spell_routines.inc
|
| SpellCast.inc
 
Last edited by a moderator:
-- Edited to remove a ton of spam, misunderstood request --
 
Last edited:
nope i didnt but i dont mind spam thanks a lot!
 
hrm this macro runs the seru part but doesnt do the casting. if in seru or even another zone just does nothing and mine failed 2 lol im trying to learn but it gets confusing till u get use to the code
 
It's set up to only do the casting part while other people are in the zone.

Did you want
If people in zone: Chain cast
If empty zone: Cast cycle, do turn ins, cast cycle again, do turn ins ?
 
well actually wanted it to not cast if people are in zone im in a small guild so hardly anyone in guild hall ever so wanted it to cast till someone came in then stop. i was just trying to edit the pchold out of urs to make it easier but im a noob. since the casting mac does a the events after every cast. Could i just add a sub event to check for pcs and if they are to send it to pchold then once they are going it would go back to the loop?
 
I completely misunderstood. If you are one of the 2 people to originally download this, please do it again. I managed to remove the Mana event somehow. I left most the comments intact since it wasn't my macro to start with, but I took the liberty of cleaning it up a little.

Code:
|--- Macro Casting.mac
|--- Work your casting skills while AFK
|--- or while on the toon being PLed
|---
|--- usage /mac Casting
|--- Park yourself in a safe place - 

|--- Set for spells to be in slots 1 -5
|--- one spell for each ability you want to work
|--- Ensure you save the spell set as CS or edit line 1 to your spellset name


#include spell_routines.inc

#Event Zoned "LOADING, PLEASE WAIT#*#"
#Event Mana "#*#Insufficient Mana#*#"

Sub Main
   /memspellset CS
   /delay 20s
   /declare loopcount int outer 0

:PCHolding
  /for loopcount 1 to 5
     /doevents
     /target myself
     /if (${SpawnCount[PC]}>1) /goto :PCHolding
     /call cast "${Me.Gem[${loopcount}]}" gem{loopcount}
     /delay 5s
     /autoinventory
  /next loopcount
  /goto :PCHolding

/return

Sub Event_Zoned 
  /echo died or instanced ended.. time to go
  /twist off
  /end
  /camp desk  
/return

Sub Event_Mana
  /if (${Me.Standing}) /sit
  /echo Medding...
:loop
  /delay 15S
  /if ( ${Me.PctMana}==100 ) /return
  /goto :loop
/return
 

Attachments

  • Casting.mac
    1 KB · Views: 4
Last edited:
god i wish i was as good as u =p u rock thanks
 
hey the casting macro keeps ending here is the message i get when i start it and the last one happens when i dont have enough mana to cast the next spell
 

Attachments

  • sc.bmp
    247.9 KB · Views: 15
Easy enough. Screenshot was very helpful. Updated previous post.
 
hey updated it and am still getting the same error not sure why ima mess around with if i get it ill post the update
 
Whoops. I updated the code in the post, but didn't update the file. Done.

It was simply missing brackets around the one if statement

And spell_routines.inc uses 'i' as a variable, as did the previous version of the macro. So it was trying to redeclare an already existant name. Just changed it to loopcount.
 
You went through all this trouble when there was a perfectly good macro already made for this. its called skillcast.mac and its included with Frys release.
 
Status
Not open for further replies.