Markyieee Posted March 31, 2014 Posted March 31, 2014 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
Emistry Posted March 31, 2014 Posted March 31, 2014 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
krisnx Posted March 31, 2014 Posted March 31, 2014 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 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
Markyieee Posted April 1, 2014 Author Posted April 1, 2014 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 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 What will be the COLUMNUSER ? YOURCOLUMNPOINTS? and YOURTABLEVOTE?
krisnx Posted April 2, 2014 Posted April 2, 2014 (edited) 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 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 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 post here your database where it save the vote from flux.. Edited April 2, 2014 by nostafu
Markyieee Posted April 5, 2014 Author Posted April 5, 2014 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 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 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 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?
krisnx Posted April 6, 2014 Posted April 6, 2014 - 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
Markyieee Posted April 8, 2014 Author Posted April 8, 2014 (edited) - 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 : 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 April 8, 2014 by Markyieee
JassMax Posted May 19, 2014 Posted May 19, 2014 Bumpe~same problemi dont get cash in game after i vote
Markyieee Posted May 19, 2014 Author Posted May 19, 2014 Try to check it on your control panel. addons/config/addon.php
JassMax Posted May 20, 2014 Posted May 20, 2014 (edited) 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 May 20, 2014 by JassMax
JassMax Posted May 20, 2014 Posted May 20, 2014 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', ) ) ?>
Question
Markyieee
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
12 answers to this question
Recommended Posts