GASP.CMD
GASP.CMD · 3.4 KB
From the archive gasp.zip
Download the archive « Back to the archive contents
;H - Hit - GetName - Is there a Name awaiting authorization?
;N - temporary loop counter
;N$ - name (first letter adjusted to upper case)
Define(F1$ ,80) Define(F2$ ,80) Define(F3$ ,80) Define(F4$ ,80)
Define(F5$ ,80) Define(F6$ ,80) Define(F7$ ,80) Define(F8$ ,80)
Define(F9$ ,80) Define(F10$,80) Define(F11$,80) Define(F12$,80)
Define(F13$,80) Define(F14$,80) Define(F15$,80) Define(F16$,80)
Define(F17$,80) Define(F18$,80) Define(F19$,80) Define(F20$,80)
Define(F21$,80) Define(F22$,80) Define(F23$,80) Define(F24$,80)
Define(F25$,80)
Define(N$,80)
;***************************************************************************
PROC(CapScr) N=25 WHILE(N>=1) F$(N)=Screen(1,N,80) N=N-1 ENDW ENDP
;***************************************************************************
PROC(GetName)
N=25 H=0
WHILE (N>=1) AND (H=0)
P =(Pos(F$(N),"Log: ("))
P0=(Pos(F$(N),"Monitor: ("))
;Scrnwr(60,N,"P="&String(P)&" P0="&String(P0))
IF (P<>0) OR (P0<>0)
Q=(Pos(F$(N),"@"))
R=(Pos(F$(N)," new "))
;Send("P="&String(P)&" Q="&String(Q)&" R="&String(R))
IF (P <>0) AND (Q<>0) AND (R<>0) AND (Q>P) AND (R>Q)
N$=Substr(F$(N),P+9,Q-P-9) H=1 ENDIF
IF (P0<>0) AND (Q<>0) AND (R<>0) AND (Q>P0) AND (R>Q)
N$=Substr(F$(N),P0+13,Q-P0-13) H=1 ENDIF
ENDIF
N=N-1
ENDW
ENDP
;***************************************************************************
PROC(PYes)
Call (GetName)
IF (H=1) Wait(10) Sendln("auth "&N$&" yes") ENDIF
ENDP
;***************************************************************************
PROC(PInapprop) Call(GetName)
IF (H=1) Wait(10)
Sendln("auth "&N$&" "&N$&" is inappropriate. Please choose a medieval name.")
Wait(50) Sendln("auth "&N$&" no") ENDIF ENDP
;***************************************************************************
PROC(PCaps) Call(GetName)
IF (H=1) Wait(10)
Sendln("auth "&N$&" Please choose a medieval name using lower case letters.")
Wait(50) Sendln("auth "&N$&" no") ENDIF ENDP
;***************************************************************************
PROC(PImm) Call(GetName)
IF (H=1) Wait(10)
Sendln("auth "&N$&" That name is similar to another player's. Please try again.")
Wait(50) Sendln("auth "&N$&" no") ENDIF ENDP
;***************************************************************************
PROC(PAbusive) Call(GetName)
IF (H=1) Wait(10)
Sendln("auth "&N$&" Please choose a non-abusive name.")
Wait(50) Sendln("auth "&N$&" no") ENDIF ENDP
;***************************************************************************
PausSet( 1,[<#9>]) ; TAB - Yes
PausSet( 2,[<#0;15>]) ; ShfTAB - No
PausSet( 3,[<#0;84>]) ; ShfF01 - Caps (All Caps)
PausSet( 4,[<#0;85>]) ; ShfF02 - Imm (Too close to existing)
PausSet( 5,[<#0;86>]) ; ShfF03 - Abusive
PausSet( 6,[<#0;120>]) ; Alt1 - Caps (All Caps)
PausSet( 7,[<#0;121>]) ; Alt2 - Imm (Too close to existing)
PausSet( 8,[<#0;122>]) ; Alt3 - Abusive
REPEAT
Pause
IF(PausKey=1) Call(CapScr) Call(PYes)
ELSE IF(PausKey=2) Call(CapScr) Call(PInapprop)
ELSE IF(PausKey=3) OR (PausKey=6) Call(CapScr) Call(PCaps)
ELSE IF(PausKey=4) OR (PausKey=7) Call(CapScr) Call(PImm)
ELSE IF(PausKey=5) OR (PausKey=8) Call(CapScr) Call(PAbusive)
Wait(0)
ENDIF ENDIF ENDIF ENDIF ENDIF
UNTIL (0=1)
;Log: (1) Matthew@206.67.154.108 new Half-Elf Thief applying for