MudBytes
» MUDBytes Community » Discussion » General Chatter » MudRage = gone?
Pages: << prev ... 4, 5, 6, 7, 8 next >>
MudRage = gone?
Sandi
Wizard






Group: Members
Posts: 628
Joined: Jun 17, 2006

Go to the bottom of the page Go to the top of the page
#91 id:12173 Posted Sep 16, 2008, 8:07 am

I'm with you on that, Skol. We have Camelot, Freeport, Seas of the Lords, The Pirate Lords, and the Faerie Ring in our game. Given the notes he wrote in some of them on how they work, I'd say he meant for them to be distributed. We got several of them from ROMLama.
.........................
The Witch of Tir na nOg

www.tnnmud.com
tnnmud.com 6789

Hades_Kane
Wizard






Group: Moderators
Posts: 817
Joined: May 31, 2006

Go to the bottom of the page Go to the top of the page
#92 id:12184 Posted Sep 16, 2008, 11:18 am


Fizban said:
alias trigger code?


http://www.mudbytes.net/index.php?a=files&s=viewfile&fid=932
.........................
-Diablos of End of Time, eotmud.com:4000, Final Fantasy themed -- Seeking Builders!    For more info visit: http://www.eotmud.com/

Fizban
Wizard




Group: Members
Posts: 619
Joined: Jan 8, 2007

Go to the bottom of the page Go to the top of the page
#93 id:12186 Posted Sep 16, 2008, 2:44 pm

Ahh, looks to be identical (in use not code) to DG's Command Type.

ie:

Code (text):
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
 
Name: 'Touch Mirror'
Trigger Intended Assignment: Rooms
Trigger Type: Command , Numeric Arg: 100, Arg list: touch
Commands:
if 'mirror /= '%arg%
  %send% %actor% As you touch the mirror you feel an odd gut wrenching sensation and find yourself elsewhere.
  %echoaround% %actor% %actor.name% touches the mirror and disappears from existence.
  %teleport% %actor% 456
  %force% %actor% look
else
  return 0
end
 


When they type touch mirror they get messages, everyone in the room but them gets another, they get teleported then they are forced to see the new room. The return 0 makes the command continue to the mud as usual if the %arg% (everything after the first word, think argument in c terms ) is not a substring of mirror.
.........................
http://www.tbamud.com/files/tbaMUDcom%20Development%20Crew%20%20Fizban.png
The Builder Academy
4 Dimensions

David Haley
Wizard






Group: Members
Posts: 6,913
Joined: Jun 30, 2007

Go to the bottom of the page Go to the top of the page
#94 id:12187 Posted Sep 16, 2008, 2:47 pm

Haven't command progs been around in SMAUG for quite a while now too?
.........................
-- d.c.h --
BabbleMUD Project (custom codebase)
Legends of the Darkstone (head coder)
http://david.the-haleys.org
.........................

Fizban
Wizard




Group: Members
Posts: 619
Joined: Jan 8, 2007

Go to the bottom of the page Go to the top of the page
#95 id:12188 Posted Sep 16, 2008, 2:54 pm


DavidHaley said:
Haven't command progs been around in SMAUG for quite a while now too?


They weren't last time I worked on a SMAUG, but then again...that was in the 90's.
.........................
http://www.tbamud.com/files/tbaMUDcom%20Development%20Crew%20%20Fizban.png
The Builder Academy
4 Dimensions

Zeno
Wizard






Group: Moderators
Posts: 1,206
Joined: May 15, 2006

Go to the bottom of the page Go to the top of the page
#96 id:12189 Posted Sep 16, 2008, 3:02 pm

They were never in Smaug 1.4, but they were in one of the SWR versions. I don't know about Smaug 1.8.
.........................
-Zeno McDohl,
Owner of Bleached InuYasha Galaxy.
Zenorebirth: Free MUD host.
Learn how to build in Smaug at Smaug Building Institute.

David Haley
Wizard






Group: Members
Posts: 6,913
Joined: Jun 30, 2007

Go to the bottom of the page Go to the top of the page
#97 id:12190 Posted Sep 16, 2008, 3:22 pm

Hmm, I guess one of the coders before me added it to Darkstone from a snippet or something. (I took on the coding in 2001.) I kind of assumed it had been around in the stock bases as well given how useful it is for adding depth to an area.
.........................
-- d.c.h --
BabbleMUD Project (custom codebase)
Legends of the Darkstone (head coder)
http://david.the-haleys.org
.........................

Kayle
Wizard






Group: Members
Posts: 1,167
Joined: Nov 27, 2006

Go to the bottom of the page Go to the top of the page
#98 id:12196 Posted Sep 16, 2008, 6:53 pm

I'd have to fiddle with it and look in the code but I think FUSS has support for this with 1.8+.
.........................
Owner/Coder                                                            Coder
Malevolent Whispers                                                  Star Wars: The Sith Wars
{Development Phase - Not accepting players}            Open Alpha - Players Welcome - Full System Re-writes Imminent.                                     

