How i get this added to a macro

Help section from before the user variable changes that broke all macros

Moderator: MacroQuest Developers

Muddle
decaying skeleton
decaying skeleton
Posts: 5
Joined: Wed Feb 12, 2003 3:00 pm
Location: Nowhere
Contact:

How i get this added to a macro

Post by Muddle » Thu Feb 20, 2003 4:44 pm

i want this report to run when i ask

if i am running a cleric or bard bot and wanta update i wrote this macro but have a had time understanding how the #event work so i can write it into my macro call this report when it get s tell asking for it

i want it to run this macro when i send a tell saying "report"

also i have found that you may have to change the delay time ... based on you normal ping time ....

if you have a 150 to 200 ping all the time best to use 20 delay ... i find it best tot take your ping time devided by 10 as a delay setting ...

Code: Select all


| report.mac  
 

#Define CTimeTick v12 
#Define CTimeTotSec v13 
#Define CTimeHour v15 
#Define CTimeMin v14 
#Define CTimeSec v16 
#Define Temp v17 
#Define Run_count v18 
#Define Run_Speed v19 
#Turbo



sub Main

   /for p1 1 to 15  
      /varset CTimeHour 0 
      /varset CTimeMin 0 
      /varset CTimeTotSec 0 
      /varset CTimeSec 0 
      /varset Temp 0 
      /varset CTimeTick $char(buff,$p1,duration) 
      /varcalc CTimeTotSec $int($CTimeTick*6) 
      /varcalc CTimeHour $int($CTimeTotSec/3600) 
      /varcalc Temp $CTimeHour*3600 
      /varsub  CTimeTotSec $Temp 
      /varcalc CTimeMin $int($CTimeTotSec/60) 
      /varcalc Temp $CTimeMin*60 
      /varsub  CTimeTotSec $Temp 
      /varcalc CTimeSec $CTimeTotSec 
      /if n $CTimeTick>=1 /reply Buff $p1 has $CTimeHour h $CTimeMin m $CTimeSec s remaining. 
          /delay 15
      /next p1 
      /varset Run_count $char(speed)   | base run speed return is 0.70
      /varcalc Run_Speed $abs($Run_count*10000/70) | change run to 100% 
      /delay 20
      /reply Exp: $char(exp) % AA Exp $char(aa,exp) %
      /delay 20
	/reply Current HP: $char(hp,cur) -- Max HP: $char(hp,max)
      /delay 20
	/reply Current Mana: $char(mana,cur) -- Max Mana: $char(mana,max)
      /delay 20
	/reply Current Speed $Run_Speed %		Default Run speed is 100%
      /delay 20
 	/reply this is a report on $char(name) who is a lvl $char(level) $char(race) $char(class)
    
/return



Vendor001
Cheezily Banned
Cheezily Banned
Posts: 78
Joined: Wed Nov 13, 2002 1:37 pm

Post by Vendor001 » Thu Feb 20, 2003 6:03 pm

I am not 100% sure on this, but this should do what you were asking.

Code: Select all

