Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Instrument scripts (https://forums.graalonline.com/forums/showthread.php?t=16980)

ninjaterd 11-15-2001 12:30 PM

Instrument scripts
 
Does any one know the script for a instrument of your choice....if u do plzzz tell me.....thx

PresShinP2P 11-15-2001 10:54 PM

it just works on keydown procedures

entravial 11-16-2001 04:58 AM

~AlphaFlame~

Basically, just use a for loop, keydown, and playsound... here's one I made a bit ago (with a little not-so-subtle hint from Kaimetsu for a change in it)... it's fairly optimized...

TO CHANGE IT: just change the line "play ocarina#v"... change only the ocarina part to whatever instrument you want. Make sure the .wavs for that instrument end with a number from 1-8 though... Tada.

if (playertouchsme){
toweapons Ocarina;
destroy;
}
if (weaponfired){
this.mode=1-this.mode;
disabledefmovement;
timeout=.05;
}
if (timeout){
if (this.mode=1){
for (i=0;i<4;i++){
if (keydown(i))play ocarina#v(i+1+keydown(5)*4).wav;
}
if (keydown(6)){
this.mode=0;
enabledefmovement;
}
timeout=.05;
} else {enabledefmovement;}
}

jonny12 11-16-2001 09:05 AM

trumpet
 
1 Attachment(s)
here


// NPC made by jonny12
if (playertouchsme) {
toweapons Trumpet;
hidelocal;
}

if (weaponfired) {setplayerprop #P2,trumpet0.png;

disabledefmovement;
setani playtrump,;
timeout=.05;
}

if (timeout) {
if (keydown(0)&&!keydown(5)) {play trumpet1.wav;sleep .1;setani playtrump2,;sleep .1;}
if (keydown(1)&&!keydown(5)) {play trumpet2.wav;sleep .1;setani playtrump2,;sleep .1;}
if (keydown(2)&&!keydown(5)) {play trumpet3.wav;sleep .1;setani playtrump2,;sleep .1;}
if (keydown(3)&&!keydown(5)) {play trumpet4.wav;sleep .1;setani playtrump2,;sleep .1;}
if (keydown(0)&&keydown(5)) {play trumpet5.wav;sleep .1;setani playtrump2,;sleep .1;}
if (keydown(1)&&keydown(5)) {play trumpet6.wav;sleep .1;setani playtrump2,;sleep .1;}
if (keydown(2)&&keydown(5)) {play trumpet7.wav;sleep .1;setani playtrump2,;sleep .1;}
if (keydown(3)&&keydown(5)) {play trumpet8.wav;sleep .1;setani playtrump2,;sleep .1;}

if (keydown(6)) {enabledefmovement;setani idle,;}
if (!keydown(6)) {timeout=.05;}

entravial 11-16-2001 09:09 AM

~AlphaFlame~

Gods, what an ugly trumpet script...

Jonny... a few little hints

1- Don't use sleep.
2- Condense your scripting commands.
3- Learn how to optimize your NPCs.

ninjaterd 11-16-2001 05:30 PM

terribly sorry
 
Quote:

Originally posted by entravial
~AlphaFlame~

Gods, what an ugly trumpet script...

Jonny... a few little hints

1- Don't use sleep.
2- Condense your scripting commands.
3- Learn how to optimize your NPCs.

Im terribly, teribly sorry but non of these scripts work........is there anyone here that could tell me 1 that works

entravial 11-17-2001 06:48 AM

~AlphaFlame~

Mine works. Do you have the .wav files of ocarina1 through ocarina8, or whatever instrument it is?

Xythar 11-17-2001 08:35 PM

I think Providence's fife works with ganis, instead of 'play.'


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

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