Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen gezeigt.

Link zu dieser Vergleichsansicht

nettalk:scripting:slapcount [2005/08/05 13:19]
127.0.0.1 (alte Version wieder hergestellt)
nettalk:scripting:slapcount [2007/03/26 21:34] (aktuell)
91.0.94.234
Zeile 7: Zeile 7:
  
 Sub Serv_Action(Text,​ Nick, FrameID, ConnID) Sub Serv_Action(Text,​ Nick, FrameID, ConnID)
-  if (instr(1,​lcase(Text),"​slaps ") > 0 or instr(1,​lcase(Text),"​haut ") > 0) and instr(1,​lcase(Text),​lcase(GetVal(Frontconnid,5))) > 0 then +  ​texoc=RemColors(Text) 
-    SlapCount=SlapCount+1+ 
 +  ​if (instr(1, lcase(texoc),"​slaps ") > 0 or instr(1, lcase(texoc), "haut ") > 0) and instr(1, lcase(texoc), lcase(GetVal(FrontConId, 5))) > 0 then 
 +    SlapCount = SlapCount + 1
     send "/me wurde das " & SlapCount & ". mal geschlagen!",​ FrameID     send "/me wurde das " & SlapCount & ". mal geschlagen!",​ FrameID
   end if   end if
Zeile 20: Zeile 22:
   Save "​SlapCount",​ SlapCount   Save "​SlapCount",​ SlapCount
 End Sub End Sub
 +
 +
 +Sub RemColors(Text)
 +  TextNoColor=""​
 +  i=0
 +  Do
 +    i2=i
 +    i=InStr(i2+1,​ Text, Chr(1))
 +    i4=InStr(i2+1,​ Text, Chr(3))
 +    if (i4<i or i=0) and i4>0 Then i=i4
 +    i3=i
 +    if i = 0 Then
 +      i=Len(Text)+1
 +      i3=i
 +    else
 +      Do
 +        i=i+1
 +        Dat=Mid(Text,​ i, 1)
 +      Loop until (Asc(Dat) > 57 or Asc(Dat) < 48) and Dat<>","​
 +      i=i-1
 +    end if
 +    if i3-i2 > 1 Then TextNoColor=TextNoColor+Mid(Text,​ i2+1, i3-i2-1)
 +  loop until i3=Len(Text)+1
 +  RemColors = TextNoColor
 +End Sub
 +
 </​code>​ </​code>​

Eigene Werkzeuge