Language Macro - Master Languages with a group

Post your completed (working) macros here. Only for macros using MQ2Data syntax!

Moderator: MacroQuest Developers

yousten
decaying skeleton
decaying skeleton
Posts: 3
Joined: Fri May 20, 2005 7:11 am

Re

Post by yousten » Mon May 23, 2005 9:18 am

So u only need the macro copyd in the texteditor, and with the ending .mac. Or do u need anything else. Sorry for the stzupied question but i am new to this.

There is any where a help file or somehting similar where i can learn this, lol?

Thnxs

yousten
decaying skeleton
decaying skeleton
Posts: 3
Joined: Fri May 20, 2005 7:11 am

Post by yousten » Mon May 23, 2005 9:22 am

Ok, finally found the help file, sorry for the spam here

brianman
a ghoul
a ghoul
Posts: 114
Joined: Mon Jun 07, 2004 7:46 am

Post by brianman » Thu Sep 22, 2005 7:00 pm

Made my own version which I think is a bit more intelligent.
It uses 2 macroes, one for the teacher and one for the student.

What it does it simply to say in group chat what language it wishes to learn now and the teacher switches to that language.

LangTeach.mac

Code: Select all

|** LangTeach.mac
 *  by brianMan
 *
 * This is 1 of 2 files used for this language trainer.
 * - LangTeach.mac (this) is used by the "teacher".
 * - LangLearn.mac is used by the "student".
 *
 * What this macro does, is simply start at "/lang 2" and spam away in group, it
 * keeps spamming that language untill the "student" informs the "teacher(s)"
 * that this language is now maxed.
**|
#Event SwitchLang "#1# tells the group, 'Lang:#2#'"
#chat group
Sub Main
	/declare TheLang int outer
	/varset TheLang 2
	/lang ${TheLang}
	:loop
		/if (!${Target.ID}) /return
		/doevents
		/keypress enter chat
		/keypress /
		/keypress g chat
		/keypress s chat
		/keypress a chat
		/keypress y chat
		/keypress space chat
		/keypress ${Math.Rand[2]} chat
		/keypress enter chat
	/goto :loop
/return

Sub Event_SwitchLang(string Line, string Toon, int Lang)
	/echo Caught it: ${Toon} / ${Lang}
	/if (${Lang} == 0) {
		/lang 1
		/endmacro
	}
	/varset TheLang ${Lang}
	/lang ${TheLang}
/return
LangLearn.mac

Code: Select all

|** LangLearn.mac
 *  by brianMan
 *
 * This is 1 of 2 files used for this language trainer.
 * - LangLearn.mac (this) is used by the "student".
 * - LangTeach.mac is used by the "teacher".
 *
 * What this macro does, is simply start at "/lang 2" and spam away in group, it
 * keeps spamming that language untill it's maxed, then it switches to the next
 * language, and informs the "teacher(s)" what language to switch to.
**|
Sub Main
	/declare LearnLang int local
	/for LearnLang 2 to 25
		/lang 1
		/gsay Lang:${LearnLang}
		/lang ${LearnLang}
		/delay 1
		:loop
			/if (!${Target.ID}) /return
			/delay 1
			/keypress enter chat
			/keypress /
			/keypress g chat
			/keypress s chat
			/keypress a chat
			/keypress y chat
			/keypress space chat
			/keypress ${Math.Rand[2]} chat
			/keypress enter chat
		/if (${Me.LanguageSkill[${LearnLang}]} < 100) /goto :loop
	/next LearnLang
	/gsay Lang:0
/return
Last edited by brianman on Fri Aug 04, 2006 3:17 pm, edited 2 times in total.

Xasiz
a lesser mummy
a lesser mummy
Posts: 43
Joined: Sat May 07, 2005 1:55 pm

Stops

Post by Xasiz » Mon Dec 19, 2005 11:04 am

Hey Brianman, I tried this macro out today and it stops at 11 old erudine. Is there an update to this?
Last edited by Xasiz on Mon Dec 19, 2005 11:35 am, edited 1 time in total.

User avatar
fearless
Not a Psychic
Posts: 2684
Joined: Wed Mar 10, 2004 3:52 pm

