Joined: May 11, 2004 Posts: 79 Location: Halifax, Nova Scotia
Posted: Fri Aug 15, 2008 7:43 pm Post subject: Trigger Problem
Hi there,
I've written a trigger to stock our crafting resources shop each tick. The regular zedit method returns an error and doesn't alow us to give items to a mob unless it's dependant on the previous command. The script doesn't seem to be running, even when I've set the Num Arg to 100.
Name: 'Crafting Shop Stocking Script', VNum: [ 3006], RNum: [ 37]
Trigger Intended Assignment: Mobiles
Trigger Type: Random Entry , Numeric Arg: 1, Arg list: None
Commands:
* For creating crafting shop inventory
* 100% chance of loading steel
%load% obj 64000
* 25% chance of loading a minor magical essence
if (%random.4% == 1)
%load% obj 64100
end
* 25% chance of loading an obsidian
if (%random.4% == 1)
%load% obj 64001
end
* 25% chance of loading cold iron
if (%random.4% == 1)
%load% obj 64002
end
* 20% chance of loading an onyx
if (%random.5% == 1)
%load% obj 64003
end
* 50% chance of loading silver
if (%random.2% == 1)
%load% obj 64004
end
* 30% chance of loading gold
if (%random.10% <= 3)
%load% obj 64005
end
* 15% chance of loading a ruby
if (%random.100% <= 15)
%load% obj 64006
end
* 20% chance of loading mithril
if (%random.5% == 1)
%load% obj 64007
end
* 10% chance of loading a sapphire
if (%random.10% == 1)
%load% obj 64008
end
* 10% chance of loading an emerald
if (%random.10% == 1)
%load% obj 64009
end
* 10% chance of loading adamantine
if (%random.10% == 1)
%load% obj 64010
end
* 5% chance of loading a diamond
if (%random.20% == 1)
%load% obj 64011
end
say Looks like I've got some new inventory if you're interested.
Anything look wrong with that to anyone? _________________ ageofdragons.com - 4th Age Dragonlance MUD with both OGL (D&D 3.5e, Pathfinder) and classic Diku-style rules ports.
Joined: Nov 26, 2005 Posts: 1390 Location: Shelby Township, Michigan
Posted: Sat Aug 16, 2008 12:19 am Post subject:
It's definitely related to the types. Entry triggers when a mob enters a room, not when a player enters the same room as the mob, not sure if that was your intention though. Also random triggers only ever fire when there is a player in the zone (immortals above level GRGOD, or whatever Rasputin's equivalent ADM_LVL is, and any immortals with nohassle on do not count). _________________ DG Script Reference Forum 4 Dimensions
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum