Building & Scripting > Scripting Board
Trigger of the .... something
Kvetch:
Molly witha voodoo doll.. that sent a shiver down my spine.
Here's a script that will let your mobs load with different eq when they load. That way each "knight" can look slightly different - even if they are the same vnum.
--- Code: ---Name: '(2700) different eq on load', VNum: [ 2772], RNum: [ 731]
Trigger Intended Assignment: Mobiles
Trigger Type: Load , Numeric Arg: 100, Arg list: None
Commands:
switch %random.3%
case 1
%load% obj 2750
wear tunic
break
case 2
%load% obj 2752
wear shirt
break
case 3
%load% obj 2753
wear vest
break
default
%load% obj 2752
wear shirt
break
done
switch %random.3%
case 1
%load% obj 2754
wear pants
break
case 2
%load% obj 2755
wear trousers
break
case 3
%load% obj 2756
wear breeches
break
default
%load% obj 2755
wear trousers
break
done
switch %random.3%
case 1
%load% obj 2757
wear sandals
break
case 2
%load% obj 2758
wear shoes
break
case 3
%load% obj 2760
wear boots
break
default
%load% obj 2758
wear shoes
break
done
switch %random.2%
case 1
%load% obj 2751
wear cord
break
case 2
%load% obj 2759
wear belt
break
default
%load% obj 2751
wear cord
break
done
switch %random.2%
case 1
%load% obj 2714
break
case 2
%load% obj 2761
wear cloth
break
default
%load% obj 2761
wear cloth
break
done
wear all
--- End code ---
Kvetch:
Let them there Wild Wester's Pan for gold!!
--- Code: ---Name: 'Panning for gold', VNum: [ 700], RNum: [ 276]
Trigger Intended Assignment: Rooms
Trigger Type: Command , Numeric Arg: 100, Arg list: p
Commands:
* Don't let someone spam the trigger to make money Take some movement points away every round and stop when they get to 10
if %actor.move% <= 10
%send% %actor% You are too exhausted to continue.
halt
end
* Fire on pan gold or abbreviations of each word
if %cmd% /= pan && %arg% /= gold
eval heldobj %actor.eq(hold)%
* Make sure they picked up the gold pan in room 703 and are holding it
if %heldobj.vnum% == 717
%send% %actor% You dip your pan into the river and scoop up some of the river bed and begin swirling it in the water.
%echoaround% %actor% %actor.name% dips a pan into the river and begins panning for gold.
* Take 10 movement points away, wait 3 seconds and give a 1 in 10 chance of success.
nop %actor.move(-10)%
wait 3 sec
if %random.10% == 1
%send% %actor% You find a small gold nugget in the bottom of your pan.
%echoaround% %actor% %actor.name% picks something out of %actor.hisher% pan.
* Give them a nugget
%load% obj 718 %actor% inv
else
%send% %actor% You find nothing of value.
end
else
%send% %actor% You need a pan for that.
end
end
--- End code ---
Kvetch:
Isn't it always a torch or a bookcase that opens up a secret door? Well, let's just give you the script for it then.
--- Code: ---Name: 'Pull torch - 23840', VNum: [23840], RNum: [ 2682]
Trigger Intended Assignment: Rooms
Trigger Type: Command , Numeric Arg: 100, Arg list: pu
Commands:
if pull /= %cmd% && torch /= %arg%
%send% %actor% The torch turns easily in your hand revealing a trap door.
%echoaround% %actor% As %actor.name% pulls the torch a trap door swings open leading upwards.
%door% 23840 up room 23841
%door% 23840 up name trap door
wait 60s
%echo% The trap door slams itself closed as if by magic.
%door% 23840 up purge
else
%send% %actor% OK!
%echoaround% %actor% You start to question the sanity of %actor.name% as they fumble about the room.
--- End code ---
Kvetch:
Here's a way to make a magic user mob useful. The Numeric Arg of 10, is the percent chance the script will go off while the mob is fighting (fighting being the trigger type). So, 10% of the time while fighting this mob will cast a spell. Though, this does go off the level of the person the magic user is fighting and only goes up to level 22, so if it was used in 4D, it'd have to be changed a bit.
--- Code: ---Name: 'Magic User - 7009, 7200-7202', VNum: [ 7200], RNum: [ 1050]
Trigger Intended Assignment: Mobiles
Trigger Type: Fight , Numeric Arg: 10, Arg list: None
Commands:
switch %actor.level%
case 1
case 2
case 3
break
case 4
dg_cast 'magic missile' %actor%
break
case 5
dg_cast 'chill touch' %actor%
break
case 6
dg_cast 'burning hands' %actor%
break
case 7
case 8
dg_cast 'shocking grasp' %actor%
break
case 9
case 10
case 11
dg_cast 'lightning bolt' %actor%
break
case 12
dg_cast 'color spray' %actor%
break
case 13
dg_cast 'energy drain' %actor%
break
case 14
dg_cast 'curse' %actor%
break
case 15
dg_cast 'poison' %actor%
break
case 16
if %actor.align% > 0
dg_cast 'dispel good' %actor%
else
dg_cast 'dispel evil' %actor%
end
break
case 17
case 18
dg_cast 'call lightning' %actor%
break
case 19
case 20
case 21
case 22
dg_cast 'harm' %actor%
break
default
dg_cast 'fireball' %actor%
break
done
--- End code ---
Kvetch:
A potion that changes every time it loads or is dropped/gotten. Rather devious if you ask me. Of course, it's from the mind of Once.
--- Code: ---Name: 'Potion script.', VNum: [16928], RNum: [ 982]
Trigger Intended Assignment: Objects
Trigger Type: GetLoad, Numeric Arg: 100, Arg list: None
Commands:
eval change1 %random.86%
eval change2 %random.86%
eval change3 %random.86%
if (%change1% || %change2% || %change3%) = 31
eval change1 %random.86%
eval change2 %random.86%
eval change3 %random.86%
osetval 1 %change1%
osetval 2 %change2%
osetval 3 %change3%
endif
--- End code ---
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version