An Easy Way To Implement "Auto Vend" - Proposals & Suggestions - WarpPortal Community Forums

Jump to content


Photo
- - - - -

An Easy Way To Implement "Auto Vend"


  • Please log in to reply
12 replies to this topic

#1 TwiliteGarden

TwiliteGarden

    Too Legit To Quit

  • Members
  • 1308 posts
  • LocationNew York City
  • Playing:ROSE Online
  • Server:Leonis

Posted 14 May 2011 - 04:44 PM

It would be relatively straight forward to implement a persistent shop by using XML much in the same way that ItemMallListings.xml is used.

Looking at my example below you can see that the root level element is called Vending. Inside the Vending element you have a ShopMessage element that basically contains the message at the top of your shop.

The Buying element lists all the items you are going to buy (including quantity and zulie amount) and the Selling item lists all the items you are selling.

Whenever you setup shop for the first time after you click Start it evaluates all the items in your buy/sell tab and saves them as a local XML document in the format shown. If you stop vending (or you get a d/c as happens many many times) all you have to do is use the Vend skill and it will check for the existence of this XML and parse it to rebuild your shop with everything listed.

Of course, you can then change any aspect of the buy/sell items or the shop title and when you click Start it saves the XML again.

If you would like I can provide you with the XML schema for my example. It's pretty easy though so I doubt you will need it.


Posted Image

NOTE - you could even add an attribute to the Item element called Position that defines to which slot the item goes or you could just order things as they appear in the listings. It's probably much easier to do the latter because Rose does not allow empty 'spaces' in the vending slots.

PS. Lets keep this listing 'alive' by replying to it whenever it falls below the first couple of slots. This is a feature that is desperately needed. :o

Edited by TwiliteGarden, 14 May 2011 - 05:07 PM.

  • 12

#2 Rukario

Rukario

    Awarded #1 Troll

  • Members
  • 797 posts
  • LocationJohnston City, IL
  • Playing:ROSE Online

Posted 14 May 2011 - 04:53 PM

Now if only they would implement it.
  • 0

#3 TwiliteGarden

TwiliteGarden

    Too Legit To Quit

  • Members
  • 1308 posts
  • LocationNew York City
  • Playing:ROSE Online
  • Server:Leonis

Posted 14 May 2011 - 05:01 PM

Now if only they would implement it.


The hardest part about implementing would be the error checking. I can think of a few things off the top of my head that they would have to check for:

1. the item(s) listed are actually in your inventory
2. the sum total of the vending items is less than or equal to the total amount of zulie on your character
3. the number of items is less than the number of slots in the buy/sell tabs
4. the sell/buy amount is less than or equal to the max value (2bil something)
5. the shop title string length is less than max
6. each item is able to be vended
etc.

Edited by TwiliteGarden, 14 May 2011 - 05:04 PM.

  • 0

#4 Xieg2

Xieg2

    Amateur Blogger

  • Members
  • 438 posts
  • LocationBaguio City, Philippines
  • Playing:ROSE Online
  • Server:Draconis

Posted 14 May 2011 - 05:15 PM

The hardest part about implementing would be the error checking. I can think of a few things off the top of my head that they would have to check for:

1. the item(s) listed are actually in your inventory
2. the sum total of the vending items is less than or equal to the total amount of zulie on your character
3. the number of items is less than the number of slots in the buy/sell tabs
4. the sell/buy amount is less than or equal to the max value (2bil something)
5. the shop title string length is less than max
6. each item is able to be vended
etc.


I always get dc because of my broadband connection. And I found a way so i don't have to rebuild my shop over and over again (Which I can't discuss here :o .

Congrats on your 100th post :P (no sarcasm intended)

Edited by Xieg2, 14 May 2011 - 05:15 PM.

  • 0

#5 TwiliteGarden

TwiliteGarden

    Too Legit To Quit

  • Members
  • 1308 posts
  • LocationNew York City
  • Playing:ROSE Online
  • Server:Leonis

Posted 14 May 2011 - 05:17 PM

I always get dc because of my broadband connection. And I found a way so i don't have to rebuild my shop over and over again (Which I can't discuss here :o .

Congrats on your 100th post :) (no sarcasm intended)



hahah you haxor. B) i bet you use a kb/mouse macro.

and i didnt even notice the 100 posts. :P
  • 0

#6 Xieg2

Xieg2

    Amateur Blogger

  • Members
  • 438 posts
  • LocationBaguio City, Philippines
  • Playing:ROSE Online
  • Server:Draconis

Posted 14 May 2011 - 05:27 PM

hahah you haxor. :) i bet you use a kb/mouse macro.

and i didnt even notice the 100 posts. :o



No I'm not! :o It's just irritating so much waste of time to rebuild a shop again after a DC (Imagine if you got a lot of items to sell) So I asked my friend (Google! :P B) ) we talked deliberately about my problem and he gave me some ideas (Not hacking and I wonder why there's no Game Guard now on Rose)


I use a packet [Removed for security reasons]


I check mine all the time :)
  • 0

