Jump to content
  • 0

Rune Soundeffect


SlashGeeGee

Question


  • Group:  Members
  • Topic Count:  111
  • Topics Per Day:  0.02
  • Content Count:  573
  • Reputation:   20
  • Joined:  11/19/11
  • Last Seen:  

Hello rA.

I just want my dota runes to have sound effect like HoN i got already the client side files and placed them in the wav. folder but in scripting I just tried like this but it won't effect ingame.

Here's my script :


//http://rathena.org/board/topic/57784-request-dota-runes/page__fromsearch__1

pvp_y_1-2,1,1,5 script Runes 802,2,2,{
dispbottom "Walkthrough to get Runes.";
end;

OnTouch:
switch( .Runes ){
Case 1:
sc_start SC_INCATKRATE,( .Duration * 1000 ),100;
sc_start SC_INCMATKRATE,( .Duration * 1000 ),100;
soundeffect "ddamage.wav", 0;
break;
Case 2:
skill "AS_CLOAKING",10,1;
sc_start SC_CLOAKING,( .Duration * 1000 ),10;
soundeffect "invi.wav", 0;
break;
Case 3:
sc_start4 SC_REGENERATION,( .Duration * 1000 ),-10,1,0,0;
soundeffect "regen.wav", 0;
break;
Case 4:
getmapxy( .@Map$,.@X,.@Y,0,strcharinfo(0) );
clone .@Map$,.@X,.@Y,"",getcharid(0),getcharid(0),"",1,.Duration;
clone .@Map$,.@X,.@Y,"",getcharid(0),getcharid(0),"",1,.Duration;
soundeffect "illusion.wav", 0;
break;
Case 5:
sc_start SC_SpeedUp1,( .Duration * 1000 ),0;
break;
soundeffect "haste.wav", 0;
default: end;
}
announce "[ "+strcharinfo(0)+" ] has gained "+.Names$[.Runes]+".",bc_self,0x00FF00;
hideonnpc strnpcinfo(0);
delwaitingroom;
set .Runes,0;
set .RuneDelay,gettimetick(2) + .Duration;
while( .RuneDelay > gettimetick(2) ) sleep2 1000;

OnInit:
// Runes Duration in Seconds
set .Duration,60;

// Name of Each Runes.
setarray .Names$[1],
"Double Damage", // 2 x ATK Rate
"Invisibility", // Cloaking
"Regeneration", // HP / SP Regeneration
"    Clone", // Create 2 Clones
"    Haste"; // Improve Movement Speed

// Random Coordinate where NPC will Shown Again
setarray .CoordinateX[0],128;
setarray .CoordinateY[0],163;

sc_end SC_CLOAKING;
sc_end SC_REGENERATION;
set .Random,rand( getarraysize( .CoordinateX ) );
movenpc strnpcinfo(0),.CoordinateX[ .Random ],.CoordinateY[ .Random ];
hideoffnpc strnpcinfo(0);
if( !.Runes ) set .Runes,rand( 1,( getarraysize( .Names$ ) - 1 ) );
if( .Runes ) waitingroom "   "+.Names$[.Runes],0;
end;
}

Thanks in Advance ! /no1

SlashGeeGee

Link to comment
Share on other sites

6 answers to this question

Recommended Posts

  • 1

  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  2044
  • Reputation:   682
  • Joined:  10/09/12
  • Last Seen:  

<Removed previous script>

its working fine for me

try test your custom soundeffect by gm-command

@sound triplekill

//http://rathena.org/board/topic/57784-request-dota-runes/page__fromsearch__1

