[DEV]/duel

02/05/2010 18:25 hunterman01#1
Explination: While andy was running Coemu it had a system where you can use /duel and pvp another player and it counts how many times you hit the other player when you get 10 hits you win.

He also had a point system by how many wins you get a certain amount of points

Would it be possible to add a shop and you able to use the points you won from duel to buy + stones

Ive thought of a different way of doing this

Just taking away the points and trading them for cps but i really wanna just make it to where you can use the points to get + stones

not sure if its even possible

if it is let me know
02/05/2010 23:33 -impulse-#2
Npcs?
02/05/2010 23:41 hunterman01#3
That was my second option if the first option (actually setting up a shop) didnt work
02/05/2010 23:49 -impulse-#4
try with vending...leavemealone used to do something like that in his last released source.
02/06/2010 13:02 sawickas#5
Quiqco source (coemu) hawe honor paints systam yuo can lok in it,it was realaised in another secion
02/06/2010 23:56 Korvacs#6
Yeah you can use your own point system, much like virtue points, you just store the value.

Also in shop.dat i think you can specify the type of currency it uses, you could make up your own i would imagine and the packet will be altered for buying and selling to shops so that the money type is different, then you could deduct from your own points system.
02/07/2010 00:12 -impulse-#7
Quote:
Originally Posted by Korvacs View Post
Yeah you can use your own point system, much like virtue points, you just store the value.

Also in shop.dat i think you can specify the type of currency it uses, you could make up your own i would imagine and the packet will be altered for buying and selling to shops so that the money type is different, then you could deduct from your own points system.
I agree, but let's say you do MoneyType = 2, the client won't know much about it neither will know how much will that items cost for that unknown type of money.
02/07/2010 00:15 hunterman01#8
Thats what i was afraid of the client not knowing the money type
02/07/2010 00:27 Korvacs#9
Quote:
Originally Posted by -impulse- View Post
I agree, but let's say you do MoneyType = 2, the client won't know much about it neither will know how much will that items cost for that unknown type of money.
It wouldnt have to know aslong as it sends the type 2 in the packet then the server can just look up the cost. I would try it first anyway, the client might default to the gold cost of the item, which you could change. That way the client will display the cost of the item. Otherwise it would just be a blank space i would imagine.
02/07/2010 00:38 -impulse-#10
Quote:
Originally Posted by Korvacs View Post
It wouldnt have to know aslong as it sends the type 2 in the packet then the server can just look up the cost. I would try it first anyway, the client might default to the gold cost of the item, which you could change. That way the client will display the cost of the item. Otherwise it would just be a blank space i would imagine.
Theres a problem, if you try to buy an item that costs 0, your client will close.
02/07/2010 07:28 Arcо#11
Quote:
Originally Posted by -impulse- View Post
Theres a problem, if you try to buy an item that costs 0, your client will close.
So you'd have to do something extreme to itemtype.dat which I don't think can be done.
02/07/2010 07:46 pro4never#12
Quote:
Originally Posted by -impulse- View Post
Theres a problem, if you try to buy an item that costs 0, your client will close.
Then why not just use both.

Have the price be in gold and then in your shop code on the source have something checking if the item purchased was one from the shop. Do the client points check first, then gold check. If it fails point check just print out to the client that you don't have enough points.

Then in the shop.dat just code it as if it's gold using the gold price = to the number of points you want it to cost. That way the client will see the correct cost and the server will do the other work of checking points/removing them.


Personally I'm thinking 10,000 or so points would be 'huge' for this type of system so it's not like there are going to be a ton of issues with players complaining the gold cost is too high... just charge them both.


Note: I am very aware how bad this post was written... I need sleep badly lol... Anyways, hopefully I'm not just being retarded but I don't see a reason why that wouldn't work.
02/07/2010 12:03 Korvacs#13
Quote:
Originally Posted by -impulse- View Post
Theres a problem, if you try to buy an item that costs 0, your client will close.
Will it? Ive never experienced that one =o, thanks for the info.

Pro's solution sounds good, just do a check in the purchasing method for that particular shopid, and then switch over to the points based purchasing method, everyones a winner.
02/07/2010 12:25 -impulse-#14
What if you got points and you don't have silvers? Then what?

PS: tried hacking TQ Bins with a hack like that(adding a club into shopping mall) and it was closing my client
02/07/2010 12:31 Korvacs#15
Quote:
Originally Posted by -impulse- View Post
What if you got points and you don't have silvers? Then what?

PS: tried hacking TQ Bins with a hack like that(adding a club into shopping mall) and it was closing my client
Code:
            if (MoneyType == 0)
            {
                if (ShopID == 1467)
                {
                    if (DPoints > 0)
                    {

                    }
                }
            }
You dont even need to check if the gold is greater than 0.