vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   vB Hangman for vB3 (https://vborg.vbsupport.ru/showthread.php?t=63391)

AutomatikStudio 04-15-2004 12:40 AM

Quote:

Originally Posted by deathemperor1st
there's store hack released, could someone make this when users win they gain store points and opposite.
vb2 had this so plz make this someone

I will hopefully release this tonight.

AutomatikStudio 04-15-2004 01:08 AM

Alright. Here's a quick little hack for people with the store hack. It adds or subtracts points from the user depending on whether they win or lose.

All of these edits occur in hangman.php

FIND
PHP Code:

$play .= "The $term was \"<B>$word</B>\"<BR><BR>\n<A HREF=$PHP_SELF?n=$n>Play again.</A>\n\n"

ADD BELOW
PHP Code:

 $losspoints=2//Number of points subtracted for losing
  
if ($bbuserinfo['uttpoints'] > $losspoints){ //only subtract if the users points are greater than the amount to subtract
  
$userid=$bbuserinfo['userid'];
  
mysql_query("UPDATE user SET uttpoints=uttpoints-'$losspoints' WHERE userid='$userid'");
  } 

FIND
PHP Code:

$win .= "<BR><BR><H1><font size=5>\n$word_line</font></H1>\n<P><BR><BR><B>Congratulations $bbuserinfo[username]!!! &nbsp;You have won!!!</B><BR><BR><BR>\n<A HREF=$PHP_SELF?n=$n>Play again</A>\n\n"

ADD BELOW
PHP Code:

    $winpoints=10//Number of points added for winning
       
$userid=$bbuserinfo['userid'];
       
mysql_query("UPDATE user SET uttpoints=uttpoints+'$winpoints' WHERE userid='$userid'"); 

Took like 5 seconds to do. If you want other little features to integrate this with the store just let me know and I'll see what I can do.

Zelda-King 04-15-2004 02:55 AM

Hmm, did you take into account them having enough money to play? We wouldn't want people going into the minus range.

AutomatikStudio 04-15-2004 03:39 AM

Quote:

Originally Posted by Zelda-King
Hmm, did you take into account them having enough money to play? We wouldn't want people going into the minus range.

Thanks for bringing that to my attention. The code has been updated to only subtract if the users points are greater than the amount to subtract.

Catch-22|BL 04-15-2004 04:10 AM

Nice and simple! Easy install and very straightforward! :)

Zelda-King 04-15-2004 12:54 PM

Someone on my board reported something disturbing.
Quote:

With the way it is right now, it's possible to cheat in Hangman by simply backing up in the browser window to take back an incorrect move.
I've tested this. You can guarantee victory with this glitch.

deathemperor 04-20-2004 04:42 AM

like the vb2 version, back to cheat
but like Erwin said this hack was not supposed to take your board's performance.
but I anyway have to disable that ^^
can you AutomatikStudio ?

Zelda-King 04-20-2004 09:50 AM

Well I want to use the uStore integration posted here but I can't right now because anyone in the know could just cash in... but I'm aware this wasn't on Erwin's mind when he wrote this so I'm not fussing.

jancarlo 04-20-2004 12:07 PM

to me it gives these errors:

Warning: rand(): Invalid range: 1..0 in /home/httpd/vhosts/forum.com/httpdocs/hangman.php on line 42

Warning: rand(): Invalid range: 1..0 in /home/httpd/vhosts/forum.com/httpdocs/hangman.php on line 91

how I can resolve?

thanks
jancarlo

Holidazed 05-07-2004 07:11 PM

Erwin, there is now file attachment for this hack. Can you repost it please? I see the games_list_1.txt, movielist.txt & artists.txt files, but not hack attachment.


All times are GMT. The time now is 09:51 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01179 seconds
  • Memory Usage 1,748KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_php_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete