server voting for 5165

01/16/2010 14:23 gulpi_de_gulat#1
i dont know if someone release like this, vote for the server, but i saw some server have this NPC too.
here we go first open character.cs and look for
Code:
public byte LotteryUsed = 0;
put under
Code:
public byte VoteUsed = 0;
now to the NPCDialog.cs add this
Code:
#region Vote server
                            case 30165:
                                {
                                    if (Control == 0)
                                    {
                                        GC.AddSend(Packets.NPCSay("You want to vote the server?"));
                                        GC.AddSend(Packets.NPCLink("yes", 1));
                                        GC.AddSend(Packets.NPCLink("no", 255));
                                        GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                        GC.AddSend(Packets.NPCFinish());
                                    
                                    }
                                    if (Control == 1)
                                    {
                                        if (GC.MyChar.VoteUsed == 0)
                                        {
                                            GC.MyChar.VoteUsed++;
                                            GC.MyChar.CPs += 5000;
                                            Game.World.SendMsgToAll("SYSTEM", "http://www.xtremetop100.com/in.php?site=1132296413", 2105, 0);
                                            Game.World.SendMsgToAll("SYSTEM"," Congratulation "  + GC.MyChar.Name +  " recieve 5000 cps upon voting the server ", 2011, 0);
                                        
                                        }
                                        else
                                        {
                                            GC.AddSend(Packets.NPCSay("you can vote only once a day"));
                                            GC.AddSend(Packets.NPCLink("I see", 255));
                                            GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                            GC.AddSend(Packets.NPCFinish());
                                        }
                                    }
                                    break;
                                }
                            #endregion
and replace the NO. to your site Number, 1132296413 <----- Replace this. im sure you like this release its me yhudong
well i edit a little for the reason all have internet explorer
01/16/2010 14:32 coreymills#2
nice keep it up
01/16/2010 14:35 gulpi_de_gulat#3
Quote:
Originally Posted by coreymills View Post
nice keep it up
thankz bro
01/16/2010 18:28 Arcо#4
But this wouldn't vote for the server itself.
Seeing as you need to put in those two words it tells you to once you get to the website.
01/16/2010 19:28 .Ryu#5
If you could figure out how the vote systems work then you could make this work like wonders
Goodjob im gonna look into this..
01/16/2010 19:34 -Shunsui-#6
Havent tryed this but shouldent it be
Code:
System.Diagnostics.Process.Start("iexplore.exe", "http://www.xtremetop100.com/in.php?site=1132296413");
Making it Start Internet Explorer, Cause how would it know Wich Web browser to start so it can load the site,

Just saying if i'am wrong correct me,
01/16/2010 19:45 Basser#7
Quote:
Originally Posted by -Shunsui- View Post
Havent tryed this but shouldent it be
Code:
System.Diagnostics.Process.Start("iexplore.exe", "http://www.xtremetop100.com/in.php?site=1132296413");
Making it Start Internet Explorer, Cause how would it know Wich Web browser to start so it can load the site,

Just saying if i'am wrong correct me,
This way is even better.
Your PC will figure out what your standard browser is.
I don't use iexplorer, so if it would start IE, it would only be a disadvantage for me.
This one will find out with what program is associated with "http files", and run that one. =)
Haven't tested this, but I'm 99% sure this works completely fine.
01/16/2010 20:02 Sinestro#8
nice
01/16/2010 20:03 Arcо#9
Quote:
Originally Posted by -Shunsui- View Post
Havent tryed this but shouldent it be
Code:
System.Diagnostics.Process.Start("iexplore.exe", "http://www.xtremetop100.com/in.php?site=1132296413");
Making it Start Internet Explorer, Cause how would it know Wich Web browser to start so it can load the site,

Just saying if i'am wrong correct me,
Ah I like this much more than the way the OP had it.
And for the exact reasons X mentioned.
01/16/2010 20:13 .Ryu#10
When you go to the vote page open the pages source and see if you can figure it out on when you put Vote For ServersName

And then that would be beastly =P they would actualy be voting and getting cps ^^
01/16/2010 20:34 Arcо#11
Quote:
Originally Posted by .Ryu View Post
When you go to the vote page open the pages source and see if you can figure it out on when you put Vote For ServersName

And then that would be beastly =P they would actualy be voting and getting cps ^^
But it still does a check on if the two words in the box are correct.
01/16/2010 22:03 LetterX#12
Quote:
Originally Posted by Hepatitis C View Post
But it still does a check on if the two words in the box are correct.
On xtremetop100, that is only there if you have javascript disabled.
01/16/2010 22:15 coreymills#13
ya the npc works u just gotta put the 2 words in
01/16/2010 23:03 gulpi_de_gulat#14
Quote:
Originally Posted by -Shunsui- View Post
Havent tryed this but shouldent it be
Code:
System.Diagnostics.Process.Start("iexplore.exe", "http://www.xtremetop100.com/in.php?site=1132296413");
Making it Start Internet Explorer, Cause how would it know Wich Web browser to start so it can load the site,

Just saying if i'am wrong correct me,
i never put that (iexplore.exe) because i was using mozilla firefox and its easy to open.
01/17/2010 00:52 Arcо#15
Quote:
Originally Posted by gulpi_de_gulat View Post
i never put that (iexplore.exe) because i was using mozilla firefox and its easy to open.
Well not everyone uses mozilla firefox.