User:DekeFantle

From Elanthipedia
Revision as of 13:51, 25 January 2009 by Maintenance script (talk | contribs)
Jump to navigation Jump to search

I am the Fentle, unless you played Space Merchant you have no idea what that means. *chuckle*

Just writing something to "get the red out".

Any old HOA members out there?, look for a dwarf that has the glint of laser cannons (maybe lightning bolts) in his eyes and give him the high sign.

#**************************************************************************************
# SUB_LISTEN
#
# USAGE;
# GoSub SUB_LISTEN
# [Next Statement/Action]
# Use SUB_RETURN to exit
#**************************************************************************************

SUB_LISTEN:
GoTo DISCOVER-TEACHER

DISCOVER-TEACHERW:
Pause
DISCOVER-TEACHER:
SetVariable LISTENING FALSE
SetVariable PREFERED-TEACHER1 UNKNOWN
SetVariable PREFERED-TEACHER2 UNKNOWN
SetVariable PREFERED-TEACHER3 UNKNOWN
SetVariable PREFERED-TEACHER4 UNKNOWN
SetVariable PREFERED-TEACHER5 UNKNOWN
SetVariable PREFERED-TEACHER6 UNKNOWN
SetVariable TEACHER UNKNOWN
SetVariable CURRENT-TEACHER UNKNOWN
action setvariable CURRENT-TEACHER $1 when (.+) is teaching a class .* You are in this class
action setvariable PREFERED-TEACHER6 $1 when (.+) is teaching a class .* Evasion which is still open to new students
action setvariable PREFERED-TEACHER5 $1 when (.+) is teaching a class .* Parry which is still open to new students
action setvariable PREFERED-TEACHER4 $1 when (.+) is teaching a class .* Multi Opponent which is still open to new students
action setvariable PREFERED-TEACHER3 $1 when (.+) is teaching a class .* Heavy Edged which is still open to new students
action setvariable PREFERED-TEACHER2 $1 when (.+) is teaching a class .* Disarm Traps  which is still open to new students
action setvariable PREFERED-TEACHER1 $1 when (.+) is teaching a class .* Targeted Magic which is still open to new students
action setvariable DEFAULT-TEACHER $1 when (.+) is teaching a class
action SetVariable LISTENING TRUE when You are in this class!
Match SUB_RETURN You are teaching a class
Match TRY2TEACH No one seems to be teaching
Match SET-TEACHER roundtime
Matchre DISCOVER-TEACHERW /sorry,|\.\.\.wait/i
put asses teach
MatchWait 20
GoTo DISCOVER-TEACHER

TRY2TEACH:
GoSub SUB_TEACH
return

SET-TEACHER:
Pause 3
ECHO SET-TEACHER: LISTENING = %LISTENING
If %LISTENING = "TRUE" then GoTo CHECK-BETTER-TEACHER1
If %PREFERED-TEACHER1 != "UNKNOWN" then GoTo SET-PREFERED-TEACHER1
If %PREFERED-TEACHER2 != "UNKNOWN" then GoTo SET-PREFERED-TEACHER2
If %PREFERED-TEACHER3 != "UNKNOWN" then GoTo SET-PREFERED-TEACHER3
If %PREFERED-TEACHER4 != "UNKNOWN" then GoTo SET-PREFERED-TEACHER4
If %PREFERED-TEACHER5 != "UNKNOWN" then GoTo SET-PREFERED-TEACHER5
If %PREFERED-TEACHER6 != "UNKNOWN" then GoTo SET-PREFERED-TEACHER6
If %TEACHER6 != "UNKNOWN" then GoTo SET-DEFAULT-TEACHER


