Jump to content
  • 0

Votes does not show in game :-/


Markyieee

Question


  • Group:  Members
  • Topic Count:  42
  • Topics Per Day:  0.01
  • Content Count:  134
  • Reputation:   4
  • Joined:  06/14/12
  • Last Seen:  

After voting in flux there is a remark that the players gained 10 Votes

 

But during in game when using votes to buy on vote shop, It does say that the player doesn't have any vote/cash

 

What is the problem here thank you

Link to comment
Share on other sites

12 answers to this question

Recommended Posts


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10013
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  

it depend on how and where you store the vote point

then

it depend on how your npc going to retrieve it and use it

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  104
  • Reputation:   4
  • Joined:  06/23/12
  • Last Seen:  

After voting in flux there is a remark that the players gained 10 Votes

 

But during in game when using votes to buy on vote shop, It does say that the player doesn't have any vote/cash

 

What is the problem here thank you

 

maybe you need convert it to variable #CASHPOINTS and using OnPCLoginEvent to convert it to cash shop in the game :D

in my private server using this script to convert it .

-	script	VotePointConvert	-1,{
OnPCLoginEvent:
	query_sql("SELECT `YOURCOLUMNPOINTS` FROM `YOURTABLEVOTE` WHERE account_id="+getcharid(3)+" LIMIT 1",.@points);
	if (!.@points) end;
	query_sql("UPDATE `COLUMNUSER` SET YOURCOLUMNPOINTS=(YOURCOLUMNPOINTS-"+.@points+") WHERE account_id='"+getcharid(3)+"'");
	set #CASHPOINTS, #CASHPOINTS+.@points;
	//set #VOTEPOINTS, 0;
	dispbottom "Cash Points updated! Total: "+#CASHPOINTS;
	end;
}

maybe it can help you sir :D

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  42
  • Topics Per Day:  0.01
  • Content Count:  134
  • Reputation:   4
  • Joined:  06/14/12
  • Last Seen:  

 

After voting in flux there is a remark that the players gained 10 Votes

 

But during in game when using votes to buy on vote shop, It does say that the player doesn't have any vote/cash

 

What is the problem here thank you

 

maybe you need convert it to variable #CASHPOINTS and using OnPCLoginEvent to convert it to cash shop in the game :D

in my private server using this script to convert it .

-	script	VotePointConvert	-1,{
OnPCLoginEvent:
	query_sql("SELECT `YOURCOLUMNPOINTS` FROM `YOURTABLEVOTE` WHERE account_id="+getcharid(3)+" LIMIT 1",.@points);
	if (!.@points) end;
	query_sql("UPDATE `COLUMNUSER` SET YOURCOLUMNPOINTS=(YOURCOLUMNPOINTS-"+.@points+") WHERE account_id='"+getcharid(3)+"'");
	set #CASHPOINTS, #CASHPOINTS+.@points;
	//set #VOTEPOINTS, 0;
	dispbottom "Cash Points updated! Total: "+#CASHPOINTS;
	end;
}

maybe it can help you sir :D

 

 

What will be the COLUMNUSER ? YOURCOLUMNPOINTS?  and YOURTABLEVOTE?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  104
  • Reputation:   4
  • Joined:  06/23/12
  • Last Seen:  

 

 

After voting in flux there is a remark that the players gained 10 Votes

 

But during in game when using votes to buy on vote shop, It does say that the player doesn't have any vote/cash

 

What is the problem here thank you

 

maybe you need convert it to variable #CASHPOINTS and using OnPCLoginEvent to convert it to cash shop in the game :D

in my private server using this script to convert it .

-	script	VotePointConvert	-1,{
OnPCLoginEvent:
	query_sql("SELECT `YOURCOLUMNPOINTS` FROM `YOURTABLEVOTE` WHERE account_id="+getcharid(3)+" LIMIT 1",.@points);
	if (!.@points) end;
	query_sql("UPDATE `COLUMNUSER` SET YOURCOLUMNPOINTS=(YOURCOLUMNPOINTS-"+.@points+") WHERE account_id='"+getcharid(3)+"'");
	set #CASHPOINTS, #CASHPOINTS+.@points;
	//set #VOTEPOINTS, 0;
	dispbottom "Cash Points updated! Total: "+#CASHPOINTS;
	end;
}

maybe it can help you sir :D

 

 

What will be the COLUMNUSER ? YOURCOLUMNPOINTS?  and YOURTABLEVOTE?

 

this is table from your vote database , like this :

	  CREATE TABLE `vote_point` (
      `account_id` int(11) NOT NULL default '0',
      `point` int(11) NOT NULL default '0',
      `last_vote1` int(11) NOT NULL default '0',
      `last_vote2` int(11) NOT NULL default '0',
      `last_vote3` int(11) NOT NULL default '0',
	  `last_vote4` int(11) NOT NULL default '0',
	  `last_vote5` int(11) NOT NULL default '0',
      `date` text NOT NULL,
      PRIMARY KEY  (`account_id`)
    ) ENGINE=MyISAM DEFAULT CHARSET=latin1;

