Welcome to the Builder Academy

Question Trigger of the Day - Parrot

More
16 Jul 2013 13:33 #3453 by Rumble
Code:
Name: 'Parrot Array Example', VNum: [ 46], RNum: [ 46] Trigger Intended Assignment: Mobiles Trigger Type: Speech , Numeric Arg: 100, Arg list: * Commands: * By Meyekul of The Builder Academy tbamud.com 9091 * Squak for the nice people, Polly wait 1 s emote squawks loudly. wait 1 s * 75% chance of learning phrase. eval polly %random.4% if %polly% > 1 * Ignore if already known switch %speech% case %phrase(1)% case %phrase(2)% case %phrase(3)% case %phrase(4)% case %phrase(5)% case %phrase(6)% case %phrase(7)% case %phrase(8)% case %phrase(9)% case %phrase(10)% emote looks at you curiously. break default eval say %%phrase(%random.%%number%%)%)%% emote squawks, %say% break done * Learn new phrases eval number (%number% + 1) eval phrase(%number%) %speech% global number global phrase(%number%) * Reset array after 10 phrases if %number% == 10 eval number 0 global number eval maxphrases 1 global maxphrases end end
If this was helpful please vote or leave a review for TBA.

Rumble
The Builder Academy
tbamud.com 9091
rumble@tbamud.com

Please Log in or Create an account to join the conversation.

Time to create page: 0.161 seconds