Saturday, May 11, 2013

Mapping out new triggers

I have two that I'm planning right now... One of them is based on one that Rumble wrote, and the other is one I'm going to tackle on my own.

The point of the first is to respawn a cosmetic item into a container. The item is trash and would have no use except to be used as a token of friendship or affection. It is a white rose that the player would have to "pluck" from a rose bush. Unfortunately, the triggers can't reload items directly to containers, so I need a mobile to do it for me. My nymph seemed the best choice. It will look like this, more or less:

Name: Reload Rose in Rosebush - Obj 59319
Vnum: 59305
Trigger Intended for: Mobiles
Trigger Type: Load
Numeric Arg: 100
Argument: None
Commands:
if %self.contents% < 0
eval %self.contents%
if %self.contents.vnum% == 59320
halt
break
if %self.contents.vnum% != 59320
%purge% %self.contents%
end
if %self.contents% > 1
set nymph mob 59309
set rose obj 59320
%load% %nymph%
%echo% A beautiful nymph steps out from a tree nearby and approaches the rose bush.
%load% %rose% %nymph.inv%
wait 2s
%echo% She examines the rose bush and tends to it gently. Where her hands pass, more roses bloom.
%force% %nymph% put %rose% in %self%
wait 2s
%echo% Satisfied, the nymph nods and seems to melt into the foliage, ignoring all around her.
end

I'm going to pause here for now, and map out the other trigger in a while. Perhaps going to game for a bit after I test my logic for this particular trigger. :)

Edit: Logic was faulty in a few different places... I'll map out what changes I make here, I just don't want to think about it right now so I don't get too frustrated. XD

Change 1:
Trigger Intended for: Objects
Trigger Type: Global Random
(It'll have a chance to fire every 13 seconds without anything actually happening this way.)

Change 2:
Commands:
if %self.contents% < 0
eval %self.contents%
if %self.contents.vnum% == 59320
halt
end
if %self.contents.vnum% != 59320
%purge% %self.contents%
end
Add line: end
if %self.contents% > 1
(Got an eval error after this change. This is where I took a break. I'm going to have to read up on eval.)

No comments:

Post a Comment