Page 1 of 4

Simple language script

Posted: Mon Jul 03, 2006 2:11 pm
by aChallenged1
I have been wanting to convert a language macro over, and this is what I came up with. It is a bit slower than others, but hey, who cares, it's hands free!

Mind you, it is untested, which is why it is here.

It will only do one language at a time, which is the only draw back.
Later I'll add in another script to run on another group member to stop this, hands free.

Code: Select all

; Langloop.inc
; language trainer for groups 
; original macro developed by BlackTooth 
; If you have two people running this macro 
; You dont need them to be good at all in the language 
; Just set them both on the same language and they 
; Will increase each others skill in the language 
; From 0 to 100 takes a few minutes 
; More peeps you have spamming the faster she goes
; to end have someone in group /gsay "maxed language" or /gsay "done language"


function main()
{
AddTrigger Done "@P1@tells the group@p2@maxed@p3@language@p4@"
AddTrigger Done "@P1@tells the group@p2@done@p3@language@p4@"

   echo Language Macro Starting 
   
   while "${x}"
   { 
      EQExecute /gsay Do you understand me yet? 1
      wait ${Math.Rand[3]:Inc[2]
      EQExecute /gsay Do you understand me yet? 2
      wait ${Math.Rand[3]:Inc[2]
      EQExecute /gsay Do you understand me yet? 3
      wait ${Math.Rand[3]:Inc[2]
      EQExecute /gsay Do you understand me yet? 4
      wait ${Math.Rand[3]:Inc[2]
      EQExecute /gsay Do you understand me yet? 5
      ExecuteQueue
   } 
}

function Done()
{
set:x[FALSE]
Beep
Beep
Beep
}

Posted: Fri Jul 28, 2006 4:03 pm
by MacQ
Thanks for this macro aChallenged1. I have my IS subscription and the more examples of IS macros I can find, the more I will learn. I'm still trying to figure out how to even use IS and I know I will eventually get there. Anyway my plan is to eventually convert my macros to IS which I will post to share with the community. Thank God IS has WHILE loops, i hate goto statements.

Re: Simple language script

Posted: Fri Jul 28, 2006 5:21 pm
by Yunto?

Code: Select all

; Langloop.inc
; language trainer for groups 
; original macro developed by BlackTooth 
; If you have two people running this macro 
; You dont need them to be good at all in the language 
; Just set them both on the same language and they 
; Will increase each others skill in the language 
; From 0 to 100 takes a few minutes 
; More peeps you have spamming the faster she goes
; to end have someone in group /gsay "maxed language" or /gsay "done language"
;Originally by AC1, edited by Yunto?

function main()
{
variable int CurrentLang=1
AddTrigger Done "@P1@tells the group@p2@maxed@p3@language@p4@"
AddTrigger Done "@P1@tells the group@p2@done@p3@language@p4@"

   echo Language Macro Starting 
   EQExecute /lang ${CurrentLang}

   while "${x}"
   { 
      EQExecute /gsay Do you understand me yet? 1
      wait ${Math.Rand[3]:Inc[2]
      EQExecute /gsay Do you understand me yet? 2
      wait ${Math.Rand[3]:Inc[2]
      EQExecute /gsay Do you understand me yet? 3
      wait ${Math.Rand[3]:Inc[2]
      EQExecute /gsay Do you understand me yet? 4
      wait ${Math.Rand[3]:Inc[2]
      EQExecute /gsay Do you understand me yet? 5
      ExecuteQueue
   } 
}

function Done()
{
if (${CurrentLang}>=25) set:x[FALSE]
varcalc CurrentLang ${CurrentLang}+1
Beep
Beep
Beep
}
Is that varcalc how you increment a variable?

Posted: Fri Jul 28, 2006 5:37 pm
by Kroak
I beleive you'd want it this way for the loop... Well, Kinda.

Code: Select all

; Langloop.iss
; language trainer for groups 
; original macro developed by BlackTooth 
; If you have two people running this macro 
; You dont need them to be good at all in the language 
; Just set them both on the same language and they 
; Will increase each others skill in the language 
; From 0 to 100 takes a few minutes 
; More peeps you have spamming the faster she goes 
; to end have someone in group /gsay "maxed language" or /gsay "done language" 

;Modified:  Must set up a hotkey on key 1 with random text of choice.  No /gsay needed.
;Set main window to "Group" channel and "Always chat here" in game.
;Target self to end.


function main() 
{ 
AddTrigger Done "@P1@tells the group@p2@maxed@p3@language@p4@" 
AddTrigger Done "@P1@tells the group@p2@done@p3@language@p4@" 
Declare CurrentLang int 0 
Declare X bool script TRUE
   echo Language Macro Starting 
    
   while "${CurrentLang:Inc}<26"
   { 
   		EQExecute /lang ${CurrentLang}
   		wait 1
      Execute keypress 1
      wait ${Math.Rand[3]:Inc[2]}
      Execute keypress 1 
      wait ${Math.Rand[3]:Inc[2]} 
      Execute keypress 1 
      wait ${Math.Rand[3]:Inc[2]} 
      Execute keypress 1 
      wait ${Math.Rand[3]:Inc[2]} 
      Execute keypress 1 
      ExecuteQueue
      if "${Target.ID}==${Me.ID}"
      	X:Set[FALSE]
      if "!${X}" 
        Call Done
      if "${CurrentLang}==25" 
        CurrentLang:Set[0] 
      if "!${X}"
      	break
   } 
} 

function Done() 
{ 
X:Set[FALSE]
Beep 
Beep 
Beep
}
EDIT: OK, this changes the language on each loop. The /tell to end I haven't tested, but you can target yourself. However, for some reason, the text it sends out to group doesn't change even with only one window, and ISXChatWnd unloaded. /lang does change in main window though.
OK, here's the answer.
Set up a hotkey with text in it, no /gsay.
Set up Main window by clicking "Always chat here" and group as the channel.
Change all lines with

Code: Select all

EQExecute /gsay Do you understand me yet? 1 
to

Code: Select all

Execute keypress 1
Done. Working language trainer that does all languages, should stop on tells and targeting self. Changed code above.
Triggers not working though.

While loops? They just fors and ifs...

Posted: Tue May 29, 2007 3:18 am
by zoobish
MacQ wrote:Thank God IS has WHILE loops, i hate goto statements.
Like this:

Code: Select all

/for W 1 to 2
    /if (${check}) {
        /echo in while loop...
        ...
        ...
        /varset W 1
    } else {
        /varset W 2
    }
/next W
Is the same as:

Code: Select all

/while (${check}) {
    /echo in while loop...
    ...
    ...
}

Re: Simple language script

Posted: Fri Jul 18, 2025 7:09 am
by xyilla

Re: Simple language script

Posted: Fri Jul 18, 2025 7:10 am
by xyilla

Re: Simple language script

Posted: Fri Jul 18, 2025 7:12 am
by xyilla

Re: Simple language script

Posted: Fri Jul 18, 2025 7:13 am
by xyilla

Re: Simple language script

Posted: Fri Jul 18, 2025 7:14 am
by xyilla

Re: Simple language script

Posted: Fri Jul 18, 2025 7:15 am
by xyilla

Re: Simple language script

Posted: Fri Jul 18, 2025 7:16 am
by xyilla

Re: Simple language script

Posted: Fri Jul 18, 2025 7:17 am
by xyilla

Re: Simple language script

Posted: Fri Jul 18, 2025 7:18 am
by xyilla

Re: Simple language script

Posted: Fri Jul 18, 2025 7:20 am
by xyilla