Single Key Morph/Unmorph

macros macros macros

Moderators: Phineas, noivad

Gremlins
Fenix Fire
Fenix Fire
Posts: 811
Joined: Fri Dec 22, 2006 10:42 am
Profession: Fallen
Race: Ghorak Zo
Player Status: Active
Location: Likely with some spiders…
Contact:

Re: Single Key Morph/Unmorph

Post by Gremlins » Thu May 20, 2010 6:09 pm

I will refrain from any comments.
Chum wrote:Do not attempt to apply logic to matters regarding Clan Lord; it'll just drive you nuts... ;)

User avatar
noivad
Order of the White Elephant
Order of the White Elephant
Posts: 3327
Joined: Wed Oct 08, 2003 4:04 pm
Profession: Fighter
Race: Sylvan
Player Status: Active
Location: SF Bay Area
Contact:

Re: Single Key Morph/Unmorph

Post by noivad » Sun May 23, 2010 1:02 am

Please direct all flamey or flame-baiting replies to the appropriate area. (See Flamewars forum)
http://www.clanlord.net/
Org Du Lac's bestiary: http://bestiary.clanlord.net/index.html
Gil Galad’s Pirates http://pirates.clanlord.net/ & Ranger Studies: http://studies.clanlord.net/
?security warning:View cert•CL players assess valid by refs

User avatar
Salandra
Exile
Posts: 546
Joined: Mon Jan 21, 2008 2:02 pm
Profession: Mystic
Race: Thoom

Re: Single Key Morph/Unmorph

Post by Salandra » Tue Jul 20, 2010 2:33 pm

I wanted to add a sidebar message that gave a progressive message every 30 seconds so I could lazy man the timing. I used the following which is giving inconsistent results. Sometimes it stops displaying the messages when I cancel the morph and sometimes it keeps going. I'm sure there is an easy way to get it done I just don't know it.
f1 call Shapeshift
set isShapeShifted 0

Shapeshift
{
if isShapeShifted == 0
setglobal isShapeShifted 1
"/useitem belt /shape HaremauKitten\r"
pause 128
message "* 30 Seconds"
pause 128
message "* 60 Seconds"
pause 128
message "* 90 Seconds"
pause 128
message "* 120 Seconds"
pause 128
message "* 150 Seconds"
pause 128
message "* 180 Seconds"
pause 128
message "* 210 Seconds"
pause 128
message "* 240 Seconds"
else if isShapeShifted == 1
setglobal isShapeShifted 0
"/useitem belt /return\r"
end if
}
http://www.lfgcomic.com/
Help control your Mystic population. Bury all their trainers!

Geotzou
Exile
Posts: 210
Joined: Wed May 04, 2005 9:22 am

Re: Single Key Morph/Unmorph

Post by Geotzou » Tue Jul 20, 2010 3:10 pm

Salandra wrote:I wanted to add a sidebar message that gave a progressive message every 30 seconds so I could lazy man the timing. I used the following which is giving inconsistent results. Sometimes it stops displaying the messages when I cancel the morph and sometimes it keeps going. I'm sure there is an easy way to get it done I just don't know it.
RIght now, the macro you showed us should always continue until the 240 seconds message. You might possibly even see multiple messages overlap with apparent confusion if you trigger the macro repeatedly. The way you extended the macro after the morphing, it stays there and it is another "copy" of the same macro that actually does the unmorph. If you want to have the messages turned off, you need to stop the first copy.

As a generic advice, I would recommend doing what you want to do because if you sometimes do the sequence morph/unmorph/remorph quickly, or befriend, or simply hit with gossamer bonus, or shieldstone, the cues might be misleading. As much as I like macros, timing a phenomenon for which the equation has many variables not controllable by the same macro is unlikely to give you a better estimate than watching your spirit bar.

However, if you really want to do it, it is doable if you choose well your flag between the various copies of the macros.

User avatar
Salandra
Exile
Posts: 546
Joined: Mon Jan 21, 2008 2:02 pm
Profession: Mystic
Race: Thoom

Re: Single Key Morph/Unmorph

Post by Salandra » Wed Jul 21, 2010 2:13 am

Geotzou wrote:RIght now, the macro you showed us should always continue until the 240 seconds message.
Aye I know it doesn't work like I want. I was asking for help on how to make one that works the way I described and gave the example so people would have a better I idea of what I meant. =)
http://www.lfgcomic.com/
Help control your Mystic population. Bury all their trainers!

User avatar
Magnic
Exile
Posts: 456
Joined: Wed Oct 03, 2007 7:11 am
Profession: Fighter
Race: Dwarf
Player Status: Spambot
Location: Austraila
Contact:

