|
bair Beginner
Joined: 31 Oct 2006 Posts: 22
|
Posted: Mon Nov 06, 2006 5:55 pm
databases |
im trying to compile a database for quest items which prompts the user "Zone?" so it puts the item name and the zone entered into a database. Here is what it says when you complete a quest item
You touch a house key to a quest card, and a house key vanishes!
Thanks.
OK did some research, so far i have this:
Code: |
#TRIGGER {You touch (%w) to a quest card, and (%w) vanishes! } {
qmob=%prompt( "", "What mob?")
qzone=%prompt( "", "What zone?")
#new qitem Item=%1 Mob=@qmob Zone=@qzone
}
|
I need to know how to have it check if the entry is already in the database, and if it is exactly the same, to ignore it, but if it varies by zone or mob, then to add another entry. Also, what is the difference between #new and #addkey? |
|
|
|
Atreides_096 Wanderer
Joined: 21 Jan 2005 Posts: 99 Location: Solvang, CA
|
Posted: Tue Nov 07, 2006 10:22 am |
Try this:
Code: |
#TRIGGER {^You touch * to a quest card, and * vanishes!} {
#addkey QuestVar Qmob %prompt( %db( @QuestVar, Qmob), "Enter the name of the qmob")
#if %iskey(@QuestVar, %db(@QuestVar, Qmob)!=0 {
#addkey QuestVar %db(@QuestVar, %db(@QuestVar, Qmob)) %prompt( %db(@QuestVar, %db(@QuestVar, Qmob)), "Enter the zone")
}
} |
I think that'll do what you want.. though you can probably automate it in conjunction with the mapper... or at least automate the qmob aspect of it, using
Code: |
#if (%iskey(@Questvar, %-1)!=0 and %db(@QuestVar, QuestStatus)="OnQuest") |
and triggering on some mob death message, with triggers to keep track of if you are questing or not... if that makes sense |
|
|
|
bair Beginner
Joined: 31 Oct 2006 Posts: 22
|
Posted: Tue Nov 07, 2006 2:45 pm |
although i cant really understand it that well, that trigger doesnt look like it puts the item name into the db, the purpose of this is just to create a database of every quest item, its location, and the mob holding it, 2 of which are prompts asked to input after completion of the quest. doing some type of automation w/ mapping n such is not possible in this mud because of the amount of walking and aggro mobs. also the code in my first post isnt working and i have no idea why?
|
|
|
|
Dumond Newbie
Joined: 01 Nov 2004 Posts: 4
|
Posted: Tue Nov 14, 2006 12:07 am |
I believe that the following script will work for you:
#TRIGGER {^You touch &(qitem) to a quest card, and * vanishes!} {
qmob=%prompt( "", "What mob?")
qzone=%prompt( "", "What zone?")
if %query(((&item=@qitem)&(&mob=@qmob)&(&zone=@qzone)),) {#show That item was already in the database.} {#new qitem Item=@qitem Mob=@qmob Zone=@qzone;#show A NEW item was added to the database. }
}
Dumond
Eternal Darkness
ed.wolfpaw.net 9700 |
|
|
|
pvnarc Newbie
Joined: 28 Aug 2004 Posts: 7
|
Posted: Sun Nov 19, 2006 8:53 pm |
looks good but does not capture the initial line to start the rest of the trigger
|
|
|
|
|
|
|
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
|
|