FUSS Project Team Lead
SmaugMuds.Org - The Smaug MUDs Community Center

Zeno
Wizard






Group: Moderators
Posts: 1,206
Joined: May 15, 2006

Go to the bottom of the page Go to the top of the page
#99 id:12197 Posted Sep 16, 2008, 6:56 pm

It's in RoD, so it's in 1.8 probably.
.........................
-Zeno McDohl,
Owner of Bleached InuYasha Galaxy.
Zenorebirth: Free MUD host.
Learn how to build in Smaug at Smaug Building Institute.

Hades_Kane
Wizard






Group: Moderators
Posts: 817
Joined: May 31, 2006

Go to the bottom of the page Go to the top of the page
#100 id:12198 Posted Sep 16, 2008, 9:43 pm

Fizban said:
Ahh, looks to be identical (in use not code) to DG's Command Type.

ie:

Code (text):
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
 
Name: 'Touch Mirror'
Trigger Intended Assignment: Rooms
Trigger Type: Command , Numeric Arg: 100, Arg list: touch
Commands:
if 'mirror /= '%arg%
  %send% %actor% As you touch the mirror you feel an odd gut wrenching sensation and find yourself elsewhere.
  %echoaround% %actor% %actor.name% touches the mirror and disappears from existence.
  %teleport% %actor% 456
  %force% %actor% look
else
  return 0
end
 


When they type touch mirror they get messages, everyone in the room but them gets another, they get teleported then they are forced to see the new room. The return 0 makes the command continue to the mud as usual if the %arg% (everything after the first word, think argument in c terms ) is not a substring of mirror.


I'm not sure if that extends to any command or just touch, but what I've expanded the alias snippet to do is allow us to attach a program to any possible input into the game that we want.  If we want something different to open when someone tries to open a door, or when they try to scan, or when they do any number of things that aren't actual commands, we can make it fire off of that.  I don't recall how all we've expanded it, I believe by default its limited to rooms and objects, with objects being the only target, but I know that we have it to where it works with room progs, obj progs, mob progs, and both objects and mobs can be the target, along with having no target at all, and some variations on the object part of it includes allowing any instance of it working, or limited to just objects you are carrying, wearing, have in your inventory, or that is in the room.

Sure, stock progs are a bit limited, but with a little bit of modification (this snippet being one of the key modifications) it can allow you to do virtually anything.  Literally, there's nothing that I've considered trying to do with our progs in their current state that I've been unable to accomplish.

Edited to add:

100!
.........................
-Diablos of End of Time, eotmud.com:4000, Final Fantasy themed -- Seeking Builders!    For more info visit: http://www.eotmud.com/

Last edited Sep 16, 2008, 9:44 pm by Hades_Kane
Fizban
Wizard




Group: Members
Posts: 619
Joined: Jan 8, 2007

Go to the bottom of the page Go to the top of the page
#101 id:12200 Posted Sep 16, 2008, 11:19 pm

Quote:
m not sure if that extends to any command or just touch, but what I've expanded the alias snippet to do is allow us to attach a program to any possible input into the game that we want.  If we want something different to open when someone tries to open a door, or when they try to scan, or when they do any number of things that aren't actual commands, we can make it fire off of that.  I don't recall how all we've expanded it, I believe by default its limited to rooms and objects, with objects being the only target, but I know that we have it to where it works with room progs, obj progs, mob progs, and both objects and mobs can be the target, along with having no target at all, and some variations on the object part of it includes allowing any instance of it working, or limited to just objects you are carrying, wearing, have in your inventory, or that is in the room.


