55 lines
1.4 KiB
Plaintext
55 lines
1.4 KiB
Plaintext
|
string di_shuffleString(string str);
|
||
|
void di_PlaySound(string str);
|
||
|
|
||
|
string di_ShuffleString(string str)
|
||
|
{
|
||
|
string result = "";
|
||
|
int iLength = GetStringLength(str);
|
||
|
while(iLength > 0)
|
||
|
{
|
||
|
int iPos = Random(iLength) + 1;
|
||
|
result = result + GetSubString(str, iPos - 1, 1);
|
||
|
str = GetStringLeft(str, iPos - 1) + GetStringRight(str, iLength - iPos);
|
||
|
iLength = GetStringLength(str);
|
||
|
}
|
||
|
return result;
|
||
|
}
|
||
|
|
||
|
void di_PlaySound(string str)
|
||
|
{
|
||
|
if(str=="1")
|
||
|
PlaySound("as_cv_bell1");
|
||
|
else if(str=="2")
|
||
|
PlaySound("whinny");
|
||
|
else if(str=="3")
|
||
|
PlaySound("as_an_chickens1");
|
||
|
else if(str=="4")
|
||
|
PlaySound("as_wt_thundercl1");
|
||
|
else if(str=="5")
|
||
|
PlaySound("gui_magbag_full");
|
||
|
else if(str=="6")
|
||
|
PlaySound("cb_bu_metalsml");
|
||
|
else if(str=="7")
|
||
|
PlaySound("as_an_hawk1");
|
||
|
else if(str=="8")
|
||
|
PlaySound("as_an_cow1");
|
||
|
else if(str=="9")
|
||
|
PlaySound("c_cat_atk1");
|
||
|
else if(str=="0")
|
||
|
PlaySound("c_dog_atk1");
|
||
|
else if(str=="A")
|
||
|
PlaySound("c_raven_hit1");
|
||
|
else if(str=="B")
|
||
|
PlaySound("as_an_catmeow1");
|
||
|
else if(str=="C")
|
||
|
PlaySound("as_sw_lever1");
|
||
|
else if(str=="D")
|
||
|
PlaySound("as_na_splash1");
|
||
|
else if(str=="E")
|
||
|
PlaySound("as_an_frog1");
|
||
|
else if(str=="F")
|
||
|
PlaySound("as_an_rooster1");
|
||
|
else if(str=="G")
|
||
|
PlaySound("as_an_owlhoot2");
|
||
|
}
|