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
Llian
Newbie


Joined: 28 Aug 2005
Posts: 4

PostPosted: Thu Nov 02, 2006 8:41 am   

Database multi-variable
 
Ok, trying to catalogue all my items in the DB and have a query.
When I stat the item I get a number from 1 to 41. This number corresponds to the weapon type (hit, bludgeon, dagger, sword etc). Is there an easy(ish) way to get the DB to pick up the number and convert it to weapon type?
Code:
Name: 'a lightsaber with a glowing purple blade', Aliases: lightsaber saber light sarina
VNum: [ 1212], RNum: [   31], Type: WEAPON, SpecProc: None
L-Des: A inert hilt rests on the ground here.
Can be worn on: TAKE RIGHT HAND LEFT HAND AT BELT
Set char bits : NOBITS
Extra flags   : GLOW HUM POWERFORGED
Weight: 0, Value: 0, Cost/day: 0, Timer: 0, Min Level: 0
In room: Nowhere, In object: None, Carried by: Nobody, Worn by: Nobody
Todam: 99d50, Message type: 31
Affections: +125 to HITROLL, +125 to ARMOR, +125 to POIBLADE, -125 to ATKSPEED, +125 to ABSORB, +25 to DAMROLL

The Message type bit there is the number I am referring to.

Edit: Would creating the weapon type listings with #SUB work if I can get the trigger to fire BEFORE the one thta captures the data?
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Thu Nov 02, 2006 10:19 am   
 
Create a list of all the types in the form "hit|bludgeon|dagger|sword|etc." Then in your capture trigger assign the value with %item(@list,%nn). You will have to use a text field in the database for this rather then a pick list due to a 32 item limit for pick lists.
_________________
The only good questions are the ones we have never answered before.
Search the Forums
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