{5165} Voting NPC

03/24/2013 02:30 protoxxx#1
Aight.. So I created an npc O.o


What this NPC does:
This NPC allows players and staff, to access your server voting page, and they will receive an award.

Here, leggo.

Add this code to NPCDialog.cs
Code:
#region Voting NPC - protoxxx Npc edits
case 30165:
{
    if (Control == 0)
    {
        GC.AddSend(Packets.NPCSay("Hey! " + GC.MyChar.Name + " Do you wanna vote for our server, for CPs?"));
        GC.AddSend(Packets.NPCLink("No shit!", 1));
        GC.AddSend(Packets.NPCLink("I have better things to do.", 255));
        GC.AddSend(Packets.NPCSetFace(N.Avatar));
        GC.AddSend(Packets.NPCFinish());

    }
    if (Control == 1)
    {
        
        {
            
            GC.MyChar.CPs += [B]edit how many cps player gets for voting[/B];
            Game.World.SendMsgToAll("SYSTEM", "http://www.xtremetop100.com/in.php?site=[B]Your vote site id (xtremetop100)[/B]", 2105, 0);
            Game.World.SendMsgToAll("SYSTEM", " Gratz " + GC.MyChar.Name + " got em cp rewardz. u shud vote too.. <3 ", 2011, 0);

        }
        
        {
            GC.AddSend(Packets.NPCSay("Sadly, voting is only allowed every 12 hours, On xtremetop100 system."));
            GC.AddSend(Packets.NPCLink("Fuck the system", 255));
            GC.AddSend(Packets.NPCSetFace(N.Avatar));
            GC.AddSend(Packets.NPCFinish());
        }
    }
    break;
}
#endregion
Add this to npcs.txt oldcodb.
Code:
30165 8400 2 34 1002 435 374
I bolded the text you gotta edit, to make it vote for your servers and if u dun wanna give any reward remove " GC.MyChar.CPs += edit how many cps player gets for voting;"

You shud prolly add the "voteused=false;" thingy in character.cs unless it dusnt give u any errors when u write in npc dialog.

no. idgaf if this was released before. i released it again. problem?
If you read the f***ing thread, perhaps <3<3<3thankme?<3<3<3
03/24/2013 08:51 Spirited#2
Using this code, how do you ensure that the player actually voted? You're basically just giving the player cps for clicking "No shit!". Also, when you click on that option, it sends the website to everyone, not just the user (which is a lot of spam if a lot of people are on clicking that thing). The last thing I noticed is the unnecessarily aggressive tone of the npc. Is it really appropriate to have the answers be "No shit" and "Fuck the system"? It makes you seem very immature and unprofessional.