Post by fearless » Mon Dec 19, 2005 11:23 am

What recent changes?
Reading . . . it's not just for me.

[url=http://www.catb.org/~esr/faqs/smart-questions.html]How To Ask Questions The Smart Way[/url]
[quote="Ccomp5950"]Fearless showed me the light, you too shall learn.[/quote]

JakeSpeed
decaying skeleton
decaying skeleton
Posts: 1
Joined: Thu Mar 09, 2006 6:23 pm

Post by JakeSpeed » Mon Mar 13, 2006 8:06 am

Quick question how do you stop it?

Thanks,

A_Druid_00
Macro Maker Extraordinaire
Posts: 2378
Joined: Tue Jul 13, 2004 12:45 pm
Location: Rolling on the Lawn Farting

Post by A_Druid_00 » Mon Mar 13, 2006 9:11 am

/endmacro?
[quote]<DigitalMocking> man, A_Druid_00 really does love those long ass if statements
<dont_know_at_all> i don't use his macro because i'm frightened of it[/quote]
[quote][12:45] <dont_know_at_all> never use a macro when you can really fuck up things with a plugin[/quote]

Yunto?
a grimling bloodguard
a grimling bloodguard
Posts: 502
Joined: Sat Nov 19, 2005 12:05 pm

Post by Yunto? » Mon Mar 13, 2006 10:38 am

Actually cant /endmacro since its keypressing. Clear your target window (esc) should end it.

A_Druid_00
Macro Maker Extraordinaire
Posts: 2378
Joined: Tue Jul 13, 2004 12:45 pm
Location: Rolling on the Lawn Farting

Post by A_Druid_00 » Mon Mar 13, 2006 10:59 am

You should still be able to hotkey it, but yeah.
[quote]<DigitalMocking> man, A_Druid_00 really does love those long ass if statements
<dont_know_at_all> i don't use his macro because i'm frightened of it[/quote]
[quote][12:45] <dont_know_at_all> never use a macro when you can really fuck up things with a plugin[/quote]

brianman
a ghoul
a ghoul
Posts: 114
Joined: Mon Jun 07, 2004 7:46 am

Re: Stops

Post by brianman » Fri Aug 04, 2006 3:22 pm

Xasiz wrote:Hey Brianman, I tried this macro out today and it stops at 11 old erudine. Is there an update to this?
Hmm. I haven't experienced that problem. It might be that either the teacher or the student (or both) don't have all the languages. For my macro(s) to work properly you must have 1 point in all the languages on the teacher(s).

To make it run you need to have a target (just target yourself). This is due to it using /keypress'es to send the data (otherwise the client for some reason don't see the text and therefore dosn't skill up from it), so hitting the Escape key will clear your targeted and stop the macro (since you don't have a target).

wakkedup
a ghoul
a ghoul
Posts: 114
Joined: Tue Apr 11, 2006 5:25 am

Post by wakkedup » Sun Dec 31, 2006 3:41 am

Comments pretty much say it all...Thanks Cr4zyb4rd for the original code, still working like a champ

Code: Select all

