Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » Finished MUD Scripts
Thexder
Newbie


Joined: 07 Oct 2001
Posts: 3

PostPosted: Sun Oct 07, 2001 4:06 am   

Medievia Database EQ Script
 
This is the easiest 'Identify' EQ class I've seen by far. This script parses the following output:
----BEGIN OUTPUT----
Your divination is complete...
Object: a red eye gem [red eye gem]
Item Type: TREASURE Effects: GLOW MAGIC
Equipable Location(s): TAKE HOLD
Weight: 1 Value: 1000 Level Restriction: 15
The object appears to be in perfect pristine condition.
Days Left: 181
Affects:
Level 25 spell of charm person.
+20 to MANA
+10 to AGE
+2 to STR
+2 to DAMROLL
----END OUTPUT---
It also parses all (at least all the ones I could think of) of the optional 'Affects' such as SAVING_SPELL, HIT_POINTS, HITROLL, etc.

The class definition should go into it's own folder named 'identify'. The other trigger should be put into a top-level folder that is always enabled unless, of course, you wish to turn off your database. To set up the database, simply create a new database with the all the field names that you see in the script and name the database 'items'. For example, you'd want to create a field named 'Object' because you saw &Item.Object in the script. Likewise with &Item.Names, &Item.Weight, &Item.Effects, etc.

NOTE: I wrote and debugged this script using v6.16 so I don't know if it works in earlier versions. Feel free to let me know if something isn't working correctly or if you know a way to do something better.

Peace,

Thexder
----BEGIN CODE----

#TRIGGER {Your divination is complete...} {#T+ identify}

#CLASS {identify}
#TRIGGER {Object: &Item.Object ~[&Item.Names~]} {}
#TRIGGER {Item Type: &Item.ItemType Effects: &Item.Effects} {}
#TRIGGER {Equipable Location~(s~): &Item.EquipLocs} {}
#TRIGGER {Weight: &Item.Weight Value: &Item.Value Level Restriction: &Item.LvlRestriction} {}
#TRIGGER {Attributes: &Item.Attributes} {}
#TRIGGER {Damage Dice of &Item.DamageDice} {}
#TRIGGER {&Item.Mana to MANA} {}
#TRIGGER {&Item.AGE to AGE} {}
#TRIGGER {&Item.STR to STR} {}
#TRIGGER {&Item.DEX to DEX} {}
#TRIGGER {&Item.CON to CON} {}
#TRIGGER {&Item.WIS to WIS} {}
#TRIGGER {&Item.INT to INT} {}
#TRIGGER {&Item.STA to STA} {}
#TRIGGER {&Item.DAMROLL to DAMROLL} {}
#TRIGGER {&Item.MOVE to MOVE} {}
#TRIGGER {&Item.HIT_POINTS to HIT_POINTS} {}
#TRIGGER {&Item.HITROLL to HITROLL} {}
#TRIGGER {&Item.SAVING_SPELL to SAVING_SPELL} {}
#TRIGGER {Level &Item.SpellLvl spell of &Item.SpellName.} {}
#TRIGGER {$} {
#T- identify
#DBLOAD items
#NEW All @Item
#DBSAVE items
#DBCLOSE items
#ECHO {Item added to Database.}
#UNV Item
}
#CLASS 0
----END CODE----

Edited by Troubadour to replace some unsupported HTML.

Edited by - troubadour on 10/12/2001 14:03:58
Reply with quote
Galherdon
Newbie


Joined: 10 Oct 2001
Posts: 6
Location: USA

PostPosted: Fri Oct 12, 2001 2:46 pm   
 
I made the new database, made all the fields that I would need (all are text type) and loaded the script... when I cast identify on an item yellow text is printed "Identify" but when I open my database there is no listing of the item I jsut cast id on???

I do have 6.16 registered.

-ICQ- 11772621
Reply with quote
Thexder
Newbie


Joined: 07 Oct 2001
Posts: 3

PostPosted: Sun Oct 14, 2001 8:45 pm   
 
I had that problem initially too. Apparently there is some problem with auto entry into an empty database. Try filling the first entry in the database with bogus values, i.e. make up an item and put it in there. Then try to identify something else and see if the auto entry works.

Also about the &#43 in the code--that's HTML code for a plus sign. Everywhere you see that in the code, replace it with a plus sign.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » Finished MUD Scripts 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