Re: Single Key Morph/Unmorph

Post by Magnic » Wed Jul 21, 2010 2:58 am

Salandra wrote:
Geotzou wrote:RIght now, the macro you showed us should always continue until the 240 seconds message.
Aye I know it doesn't work like I want. I was asking for help on how to make one that works the way I described and gave the example so people would have a better I idea of what I meant. =)

Code: Select all

set time 0
set shape 0

f7
{
   if @my.waist_item >= "belt of the wild"
      "/equip beltofthewild\r"
         "/useitem belt /shape HaremauKitten\r"
setglobal shape 1
else if shape 1
         "/useitem belt /shape \r" //i dont know the command to unmorph
setglobal shape 0
end if
label formcheck
   if @env.text == "You return to your normal form."
end
else
setgobal time + 1 //adds seconds or frames unsure. if its frames may need to ask noivard or gorvin.
   goto formcheck
end if
}

"/check"
{
label top
if time < 240
goto end
else
pause 128
message "*" time "seconds" //not sureif that part will work.
goto top
label end
end
end if
}
untested, but thats 90% of the macro.
also if it does work i may need to add another fail safe in.
Vagile wrote:I've had to remove your sig. If it happens again, you're out for a while.
THEN FUCKING DISABLE IT!
ITS NOT FUCKING HARD TO DO, I KNOW IVE DONE IT BEFORE MY SELF.
NOT THAT IT USES ANY FUCKING BANWITH BECUASE IT LOADS FROM OTHER SITES, FUCKING N00B.

Geotzou
Exile
Posts: 210
Joined: Wed May 04, 2005 9:22 am

Re: Single Key Morph/Unmorph

Post by Geotzou » Wed Jul 21, 2010 8:38 am

Aye I know it doesn't work like I want. I was asking for help on how to make one that works the way I described and gave the example so people would have a better I idea of what I meant. =)
My previous message lacked a "not" but I guess you got the idea. I was advising against doing this. BUt I am not a ranger, and I am in particular not you, so I respect your need for something this specialized.

Here is a combo of what I had made for Tafari with what you seem to want. Let me know how it goes. If you want the timer to go on longer, just change the 230 there for something larger (or smaller for that matter if you want a shorter spam sequence).

Code: Select all

f7 call Shapeshift
Shapeshift
{
    set this_id @random
    setglobal Shapeshift_last_id this_id
    if @my.waist_item == "belt of the wild"
        "/useitem belt /return\r"
    else
        "/equip beltofthewild\r"
        "/useitem belt /shape HaremauKitten\r"
        set warning_seconds 0
        label warning_loop
        pause 128
        if this_id == Shapeshift_last_id
            set warning_seconds + 30
            message "* " warning_seconds " Seconds"
            if warning_seconds < 230
                goto warning_loop
            end if
        end if
    end if
}

User avatar
Magnic
Exile
Posts: 456
Joined: Wed Oct 03, 2007 7:11 am
Profession: Fighter
Race: Dwarf
Player Status: Spambot
Location: Austraila
Contact:

Re: Single Key Morph/Unmorph

Post by Magnic » Wed Jul 21, 2010 9:21 am

Code: Select all

set time 0
set shape 0

f7
{
label belt
   if @my.waist_item >= "belt of the wild"
      "/equip beltofthewild\r"
         "/useitem belt /shape HaremauKitten\r"
setglobal shape 1
else if shape 1
         "/useitem belt /return \r"
setglobal shape 0
end if
label formcheck
   if @env.text == "You return to your normal form."
end
else
setgobal time + 1
   goto formcheck
end if
else if time < 240
goto belt
end if
}

"/check"
{
label top
if time < 240
goto end
else
pause 128
message "*" time "seconds"
goto top
label end
end
end if
}
most of this macro comfirmed working by looking at Geotzou macro
added fail safe.

Geotzou seem yours was made to run with another macro?
Vagile wrote:I've had to remove your sig. If it happens again, you're out for a while.
THEN FUCKING DISABLE IT!
ITS NOT FUCKING HARD TO DO, I KNOW IVE DONE IT BEFORE MY SELF.
NOT THAT IT USES ANY FUCKING BANWITH BECUASE IT LOADS FROM OTHER SITES, FUCKING N00B.

Geotzou
Exile
Posts: 210
Joined: Wed May 04, 2005 9:22 am

Re: Single Key Morph/Unmorph

Post by Geotzou » Wed Jul 21, 2010 11:01 am