CHECK-BETTER-TEACHER1:
ECHO CHECK-BETTER-TEACHER1:
If %PREFERED-TEACHER1 != "UNKNOWN" && %PREFERED-TEACHER1 = %CURRENT-TEACHER then return
If %PREFERED-TEACHER1 != "UNKNOWN" && %PREFERED-TEACHER1 != %CURRENT-TEACHER then GoTo STOP-LISTENING
If %PREFERED-TEACHER2 != "UNKNOWN" && %PREFERED-TEACHER2 = %CURRENT-TEACHER then return
If %PREFERED-TEACHER2 != "UNKNOWN" && %PREFERED-TEACHER2 != %CURRENT-TEACHER then GoTo STOP-LISTENING
If %PREFERED-TEACHER3 != "UNKNOWN" && %PREFERED-TEACHER3 = %CURRENT-TEACHER then return
If %PREFERED-TEACHER3 != "UNKNOWN" && %PREFERED-TEACHER3 != %CURRENT-TEACHER then GoTo STOP-LISTENING
If %PREFERED-TEACHER4 != "UNKNOWN" && %PREFERED-TEACHER4 = %CURRENT-TEACHER then return
If %PREFERED-TEACHER4 != "UNKNOWN" && %PREFERED-TEACHER4 != %CURRENT-TEACHER then GoTo STOP-LISTENING
If %PREFERED-TEACHER5 != "UNKNOWN" && %PREFERED-TEACHER5 = %CURRENT-TEACHER then return
If %PREFERED-TEACHER5 != "UNKNOWN" && %PREFERED-TEACHER5 != %CURRENT-TEACHER then GoTo STOP-LISTENING
If %PREFERED-TEACHER6 != "UNKNOWN" && %PREFERED-TEACHER6 = %CURRENT-TEACHER then return
If %PREFERED-TEACHER6 != "UNKNOWN" && %PREFERED-TEACHER6 != %CURRENT-TEACHER then GoTo STOP-LISTENING
Else return

SET-PREFERED-TEACHER1:
SetVariable WHO2LISTEN2 %PREFERED-TEACHER1
GoTo LISTEN-UP

SET-PREFERED-TEACHER2:
SetVariable WHO2LISTEN2 %PREFERED-TEACHER2
GoTo LISTEN-UP

SET-PREFERED-TEACHER3:
SetVariable WHO2LISTEN2 %PREFERED-TEACHER3
GoTo LISTEN-UP

SET-PREFERED-TEACHER4:
SetVariable WHO2LISTEN2 %PREFERED-TEACHER4
GoTo LISTEN-UP

SET-PREFERED-TEACHER5:
SetVariable WHO2LISTEN2 %PREFERED-TEACHER5
GoTo LISTEN-UP

SET-PREFERED-TEACHER6:
SetVariable WHO2LISTEN2 %PREFERED-TEACHER6
GoTo LISTEN-UP

SET-DEFAULT-TEACHER:
SetVariable WHO2LISTEN2 %DEFAULT-TEACHER
GoTo LISTEN-UP

LISTEN-UPW:
Pause
LISTEN-UP:
Match SUB_RETURN closed the class to new students
Match LISTENING You begin to listen
Match STOP-LISTENING You are already listening to someone
Match DISCOVER-TEACHER I could not find who you were referring to
Matchre LISTEN-UPW /sorry,|\.\.\.wait/i
put listen to %WHO2LISTEN2
MatchWait 20
GoTo DISCOVER-TEACHER

STOP-LISTENINGW:
Pause
STOP-LISTENING:
Match DISCOVER-TEACHER You stop listening
Match DISCOVER-TEACHER But you aren't listening to anyone
Matchre STOP-LISTENINGW /sorry,|\.\.\.wait/i
put stop listen
MatchWait 20
GoTo DISCOVER-TEACHER

LISTENING:
action remove (.+) is teaching a class .* You are in this class
action remove (.+) is teaching a class .* Evasion which is still open to new students
action remove (.+) is teaching a class .* Parry which is still open to new students
action remove (.+) is teaching a class .* Multi Opponent which is still open to new students
action remove (.+) is teaching a class .* Heavy Edged which is still open to new students
action remove (.+) is teaching a class .* Disarm Traps  which is still open to new students
action remove (.+) is teaching a class .* Targeted Magic which is still open to new students
action remove (.+) is teaching a class
action remove You are in this class!
SetVariable LISTENING TRUE
return

# END SUB
#**************************************************************************************
#**************************************************************************************