Wednesday, May 8, 2013

DG Scripts 1

DG Scripts are my first project. I've already learned a lot about them, but I just had my first big success.

1) Name         : Iryli Loads Key - Obj [59322]
2) Intended for : Mobiles
3) Trigger types: Act 
4) Numeric Arg  : 100
5) Arguments    : *
6) Commands:
wait 2s
if %arg% /= whispers to you, 'May the Cycle balance all things.'
  %load% obj 59322
  %echo% Iryli inclines her head and speaks in a low voice. 'Of course. Here you are.'
  give key %actor.name%
  wait 2s
  %echo% Iryli resumes her position. 'Have a pleasant day.'
  wait 1s
else
end
W) Copy Trigger
Q) Quit
Enter Choice :
q
Do you wish to save your changes? :
y
Trigger saved to disk.

34H 100M 88V >
detach mob 59306 59303
Trigger removed.

34H 100M 88V >
attach mob 59303 59306
Trigger 59303 (Iryli Loads Key - Obj [59322]) attached to Iryli, the Keeper's Guard
[59306].

34H 100M 88V >
whisp Ir May the Cycle balance all things.
You whisper to Iryli, the Keeper's Guard, 'May the Cycle balance all things.'

34H 100M 88V >

Iryli inclines her head and speaks in a low voice. 'Of course. Here you are.'
Iryli, the Keeper's Guard gives you a brass key wreathed in vines.

34H 100M 88V >

Iryli resumes her position. 'Have a pleasant day.'

34H 100M 88V >
dance
You dance around happily.
-----------------------------------------------------

I had help, but I couldn't for the life of me figure out whyyy it was not working.

Pretty much all this is doing is this mob (Iryli) only makes an action if the argument that is sent (the * in the Arguments field at the top makes the trigger analyze ALL commands) matches the substring (/=) of "whispers to you, ' May the Cycle balance all things.'" So this won't activate if the phrase is said in any way but a whisper.
She then loads the key into her own inventory, makes a short action for show, gives the key to the %actor%, which is the PC that sent the whisper, and makes another short action for show.
I'm SO THRILLED THIS WORKS!!

No comments:

Post a Comment