Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

Web How to add a custom reward/voting system. (NON TIMED)

Newbie Spellweaver
Joined
Aug 7, 2009
Messages
41
Reaction score
1
Great Guide! Hopefully some people will learn from this!
 
Joined
May 23, 2010
Messages
528
Reaction score
23
A few questions:

1. Is this for vote points only? (stupid question)
2. How would I change it to make it BOTH Vote Points and Vote for NX?
3. It's non-timed...can I make it timed? (like every 12hrs)

Thanks for the info, I'm new to this and trying my best to learn. :D
 
Last edited:
I'm sexy and I know it :)
Joined
Oct 21, 2008
Messages
811
Reaction score
350
A few questions:

1. Is this for vote points only? (stupid question)
2. How would I change it to make it BOTH Vote Points and Vote for NX?
3. It's non-timed...can I make it timed? (like every 12hrs)

Thanks for the info, I'm new to this and trying my best to learn. :D

it links to a thread which teaches you how to make it timed.
Also, nx is already there.
 
Newbie Spellweaver
Joined
Oct 12, 2008
Messages
25
Reaction score
0
I get the following error when I compile:
Code:
init:
Deleting: C:\Users\Marvin\Desktop\compile\build\built-jar.properties
deps-jar:
Updating property file: C:\Users\Marvin\Desktop\compile\build\built-jar.properties
Compiling 2 source files to C:\Users\Marvin\Desktop\compile\build\classes
C:\Users\Marvin\Desktop\Power-Story\src\scripting\npc\NPCConversationManager.java:177: cannot find symbol
symbol  : method saveToDB(boolean)
location: class scripting.npc.chr
        chr.saveToDB(true); // No more stupid rollbacks ;) ~Deagan
1 error
C:\Users\Marvin\Desktop\compile\nbproject\build-impl.xml:406: The following error occurred while executing this line:
C:\Users\Marvin\Desktop\compile\nbproject\build-impl.xml:196: Compile failed; see the compiler error output for details.
BUILD FAILED (total time: 1 second)

I need some help, please.
Marvin :thumbup:
 
Newbie Spellweaver
Joined
Jun 14, 2010
Messages
24
Reaction score
3
Any idea why I'm getting:
PHP:
cannot find symbol
symbol  : method getPlayer()
location: class client.MapleCharacter
        return getPlayer().getvotingpoints();

cannot find symbol
symbol  : method getPlayer()
location: class client.MapleCharacter
        getPlayer().setvotingpoints(newpoints);

cannot find symbol
symbol  : method getPlayer()
location: class client.MapleCharacter
        getPlayer().gain1votingpoint();
?
 
Newbie Spellweaver
Joined
Aug 10, 2009
Messages
9
Reaction score
0
can someone please help.. i have this error, it says colum votingpoints not found, (in bat). please help?
 
Newbie Spellweaver
Joined
Feb 19, 2009
Messages
10
Reaction score
1
I done a voting system like this.
but for what I remember is that I did somewhere that
if (votepoints > 32767) {
votepoints = 32767;
}
Because I dont think "int" can take a number that is bigger than 32767.
 
Joined
May 19, 2010
Messages
4
Reaction score
0
by the way, i tried to do trade a vote point for 2k NX npc, but it always doesn't find setvotingpoints. i did over and over :(
 
Junior Spellweaver
Joined
Oct 12, 2008
Messages
130
Reaction score
38
Had to bump this lovely old thread, however.
I done a voting system like this.
but for what I remember is that I did somewhere that
if (votepoints > 32767) {
votepoints = 32767;
}
Because I dont think "int" can take a number that is bigger than 32767.

is true, but if you wish to grant them more vote points than 1 per vote, use the LONGINT or longinteger one, it takes what you know to be 2147483647 mesos, however if that is not enough. Use a system similar to this
if (cm.votepoints > 32767) && (cm.votepoints == 32768) {
cm.votepoints = 32767;
cm.gainvotepoints2(1);
} else {
cm.votepoints2 = cm.votepoints -5000;
}

where 5000 could be a few times multiplied by the amount you gain each vote. I made a few mistakes there, but I'm really tired.
Also consider use of bigint and biginteger, which are also merely the same.
 
Newbie Spellweaver
Joined
Oct 23, 2010
Messages
11
Reaction score
0
Got stucked at
NPCConversationManager

