Go Back   pimpmygame Forum > Guild Wars > GW :: Bots & Macros

Reply

Our Advertisers
 
Thread Tools Display Modes
Old 10.11.2008, 13:13   #1
Erfahrener Benutzer
 
Janina's Avatar
 
Join Date: 07.11.2008
Posts: 622
Default Sounds for WPF

.dll file for play sounds :

Code:
library WPSound;

uses
mmsystem;

procedure wpPlaySound(SoundFile: pchar;Loop: integer = 0); stdcall;
begin
if Loop=1 then PlaySound(SoundFile,0,SND_ASYNC or SND_LOOP)
else PlaySound(SoundFile,0,SND_ASYNC);
end;

procedure wpStopSound; stdcall;
begin
PlaySound(0,0,SND_PURGE);
end;

exports wpPlaySound, wpStopSound;

begin
end.

How to use in script? :

Code :
var
hlib : handle;

const DLLname = 'dll\wpsound.dll'; // ôàéë DLL

procedure OnCreate;
begin
hlib:=gDLL.LoadLib(DLLname);
end;

procedure OnDestroy;
begin
gDLL.FreeLib(hlib);
end;

BEGIN
gDLL.CallFunc3(hlib,'wpPlaySound',_gCustomDir+'Err or.wav',0,null);
//gDLL.CallFunc3(hlib,'wpStopSound',null,null,null);
END.

Code:
gDLL.CallFunc3(hlib,'wpPlaySound',_gCustomDir+'Err or.wav',0,null);

1 times the sound plays. if 2 to 1 on the parameters, the sound will be reproduced cyclically until the procedure call wpStopSound:

Code:
gDLL.CallFunc3(hlib,'wpStopSound',null,null,null);


For example ---->[Only registered and activated users can see links. Register now...]
__________________
Wenn die Anderen denken, dass du am Ende bist, dann fang erst richtig an!
Janina is offline   Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Archimond sounds Undead WoW :: General Discussion 0 27.02.2008 20:38
Archimond sounds tass WoW :: General Discussion 0 02.02.2008 22:04


All times are GMT +2. The time now is 06:14.

World of Warcraft Top Sites Warcraft 1 2 3 & World of Warcraft World of Warcraft private servers World of Warcraft Servers

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
Copyright ©2000-2008, Pimp my Game (PmG). All rights reserved.