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


Joined: 17 May 2002
Posts: 4

PostPosted: Sun May 19, 2002 10:37 pm   

Variables and DB Scripting
 
I'm customizing an EQ database script to populate a Database (Zmud 6.26a).

The section of output I'm having a problem with from my 'id' command is this:

Adds immunity to magic.
Adds immunity to weapon.
Adds immunity to poison.

And other similar lists of immunities, vulnerabilities, etc.

Is there a way (using a data record type variable) to continuously add to that key until I write the entire record to the DB?

TIA.
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Thu May 23, 2002 6:26 pm   
 
The simplest method is probably to use another variable. Your id script should set it to null when you do the id. After you've got all the affects, you can use #ADDKEY to put it in your database-variable (which should also be nulled by the id script)
#AL id {#VAR dbvar %null;#VAR affects %null;cast identify}
#TR {^Adds (*).} {#IF %len(@affects) {#VAR affects {@affects, %1}} {#VAR affects {%1}}}
#TR {whatever indicates you've reached the end of the affects} {#ADDKEY dbvar affects {@affects}}

LightBulb
Vague questions get vague answers
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