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
Santel
Novice


Joined: 07 Feb 2003
Posts: 32

PostPosted: Thu Feb 20, 2003 6:00 pm   

v6.40 DB #Find
 
When i execute this command:
#FIND neptune All Names
I get this result:
Wield Neptune's Trident Weapon 18 +0 +0 6 20 13 +7 +6 Yes +20 +30 +0 +0 +1 +2 +1 +0 +0 +0 +12 125000 good, neutral All All All metal 0

The result is correct, but i would like to manipulate the output.

Is there anyway I can put the result from #find into a variable so I can take away all fields that have "0" data and also make it look more understandable.

Basicly i want to manipulate the output from the #Find command to look like this:

Neptune's Trident (weapon) : metal enchanted Lv=18 DAM=4-21 HR+7 DR+6 HP+20 MP+30 DEX+1 INT+2 WIS+1 wgt=12 $=125000

Santel
Reply with quote
TonDiening
GURU


Joined: 26 Jul 2001
Posts: 1958
Location: Canada

PostPosted: Thu Feb 20, 2003 7:56 pm   
 
Have a look at the %find function so you can return what you
want into a variable.

An example of something similar by Lightbulb:
quote:

#Alias identify {#IF %find(%1, All, Name) {#FORALL %find( %1, All, Name) {#DBGET %i;say ~[Name: &Name~] ~[Value: &Value~] ~[Bonus: &Bonus~] ~[Weapon: &Weapon~] ~[Required: &Required~]}}}



Ton Diening
Reply with quote
Santel
Novice


Joined: 07 Feb 2003
Posts: 32

PostPosted: Fri Feb 21, 2003 2:52 pm   
 
Cool.. thanks a lot

Santel
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