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
Jim Vance
Beginner


Joined: 07 Dec 2006
Posts: 16

PostPosted: Sun Feb 03, 2008 2:01 am   

Need ideas for script involving #LOOPDB
 
Hey there,

I was wondering if anyone could help me with this one. I am building a script that will allow me to use an alias called "quest" to make doing item quests easier. It identifies if I am in an particular room on the Automapper, then builds a quest title and assigns an existing alias to a simpler alias (such as "q_sword_01" to "q1"). Once the appropriate variables are populated, a listing of quest titles are sent to a window called "Guide" and the simple aliases are built in a new class called Qtemp. Sort of. Here's the "quest" alias so far:

Code:
#IF (%roomnum = 1) {
  #VAR NODE "Blahtown Quests"
  G_ROOM.q1 = Sword Quest
  Q_ROOM.q1 = q_sword_01
  G_ROOM.q2 = Shield Quest
  Q_ROOM.q2 = q_shield_01
  #VAR QUEST 1
  }
#IF (%roomnum = 2) {
  #VAR NODE "Hohumshire Quests"
  G_ROOM.q1 = Big Sword Quest
  Q_ROOM.q1 = q_sword_02
  G_ROOM.q2 = Big Shield Quest
  Q_ROOM.q2 = q_shield_02
  #VAR QUEST 1
  }
#IF (@QUEST = 1) {
  #WIN Guide @NODE
  #WIN Guide %ansi( white)%expanddb( @G_ROOM, %crlf, ": ")
  #LOOPDB @Q_ROOM {#ALIAS %key {%val} Qtemp}
  }


The problem is the last line. #LOOPDB creates the Qtemp class and puts the aliases q1 and q2 there, but the alias value in both says "%var" instead of q_sword_01 (or _02) and q_shield_01 (or _02). How can I get them to populate with their respective (longer) aliases?

Thanks.

Jim Vance
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