Thread: Motivote

Results 1 to 8 of 8
  1. #1 Motivote 
    Registered Member
    Join Date
    Mar 2016
    Posts
    131
    Thanks given
    8
    Thanks received
    9
    Rep Power
    11
    So i installed Motivote on my server, Everything runs good in the console. It even says the Libary is loaded and it's checking for votes on the database. But when i did a vote test, It's not giving anything.

    All though i have voting on my other server and it gave on there, But i changed the Hash key and closed the other server. And i still didn't get rewards.
    Reply With Quote  
     

  2. #2  
    Registered Member
    hc747's Avatar
    Join Date
    Dec 2013
    Age
    26
    Posts
    1,474
    Thanks given
    3,312
    Thanks received
    691
    Rep Power
    1098
    Did you create the reward handler..?
    Reply With Quote  
     

  3. #3  
    Registered Member
    Join Date
    Mar 2016
    Posts
    131
    Thanks given
    8
    Thanks received
    9
    Rep Power
    11
    Yeah i did, but not entirely sure i did it correct. But it has no error in it.
    Reply With Quote  
     

  4. #4  
    Registered Member
    hc747's Avatar
    Join Date
    Dec 2013
    Age
    26
    Posts
    1,474
    Thanks given
    3,312
    Thanks received
    691
    Rep Power
    1098
    Quote Originally Posted by Weekndz View Post
    Yeah i did, but not entirely sure i did it correct. But it has no error in it.
    Just because it has no error, does not mean it's correct - post the class, in [ CODE ] [ / CODE ] tags.
    Reply With Quote  
     

  5. #5  
    Registered Member
    Join Date
    Feb 2016
    Posts
    116
    Thanks given
    8
    Thanks received
    8
    Rep Power
    11
    Use the new motivote version that just came out a week ago. Its much better & easy to setup.
    Reply With Quote  
     

  6. Thankful user:


  7. #6  
    Registered Member
    Join Date
    Mar 2016
    Posts
    131
    Thanks given
    8
    Thanks received
    9
    Rep Power
    11
    Quote Originally Posted by hc747 View Post
    Just because it has no error, does not mean it's correct - post the class, in [ CODE ] [ / CODE ] tags.
    Code:
    package org.mistex.game;
    
    
    import org.mistex.game.world.player.Client;
    import org.mistex.game.world.player.Player;
    
    import com.rspserver.motivote.MotivoteHandler;
    import com.rspserver.motivote.Reward;
    
    public class RewardHandler extends MotivoteHandler<Reward>
    {
    	@Override
    	public void onCompletion(Reward reward)
    	{
    		// SOME OF THIS CODE WILL BE DIFFERENT FOR YOUR SERVER, CHANGE IT ACCORDINGLY. everything to do with motivote will stay the same!
    		int itemID = -1;
    		
    		if (reward.rewardName().equalsIgnoreCase("gold"))
    		{
    			itemID = 995;
    		}
    		
    		if (PlayerHandler.isPlayerOn(reward.username()))
    		{
    			Player p = PlayerHandler.getPlayer(reward.username());
    			
    			if (p != null && p.isActive == true) // check isActive to make sure player is active. some servers, like project insanity, need extra checks.
    			{
    				synchronized(p)
    				{
    					Client c = (Client)p;
    					
    					if (c.getItems().addItem(itemID, reward.amount()))
    					{
    						c.sendMessage("You've received your vote reward! Congratulations!");
    						reward.complete();
    					}
    					else
    					{
    						c.sendMessage("Could not give you your reward item, try creating space.");
    					}
    				}
    			}
    		}
    	}
    }
    Like it doesn't callback in the console to the webhost.
    Reply With Quote  
     

  8. #7  
    RSPS SERVICES PROVIDER

    The Plateau's Avatar
    Join Date
    May 2015
    Posts
    999
    Thanks given
    592
    Thanks received
    191
    Rep Power
    129
    Quote Originally Posted by Weekndz View Post
    Code:
    package org.mistex.game;
    
    
    import org.mistex.game.world.player.Client;
    import org.mistex.game.world.player.Player;
    
    import com.rspserver.motivote.MotivoteHandler;
    import com.rspserver.motivote.Reward;
    
    public class RewardHandler extends MotivoteHandler<Reward>
    {
    	@Override
    	public void onCompletion(Reward reward)
    	{
    		// SOME OF THIS CODE WILL BE DIFFERENT FOR YOUR SERVER, CHANGE IT ACCORDINGLY. everything to do with motivote will stay the same!
    		int itemID = -1;
    		
    		if (reward.rewardName().equalsIgnoreCase("gold"))
    		{
    			itemID = 995;
    		}
    		
    		if (PlayerHandler.isPlayerOn(reward.username()))
    		{
    			Player p = PlayerHandler.getPlayer(reward.username());
    			
    			if (p != null && p.isActive == true) // check isActive to make sure player is active. some servers, like project insanity, need extra checks.
    			{
    				synchronized(p)
    				{
    					Client c = (Client)p;
    					
    					if (c.getItems().addItem(itemID, reward.amount()))
    					{
    						c.sendMessage("You've received your vote reward! Congratulations!");
    						reward.complete();
    					}
    					else
    					{
    						c.sendMessage("Could not give you your reward item, try creating space.");
    					}
    				}
    			}
    		}
    	}
    }
    Like it doesn't callback in the console to the webhost.

    have you change type of gold coin on vote page?

    edit: try to add your vps ip to remote host on webhost
    Reply With Quote  
     

  9. #8  
    Registered Member
    Join Date
    Mar 2016
    Posts
    131
    Thanks given
    8
    Thanks received
    9
    Rep Power
    11
    Quote Originally Posted by Sky O.o View Post
    have you change type of gold coin on vote page?

    edit: try to add your vps ip to remote host on webhost
    Not running on a VPS since this is a beta server, Currently running on my computer for testing purposes.
    Reply With Quote  
     


Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Similar Threads

  1. Autovote - Motivote - Server and Web tutorial
    By funkE in forum Tutorials
    Replies: 120
    Last Post: 05-26-2018, 05:05 PM
  2. Motivote RELEASE - Ultimate Vote Script (SERVER & WEBSITE)
    By funkE in forum Website Development
    Replies: 139
    Last Post: 10-02-2017, 08:16 PM
  3. Motivote - Ultimate Vote Script
    By funkE in forum Website Development
    Replies: 24
    Last Post: 07-07-2016, 02:02 PM
  4. [Buying] Motivote server side converted for 667+
    By OodlesOfNoodles in forum Buying
    Replies: 9
    Last Post: 01-06-2015, 08:10 AM
  5. Motivote for 718?
    By OodlesOfNoodles in forum Help
    Replies: 1
    Last Post: 01-03-2015, 04:59 AM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •