Code: Select all
| Language.mac This macro was intended to teach languages to others. The macro
| assumes the character<bot> running the macro is a Master in a lot of Languages.
| To place the macro into opertaion /macro lang <mastername> where mastername is the person
| controlling the bot.
|
| Important setup:
| To function properly you will need to create a Hot Button/key to spam 5 lines of text to grp chat.
|
| Line 1: /gsay This is line 1 of language lessons
| Line 2: /gsay This is line 2 of language lessons
| Line 3: /gsay This is line 3 of language lessons
| Line 4: /gsay This is line 4 of language lessons
| Line 5: /gsay This is line 5 of language lessons
| HOTKey is currently programmed for /press 1
|
| The Master and the BOt need to be in the same grp.
| Messages sent to the BOT other than by the MASTER are forwarded onto the MASTER.
|
|+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
| Commands:
| TEACH:
| /tell <bot> TEACH <1-25> - Starts the teaching cycle for selected language
|
| STOP:
| /tell <bot> STOP - Stops the teaching cycle, and returns language to common
|
| EMAC:
| /tell <bot> EMAC - Stops the the macro altogether with /endmacro.
|
| Lang <1-25>:
| /tell <bot> LANG <1-25> - Sets current language of BOT to the corresponding EQ language with
| that number.
|
| Lang HELP:
| /tell <bot> HELP - Generic help listing
| /tell <bot> HELP <1-25> Identifies the language that number is associated with
|
#define MasterName v50
#define RelayTell v74
#define StartStop v75
#define CurrLang V51
#chat tell
Sub Main
/if n $strlen("$p0")<=0 {
/echo Usage: /macro Lang <Master Name>
/endmacro
}
/varset MasterName $p0
/varset RelayTell 1
/varset StartStop 0
/call LoadUpLangs
/tell $MasterName What is thy bidding my master? Commands HELP, TEACH, STOP, LANG, EMAC
:MainLoop
/if n $v75==1 /press 1
/doevents
/delay 5
/goto :MainLoop
/return
Sub Event_Chat
/if "$MasterName"=="$p1" {
/if $arg(1,"$p2")==Teach {
/lang $arg(2,"$p2")
/delay 5
/varset v52 $arg(2,"$p2")
/varset v51 $a(1,$v52)
/tell $MasterName I am now ready to start teaching $v51
/delay 50
/tell $v50 Teaching in 5 seconds
/delay 50
/varset v75 1
}
/if $arg(1,"$p2")==Lang {
/lang $arg(2,"$p2")
/delay 5
/varset v52 $arg(2,"$p2")
/varset v51 $a(1,$v52)
/tell $MasterName I am now ready to start teaching $v51
}
/if $arg(1,"$p2")==Help {
/if n $arg(2,"$p2")>0 /if n $arg(2,"$p2")<26 {
/varset v52 $arg(2,"$p2")
/varset v51 $a(1,$v52)
/tell $v50 Language number $v52 identifies as $v51
/return
}}
/if n $arg(2,"$p2")>25 {
/varset v52 $arg(2,"$p2")
/echo v52 $v52
/tell $v50 I only know 25 languages. Please use a number between 1 and 25.
/return
}
/tell $v50 I can teach you 25 different languages. To identify a language, tell me HELP <lang#>. Where Lang# is a number between 1 and 25.
}
/if $arg(1,"$p2")==Emac /endmacro
/if $arg(1,"$p2")==Stop {
/Varset v75 0
/tell $MasterName I will stop teaching in 5 seconds
/delay 5
/lang 1
}
}
/if "$MasterName"!="$p1" {
/if n $RelayTell==1 /tell $v50 $p1 told me: $p2
}
/return
Sub LoadUpLangs
/varset a(1,0) "StoogeOffset"
/varset a(1,1) "Common"
/varset a(1,2) "Barbarian"
/varset a(1,3) "Erudian"
/varset a(1,4) "Elvish"
/varset a(1,5) "DarkElvish"
/varset a(1,6) "Dwarvish"
/varset a(1,7) "Troll"
/varset a(1,8) "Ogre"
/varset a(1,9) "Gnomish"
/varset a(1,10) "Halfling"
/varset a(1,11) "ThievesCant"
/varset a(1,12) "OldErudian"
/varset a(1,13) "ElderElvish"
/varset a(1,14) "Froglok"
/varset a(1,15) "Goblin"
/varset a(1,16) "Gnoll"
/varset a(1,17) "CombineTongue"
/varset a(1,18) "ElderTierdDal"
/varset a(1,19) "Lizardman"
/varset a(1,20) "Orcish"
/varset a(1,21) "Faerie"
/varset a(1,22) "Dragon"
/varset a(1,23) "ElderDragon"
/varset a(1,24) "DarkSpeech"
/varset a(1,25) "VahShir"
/return