|========================================================================================================================
| Modded from Cr4zyb4rd...Thanks for the original code, still working like a champ
|		http://www.macroquest2.com/phpBB2/viewtopic.php?t=9067&postdays=0&postorder=asc&start=15
| Run this on 2 or more chars, will cycle through the languages and skill them up.
| Echoes what skill started at & ended at upon exitting(for skills that increased)
| Gives total language & your average upon exitting as well(excluding common tongue)
| Clear target with ESC key to stop macro
| Character MUST have at least 1 point in each language for this to work properly
|========================================================================================================================
Sub Main
	/declare BeginSkills int local
	/declare EndSkills int local
	/declare lingo int local 0
	/declare avg int local 0
	/declare index int local
	/declare looper int local
	/for BeginSkills 2 to 25
		/declare "${Me.Language[${BeginSkills}]}_Begin" int outer ${Me.LanguageSkill[${BeginSkills}]}
	/next BeginSkills
	/echo Started ::: ${Macro}
	:loopme
	/target ${Group.Member[1]}
	/for index 2 to 25
		/language ${index}
		/delay 1
		/for looper 1 to 2000
			/if (!${Bool[${Target}]}) {
				/echo No target, exiting ${Macro}
				/language 1
				/return
			}
			/if (!${Math.Calc[${looper} % 30].Int}) /delay 1
		/keypress enter chat
		/keypress /
		/keypress g chat
		/keypress s chat
		/keypress a chat
		/keypress y chat
		/keypress space chat
		/keypress ${Math.Rand[9]} chat
		/keypress enter chat
		/next looper
	/next index
	/goto :loopme
	:OnExit
	/for EndSkills 2 to 25
		/declare "${Me.Language[${EndSkills}]}_End" int outer ${Me.LanguageSkill[${EndSkills}]}
		/if (${${Me.Language[${EndSkills}]}_Begin}==${${Me.Language[${EndSkills}]}_End}) {
			/delay 1
		} else /if (${Me.LanguageSkill[${EndSkills}]}>99) {
			/echo ${Me.Language[${EndSkills}]} ::: ${${Me.Language[${EndSkills}]}_Begin} TO MASTER
		} else {
			/echo ${Me.Language[${EndSkills}]} ::: ${${Me.Language[${EndSkills}]}_Begin} to ${${Me.Language[${EndSkills}]}_End}
		}
	/next EndSkills
	/varcalc lingo ${Me.LanguageSkill[2]}+${Me.LanguageSkill[3]}+${Me.LanguageSkill[4]}+${Me.LanguageSkill[5]}+${Me.LanguageSkill[6]}+${Me.LanguageSkill[7]}+${Me.LanguageSkill[8]}+${Me.LanguageSkill[9]}+${Me.LanguageSkill[10]}+${Me.LanguageSkill[11]}+${Me.LanguageSkill[12]}+${Me.LanguageSkill[13]}+${Me.LanguageSkill[14]}+${Me.LanguageSkill[15]}+${Me.LanguageSkill[16]}+${Me.LanguageSkill[17]}+${Me.LanguageSkill[18]}+${Me.LanguageSkill[19]}+${Me.LanguageSkill[20]}+${Me.LanguageSkill[21]}+${Me.LanguageSkill[22]}+${Me.LanguageSkill[23]}+${Me.LanguageSkill[24]}+${Me.LanguageSkill[25]}
	/varcalc avg ${lingo} / 24
	/echo ${lingo} total linguist skill points.
	/echo ${avg} linguist skill average.
/return
Nothing to see here. Move along.

Sorry
orc pawn
orc pawn
Posts: 20
Joined: Thu Oct 26, 2006 6:18 pm

Post by Sorry » Fri Jan 12, 2007 2:12 pm

What about the 26th and 27th languages? They are both called "an unknown language" and at present can only be learned from another player with these languages. Surely there is something that MQ can do about this?

jacensolo
a snow griffon
a snow griffon
Posts: 427
Joined: Wed Feb 14, 2007 8:51 am
Location: Right behind you

controllable version

Post by jacensolo » Wed Mar 28, 2007 6:29 pm

Here's my version. I wanted one that would let me skill up all of the characters on my friends account, so I made this version that idles, will invite when it gets a tell saying "Teach me.", and will spam each language enough to get my friend's character with 200 INT up to max in each language. Also, I added a feature so that if your character doesn't max a language, you can send a tell to the teacher saying "Teach more (language name here)" and it will do 200 more repetitions of that language.

Code: Select all

#event called "#1# tells you, 'Teach me.'"
#event teachmore "#1# tells you, 'Teach More #2#'"

Sub Main
   /declare lang_current int 1
   /declare lang_start int outer 0
   /echo Now running Language Master
   /call Idle
/return

Sub Idle
   :Idle
   /if (${lang_start}=1) /call Teaching 1000
   /doevents
   /delay 20
   /goto :Idle
/return