I know I should not do this, but you put my name in there. I will try to remain polite and provide you factual, constructive feedback.
Magnic wrote: most of this macro comfirmed working
Fact: You posted a macro that you have not tested.

I speak for myself here, but I know at least 3 regular readers of this section who will wholly agree with me: Magnic, PLEASE, *test* before you post. Put the macro in your macro folder, load up a character, and run it. many times. under various conditions. Above all the other issues numerous people have with your posts in the Macros section, there is the lack of testing of the macros you post. You might think it does not matter, but it does. People who ask for help here want macros that work, not macros that have a percentage of correct lines intermingled with bugs, errors, omissions, typos, etc. They often are not programmers. Figuring the issue *is* a big deal for them or they would not be asking for help. Let alone multiple issues. Let alone finding the fix once you find the bug.

If you had tested your macros, you would have found that:
- you dont reset the time between invocations of ShapeShift. It is a global. It will stay at a high value once it reaches a high value.
- <<<else if shape 1>>> is not a valid statement and will actually cause a CL macro interpreter error
- <<<if @env.text == "You return to your normal form.">>> will never match for people who use time stamps
- <<<end>>> is not a language statement, so CL will treat it as plain text and append it to the text input box, whenever you do have a match for the normal form returning, caveat the issue stated above
- <<<setgobal time + 1>>> is again not a language construct, and will quickly put a ton of garbage in your text input box
- <<<else if time < 240>>> does not have an opening if statement. However, this currently causes no direct issues, since the goto formcheck is currently inconditionnal and will cause the macro to never reach it. you have an infinite loop.
- your tight loop on the @env.text check will actually make the client sluggish by eating a high percentage of CPU. And crash it eventually. Yes, I tested it.
- You currently do nothing when the <<<if @env.text >= "You return to your normal form.">>> check matches. I am not sure what you wanted to do, and Salandra did not seem to require that feature, so I wont try to change the code here.

Now, assuming all the above are fixed:
-your /check macro will actually not do anything for the first 56 seconds (240 frames), and quit since you goto end.
- if invoked after 56 seconds, it will pause 30 seconds, then it will display a high value that is not the time elapsed in seconds and actually loop almost properly and display a a high value that although incorrect, will happen every 30 seconds.
-once /check enters this loop mode, it will never stop unless someone invokes f7 again with the fix for the very first bug above of not resetting the time between runs.

by looking at Geotzou macro
I would be highly interested to see how looking at my macro, which has strictly no relationship to yours, has allowed you to confirm that "most of this macro" was working when in fact, it doesn't.
Geotzou seem yours was made to run with another macro?
No, why would have it been made to run with another macro? Salandra posted a request, and I posted a solution. That is complete. That I tested. That works.

If you are interested in an explanation on how the single macro works, or if you have specific questions on parts of it that you don't fully understand upon first reading it, please ask, I will be pleased to answer.

User avatar
Magnic
Exile
Posts: 456
Joined: Wed Oct 03, 2007 7:11 am
Profession: Fighter
Race: Dwarf
Player Status: Spambot
Location: Austraila
Contact:

Re: Single Key Morph/Unmorph

Post by Magnic » Wed Jul 21, 2010 11:31 am

if you you say dont try, so i shouldnt? lisen to some i dont know?
you can yell and screem all you want, im still gonna try.

i try to help, by looking at your macro was just comfirming that fact i thort was right but unsure of some commmands i had put in the macro.

i didnt ask for your opion all i asked is if it worked or not, i cant test them all (and yes all of them work, incuding this one.) due to my ranks in game the way i have set up some of my guys. its not my fault i cant test, so stop asking.

what ive done is the same as you except ive made them in to diffrent one so that you dont always have to have the messages
for people who want to be selceive some time they may want to see, other times not.

Code: Select all

