Alter Aeon Community Forum

General Category => Building and Construction => Topic started by: Draak on June 05, 2014, 07:54:28 pm



Title: iact with sound
Post by: Draak on June 05, 2014, 07:54:28 pm
The following iact scripts can be added to any rattlesnake mob to make it become aggressive after rattling its tail:

Code:
mset snake iact start
waitfor player goto aggro@
@

mset snake iact aggro
pause 3
rest
pause 2
sound mobs/animal_rattlesnake_alert1
echo %1 lets out a menacing rattle.
pause 5
sound mobs/animal_rattlesnake_alert1
echo %1 continues to rattle its tail...
pause 4
sound mobs/animal_rattlesnake_alert1
echo %1 lets out a loud hiss while rattling its tail!
if !player ishere goto start
mset flag +aggro
goto loop@
@


mset snake iact loop
waitfor player goto loop
pause 30
stand
mset flag -aggro
goto start@
@


Title: Re: iact with sound
Post by: Draak on June 10, 2014, 02:25:15 pm
This iact script can be added to a room in a cave area. It sends the strings and sound to the entire zone, so make sure the entire zone is underground or it won't look right.

Code:
pause 20
areasound dproc/ambient_cave1
areasend The sound of dripping water echoes through the cave.
pause 60
goto start

Waitfors should be added if the zone is not an instance.


Title: Re: iact with sound
Post by: Draak on July 21, 2014, 05:58:35 am
Here's a version for a single room. It triggers only when a player is present, and will not repeat unless they leave the room for a short time and re-enter. Note that the sound "ambient_cave1" is randomized by the server to choose between several variant dripping noises, so it will not sound the same each time.

iact name: start
Code:
waitfor player goto drip
pause 10
goto start

iact name: drip
Code:
pause 20
sound dproc/ambient_cave1
echo The sound of dripping water echoes through the cave.
pause 60
goto loop

iact name: loop
Code:
waitfor player goto loop
pause 10
goto start


Title: Re: iact with sound
Post by: Shadowfax on July 28, 2014, 03:52:07 pm
It would be useful to randomize the amount of time for each pause between sound sends, lest it gain an unnatural rhythm.  Something like:

rset inter 0
pause 20
areasound dproc/ambient_cave1
areasend The sound of dripping water echoes through the cave.
goto chooser@
done

rset inter chooser
if rnd < 33 goto 1
if rnd < 33 goto 2
if rnd < 33 goto 3
goto chooser@
done

rset inter 1
pause 60
goto 0@
done

rset inter 2
pause 80
goto 0@
done

rset inter 3
pause 100
goto 0@
done