It can b any command. the arg list determines what command triggers the script. It does not have to be a real command, but if it is it will over-ride the actual command unless you add a return 0 to it, in such a case the script will fire, and then the command will be passed to the MUD (unless you add a return 0 near the top of the script and then wait a deci-second (or more) before the rest of the script continues to let the MUD do the normal command first. By using %arg% you can also make 'touch ball' and 'touch rug' do different things in the same room. The arg list can also be several words  long like shown below (Example A) or be 100% open ended and trigger upon any command like shown in Example B.


Example A:
Code (text):
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
 
Name: 'Push Ball & Touch Stone'
Trigger Intended Assignment: Rooms
Trigger Type: Command , Numeric Arg: 100, Arg list: touch push      <----- fire when the command touch or fire are typed.
Commands:
if %cmd% == push && 'ball /= '%arg% 
*/= just does a substring check I added the ' to the start of both so push ba would trigger it but push all wouldn't
  %send% %actor% You push the ball and reveal a hole in the ground underneath it leading into a cave. 
  *%actor% is always a unique identifier pointing to the character that triggered a script
  %door% %self.vnum% north room 4500 
  *syntax: %door% <vnum of room A> <direction of exit being modified in room A> <several different fields that can be edited here, but room is the option to make a new exit> <vnum the exit should lead to>, so in
  *essence there is now an exit leading down from the current
  *room, %self.room% being the room the script is attached to, to room 4500
  %echoaround% %actor% %actor.name% puts all of %actor.hisher% weight behind the ball and manages to move it. 
  *%actor.name% displays the name of the actor, %actor.hisher% puts his or her depending on the sex of the actor.
elseif %cmd% == touch && 'stone /= '%arg%
  %send% %actor% You reach forward and touch the stone, but suddenly feel as if you shouldn't be here and are perhaps invading.
  %load% mob 500 
  *load mob with vnum 500
  %force% %self.people% mkill %actor%  
  *mobs can be forced to 'kill' not just mkill, but kill can fail if the mob is a far lower than the target much how low level aggro mobs won't attack a max level player, whereas mkill takes away that factor. Also kill is a
  *command, as such it targets a name, mkill is a 
  *scripted command so it can target a reference to the player which is more accurate. ie. kill %actor.name% is synonymous with 'kill fizban' whereas mkill %actor% attacks the player that triggered it no matter if
  *there might be a mob named Fizban in the room
else
  *they did touch push or touch but whichever they typed wasn't followed by the correct argument.
  %send% %actor% %cmd% what?!?
  *%cmd% will be either push or touch depending what they used to trigger the script
end
 


Code (text):
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
 
Example B:
Name: 'Open ended Script'
Trigger Intended Assignment: Rooms
Trigger Type: Command , Numeric Arg: 100, Arg list: *  (every command typed in the room will trigger the script)
set sendstring %send% %actor% Alas you try, but it's far to dark to do that here.
*create new variable to save the amount needed to type later on.
switch %cmd.mudcommand%
*mudcommand is a field only usable when dealing with 'real' commands, if you have a command named push checking %cmd.mudcommand% instead of %cmd% allowed anything that would be interpreted as the
*command to be interpreted as the %cmd% for the script so pu would work and not just push.
  case look
    %sendstring%
  break
  case examine
    %sendstring%
  break
  case scan
    %sendstring%
  break
  default
    return 0
  break
done
 
.........................
http://www.tbamud.com/files/tbaMUDcom%20Development%20Crew%20%20Fizban.png
The Builder Academy
4 Dimensions

Last edited Sep 16, 2008, 11:28 pm by Fizban
Sandi
Wizard






Group: Members
Posts: 628
Joined: Jun 17, 2006

Go to the bottom of the page Go to the top of the page
#102 id:12202 Posted Sep 17, 2008, 12:35 am

Heavens, that's ugly stuff. If you could read it, you wouldn't put comments in the middle of it. Why the second %?
.........................
The Witch of Tir na nOg

www.tnnmud.com
tnnmud.com 6789

David Haley
Wizard






Group: Members
Posts: 6,913
Joined: Jun 30, 2007

Go to the bottom of the page Go to the top of the page
#103 id:12205 Posted Sep 17, 2008, 1:01 am

Because it makes it look leeter. Sorry, !33t3R.

(Couldn't resist... sorry...)
.........................
-- d.c.h --
BabbleMUD Project (custom codebase)
Legends of the Darkstone (head coder)
http://david.the-haleys.org
.........................

Hades_Kane
Wizard






Group: Moderators
Posts: 817
Joined: May 31, 2006

Go to the bottom of the page Go to the top of the page
#104 id:12217 Posted Sep 17, 2008, 11:10 am


Sandi said:
Heavens, that's ugly stuff. If you could read it, you wouldn't put comments in the middle of it. Why the second %?


I kind of have to second that :p

I'm not very familiar with DG Scripts, but the more and more I see of it, the more and more happy I am that when originally deciding on a codebase, we passed up Circle despite the insistence of one of our founding members.
.........................
-Diablos of End of Time, eotmud.com:4000, Final Fantasy themed -- Seeking Builders!    For more info visit: http://www.eotmud.com/

David Haley
Wizard






Group: Members
Posts: 6,913
Joined: Jun 30, 2007

Go to the bottom of the page Go to the top of the page
#105 id:12219 Posted Sep 17, 2008, 1:22 pm

More seriously, I believe it's to make parsing easy for the lazy. It's a lot easier to say "everything in between two percent signs is a variable" than to say "everything in this class of identifier characters after a single percent sign is a variable, unless it ends in a period, in which case the period is not part of the name, etc." It's the kind of thing that might sound reasonable when you do it, and then everybody after you pays for it and curses your name for generations to come. :wink:


EDIT: and, uh, could we fix the code posts so that the page formatting doesn't go all whack?
.........................
-- d.c.h --
BabbleMUD Project (custom codebase)
Legends of the Darkstone (head coder)
http://david.the-haleys.org
.........................

Last edited Sep 17, 2008, 1:23 pm by David Haley
Pages:<< prev ... 4, 5, 6, 7, 8 next >>
Tags
[+]

Valid XHTML 1.1! Valid CSS!