Commision Merchant

Play Now

MrSam

Dedicated Member
Dedicated Member
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.
 

MrSam

Dedicated Member
Dedicated Member
May 31, 2005
171
0
42
MiloFoxburr said:
It could be coded as a plugin for the m2server but no one here has that skil


Sure that people have the skill to read line by line from text and output the values into a text file though in VBScript? (I could do this in PHP but that's the only language I know.)


Is everything else technically sound (you should know as well as anyone Milo), like the lists etc can be sorted by line number?
 

Toxick

Golden Oldie
Golden Oldie
Apr 17, 2003
1,397
0
173
1) how will the NPC/script know what the dura is/name is/how much/player name
2) how can another person buy this item?
3) how iwll the NPC know who to give the money back to(conjuction with number one, in how does the NPC know who is giving the item,)


its a good idea logicly, but putting it into a NPC scipt and into VBCode.
Like how would the VBCode be able to get the infomation that you posted?
 

MrSam

Dedicated Member
Dedicated Member
May 31, 2005
171
0
42
Toxick said:
1) how will the NPC/script know what the dura is/name is/how much/player name
2) how can another person buy this item?
3) how iwll the NPC know who to give the money back to(conjuction with number one, in how does the NPC know who is giving the item,)


its a good idea logicly, but putting it into a NPC scipt and into VBCode.
Like how would the VBCode be able to get the infomation that you posted?


The NPC script knows it because it's actually built into the NPC's file. This is the whole point of re-writing the NPC file every hour: The viewing/buying part of the NPC file doesn't look at lists, but it's just one thing.

2) This is what the 'sold' field is for, I explained this in original post, will clarify when I have more time.

3) When an item is listed it is given to the NPC (deleted) and recreated in a list. You can retrieve this item (re-generated).



Edit: Because of the enormous size that the NPC file (and even lists) would become, I think limiting the system to one item on sale per character would be a good idea.
 
Last edited:

Demix

LOMCN Veteran
Veteran
Apr 13, 2005
255
0
43
Watford, England
only problem with this whole concept is say u selling a dura 2 para.. when it spawns the item to give the buyer it would spawn it full dura .. unless theres a command im 4getting about changing dura :/
 

DevilsKnight

I
Staff member
Super Moderator
Aug 1, 2004
1,627
1
57
275
the 1st post by MrSam states that the dura of the item wen giving it 2 the npc wud have 2 be full dura.
 

WKD2005

Dedicated Member
Dedicated Member
May 16, 2005
217
0
42
ok -.- wots the point in private servers no1 sells/buys stuff hardly O.o
 

Ragnar

Hallowed be thy name
Legendary
Golden Oldie
Loyal Member
Jul 20, 2004
5,258
3
275
WKD2005 said:
ok -.- wots the point in private servers no1 sells/buys stuff hardly O.o
Yes they do, no one want's gold on private servers though, because they trade items for items instead of selling stuff for gold.
 

3g123

Guest
tbh with ya it work aok me and my bro Alpha (who has been banned) tryed it aint it works fine ^_^ n1 MrSam
 

Babyhack

Devilsoul Owner
VIP
Feb 4, 2004
5,343
28
285
Dublin, Ireland
3g123 said:
tbh with ya it work aok me and my bro Alpha (who has been banned) tryed it aint it works fine ^_^ n1 MrSam

i can understand bits of Chinese but hell if i have any idea what you are on about

think you are saying you tried it and it worked
I dont think so as it has not even been coded yet so there is no way that you have tried it

Just wait for the Chinese to add it to Plumewind

BH and Purple
 

3g123

Guest
no i mean as in i ave tried it all i get up is the Boxes =/ but wont let me put items in =/