Jim Vance Beginner
Joined: 07 Dec 2006 Posts: 16
|
Posted: 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 |
|