| xXx.mac 
| (In honor of the awesome movie of this name)
| code gloriously ripped from: cleric petbot (all hail it's uberness)
|  
| Courtesy of Dirtface 
| Special thanks: Wes (for the idea of the FOR loop) 
|                 Fippy (for figuring out "What went wrong.) 
|                 Valerian (for completely writing the Autoheal script 
|                           and the auto loot script. 
|                           Seriously, Val figured this whole thing out.) 
|                 Sparr (For helping me with the Set camp feature) 
| Usage: /macro xXx.mac <character in control> 

#Define CTimeTick v12 
#Define CTimeTotSec v13 
#Define CTimeHour v15 
#Define CTimeMin v14 
#Define CTimeSec v16 
#Define Temp v17 
#Define Run_count v18 
#Define Run_Speed v19 
#define ChatCommand p2
#chat tell 
#Turbo 


Sub Main 

:chkevent 
   /doevents 
   /goto :chkevent 
/return 

Sub Event_Chat 

:Commands 

| *** Uber Report, aka xXx *** 

/if "$ChatCommand"=="report" { 
   /for p1 1 to 15  
      /varset CTimeHour 0 
      /varset CTimeMin 0 
      /varset CTimeTotSec 0 
      /varset CTimeSec 0 
      /varset Temp 0 
      /varset CTimeTick $char(buff,$p1,duration) 
      /varcalc CTimeTotSec $int($CTimeTick*6) 
      /varcalc CTimeHour $int($CTimeTotSec/3600) 
      /varcalc Temp $CTimeHour*3600 
      /varsub  CTimeTotSec $Temp 
      /varcalc CTimeMin $int($CTimeTotSec/60) 
      /varcalc Temp $CTimeMin*60 
      /varsub  CTimeTotSec $Temp 
      /varcalc CTimeSec $CTimeTotSec 
      /if n $CTimeTick>=1 /reply Buff $p1 has $CTimeHour h $CTimeMin m $CTimeSec s remaining. 
      /delay 15 
      /next p1 
   /varset Run_count $char(speed)   | base run speed return is 0.70 
   /varcalc Run_Speed $abs($Run_count*10000/70) | change run to 100% 
   /delay 20 
   /reply Exp: $char(exp) % AA Exp $char(aa,exp) % 
   /delay 20 
   /reply Current HP: $char(hp,cur) -- Max HP: $char(hp,max) 
   /delay 20 
   /reply Current Mana: $char(mana,cur) -- Max Mana: $char(mana,max) 
   /delay 20 
   /reply Current Speed $Run_Speed %      Default Run speed is 100% 
   /delay 20 
   /reply this is a report on $char(name) who is a lvl $char(level) $char(race) $char(class)
   } 
/return 

Muddle
decaying skeleton
decaying skeleton
Posts: 5
Joined: Wed Feb 12, 2003 3:00 pm
Location: Nowhere
Contact:

Post by Muddle » Fri Feb 21, 2003 8:34 pm

what i am looking for is a way to just use the #include line and set it as part of the macro that is running .,...


so if i got any bot running i cna just have a line in the macro


#include report.mac


and then a event that calls this macro sub to run .....

and what code i would add to the main marco ..... to add this function

any help would be great

Vendor001
Cheezily Banned
Cheezily Banned
Posts: 78
Joined: Wed Nov 13, 2002 1:37 pm

Post by Vendor001 » Sat Feb 22, 2003 4:37 pm

Code: Select all

| xXx.mac 
| (In honor of the awesome movie of this name) 
| code gloriously ripped from: cleric petbot (all hail it's uberness) 
|  
| Courtesy of Dirtface 
| Special thanks: Wes (for the idea of the FOR loop) 
|                 Fippy (for figuring out "What went wrong.) 
|                 Valerian (for completely writing the Autoheal script 
|                           and the auto loot script. 
|                           Seriously, Val figured this whole thing out.) 
|                 Sparr (For helping me with the Set camp feature) 
| Usage: /macro xXx.mac <character in control> 

#Define CTimeTick v12 
#Define CTimeTotSec v13 
#Define CTimeHour v15 
#Define CTimeMin v14 
#Define CTimeSec v16 
#Define Temp v17 
#Define Run_count v18 
#Define Run_Speed v19 
#define ChatCommand p2 
#chat tell 


Sub Event_Chat 

:Commands 

| *** Uber Report, aka xXx *** 

/if "$ChatCommand"=="report" { 
   /for p1 1 to 15  
      /varset CTimeHour 0 
      /varset CTimeMin 0 
      /varset CTimeTotSec 0 
      /varset CTimeSec 0 
      /varset Temp 0 
      /varset CTimeTick $char(buff,$p1,duration) 
      /varcalc CTimeTotSec $int($CTimeTick*6) 
      /varcalc CTimeHour $int($CTimeTotSec/3600) 
      /varcalc Temp $CTimeHour*3600 
      /varsub  CTimeTotSec $Temp 
      /varcalc CTimeMin $int($CTimeTotSec/60) 
      /varcalc Temp $CTimeMin*60 
      /varsub  CTimeTotSec $Temp 
      /varcalc CTimeSec $CTimeTotSec 
      /if n $CTimeTick>=1 /reply Buff $p1 has $CTimeHour h $CTimeMin m $CTimeSec s remaining. 
      /delay 15 
      /next p1 
   /varset Run_count $char(speed)   | base run speed return is 0.70 
   /varcalc Run_Speed $abs($Run_count*10000/70) | change run to 100% 
   /delay 20 
   /reply Exp: $char(exp) % AA Exp $char(aa,exp) % 
   /delay 20 
   /reply Current HP: $char(hp,cur) -- Max HP: $char(hp,max) 
   /delay 20 
   /reply Current Mana: $char(mana,cur) -- Max Mana: $char(mana,max) 
   /delay 20 
   /reply Current Speed $Run_Speed %      Default Run speed is 100% 
   /delay 20 
   /reply this is a report on $char(name) who is a lvl $char(level) $char(race) $char(class) 
   } 
/return 
there ya go....tho you will have to integrate into you other chat event if you accept other tell commands...