i think i saw that already in another script(cant remember which one). how to play a .wav in a script?
example of what i want to do:
Simba Code:if FindBlackChatMessage('yo dude') then
play alarm.wav
i think i saw that already in another script(cant remember which one). how to play a .wav in a script?
example of what i want to do:
Simba Code:if FindBlackChatMessage('yo dude') then
play alarm.wav
I think it's just Playsound(), but it's been awhile
I have it in my salamander script though if you want to check out the use of it
Red & Green Salamander Hunter // Construction // Gilded Altar // Major help w/ Kyles Runespan // VWB Smither // PhoenixFeathers // GemCutter // Bonfire // LRC Miner // Spell Tab Maker // ApeAtollAgility // IvyWC // RoguesCooker // Herblore // AshamanButterfly // AshamanPowerMiner // Fletcher // LividFarm
kk thanks
but how do you code the path to the sound? (where do you put the .wav and how to write the path to it?)
Last edited by ogustuce; 01-08-2013 at 10:11 PM.
SoundPath:=ScriptPath+'noyelling.wav';
PlaySound(SoundPath);
soundpath is a string
That's from my sally script
Red & Green Salamander Hunter // Construction // Gilded Altar // Major help w/ Kyles Runespan // VWB Smither // PhoenixFeathers // GemCutter // Bonfire // LRC Miner // Spell Tab Maker // ApeAtollAgility // IvyWC // RoguesCooker // Herblore // AshamanButterfly // AshamanPowerMiner // Fletcher // LividFarm
yeah i saw that but you must have 'noyelling.wav' somewhere on your computer for that to work, right? so whrere to put it? (ex: C:/simb/includes/)
Red & Green Salamander Hunter // Construction // Gilded Altar // Major help w/ Kyles Runespan // VWB Smither // PhoenixFeathers // GemCutter // Bonfire // LRC Miner // Spell Tab Maker // ApeAtollAgility // IvyWC // RoguesCooker // Herblore // AshamanButterfly // AshamanPowerMiner // Fletcher // LividFarm
kk ill try that out
hmm I wrote something fast to check if it works but it doesnt do anything when i run it..... did i write something wrong?
Simba Code:program OgyAFK;
{$DEFINE SMART}
{$I SRL/SRL.Simba}
procedure DeclarePlayers;
begin
HowManyPlayers := 1; // Number of Players to use
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0; // Player to start with, first one is 0
Players[0].Name := ''; // Username
Players[0].Pass := ''; // Password
Players[0].Active := True; // just leave it as is.
Players[0].Pin := ''; // Bank Pin. Leave it if you don't have one.
Players[0].Integers[1] := 10000; // Number of loads
Players[0].Integers[2] := 375; // Xp For 1 Pouch Made <----------------------------------------
end;
var
SoundPath:string;
Procedure Alert;
begin
SoundPath:=ScriptPath+'Bang.wav';
PlaySound(SoundPath);
end;
begin
SRL_SixHourFix := True;
Smart_FixSpeed := True;
SetupSRL;
DeclarePlayers;
LogInPlayer;
repeat
alert;
wait(3000);
until (false)
end.
i should be hearing the .wav when i press play?
Last edited by ogustuce; 01-08-2013 at 11:17 PM.
Yea, as long as its in the same folder, it should find it.
~Rez
Edit: in the repeat-until you use in the main execution, try adding a wait? Might be mass playing the sound, so you wont hear it?
For the basics of the basics of pascal, try my TuT. ||Photoshop Editing ||MapleResourceDung Script || Book a flight! BuySellTrip
still doenst work =/
Either your putting the sound in the wrong directory, or the file is messed up. You can check if it's in the correct directory by doing:
Simba Code:begin
if FileExists(ScriptPath + 'bang.wav') then
WriteLn('The file is there.')
else
WriteLn('The file isn''t there.');
end.
nvm the problem is my .wav, i tried with ash's 'noyelling' wav and it works
NO YELLING ON THE BUS
glad you figured it out
Red & Green Salamander Hunter // Construction // Gilded Altar // Major help w/ Kyles Runespan // VWB Smither // PhoenixFeathers // GemCutter // Bonfire // LRC Miner // Spell Tab Maker // ApeAtollAgility // IvyWC // RoguesCooker // Herblore // AshamanButterfly // AshamanPowerMiner // Fletcher // LividFarm
There are currently 1 users browsing this thread. (0 members and 1 guests)