f7 call Shapeshift
Shapeshift
{
that part at the very top. normal macro would start like:

Code: Select all

f7
{
witch has made it able to be called by other macros.

mine seems more likey to work then yours.
Vagile wrote:I've had to remove your sig. If it happens again, you're out for a while.
THEN FUCKING DISABLE IT!
ITS NOT FUCKING HARD TO DO, I KNOW IVE DONE IT BEFORE MY SELF.
NOT THAT IT USES ANY FUCKING BANWITH BECUASE IT LOADS FROM OTHER SITES, FUCKING N00B.

User avatar
Lorikeet
Pogue Mahone
Pogue Mahone
Posts: 3718
Joined: Sat Apr 05, 2003 12:58 pm
Profession: Healer
Race: Fen'neko
Player Status: Active
Contact:

Re: Single Key Morph/Unmorph

Post by Lorikeet » Wed Jul 21, 2010 12:41 pm

Magnic wrote: mine seems more likey to work then yours.
Oh boy. He tested his, he tested yours, he found mistakes. *shrug*

User avatar
Magnic
Exile
Posts: 456
Joined: Wed Oct 03, 2007 7:11 am
Profession: Fighter
Race: Dwarf
Player Status: Spambot
Location: Austraila
Contact:

Re: Single Key Morph/Unmorph

Post by Magnic » Wed Jul 21, 2010 7:52 pm

Lorikeet wrote:
Magnic wrote: mine seems more likey to work then yours.
Oh boy. He tested his, he tested yours, he found mistakes. *shrug*
well geo has a some things wrong him self, ill never take the word of others for my macros.
Vagile wrote:I've had to remove your sig. If it happens again, you're out for a while.
THEN FUCKING DISABLE IT!
ITS NOT FUCKING HARD TO DO, I KNOW IVE DONE IT BEFORE MY SELF.
NOT THAT IT USES ANY FUCKING BANWITH BECUASE IT LOADS FROM OTHER SITES, FUCKING N00B.

User avatar
noivad
Order of the White Elephant
Order of the White Elephant
Posts: 3327
Joined: Wed Oct 08, 2003 4:04 pm
Profession: Fighter
Race: Sylvan
Player Status: Active
Location: SF Bay Area
Contact:

Re: Single Key Morph/Unmorph

Post by noivad » Wed Jul 21, 2010 10:02 pm

"Most of a macro working" means the macro doesn't work. Aside from text log check misses, macros should work 100% to put any reliance on them. You macros, while trying to be helpful, aren't because most of the people that could use them don't know enough about the language to fix the errors.

Magnic, I looked over your code and found the same problems Geo pointed out. I've worked with Geo on macro comparisons before and found him to be an excellent sounding board, and he also considers potential in-game failures and codes for them as well. In short, I consider him to be an expert on the language. You would be wise to heed his words.
http://www.clanlord.net/
Org Du Lac's bestiary: http://bestiary.clanlord.net/index.html
Gil Galad’s Pirates http://pirates.clanlord.net/ & Ranger Studies: http://studies.clanlord.net/
?security warning:View cert•CL players assess valid by refs

Tip'ii
Exile
Posts: 319
Joined: Thu Jan 25, 2007 3:13 am
Profession: Ranger
Race: Fen'neko
Player Status: Spambot
Location: Metz
Contact:

Re: Single Key Morph/Unmorph

Post by Tip'ii » Wed Jul 21, 2010 10:51 pm

Here are mine that I use quite often -- if you have hunted with me you know I spend 90% of my time morphed, hehe. Yes, I get warning messages that I already am wearing the belt, no, those don't bother me. Yes, I have to watch my spirit bar, I don't think you can really get away from that. If you use spirit for something else, like tracking or shieldstone or befriending, then you will have to watch your spirit bar anyway. Anyway, here are my KISS style morph/unmorph macros:

Code: Select all

f1
	{
	"/equip belt\r"
	"/usei belt /shape Yorilla\r"
	}

f2
	{
	"/equip belt\r"
	"/usei belt /shape Haremau Kitten\r"
	}

f3
	{
	"/usei belt /return\r"
	}

f4
	{
	"/equip belt\r"
	"/usei belt /shape Rudremau\r"
	}


User avatar
Magnic
Exile
Posts: 456
Joined: Wed Oct 03, 2007 7:11 am
Profession: Fighter
Race: Dwarf
Player Status: Spambot
Location: Austraila
Contact:

Re: Single Key Morph/Unmorph

Post by Magnic » Thu Jul 22, 2010 1:47 am

noivad wrote:"Most of a macro working" means the macro doesn't work. Aside from text log check misses, macros should work 100% to put any reliance on them. You macros, while trying to be helpful, aren't because most of the people that could use them don't know enough about the language to fix the errors.

Magnic, I looked over your code and found the same problems Geo pointed out. I've worked with Geo on macro comparisons before and found him to be an excellent sounding board, and he also considers potential in-game failures and codes for them as well. In short, I consider him to be an expert on the language. You would be wise to heed his words.
thats good and have fun with that. i dont care.
Vagile wrote:I've had to remove your sig. If it happens again, you're out for a while.
THEN FUCKING DISABLE IT!
ITS NOT FUCKING HARD TO DO, I KNOW IVE DONE IT BEFORE MY SELF.
NOT THAT IT USES ANY FUCKING BANWITH BECUASE IT LOADS FROM OTHER SITES, FUCKING N00B.

Post Reply