Keno Points Help

  Post new topicReply to topicPrintable Version
<< View previous topic View next topic >>
Share: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
#1   Keno Points Help
kingy
CZ Super Newbie
kingy has been a member for over 20 year's 20 Year Member
Status: Offline
Joined: May 12, 2004
0.00 posts per day
Posts: 33
Points: 3,286
   
I need to change my Keno points system to use the phpnuke points. With all my other mods I just change user_points to points, but this is down in the settings of Keno using variables (as you know).

I have changed mine to this



/* Change This To A Zero To Not Use The Points System */
$use_reward = "1";
/* Change This To What You Want To Charge To Play */
$game_cost = "10000";
/* Change This To What You Want Them To Get Per Correct Number */
$reward_per = "2500";
/* Change This If Yours Is Different */
$points_name = $board_config['points_name'];
/* Change This If Yours Is Different */
$users_points = $userdata['points'];



But its still not working, I dont get any errors just the points arent adjusted in any way any idea why?



Back to top Reply with quote
#2   
Telli
Site Admin
Telli has been a member for over 20 year's 20 Year Member
Occupation: Self Employed
Age: 46
Gender: Male
Fav. Sports Team: Detroit Red Wings
Website:
Status: Offline
Joined: May 26, 2003
1.06 posts per day
Posts: 8089
Points: 494,430
   
Open the includes/functions_keno.php and find the first two functions:

function TakePoints($user, $game_cost)
   {   
   global $db, $prefix, $game_cost, $user;   
   $q1 = "UPDATE ". $prefix ."_users
         SET user_points = user_points - '$game_cost'
         WHERE username = '$user'";
   $r1 = $db -> sql_query($q1);
   return;      
   }

function UpdatePoints($user, $points, $reward_per)
   {   
   global $db, $prefix, $reward_per, $new_total, $user;      
   $new_total = $points * $reward_per;   
   $q1 = "UPDATE ". $prefix ."_users
         SET user_points = user_points + '$new_total'
         WHERE username = '$user'";
   $r1 = $db -> sql_query($q1);
   return;      
   }


Replace them with these two:

function TakePoints($user, $game_cost)
   {   
   global $db, $prefix, $game_cost, $user;   
   $q1 = "UPDATE ". $prefix ."_users
         SET points = points - '$game_cost'
         WHERE username = '$user'";
   $r1 = $db -> sql_query($q1);
   return;      
   }

function UpdatePoints($user, $points, $reward_per)
   {   
   global $db, $prefix, $reward_per, $new_total, $user;      
   $new_total = $points * $reward_per;   
   $q1 = "UPDATE ". $prefix ."_users
         SET points = points + '$new_total'
         WHERE username = '$user'";
   $r1 = $db -> sql_query($q1);
   return;      
   }




_________________
The path of the righteous man is beset on all sides by the inequities of the selfish and the tyranny of evil men. Blessed is he, who in the name of charity and good will, shepherds the weak through the valley of darkness, for he is truly his brother's keeper and the finder of lost children. And I will strike down upon thee with great vengeance and furious anger those who would attempt to poison and destroy my brothers. And you will know my name is the Lord when I lay my vengeance upon thee. Ezekiel 25:17
Back to top Reply with quote
#3   
aUsTiN
CZ Active Member
aUsTiN has been a member for over 20 year's 20 Year Member
usa.gif georgia.gif
Age: 41
Gender: Male
Website:
Status: Offline
Joined: Sep 09, 2003
0.02 posts per day
Posts: 142
Points: 57
  MSN Messenger 
Suggestion telli, update the zip with that in the read me :p



Back to top Reply with quote
#4   re: Keno Points Help
kingy
CZ Super Newbie
kingy has been a member for over 20 year's 20 Year Member
Status: Offline
Joined: May 12, 2004
0.00 posts per day
Posts: 33
Points: 3,286
   
cool, that worked fine. Thanks.



Back to top Reply with quote
#5   
Telli
Site Admin
Telli has been a member for over 20 year's 20 Year Member
Occupation: Self Employed
Age: 46
Gender: Male
Fav. Sports Team: Detroit Red Wings
Website:
Status: Offline
Joined: May 26, 2003
1.06 posts per day
Posts: 8089
Points: 494,430
   


Originally posted by aUsTiN @ Wed Jun 23, 2004 3:12 am:

Suggestion telli, update the zip with that in the read me :p


Done. Actually they have two includes folder to choose from now one for Nuke Points and one for Cash Mod points.




_________________
The path of the righteous man is beset on all sides by the inequities of the selfish and the tyranny of evil men. Blessed is he, who in the name of charity and good will, shepherds the weak through the valley of darkness, for he is truly his brother's keeper and the finder of lost children. And I will strike down upon thee with great vengeance and furious anger those who would attempt to poison and destroy my brothers. And you will know my name is the Lord when I lay my vengeance upon thee. Ezekiel 25:17
Back to top Reply with quote
Display posts from previous:      
Add To: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
<< View previous topic View next topic >>
Post new topicReply to topic

Jump to 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum