- May 31, 2005
- 171
- 0
- 42
I've been giving this some thought, like everyone else, and I think I might just of worked out a way that MIGHT work. Once again, I'd like to remind people that I have NO knowledge other than hearsay of the server files, so what I say could easily not be possible.
The Concept involves a small (quite simple) VBCode application that reads one text file, or set of text files, and actually modifies the NPC text file we're going to be using, every hour.
I could probably design this, but not build it. (I could tell someone what values to take from what files and how to output them. It just needs to repeat that for each line.)
Writing this file
Like I said, the NPC file is generated dynamically every hour by the small VB application. It gets its info from lists and re-writes that info into the NPC's text file.
I can do a template for the NPC code it should generate, this is no problem.
I DON'T KNOW IF THIS BIT WILL WORK: I wanted to try and use the gm command to reload NPCs onscreen to automatically reload the NPC every hour.
Getting the info
The only way the info can be given in an extractable way is through lists, so this is what I'd use.
The lists needed are as follows:
auc_itemname
auc_dura
auc_charname
auc_price
auc_sold
- These keep track of the info you would expect.
Putting an item up for sale / buying an item
When an item is put up for sale, a line is added to each list, keeping track of it. Here's a sample set. (Dura = max dura only.)
Itemname: DragonSlayer
Dura: 33
Charname: MrSam
Price: 300,000,000
Sold: No
When an item is sold, the following happens:
1) Player pays NPC
2) Item is generated based on itemname and dura, and given to player.
3) Sold is set to 'yes'.
A player can then go and collect their commision. Where sold = 'yes' the following happens:
1) Player receives price from NPC.
2) Sold is changed to 'paid'.
When an item is listed
An entry is simply added to each list. These are related to each other by the line number. (Assuming we can set stuff by line number.)
==============
Can someone tell me where this all falls down? Maybe I can work out a way around the inevitable misunderstandings I've made from a total ignorance of what we can do.
The Concept involves a small (quite simple) VBCode application that reads one text file, or set of text files, and actually modifies the NPC text file we're going to be using, every hour.
I could probably design this, but not build it. (I could tell someone what values to take from what files and how to output them. It just needs to repeat that for each line.)
Writing this file
Like I said, the NPC file is generated dynamically every hour by the small VB application. It gets its info from lists and re-writes that info into the NPC's text file.
I can do a template for the NPC code it should generate, this is no problem.
I DON'T KNOW IF THIS BIT WILL WORK: I wanted to try and use the gm command to reload NPCs onscreen to automatically reload the NPC every hour.
Getting the info
The only way the info can be given in an extractable way is through lists, so this is what I'd use.
The lists needed are as follows:
auc_itemname
auc_dura
auc_charname
auc_price
auc_sold
- These keep track of the info you would expect.
Putting an item up for sale / buying an item
When an item is put up for sale, a line is added to each list, keeping track of it. Here's a sample set. (Dura = max dura only.)
Itemname: DragonSlayer
Dura: 33
Charname: MrSam
Price: 300,000,000
Sold: No
When an item is sold, the following happens:
1) Player pays NPC
2) Item is generated based on itemname and dura, and given to player.
3) Sold is set to 'yes'.
A player can then go and collect their commision. Where sold = 'yes' the following happens:
1) Player receives price from NPC.
2) Sold is changed to 'paid'.
When an item is listed
An entry is simply added to each list. These are related to each other by the line number. (Assuming we can set stuff by line number.)
==============
Can someone tell me where this all falls down? Maybe I can work out a way around the inevitable misunderstandings I've made from a total ignorance of what we can do.
