Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Media Player (https://forums.graalonline.com/forums/showthread.php?t=18500)

aires_graal 12-08-2001 10:51 AM

Media Player
 
Hello ^_^ Ok I am a total sucky scripter and i need help, How do i make a script that would let you load your own midis?
I tried this, but it doesnt work......... help! pleassseee!

if (playertouchsme) {
toweapons Musicoff;
}

if (playersays(music off)) {stopmidi;}
if(playerchats){
play #c,midi;}

maximus_asinus 12-08-2001 11:49 AM

I am new at this but I think tokenize is what you would use here.
tokenize.but not completely sure.Ask someone via private messages for a quick responce......sometimes.......:megaeek:

nyghtGT 12-08-2001 02:23 PM

here is a simple midi player:
NPC Code:

NPC Code:

// NPC made by Nyght GT (LAT Admin)
if (created) {
stommidi;
}
if (playerchats && startswith(playmidi,#c)) {
tokenize #c;
play #t(1).mid;
}
if (playerchats) {
if (strequals(#c,stopmidi)) {
stopmidi;
}
}




say 'playmidi filename' and it will play ... do not include the file extensions ...

aires_graal 12-09-2001 04:31 AM

thank you
 
Thanks, Maybe i should read the newbi bible, but im kind of too busy working on levels :'(

maximus_asinus 12-09-2001 05:23 AM

ya,nyghtGT is a extremely good scripter.He probably is as good as half the NATs out there.Only mistake and thats a typo,he put stommidi.It SHOULD be stopmidi.That should effect anything though.:D

T3CK 12-09-2001 05:31 AM

Yeah. I myself agree with nyghts script. Although I memorized commands.txt it didn't help. All I can do is anything known in commands.txt. Any other commands would help people.

Sennema 12-09-2001 06:21 AM

Quote:

Originally posted by nyghtGT
here is a simple midi player:
NPC Code:

NPC Code:

// NPC made by Nyght GT (LAT Admin)
if (created) {
stommidi;
}
if (playerchats && startswith(playmidi,#c)) {
tokenize #c;
play #t(1).mid;
}
if (playerchats) {
if (strequals(#c,stopmidi)) {
stopmidi;
}
}




say 'playmidi filename' and it will play ... do not include the file extensions ...

I think my computer sucks, cause it wont let me use tokensize #c;


All times are GMT +2. The time now is 12:49 AM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.