pvp_y_1-2,1,1,5	script	Runes	802,2,2,{
dispbottom "Walkthrough to get Runes.";
end;

OnTouch:
switch ( .current_rune ) {
	default:
		sc_start sc_incatkrate, .duration * 1000, 100;
		sc_start sc_incmatkrate, .duration * 1000, 100;
		soundeffect "killingspree.wav", 0;
		break;
	case 1:
	//	skill "AS_CLOAKING",10,1; <-- I played Dota, it doesn't gives you windwalk skill, just invisibility
	//	sc_start sc_cloaking, .duration * 1000, 10; <-- sc_cloaking shouldn't be use also ... should be setoption
		setoption 0x4, 1;
		addtimer .duration * 1000, strnpcinfo(0) +"::OncloakingUp";
		soundeffect "doublekill.wav", 0;
		break;
	case 2:
	//	sc_start4 sc_regeneration, .duration * 1000, -10, 1,0,0;
		sc_start sc_regeneration, .duration * 1000, 50; // <-- tested this one better
		soundeffect "triplekill.wav", 0;
		break;
	case 3:
		getmapxy .@map$, .@x, .@y, 0;
		clone .@map$, .@x, .@y, "", getcharid(0), getcharid(0) , 0, 1, .duration;
		clone .@map$, .@x, .@y, "", getcharid(0), getcharid(0) , 0, 1, .duration;
		soundeffect "holyshit.wav", 0;
		break;
	case 4:
		sc_start sc_speedup1, .duration * 1000, 0;
		soundeffect "rampage.wav", 0;
}
announce "[ "+strcharinfo(0)+" ] has gained "+ .rune_name$[ .current_rune ] +".",bc_map,0x00FF00;
delwaitingroom;
disablenpc strnpcinfo(0);
sleep .duration * 1000;
enablenpc strnpcinfo(0);
OnStart:
.@r = rand( .coordinate_total );
movenpc strnpcinfo(0), .CoordinateX[.@r], .CoordinateY[.@r];
.current_rune = rand( .total_rune_type );
waitingroom "   "+ .rune_name$[ .current_rune ], 0;
end;

OnInit:
// Runes Duration in Seconds
.duration = 5;

// Random Coordinate where NPC will Shown Again
setarray .CoordinateX, 128;
setarray .CoordinateY, 163;

.coordinate_total = getarraysize( .coordinatex );

setarray .rune_name$,
	"Double Damage", // 2 x ATK Rate
	"Invisibility", // Cloaking
	"Regeneration", // HP / SP Regeneration
	"Clone", // Create 2 Clones
	"Haste"; // Improve Movement Speed

.total_rune_type = getarraysize( .rune_name$ );

goto OnStart;

OncloakingUp:
setoption 0x4, 0;
end;
}

after totally look through this script, only I found this script is very unoptimized

Edited by AnnieRuru
  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  2044
  • Reputation:   682
  • Joined:  10/09/12
  • Last Seen:  

1st thing 1st

change that sleep2 into sleep

it is causing bugs

http://rathena.org/board/topic/57784-dota-runes/page__st__40#entry143077

Case 5:
sc_start SC_SpeedUp1,( .Duration * 1000 ),0;
break;
soundeffect "haste.wav", 0;

your break; command should put after soundeffect

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  111
  • Topics Per Day:  0.02
  • Content Count:  573
  • Reputation:   20
  • Joined:  11/19/11
  • Last Seen:  

1st thing 1st

change that sleep2 into sleep

it is causing bugs

http://rathena.org/b..._40#entry143077

Case 5:
sc_start SC_SpeedUp1,( .Duration * 1000 ),0;
break;
soundeffect "haste.wav", 0;

your break; command should put after soundeffect

i changed it already but still the sound won't work

here's my script :


//http://rathena.org/board/topic/57784-request-dota-runes/page__fromsearch__1

pvp_y_1-2,1,1,5 script Runes 802,2,2,{
dispbottom "Walkthrough to get Runes.";
end;

OnTouch:
switch( .Runes ){
Case 1:
sc_start SC_INCATKRATE,( .Duration * 1000 ),100;
sc_start SC_INCMATKRATE,( .Duration * 1000 ),100;
soundeffect "ddamage.wav", 0;
break;
Case 2:
skill "AS_CLOAKING",10,1;
sc_start SC_CLOAKING,( .Duration * 1000 ),10;
soundeffect "invi.wav", 0;
break;
Case 3:
sc_start4 SC_REGENERATION,( .Duration * 1000 ),-10,1,0,0;
soundeffect "regen.wav", 0;
break;
Case 4:
getmapxy( .@Map$,.@X,.@Y,0,strcharinfo(0) );
clone .@Map$,.@X,.@Y,"",getcharid(0),getcharid(0),"",1,.Duration;
clone .@Map$,.@X,.@Y,"",getcharid(0),getcharid(0),"",1,.Duration;
soundeffect "illusion.wav", 0;
break;
Case 5:
sc_start SC_SpeedUp1,( .Duration * 1000 ),0;
soundeffect "haste.wav", 0;
break;
default: end;
}
announce "[ "+strcharinfo(0)+" ] has gained "+.Names$[.Runes]+".",bc_self,0x00FF00;
hideonnpc strnpcinfo(0);
delwaitingroom;
set .Runes,0;
set .RuneDelay,gettimetick(2) + .Duration;
while( .RuneDelay > gettimetick(2) ) sleep 1000;

OnInit:
// Runes Duration in Seconds
set .Duration,60;

// Name of Each Runes.
setarray .Names$[1],
"Double Damage", // 2 x ATK Rate
"Invisibility", // Cloaking
"Regeneration", // HP / SP Regeneration
"    Clone", // Create 2 Clones
"    Haste"; // Improve Movement Speed

// Random Coordinate where NPC will Shown Again
setarray .CoordinateX[0],128;
setarray .CoordinateY[0],163;

sc_end SC_CLOAKING;
sc_end SC_REGENERATION;
set .Random,rand( getarraysize( .CoordinateX ) );
movenpc strnpcinfo(0),.CoordinateX[ .Random ],.CoordinateY[ .Random ];
hideoffnpc strnpcinfo(0);
if( !.Runes ) set .Runes,rand( 1,( getarraysize( .Names$ ) - 1 ) );
if( .Runes ) waitingroom "   "+.Names$[.Runes],0;
end;
}

