kisyan 发表于 2010-8-28 14:15:00

AU3版的两只老虎 转 啊D BLOG

本帖最后由 kisyan 于 2010-8-28 14:16 编辑

Func frequency($scale,$melody="C")
If $scale="0" Then Return 0
If $melody="C" Then
Switch $scale
Case "1"
   Return 264
Case "2"
   Return 297
Case "3"
   Return 330
Case "4"
   Return 352
Case "5"
   Return 396
Case "6"
   Return 440
Case "7"
   Return 495
EndSwitch
ElseIf $melody="D" Then
Switch $scale
Case "1"
   Return 297
Case "2"
   Return 334
Case "3"
   Return 371
Case "4"
   Return 396
Case "5"
   Return 446
Case "6"
   Return 495
Case "7"
   Return 557
EndSwitch
EndIf
SetError(1)
EndFunc

Func book($book,$speed=500,$melody="c")
For $s=1 To StringLen($book)
$frequency=frequency(StringMid($book,$s,1),$melody)
If @error Then ContinueLoop
$Duration=$speed
Switch StringMid($book,$s+1,1)
Case "H"
   $frequency=frequency(StringMid($book,$s,1),$melody)*2
Case "L"
   $frequency=frequency(StringMid($book,$s,1),$melody)/2
Case "Q"
   $Duration=$speed/2
Case "S"
   $Duration=$speed*2
EndSwitch
If $frequency=0 Then
Sleep($speed)
Else
Beep($frequency,$Duration)
EndIf
Next
EndFunc

book("12311231345034505Q6Q5Q4Q315Q6Q5Q4Q3126L1026L1",300,"D")

anew1983 发表于 2010-8-28 15:11:51

什么两只老虎嘛 说的不清不楚

lcgkogoo 发表于 2010-8-30 21:05:41

传奇外挂啊。。两只老虎

xyold1 发表于 2010-8-31 20:37:52

如此大作,居然看不懂,惭愧{:face (368):}

117267948 发表于 2010-12-18 19:11:40

好深奥~>~.>

tryhi 发表于 2010-12-18 19:22:16

没有声音啊,三鹿

tryhi 发表于 2010-12-18 19:44:23

三鹿,你说要看机子的IP还要什么?IP这个可以吧?@IPAddress1还是要外网IP?
页: [1]
查看完整版本: AU3版的两只老虎 转 啊D BLOG