senseheading.mac

Macro depository for macros written before the user variable changes that broke all of them.

Moderator: MacroQuest Developers

Xenophage
decaying skeleton
decaying skeleton
Posts: 5
Joined: Mon Dec 09, 2002 6:04 am

senseheading.mac

Post by Xenophage » Mon Dec 09, 2002 6:12 am

This is my first time posting to these boards. Mainly doing it for style critique and to see if I'm coding a waste of time or not.

I have a few characters that hail back from before the compass existed. That being the case, their Sense Heading needed a little work. I set one up in the Bazaar and ran this, got him up to maximum without much difficulty. Seeing as Sense Heading seems to be level-capped (5*level+5), I added in some logic for that afterwards.

Note: I am not sure if this would run well in the background while doing your normal running around. You may want to try it, you may not. It may have unpredictable side effects if you use other scripts.

All that being said, here's the code:

Code: Select all

#include routines.mac

Sub Main
	:StartHere
	/doability "Sense Heading"
	/delay 25
	/if n $char(skill,"Sense Heading")<$calc($char(level)*5+5) /goto :StartHere

:Done
/return 0
-Xeno

User avatar
L124RD
Site Admin
Site Admin
Posts: 1343
Joined: Fri Jun 14, 2002 12:15 am
Location: Cyberspace
Contact:

Post by L124RD » Tue Dec 10, 2002 12:24 am

Salutations,
Why aren't you doing:

Code: Select all

sub main
:senseheadingloop
 /if n $char(ability,"Sense Heading")>0 {
  /doability "Sense Heading"
} else /if n $char(skill,"Sense Heading")<$calc($calc($char(level)*5)+5) {
 /return
}
/goto :senseheadingloop
/return
specifically, why are you using delays instead of finding out if you can use it yet or not?

Xenophage
decaying skeleton
decaying skeleton
Posts: 5
Joined: Mon Dec 09, 2002 6:04 am

Post by Xenophage » Tue Dec 10, 2002 9:27 am

Wasn't sure of the load that would cause on the system. A pause is one thing, but a continuously looping check I didn't know the impact of. If the load caused isn't significant, I'll keep this in mind in the future.

-Xeno

mackster
a ghoul
a ghoul
Posts: 95
Joined: Mon Sep 09, 2002 3:02 pm

Post by mackster » Tue Dec 10, 2002 2:12 pm

This:

Code: Select all

Sub Main 

  :loop 
  /doability 1 
  /goto :loop 

/return 

Worked for me, simple too! Just put your Sense Heading (or whatever you want) in the first hotkey slot. Worked real good, and now I have a cool compass that doesn't twitch all the time. God damn, that was soooo worth it! 8)

Mckorr
Developer
Developer
Posts: 2326
Joined: Fri Oct 18, 2002 1:16 pm
Location: Texas

Post by Mckorr » Mon Dec 16, 2002 5:17 pm

Wonder if this could be used to raise my Begging skill...by begging from my beastlord pet :)

User avatar
Fippy
a snow griffon
a snow griffon
Posts: 499
Joined: Tue Jul 16, 2002 10:42 am

Post by Fippy » Mon Dec 16, 2002 5:33 pm

yup it sure could just put begging instead of sense heading.

Begging also helps taunt the mob so I allways do it when I am MT on the mobs were fighting. Disarm is good too. You can also throw in an /em Moons %t. It would sure piss me off anyway.
Fippy

This is my girl. But Rizwank had her first :-)
[img]http://www.btinternet.com/~artanor/images/fairy_bounce09.gif[/img]

User avatar
Morath
a lesser mummy
a lesser mummy
Posts: 41
Joined: Tue Oct 22, 2002 3:09 pm

Post by Morath » Tue Dec 17, 2002 7:51 am

I just set up a hot Key...

Hotkey lines:

/do 1 <where Sense heading is in #1 Slot>
/pause 20 <pause time for sense heading>
/do 1 <where Sense heading is in #1 Slot>
/pause 20 <pause time for sense heading>
/press 1 <where your hot key is the #1 hotkey>

Once your skill up is at max for lvl...just hit enter...it will type the number 1 in your chat box...lyour done till Ding!!

Morath

JoeBloe
orc pawn
orc pawn
Posts: 13
Joined: Thu Dec 26, 2002 3:54 pm

Post by JoeBloe » Sun Dec 29, 2002 9:39 pm

I just set my move forward key to hotbutton 5. Now every time I move forward it does whatever is in hotkey 5. I leave sense heading there until it maxes then put forage there.

That way you can save your macros for other stuff.

serberus
a lesser mummy
a lesser mummy
Posts: 58
Joined: Tue Nov 19, 2002 5:04 am

Post by serberus » Sun Dec 29, 2002 11:24 pm

Code: Select all

/if n $char(skill,"Sense Heading")<$calc($char(level)*5+5) /goto :StartHere
The problem with that is if you are over level 39...

$calc($char(40)*5+5) = 205

In other words, you need to add in another check to see if the skill is capped. You could either check to see if the char is lower than level 40 or if the skill is 200, both are equally easy.

Serberus

serberus
a lesser mummy
a lesser mummy
Posts: 58
Joined: Tue Nov 19, 2002 5:04 am

Sense Heading Macro

Post by serberus » Mon Dec 30, 2002 11:17 am

Here is a sense heading macro that does the following:

-Checks to see if you have Sense Heading on an ability button, if not, tells you to put it there
-Calculates your sense heading cap and raises it to that skill

Usage: /macro senseheading
No parameters needed for this...

Serberus

Code: Select all

#define shmcr_currentskill v1
#define shmcr_maxskill v2

Sub Main

/if n $char(ability,"Sense Heading")==0 {
   /echo 'Sense Heading Macro' You do not currently have Sense Heading mapped to a skill button, please assign it and restart the macro.
   /return
}

/varset shmcr_currentskill $int($char(skill,"sense heading"))
/varset shmcr_maxskill $if(n,$calc($calc($char(level)*5)+5)>=200,200,$int($calc($calc($char(level)*5)+5)))
/echo 'Sense Heading Macro' Raising Sense Heading from "$shmcr_currentskill" to "$shmcr_maxskill".

:shmcr_loop
/delay 2
/if n $char(ability,"Sense Heading")==-2 /goto :shmcr_loop

/if n $char(ability,"Sense Heading")==$shmcr_maxskill /goto :done
/doability "Sense Heading"
/goto :shmcr_loop

:done
/echo 'Sense Heading Macro' Sense Heading raised from "$shmcr_currentskill" to "$shmcr_maxskill" (capped)
/return