i use this query for save my vote points

-    script    RewardPointConvertnew    -1,{
OnPCLoginEvent:
    query_sql("SELECT `point` FROM `vote_point` WHERE account_id="+getcharid(3)+" LIMIT 1",.@rewards);
    if (!.@rewards)
    end;

    query_sql("UPDATE `vote_point` SET point=(point-"+.@rewards+") WHERE account_id='"+getcharid(3)+"'");
    set #CASHPOINTS, #CASHPOINTS+.@rewards;
    dispbottom "Cash Point updated! Total: "+#CASHPOINTS;
    dispbottom "Harap Relogin kembali ~";
    end;
}

and use this for convert it to cash point ,

 

maybe it different with you database, so i use the COLUMNUSER, YOURCOLUMNPOINTS and YOURTABLEVOTE for example row in database :)

 

note : first script its wrong sir , sorry my mistake :D

 

post here your database where it save the vote from flux..

Edited by nostafu
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  42
  • Topics Per Day:  0.01
  • Content Count:  134
  • Reputation:   4
  • Joined:  06/14/12
  • Last Seen:  

 

 

 

After voting in flux there is a remark that the players gained 10 Votes

 

But during in game when using votes to buy on vote shop, It does say that the player doesn't have any vote/cash

 

What is the problem here thank you

 

maybe you need convert it to variable #CASHPOINTS and using OnPCLoginEvent to convert it to cash shop in the game :D

in my private server using this script to convert it .

-	script	VotePointConvert	-1,{
OnPCLoginEvent:
	query_sql("SELECT `YOURCOLUMNPOINTS` FROM `YOURTABLEVOTE` WHERE account_id="+getcharid(3)+" LIMIT 1",.@points);
	if (!.@points) end;
	query_sql("UPDATE `COLUMNUSER` SET YOURCOLUMNPOINTS=(YOURCOLUMNPOINTS-"+.@points+") WHERE account_id='"+getcharid(3)+"'");
	set #CASHPOINTS, #CASHPOINTS+.@points;
	//set #VOTEPOINTS, 0;
	dispbottom "Cash Points updated! Total: "+#CASHPOINTS;
	end;
}

maybe it can help you sir :D

 

 

What will be the COLUMNUSER ? YOURCOLUMNPOINTS?  and YOURTABLEVOTE?

 

this is table from your vote database , like this :

	  CREATE TABLE `vote_point` (
      `account_id` int(11) NOT NULL default '0',
      `point` int(11) NOT NULL default '0',
      `last_vote1` int(11) NOT NULL default '0',
      `last_vote2` int(11) NOT NULL default '0',
      `last_vote3` int(11) NOT NULL default '0',
	  `last_vote4` int(11) NOT NULL default '0',
	  `last_vote5` int(11) NOT NULL default '0',
      `date` text NOT NULL,
      PRIMARY KEY  (`account_id`)
    ) ENGINE=MyISAM DEFAULT CHARSET=latin1;

i use this query for save my vote points

-    script    RewardPointConvertnew    -1,{
OnPCLoginEvent:
    query_sql("SELECT `point` FROM `vote_point` WHERE account_id="+getcharid(3)+" LIMIT 1",.@rewards);
    if (!.@rewards)
    end;

    query_sql("UPDATE `vote_point` SET point=(point-"+.@rewards+") WHERE account_id='"+getcharid(3)+"'");
    set #CASHPOINTS, #CASHPOINTS+.@rewards;
    dispbottom "Cash Point updated! Total: "+#CASHPOINTS;
    dispbottom "Harap Relogin kembali ~";
    end;
}

and use this for convert it to cash point ,

 

maybe it different with you database, so i use the COLUMNUSER, YOURCOLUMNPOINTS and YOURTABLEVOTE for example row in database :)

 

note : first script its wrong sir , sorry my mistake :D

 

post here your database where it save the vote from flux..

 

 

