Full Version : Making a Professor NPC
xmlspawner >>Q&A >>Making a Professor NPC


<< Prev | Next >>

Zigamus- 10-17-2006
I am makimng an Akademy where my players can train their skills. They can start as low as they want to and use this akademy to do all the training on their skills if they wish. It is the ONLY way on my shard where I want the player to be able to train their skill PAST the 100% range up to a total maximum of 120%.

As I see it, I need to create an item in the player's backpack, that cannot be moved or removed and use that as a tag for me to maintain the player's level, and make it visible to the spawner's logic.

Actually I was thinking of 2 such items, from each professor at the school. And since this will be several items, they should be in a bag, and that bag should also be made immovable in thier backpack.

These 'training items' would also be manipulated by mobs and other professors at the school.

One of the 'tags' would be for their level in a particular class/professor, and the other would be for their status in their current assignment.

I would need to create items and mobs around the akademy that can adjust the status of this second tag as they progress with their assignments.

Just as an example: A Professor of Herbology tells the student to go and find several different plants, and bring back samples of each. The greenhouses would have items in them that would give such samples and at the same time adjust the tag for status. (a simple incriment, applied one time only per student, then the tag is tested for reaching a specified amount before that lesson is complete, and the tag is cleard for another assignment.)

Sometimes the assignment would require combat, but not usually. Is this too strange a request for the spawners to handle? tongue.gif

P.S. Here is the Akademy I am talking about, I have it posted as the Pic of the Day on my shard site. I'll need about 10-20 professors to train everything, I think. BTW, this school IS inspired by the Harry Potter series by Rowling, in case anyone wonders, and is used without permission. (I don't think they will mind)

ArteGordon- 10-18-2006
QUOTE (Zigamus @ October 17, 2006 08:09 pm)
I am makimng an Akademy where my players can train their skills.  They can start as low as they want to and use this akademy to do all the training on their skills if they wish.  It is the ONLY way on my shard where I want the player to be able to train their skill PAST the 100% range up to a total maximum of 120%.

As I see it, I need to create an item in the player's backpack, that cannot be moved or removed and use that as a tag for me to maintain the player's level, and make it visible to the spawner's logic.

Actually I was thinking of 2 such items, from each professor at the school.  And since this will be several items, they should be in a bag, and that bag should also be made immovable in thier backpack.

These 'training items' would also be manipulated by mobs and other professors at the school.

One of the 'tags' would be for their level in a particular class/professor, and the other would be for their status in their current assignment.

I would need to create items and mobs around the akademy that can adjust the status of this second tag as they progress with their assignments.

Just as an example:  A Professor of Herbology tells the student to go and find several different plants, and bring back samples of each.  The greenhouses would have items in them that would give such samples and at the same time adjust the tag for status. (a simple incriment, applied one time only per student, then the tag is tested for reaching a specified amount before that lesson is complete, and the tag is cleard for another assignment.)

Sometimes the assignment would require combat, but not usually.  Is this too strange a request for the spawners to handle? tongue.gif

P.S. Here is the Akademy I am talking about, I have it posted as the Pic of the Day on my shard site.  I'll need about 10-20 professors to train everything, I think.  BTW, this school IS inspired by the Harry Potter series by Rowling, in case anyone wonders, and is used without permission.  (I don't think they will mind)

Instead of immovable items, I would use attachments to keep track of that information.
The XmlData or XmlValue attachments are good generic ones. XmlData holds string info, XmlValue hold integer info.

You can manually add such attachments to players like

[addatt xmlvalue Level 0

will add an XmlValue attachment named "Level" and assign it the value of 0.

Or you could do it via spawner or via scripts. This is a spawner entry that would add it to the triggering player

SETONTRIGMOB/ATTACH/xmlvalue,Level,0

Spawners can test for and manipulate the attachment info. For example, this test

GETONTRIGMOB,[ATTACHMENT,xmlvalue,Level,value] > 5

would test the "value" property on the XmlValue attachment named "Level" to see if it was greater than 5.

Or you can have a spawner set the value of the attachment like

SETONTRIGMOB/ATTACHMENT,xmlvalue,Level,value/5

or increment it like

SETONTRIGMOB/ATTACHMENT,xmlvalue,Level,value/INC,1

Zigamus- 10-18-2006
Excellent idea! Thanx Arte!!

ArteGordon- 10-18-2006
also note that the quest system can also be used to handle the examples that you gave. The questholders would basically be keeping track of the status of things that were being collected, killed, visited, etc.

QUOTE

Just as an example:  A Professor of Herbology tells the student to go and find several different plants, and bring back samples of each.

This could be done by making a questholder with multiple COLLECT type objectives.