SlashGeeGee

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  111
  • Topics Per Day:  0.02
  • Content Count:  573
  • Reputation:   20
  • Joined:  11/19/11
  • Last Seen:  

<Removed previous script>

its working fine for me

try test your custom soundeffect by gm-command

@sound triplekill

//http://rathena.org/board/topic/57784-request-dota-runes/page__fromsearch__1

pvp_y_1-2,1,1,5	script	Runes	802,2,2,{
dispbottom "Walkthrough to get Runes.";
end;

OnTouch:
switch ( .current_rune ) {
	default:
		sc_start sc_incatkrate, .duration * 1000, 100;
		sc_start sc_incmatkrate, .duration * 1000, 100;
		soundeffect "killingspree.wav", 0;
		break;
	case 1:
	//	skill "AS_CLOAKING",10,1; <-- I played Dota, it doesn't gives you windwalk skill, just invisibility
	//	sc_start sc_cloaking, .duration * 1000, 10; <-- sc_cloaking shouldn't be use also ... should be setoption
		setoption 0x4, 1;
		addtimer .duration * 1000, strnpcinfo(0) +"::OncloakingUp";
		soundeffect "doublekill.wav", 0;
		break;
	case 2:
	//	sc_start4 sc_regeneration, .duration * 1000, -10, 1,0,0;
		sc_start sc_regeneration, .duration * 1000, 50; // <-- tested this one better
		soundeffect "triplekill.wav", 0;
		break;
	case 3:
		getmapxy .@map$, .@x, .@y, 0;
		clone .@map$, .@x, .@y, "", getcharid(0), getcharid(0) , 0, 1, .duration;
		clone .@map$, .@x, .@y, "", getcharid(0), getcharid(0) , 0, 1, .duration;
		soundeffect "holyshit.wav", 0;
		break;
	case 4:
		sc_start sc_speedup1, .duration * 1000, 0;
		soundeffect "rampage.wav", 0;
}
announce "[ "+strcharinfo(0)+" ] has gained "+ .rune_name$[ .current_rune ] +".",bc_map,0x00FF00;
delwaitingroom;
disablenpc strnpcinfo(0);
sleep .duration * 1000;
enablenpc strnpcinfo(0);
OnStart:
.@r = rand( .coordinate_total );
movenpc strnpcinfo(0), .CoordinateX[.@r], .CoordinateY[.@r];
.current_rune = rand( .total_rune_type );
waitingroom "   "+ .rune_name$[ .current_rune ], 0;
end;

OnInit:
// Runes Duration in Seconds
.duration = 5;

// Random Coordinate where NPC will Shown Again
setarray .CoordinateX, 128;
setarray .CoordinateY, 163;

.coordinate_total = getarraysize( .coordinatex );

setarray .rune_name$,
	"Double Damage", // 2 x ATK Rate
	"Invisibility", // Cloaking
	"Regeneration", // HP / SP Regeneration
	"Clone", // Create 2 Clones
	"Haste"; // Improve Movement Speed

.total_rune_type = getarraysize( .rune_name$ );

goto OnStart;

OncloakingUp:
setoption 0x4, 0;
end;
}

after totally look through this script, only I found this script is very unoptimized

i figured out the problem is on my wav files how can I make it work ? i tried my other wav files using @sound and it worked but only these runes will not work.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  2044
  • Reputation:   682
  • Joined:  10/09/12
  • Last Seen:  

i figured out the problem is on my wav files how can I make it work ? i tried my other wav files using @sound and it worked but only these runes will not work.

http://rathena.org/board/topic/72526-soundeffect-script/#entry146761

... hey ... that's ... you .... :ani_swt3:

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  111
  • Topics Per Day:  0.02
  • Content Count:  573
  • Reputation:   20
  • Joined:  11/19/11
  • Last Seen:  

i figured out the problem is on my wav files how can I make it work ? i tried my other wav files using @sound and it worked but only these runes will not work.

http://rathena.org/b...pt/#entry146761

... hey ... that's ... you .... :ani_swt3:

haha , I once converted my files here : http://www.coolutils...io-Converter/��, then It worked like the last script I requested but when I tried to convert the runes files. it doesn't work. so I'll try your solution then. /no1

EDIT : Thanks Annie I tried your solution it worked.

Edited by SlashGeeGee
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...