CREATE TABLE IF NOT EXISTS `cp_votes` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `banner_id` int(10) unsigned NOT NULL,
  `account_id` int(10) unsigned NOT NULL,
  `credits` int(10) unsigned NOT NULL,
  `vote_date` datetime NOT NULL,
  `vote_ip` varchar(15) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `banner_id` (`banner_id`,`account_id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=563 ;
 
Here :-) Can you make one for me :-) 

@rewards - what does this mean? Is it the command to convert? or can i use @cash?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  104
  • Reputation:   4
  • Joined:  06/23/12
  • Last Seen:  

-    script    RewardPointConvertnew    -1,{
OnPCLoginEvent:
    query_sql("SELECT `credits` FROM `cp_votes` WHERE account_id="+getcharid(3)+" LIMIT 1",.@cash);
    if (!.@cash)
    end;

    query_sql("UPDATE `cp_votes` SET credits=(credits-"+.@cash+") WHERE account_id='"+getcharid(3)+"'");
    set #CASHPOINTS, #CASHPOINTS+.@cash;
    dispbottom "Cash Point updated! Total: "+#CASHPOINTS;
    dispbottom "Please relogin ~";
    end;
}

-[TAB]script[TAB]RewardPointConvertnew[TAB]-1,{

 

in first line check TAB , if error in line 1 :D

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  42
  • Topics Per Day:  0.01
  • Content Count:  134
  • Reputation:   4
  • Joined:  06/14/12
  • Last Seen:  

-    script    RewardPointConvertnew    -1,{
OnPCLoginEvent:
    query_sql("SELECT `credits` FROM `cp_votes` WHERE account_id="+getcharid(3)+" LIMIT 1",.@cash);
    if (!.@cash)
    end;

    query_sql("UPDATE `cp_votes` SET credits=(credits-"+.@cash+") WHERE account_id='"+getcharid(3)+"'");
    set #CASHPOINTS, #CASHPOINTS+.@cash;
    dispbottom "Cash Point updated! Total: "+#CASHPOINTS;
    dispbottom "Please relogin ~";
    end;
}

-[TAB]script[TAB]RewardPointConvertnew[TAB]-1,{

 

in first line check TAB , if error in line 1 :D

 

 

: DB error - BIGINT UNSIGNED value is out of range in '(`ragnarok`.`cp_votes`.`credits` - 10)'
 
 
Error. Only 10 cash got by the players but they already have 200
 
Sir I figure out that the converter convert it like 10 vote points = 2 csh points only
Edited by Markyieee
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  65
  • Topics Per Day:  0.02
  • Content Count:  235
  • Reputation:   0
  • Joined:  05/03/13
  • Last Seen:  

Bumpe~

same problem

i dont get cash in game after i vote

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  42
  • Topics Per Day:  0.01
  • Content Count:  134
  • Reputation:   4
  • Joined:  06/14/12
  • Last Seen:  

Try to check it on your control panel. addons/config/addon.php

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  65
  • Topics Per Day:  0.02
  • Content Count:  235
  • Reputation:   0
  • Joined:  05/03/13
  • Last Seen:  

Try to check it on your control panel. addons/config/addon.php

problem is if someone vote in 1st time they get cash.. but next time when they vote their not increase its stuck at 3 all time..

did u solved your problem ?

could you plz help me?

Edited by JassMax
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  42
  • Topics Per Day:  0.01
  • Content Count:  134
  • Reputation:   4
  • Joined:  06/14/12
  • Last Seen:  

Can you post the addon.php here? :-)

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  65
  • Topics Per Day:  0.02
  • Content Count:  235
  • Reputation:   0
  • Joined:  05/03/13
  • Last Seen:  

Can you post the addon.php here? :-)

_______

Here sir.. this will be Great help

<?php if (!defined('FLUX_ROOT')) exit;
return array(		
	'PointsType'			=> "cash", // credit, vote, cash
	'DefaultIntervalVoting' => 12,
	'DefaultVotePoints' 	=> 0,
	'VoteNameMax'			=> 15,
	'VoteNameMin' 			=> 6,
	'VotePointsMin'			=> 0,
	'VotePointsMax'			=> 999,
	'VoteIntervalMin'		=> 1,
	'VoteIntervalMax'		=> 24,
	'AllowedImgType'		=> array('jpg', 'jpeg', 'png', 'gif'),
	'MaxFileSize'			=> 500, // KB,
	'ImageMaxWidth'			=> 150,
	'ImageMaxHeight'		=> 150,
	'ImageUploadPath'		=> "votes", // /themes/default/img/votes/
	'EnableIPVoteCheck'		=> true,
	'AlphaNumSpaceRegex'	=> "/^[A-Za-z0-9_\s]+$/",

	'MenuItems'	=> array(
		'Other'	=> array(
			'Vote for Points' => array(
				'module' => 'voteforpoints'
			)
		)
	),

	'SubMenuItems'	=> array(
		'voteforpoints'	=> array(
			'index' => 'Vote',
			'add' => 'Add Voting Site',
			'list' => 'List Voting Sites',
			'log' => 'Voters Log',
		)
	),

	'FluxTables'	=> array(
		'vfp_logs' => 'cp_vfp_logs',
		'vfp_sites' => 'cp_vfp_sites',
	)
)
?>
Link to comment
Share on other sites

×
×
  • Create New...