Welcome to CWG Project Home
Search
Home · Topics · Downloads · Your Account · Forums · Top 10
 
 


 
 
Who is Online

There are currently, 107 guest(s) and 39 member(s) that are online.

You are Anonymous user. You can register for free by clicking here
 
 

 
 
Modules

· Home
· Content
· Downloads
· FAQ
· Feedback
· Forums
· Journal
· Members List
· Private Messages
· Recommend Us
· Reviews
· Search
· Statistics
· Stories Archive
· Submit News
· Surveys
· Top 10
· Topics
· Web Links
· Your Account
 
 

 
 
Search



 
 

 
  cwg.lazuras.org :: View topic - Trigger Problem
 Forum FAQForum FAQ   SearchSearch   UsergroupsUsergroups   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Trigger Problem

 
Post new topic   Reply to topic    cwg.lazuras.org Forum Index -> Builder Lounge
View previous topic :: View next topic  
Author Message
Gicker
CWG - Member


Joined: May 11, 2004
Posts: 79
Location: Halifax, Nova Scotia

PostPosted: Fri Aug 15, 2008 7:43 pm    Post subject: Trigger Problem Reply with quote

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.

CircleMUD, version 3.1
OasisOLC 2.0.6
DG Scripts 1.0.13
CWG Rasputin - 1.2.28b


The script is as follows:

Code:


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.
Back to top
View user's profile Send private message Visit poster's website
Vatiken
CWG - Member


Joined: Jul 03, 2008
Posts: 60

PostPosted: Fri Aug 15, 2008 8:08 pm    Post subject: Reply with quote

Does it work if you remove RANDOM and just use it as an ENTRY trigger? I always seem to have problems when I combine different trigger call functions.
Back to top
View user's profile Send private message
Fizban
CWG - Honored Elder


Joined: Nov 26, 2005
Posts: 1390
Location: Shelby Township, Michigan

PostPosted: Sat Aug 16, 2008 12:19 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Rumble
CWG - Honored Elder


Joined: Jan 09, 2004
Posts: 781
Location: Monterey, CA USA

PostPosted: Sat Aug 16, 2008 3:00 am    Post subject: Reply with quote

Use the GLOBAL and RANDOM types to make it fire whether a player is in the room or not.
_________________
Rumble
The Builder Academy
tbamud.com 9091
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Kidaf
CWG - Newbie Contributor


Joined: Nov 24, 2005
Posts: 38
Location: Poa, RS, BR

PostPosted: Sat Sep 13, 2008 1:42 pm    Post subject: Reply with quote

Or/And GREET or GREET-ALL.

That would give you the effect you expected with the ENTRY type.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    cwg.lazuras.org Forum Index -> Builder Lounge All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
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

Powered by phpBB © 2001, 2005 phpBB Group
 
 


 
 


All logos and trademarks in this site are property of their respective owner. The comments are property of their posters, all the rest ? 2002 by me
You can syndicate our news using the file backend.php or ultramode.txt
PHP-Nuke Copyright © 2005 by Francisco Burzi. This is free software, and you may redistribute it under the GPL. PHP-Nuke comes with absolutely no warranty, for details, see the license.
Page Generation: 0.24 Seconds