|
chris-74269 Magician
Joined: 23 Nov 2004 Posts: 364
|
Posted: Thu May 07, 2009 11:06 pm
[2.37] Reading a database list |
I'm trying to make a script that tracks what mobs drop particular items and how many times that mob has dropped one. So I capture the mobs name, and the item which dropped on death. Everything is organized as the item being the record, the mob its key, and the number of times that mob dropped it being the value. All items dropped are then placed in the fragmenttypes variable. Here is my script
Code: |
fragment=1
fragmentname=@firstword(%1)
dbfragmentname=%replace(%1," ",_)
dbmobdropped=%replace(@mobkilled," ",_)
#if (%db(@dbfragmentname,@dbmobdropped)) {#addkey @dbfragmentname @dbmobdropped (%db(@dbfragmentname,@dbmobdropped)+1)} {#addkey @dbfragmentname @dbmobdropped 1}
#additem fragmenttypes @dbfragmentname
//Trouble atm is getting %dbitems to work
//#FORA @fragmenttypes {#show %dbitems(%i)}
|
Everything works except using %dbitems in #fora @fragmenttypes {#show %dbitems(%i)}. It needs the variable to be declared like @variable, and using %concat(@,%i) won't work. Any ideas? |
|
|
|
oldguy2 Wizard
Joined: 17 Jun 2006 Posts: 1201
|
Posted: Fri May 08, 2009 12:07 am |
Try writing it this way.
Code: |
#FORALL @fragmenttypes {#show %dbitems(@{%i})} |
|
|
|
|
chris-74269 Magician
Joined: 23 Nov 2004 Posts: 364
|
Posted: Fri May 08, 2009 1:24 am |
you rock
|
|
|
|
|
|
|
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
|
|