#7 TwiliteGarden

TwiliteGarden

    Too Legit To Quit

  • Members
  • 1308 posts
  • LocationNew York City
  • Playing:ROSE Online
  • Server:Leonis

Posted 14 May 2011 - 05:30 PM

No I'm not! :o It's just irritating so much waste of time to rebuild a shop again after a DC (Imagine if you got a lot of items to sell) So I asked my friend (Google! :o B) ) we talked deliberately about my problem and he gave me some ideas (Not hacking and I wonder why there's no Game Guard now on Rose)


I use a packet [Removed for security reasons]


I check mine all the time :)


be careful... i dont wanna make this thread get locked. :P anyway this is my suggestion and i hope they can implement it or something similar.

Edited by TwiliteGarden, 14 May 2011 - 05:30 PM.

  • 0

#8 Xieg2

Xieg2

    Amateur Blogger

  • Members
  • 438 posts
  • LocationBaguio City, Philippines
  • Playing:ROSE Online
  • Server:Draconis

Posted 14 May 2011 - 05:48 PM

be careful... i dont wanna make this thread get locked. :) anyway this is my suggestion and i hope they can implement it or something similar.


It won't get locked I didn't say something bad :o


To the topic . . . .

The hardest part about implementing would be the error checking. I can think of a few things off the top of my head that they would have to check for:


1. the item(s) listed are actually in your inventory

Easy. You can't vend what you don't have. It'll create an empty space/slot on your shop.

2. the sum total of the vending items is less than or equal to the total amount of zulie on your character

I guess you are referring to the buying tab of the vend. If that's the case... Uhmmmm... My experience tells me the common result..
You can "buy" with the amount which is only in your inventory. They won't be able to sell to you again if you don't have the proper amount.

3. the number of items is less than the number of slots in the buy/sell tabs

It will result in DCing B)

4. the sell/buy amount is less than or equal to the max value (2bil something)

Any amount higher than the max possible value will be reset to 2,147,483,647 (and I wonder why don't they increase the max amount :o )

5. the shop title string length is less than max

Will be reset to [PlayersName]'s Personal Shop

6. each item is able to be vended

Too obvious result to explain.


Well that's some errors to be checked and I'm too lazy to come up with some.


Disclaimer:All my answers are only hypothetically based. :P
  • 0

#9 Rukario

Rukario

    Awarded #1 Troll

  • Members
  • 797 posts
  • LocationJohnston City, IL
  • Playing:ROSE Online

Posted 14 May 2011 - 06:25 PM

2,147,483,647 (and I wonder why don't they increase the max amount

The same amount is used on other games as well, I'm pretty sure it's something they can't fix.
  • 0

#10 Cordazar

Cordazar

    ROSE Senator

  • ROSE Community Senate
  • 8 posts
  • LocationStockholm, Sweden
  • Playing:ROSE Online
  • Server:Draconis

Posted 01 July 2011 - 09:10 AM

The same amount is used on other games as well, I'm pretty sure it's something they can't fix.


The datatype they use to store the price is an integer(int) which have a fixed size of 2^32 which equals to 4294967296. Integers can be signed/unsigned, unsigned gives an interval of 0 to 4294967296 while a signed integer gets an interval of -2147483647 to +2147483647. They could change the datatype to a bigint which has a max size of 2^64 which should be enough but it would also increase the amount of data that is stored.
  • 1

#11 Zayin

Zayin

    Awarded #1 Troll

  • Members
  • 605 posts
  • LocationCanada
  • Playing:ROSE Online
  • Server:Leonis

Posted 01 July 2011 - 10:13 AM

It would be a great feature, but it would be even better if people could close the client but keep their shop online for let's say, 5 hours.
  • 0

#12 maldini

maldini

    Too Legit To Quit

  • Members
  • 1675 posts
  • Playing:ROSE Online

Posted 03 July 2011 - 05:54 PM

The hardest part about implementing would be the error checking. I can think of a few things off the top of my head that they would have to check for:

1. the item(s) listed are actually in your inventory
2. the sum total of the vending items is less than or equal to the total amount of zulie on your character
3. the number of items is less than the number of slots in the buy/sell tabs
4. the sell/buy amount is less than or equal to the max value (2bil something)
5. the shop title string length is less than max
6. each item is able to be vended
etc.


these are just a simple logic programming... it is much easier than the effort of developer to come up with new costume (i am a programmer many years back).... if they can come up with at least 1 new IM costume each week.... i am sure they can implement this within days....
  • 0

#13 Bartik

Bartik

    Amateur Blogger

  • Members
  • 138 posts
  • LocationMięsny jeż
  • Playing:ROSE Online
  • Server:Draconis

Posted 08 January 2012 - 02:51 PM

UP :thumb:
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users