Sub Teaching(int reps)
   :Teachloop
   /lang ${lang_current}
   /echo Now teaching ${lang_current}
   /for x 0 to ${reps}
      /if (${Target.Name.Equal[${Me.Name}]}) /call Idle
      {
      /keypress enter
      /keypress a chat
      /keypress enter chat
      /keypress enter
      /keypress a chat
      /keypress enter chat
      /keypress enter
      /keypress a chat
      /keypress enter chat
      /keypress enter
      /keypress a chat
      /keypress enter chat
      /keypress enter
      /keypress a chat
      /keypress enter chat
      }
   /next x
   /varcalc lang_current ${lang_current}+1
   /if (${lang_current}>25) {
      /lang 1
      /varset lang_current 2
      /varset lang_start 0
      /target clear
      /disband
      /beep
      /return
   }
   /goto :Teachloop
/return

Sub Event_called(line,learner)
   /invite ${learner}
   /varset lang_start 1
   /delay 10m ${Group.Member[1].ID}
/return

Sub Event_teachmore(line,learner,langname)
   /if (${langname.Equal[Barbarian]}) /lang 2
   /if (${langname.Equal[Erudian]}) /lang 3
   /if (${langname.Equal[Elvish]}) /lang 4
   /if (${langname.Equal[Dark Elvish]}) /lang 5
   /if (${langname.Equal[Dwarvish]}) /lang 6
   /if (${langname.Equal[Troll]}) /lang 7
   /if (${langname.Equal[Ogre]}) /lang 8
   /if (${langname.Equal[Gnomish]}) /lang 9
   /if (${langname.Equal[Halfling]}) /lang 10
   /if (${langname.Equal[Thieves Cant]}) /lang 11
   /if (${langname.Equal[Old Erudian]}) /lang 12
   /if (${langname.Equal[Elder Elvish]}) /lang 13
   /if (${langname.Equal[Froglok]}) /lang 14
   /if (${langname.Equal[Goblin]}) /lang 15
   /if (${langname.Equal[Gnoll]}) /lang 16
   /if (${langname.Equal[Combine Tongue]}) /lang 17
   /if (${langname.Equal[Elder Teir'Dal]}) /lang 18
   /if (${langname.Equal[Lizardman]}) /lang 19
   /if (${langname.Equal[Orcish]}) /lang 20
   /if (${langname.Equal[Faerie]}) /lang 21
   /if (${langname.Equal[Dragon]}) /lang 22
   /if (${langname.Equal[Elder Dragon]}) /lang 23
   /if (${langname.Equal[Dark Speech]}) /lang 24
   /if (${langname.Equal[Vah Shir]}) /lang 25
   /invite ${learner}
   /delay 10m ${Group.Member[1].ID}
   /call Teaching 200
/return

Gurash
decaying skeleton
decaying skeleton
Posts: 9
Joined: Thu Jul 26, 2018 10:40 am

Re: Language Macro - Master Languages with a group

Post by Gurash » Thu Sep 13, 2018 10:55 am

This version will cycle through all 26 teachable languages (easily expandable if they add more languages). Target yourself (borrowed that idea) to switch the language to common tongue and end the macro quickly. No skill checks, no frills, just spam. As with all macros, copy and paste into a text editor and save it as <whatever you want>.mac (make sure .txt is not selected if using notepad).

Note: You must be grouped and in the same zone to learn languages.
Note: In order to teach a language, you must have at least one skill point in that language.

Code: Select all

| Lingo.mac
| Author: Gurash

Sub Main

   /declare numLangs int 27
   /declare x        int 2

   :loop
      /for x 2 to ${numLangs}
         /if (${Target.Name.Equal[${Me.Name}]}) /goto :end
         /lang ${x}
         {
            /gsay Hello, group!  Today, we are learning languages.
            /gsay Learning languages only takes a short amount of time.
            /gsay It costs nothing in platinum, and you can do it while leveling!
            /gsay There's really no reason not to learn all of the languages.
            /gsay Hopefully today's lesson will be useful to you.
         }
         /delay 1s
      /next x
      /goto :loop
   :end
      /lang 1
      /endmacro
/return
Click to view a list of languages in EQ
Alaran language quest
Hadal language quest

FrankJScott
naggy
naggy
Posts: 2128
Joined: Sun Feb 19, 2023 7:11 am

Excellent Interior Design Site

Post by FrankJScott » Thu Aug 10, 2023 10:52 pm

Why don't you Google it! before you post