Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
Hubbley
Newbie


Joined: 15 Apr 2003
Posts: 1

PostPosted: Sun May 23, 2004 4:17 pm   

displaying eq modifiers from Databases
 
is it possible to capture multi-line modifiers for eq from spells such as Identify, store them in a database, and recall/echo them to my client windows when I want to know stats on equipment?
When I cast Identify spell I get a response something like this

Your identify reveals that a: A set of black scale armplates is
item is:Armor
Armor Class: Heavy
additional effects:
+hitroll
+damage

What I would like to see zmud to do is this, capture the Armor class of Heavy and additional effects of +hitroll and +damage and put it into a Databas next to A pair of black scale armplate.

Then whenever I want to see the modifiers on a piece I want to be able to quickly retrieve these modifiers and display something like this:

A pair of Black scale armplates: Heavy, +hr, +dam

Is this even remotely possible using zmud version 5.55?
Any help on this problem would be greatly appreciated.
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Sun May 23, 2004 7:02 pm   
 
It's certainly possible. I've assumed that you'll have a blank line immediately following the list of effects. If you won't then you'll need to change that trigger's pattern. I've also assumed that all effects will begin with either a + or a -.

After entering the script, you should change the Ident class options to Disable class when connecting to a MUD and disable the class. This is necessary to limit the blank-line trigger to one use per ident.

Queries and their displays can be designed however you want. I've included one as an alias.

#TR {Your identify reveals that a: (*) is} {#T+ Ident;#VAR Item {};#ADDKEY Item Name {%1}}
#TR {$} {#T- Ident;#IF %query( &Name = @Item.Name) {} {#NEW All @Item}} {Ident}
#TR {item is:(*)} {#ADDK Item Type {%1}} {Ident}
#TR {Armor Class: (*)} {#ADDK Item ArmorClass {%1}} {Ident}
#TR {({+|-})(*)} {#IF %iskey( @Item, Effects) {#ADDK Item Effects {%db( @Item, Effects), %1%2}} {#ADDK Item Effects {%1%2}}} {Ident}
#AL EquipID {#FORALL %find( "%-1") {#SAY {%db( %i, Name): %db( %i, ArmorClass), %db( %i, Effects)}}}
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion All times are GMT
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

© 2009 Zugg Software. Hosted by Wolfpaw.net