This is the compile problome
I did everything like the guide
Please answer me :(
The project name is ElementalPoints


init:
Deleting: C:\Users\CHAYON\Documents\NetBeansProjects\XiuzSource\build\built-jar.properties
deps-jar:
Updating property file: C:\Users\CHAYON\Documents\NetBeansProjects\XiuzSource\build\built-jar.properties
Compiling 1 source file to C:\Users\CHAYON\Documents\NetBeansProjects\XiuzSource\build\classes
C:\Users\CHAYON\Desktop\ElementalMS\src\net\sf\odinms\scripting\npc\NPCConversationManager.java:158: cannot find symbol
symbol : method getelementalpoints()
location: class net.sf.odinms.client.MapleCharacter
return getPlayer().getelementalpoints();
C:\Users\CHAYON\Desktop\ElementalMS\src\net\sf\odinms\scripting\npc\NPCConversationManager.java:162: cannot find symbol
symbol : method setelementalpoints(int)
location: class net.sf.odinms.client.MapleCharacter
getPlayer().setelementalpoints(newpoints);
C:\Users\CHAYON\Desktop\ElementalMS\src\net\sf\odinms\scripting\npc\NPCConversationManager.java:166: cannot find symbol
symbol : method gain1elementalpoint()
location: class net.sf.odinms.client.MapleCharacter
getPlayer().gain1elementalpoint();
C:\Users\CHAYON\Desktop\ElementalMS\src\net\sf\odinms\scripting\npc\NPCConversationManager.java:170: cannot find symbol
symbol : method gainelementalpoints(int)
location: class net.sf.odinms.client.MapleCharacter
getPlayer().gainelementalpoints(gainedpoints);
C:\Users\CHAYON\Desktop\ElementalMS\src\net\sf\odinms\scripting\npc\NPCConversationManager.java:171: saveToDB(boolean,boolean) in net.sf.odinms.client.MapleCharacter cannot be applied to (boolean)
chr.saveToDB(true);
C:\Users\CHAYON\Desktop\ElementalMS\src\net\sf\odinms\scripting\npc\NPCConversationManager.java:173: cannot find symbol
symbol : method message(java.lang.String)
location: class net.sf.odinms.client.MapleCharacter
getPlayer().message("Hi " + getPlayer().getName() + ",");
C:\Users\CHAYON\Desktop\ElementalMS\src\net\sf\odinms\scripting\npc\NPCConversationManager.java:174: cannot find symbol
symbol : method message(java.lang.String)
location: class net.sf.odinms.client.MapleCharacter
getPlayer().message("You have achieved : " + gainedpoints + " ElementalPoint(s),");
C:\Users\CHAYON\Desktop\ElementalMS\src\net\sf\odinms\scripting\npc\NPCConversationManager.java:175: cannot find symbol
symbol : method getelementalpoints()
location: class net.sf.odinms.client.MapleCharacter
getPlayer().message("Which brings you to a total of : " + getPlayer().getelementalpoints() + " ElementalPoints~");
C:\Users\CHAYON\Desktop\ElementalMS\src\net\sf\odinms\scripting\npc\NPCConversationManager.java:175: cannot find symbol
symbol : method message(java.lang.String)
location: class net.sf.odinms.client.MapleCharacter
getPlayer().message("Which brings you to a total of : " + getPlayer().getelementalpoints() + " ElementalPoints~");
C:\Users\CHAYON\Desktop\ElementalMS\src\net\sf\odinms\scripting\npc\NPCConversationManager.java:178: cannot find symbol
symbol : method message(java.lang.String)
location: class net.sf.odinms.client.MapleCharacter
getPlayer().message("Hi " + getPlayer().getName() + ",");
C:\Users\CHAYON\Desktop\ElementalMS\src\net\sf\odinms\scripting\npc\NPCConversationManager.java:179: cannot find symbol
symbol : method message(java.lang.String)
location: class net.sf.odinms.client.MapleCharacter
getPlayer().message("You have lost : " + gainedpoints + " ElementalPoints,");
C:\Users\CHAYON\Desktop\ElementalMS\src\net\sf\odinms\scripting\npc\NPCConversationManager.java:180: cannot find symbol
symbol : method getelementalpoints()
location: class net.sf.odinms.client.MapleCharacter
getPlayer().message("Which brings you to a total of : " + getPlayer().getelementalpoints() + " ElementalPoints~");
C:\Users\CHAYON\Desktop\ElementalMS\src\net\sf\odinms\scripting\npc\NPCConversationManager.java:180: cannot find symbol
symbol : method message(java.lang.String)
location: class net.sf.odinms.client.MapleCharacter
getPlayer().message("Which brings you to a total of : " + getPlayer().getelementalpoints() + " ElementalPoints~");
13 errors
C:\Users\CHAYON\Documents\NetBeansProjects\XiuzSource\nbproject\build-impl.xml:521: The following error occurred while executing this line:
C:\Users\CHAYON\Documents\NetBeansProjects\XiuzSource\nbproject\build-impl.xml:258: Compile failed; see the compiler error output for details.
BUILD FAILED (total time: 0 seconds)
 
Last edited:
Newbie Spellweaver
Joined
Feb 24, 2011
Messages
17
Reaction score
0
Wait How do i get players to get vote points? How do i add a Site so they write in their Accounts and pass and they get vote points for acctualy voting? plz help i'm new at this...
 
Newbie Spellweaver
Joined
Dec 15, 2010
Messages
45
Reaction score
9
Nice deagan :) thanks a lot for this its going to be useful .
 
Custom Title Activated
Loyal Member
Joined
Nov 14, 2008
Messages
1,025
Reaction score
641
I get no error in netbean but when i try my script, the npc say what it should say if i didn't had any beta points, but i have that point.

here my npc script:

PHP:
var status;

function start() {
    status = -1;
    action(1, 0, 0);
}

function action(mode,type,selection) {
    if (mode == 1) {
        status++;
    } else {
        cm.dispose();
        return;
    }
    if (status == 0) {
        cm.sendSimple("DUH HERRRRO! I am the Beta point exchanger and i have only one option. If you played the Beta, you will have one of those funky points. If you got one of those point by participating, you can get a Mark of the Beta + a trophy, which will be used in a future trader.: \r\n#L0# OK GIMI.#l");
    } else if (status == 1) {
        if (selection == 0) {
            if (cm.getPlayer().getbeta() >= 0) {
                cm.getPlayer().gainbeta(-1);      
                cm.gainItem(1002419, 1);
				cm.gainItem(4000038, 1);
                cm.sendOk("HERE YA GO <3 VOTE MORE KTHXBAI.");
            } else {
                cm.sendOk("TSSKKK u didnt play beta :(");
            } 
           
        }
    cm.dispose();
    }
}
 
Back
Top