Register for your free account! | Forgot your password?

You last visited: Today at 12:46

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[Help] VIP NPC Seller

Discussion on [Help] VIP NPC Seller within the CO2 Private Server forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
Nyorai's Avatar
 
elite*gold: 200
Join Date: Sep 2011
Posts: 202
Received Thanks: 107
[Help] VIP NPC Seller

Okay, I'm working on a NPC that sells VIP previlegies for a determinated period of time. How can I do it ... I've got this so far..
Code:
                            case 16:
                                {
                                    dialog.Text("I can sell you VIP privilegies aswell for VotePoints. Which VIP level you want?");
                                    dialog.Option("VIP1 10 Days - 2 Points", 30);
                                    dialog.Option("VIP1 30 Days - 5 Points", 31);
                                    dialog.Option("VIP3 10 Days - 7 Points", 32);
                                    dialog.Option("VIP3 30 Days - 18 Points", 33);
                                    dialog.Option("Nevermind", 255);
                                    dialog.Avatar(114);
                                    dialog.Send();
                                    break;
                                }
                            case 30:
                                {
                                    if (client.Entity.VotsPoints >= 2)
                                    {
                                        client.Entity.VotsPoints -= 2;
                                        client.Entity.VIPLevel = 1;
All I really want to know is how to make the VIP last only 10 days or 30 ...
Nyorai is offline  
Old 03/06/2012, 22:40   #2
 
elite*gold: 21
Join Date: Jul 2005
Posts: 9,193
Received Thanks: 5,376
Database :P

I would add a new field to your database which controls VIP Expiration. Then when they log in your check if the current date is past when their vip expires. If it does you remove their vip.

Then when adding vip you set their vip level and set when it should expire.

Done!
pro4never is offline  
Thanks
1 User
Old 03/06/2012, 22:44   #3
 
Nyorai's Avatar
 
elite*gold: 200
Join Date: Sep 2011
Posts: 202
Received Thanks: 107
I'll try to figure it out xD
By the way, how can I connect the donation page directly connect to the game/database so donators will instantly receive what they paid for?
Nyorai is offline  
Old 03/06/2012, 23:12   #4
 
elite*gold: 0
Join Date: Jan 2012
Posts: 164
Received Thanks: 22
when someone vote u get ++ on his voting points , once his vote is enough he will buy the vip from npc , what the npc will give him ?
the npc will update his vip state , vip start and vip end time in the database
how the timed vip will be activated ? on login make check for the vip level (import from database)
effect wont be applied but on relogin (simply cuz the check is on login)

that's actually what i did but also my quests and praying hall is adding time for the vip (praying hall is somewhere u and more players and the gm pray to get vip/exp) if need codes for voting points / vip feel free to post for it

P.S

Quote:
By the way, how can I connect the donation page directly connect to the game/database so donators will instantly receive what they paid for?
how u connected the password page with database ? leech the idea and connect the donation page with it , for further paypal made an option to alert u when someone buy something , send this alert to database as donation points and create npcs trading donation point for cps

anyway the ****** part is all about the paypal(or donating in general) , but it's not ****** anymore after paypal released a button which gives u a bool if the payment is successfully or not , i already done this one too , if need codes post a request

goodluck everyone
injection illusion logic is offline  
Thanks
1 User
Old 03/06/2012, 23:33   #5
 
Nyorai's Avatar
 
elite*gold: 200
Join Date: Sep 2011
Posts: 202
Received Thanks: 107
Well, the codes would be appreciated then =]
I think I know exactly what to do now =P
Nyorai is offline  
Old 03/07/2012, 00:51   #6
 
elite*gold: 0
Join Date: Jan 2012
Posts: 164
Received Thanks: 22
well what parts u need o-0 so i ask u for variables and classes and then give u the code LOL , sorry not using a public source which make my codes pretty useless for u , so u can start on code and i help u else u can gimme fine know about variables and classes and i do it for u
about what u said in first post is not bad but u still need connection with mysql base which will be like this
new
Code:
Database.MySqlCommand(Conquer_Online_Server.Database.MySqlCommandType.UPDATE)
            .Update("sobnpcs").Set("name", pole.Name).Set("life", Pole.Hitpoints).Where("id", pole.UID).Execute();
this code is my connection with database , UPDATE is an enum , sobnpc is special mob npcs like gates and pole (sobnpc is my table name in mysql which i wanna reach) , set is to set some value , "name" is the column in the database , and pole.Name is the name i want to set into it , also to set Pole.Hitpoints in "life" column , so which row ? that's what where is for and it's at some "id" which is pole.UID value and execute is a method to execute the code, that's the idea and it only works for my source but i can share the mysql dll with u but as u got one in ur source just explore it and u know now what to search for ^^
so now u know how to do the connection between database and source also between source and voting webpage also between clients and the source (throw npc) so u r ready to go
sigh at some point there is no one out there can help u so get used to help urself (im now 3 days 46 hrs trying to working out a new guildwar with new system , none can help me , so get used that on some point u will need to try harder goodluck bro)
injection illusion logic is offline  
Old 03/07/2012, 03:05   #7
 
Spirited's Avatar
 
elite*gold: 12
Join Date: Jul 2011
Posts: 8,211
Received Thanks: 4,114
Maybe learning where the functions come from will help:
You're using Impulse's TrinityCo source, right? There's nothing special added to it like SubSonic, etc?
If it's just plain odd MySql, that should help. It helped me when I was teaching myself MySql. Good luck!
Spirited is offline  
Thanks
1 User
Old 03/07/2012, 03:07   #8
 
elite*gold: 0
Join Date: Jan 2012
Posts: 164
Received Thanks: 22
learning from a pre-done source will be good idea too , u will see as many examples as u need but u still need basics , fangs link is great ^^
injection illusion logic is offline  
Reply


Similar Threads Similar Threads
[ Minecraft-seller.tk ] Werde auch du zum SELLER Schnapp Preise bis 80% RABBAT | Nr.1
10/15/2011 - Minecraft Trading - 66 Replies
ACHTUNG ACHTUNG! ICH CARDE MINECRAFT KEYS UND BESCHEIßE LEUTE DESWEGEN WURDE ICH INFIZIERT UND GEFICKT :( http://files.sharenator.com/Problem_Officer_RE_Me anwhile_in_Lybia-s250x251-148691.jpg Vom Hobby her bin ich ein Styler xD 28. Dezember 1995



All times are GMT +2. The time now is 12:46.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.