Login
User Name:

Password:



Register
Forgot your password?
Vote for Us!
tintin++ ogg sound player script for linux
Author: Robert Smith
Submitted by: Vladaar
6Dragons ogg Soundpack
Author: Vladaar
Submitted by: Vladaar
6Dragons 4.4
Author: Vladaar
Submitted by: Vladaar
LoP 1.46
Author: Remcon
Submitted by: Remcon
LOP 1.45
Author: Remcon
Submitted by: Remcon
Users Online
CommonCrawl, Sogou, Yandex

Members: 0
Guests: 5
Stats
Files
Topics
Posts
Members
Newest Member
481
3,735
19,370
618
Micheal64X
Today's Birthdays
There are no member birthdays today.
Related Links
» SmaugMuds.org » General » Smaug Snippets » Snippet request?
Forum Rules | Mark all | Recent Posts

Snippet request?
< Newer Topic :: Older Topic > I was just wondering...

Pages:<< prev 1 next >>
Post is unread #1 Oct 1, 2008, 5:16 am   Last edited Oct 1, 2008, 5:16 am by Sanus Compleo
Go to the top of the page
Go to the bottom of the page

Sanus Compleo
Magician
GroupMembers
Posts153
JoinedMar 25, 2008

I have a need for two new if_checks, so that I can run a certain obj program, which I feel is pretty nice. Anyways, the ifchecks would be in_container, and num_in_container, the in_container would search for a specific vnum, in a specific container, and if it were set on a container, it would search inside itself for a specific vnum. num_in_container would just see how many objs are in a container, and would turn with the number. Also, now that I think of it, how would someone stop somebody from putting something in a container if the num_in_container returned 1 (as in 1 object in the container)?
       
Post is unread #2 Oct 3, 2008, 10:11 am
Go to the top of the page
Go to the bottom of the page

David Haley
Sorcerer
GroupMembers
Posts903
JoinedJan 29, 2007

in_container is a little hard because of the fact that it requires two arguments. mudprog ifchecks, at least the last time I looked at them, only take a single argument. Note that that might have changed in more recent versions like FUSS.

num_in_container is much easier in this respect because you only need one argument: the container to search. But it's a little unclear how to go about specifying the container itself.

I'm not sure if there is a mechanism to stop a command in progress. For starters, it would depend on when the trigger is, well, triggered. If the command has already taken place, then obviously you won't be able to stop it. If the trigger happens when the command is about to be processed, you would in principle be able to stop it. But like I said, I'm not sure if there is any such mechanism in place.

To be frank, issues like these are rather central to my very high frustration with mudprog, and my move toward other languages. I started my own several years ago that helped a lot, and now I'm in the process of moving that to Lua. Even though I am far from finished, things are much better already.
       
Post is unread #3 Oct 3, 2008, 10:54 am
Go to the top of the page
Go to the bottom of the page

Sanus Compleo
Magician
GroupMembers
Posts153
JoinedMar 25, 2008

The stopping thing is for a specific instance, the object I want to make will be a container, and will have random stats, based on the SINGLE item inside of it, but it won't be the item's stats etc. Since it would have to be a single item, all other items would have to have uniform weight, or the 'num_in_container' ifcheck would have to be working, and the stopping thing would work when someone tried 'put obj container' and a message would say 'You can't do that!' or something, and then no item will have been placed inside of the container.
       
Pages:<< prev 1 next >>