vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Pickpocket in Lesane Store (https://vborg.vbsupport.ru/showthread.php?t=38383)

Night Owl 07-29-2002 06:35 AM

ahhhh...I see. Thank you!

Apok2002 07-31-2002 09:05 PM

Whever someone fails a steal on my board...the page simply goes blank. Is the url or path incorrect? Could that cause it? If so, WHERE (what file or what template) would I need to modify to fix it? And what would the new path be? ie....www.myurl.net/forums/whattheheckgoeshere?

It seems to work fine when the steal is successful...just not when it is unsuccessful.

Mr_P 07-31-2002 09:13 PM

Did u Know you can steal from the godfather and the insurance guy as they are just normal members and aint protected as such.

I have tried and got the dosh quite easy.
As they aint set to admins they are excluded from being protected and seeing as the insurance guy is the one with all the money is there anyway to protect him besides setting him to Admin Status.
Also one small point is there any way to make the insurance guy pay up more to u if u are insured.

I did a test and has 5000 points so i got a test account to steal it and insurance paid me 521 what a rip off

Apok2002 07-31-2002 09:43 PM

It looks like the template for failure is store_steal_nomoney, but can anyone explain why it simply gives a blank page upon failure instead of telling you that you failed to steal from the member?

Mr_P 07-31-2002 10:47 PM

u must ov installed it wrong m8 as it does work and im afraid i aint no vbb hacker but someone will be able to help you.

GenSec 08-01-2002 09:59 AM

To protect (or not) godfather and any other account look in the previous messages.
It looks like
PHP Code:

  if ($getduser[usergroupid]=="6" OR $getduser[userid]=="777") { // don't steal from admin and Godfather
    
eval("standarderror(\"".gettemplate('store_givetitle_noadmin')."\");");
  } 

Where 777 is godfather userid
2Apok2002

You just need to install it correctly.

Apok2002 08-02-2002 01:01 AM

hmmm....I dunno. The templates are correct. I've copied and recopied the code from your ins_nokarma.txt several times. I've installed about 20 other hacks on my site just fine. This is the one that kicks my arse for some reason. Perhaps I need to just redo the entire store.php from Lesane. Then reinstall your hack from scratch.

Roxie 08-02-2002 11:20 PM

Hi gensec, is there a way to get rid of the Godfather?

vdinh 08-05-2002 02:38 PM

Hi GenSec,
One of my users actually uses the Back button to keep stealing until he is successful ... I already set up so that if a user's money is negative, he won't be allowed to steal. However, once this user was caught and his money was below 0, he keeps hitting the Back button to go back to steal and was able to do so ...

Is there a way to stop this? Thanks :)

GenSec 08-05-2002 03:00 PM

Quote:

Originally posted by Roxie
Hi gensec, is there a way to get rid of the Godfather?
Of course. Remove from store mafia item. And check user database, that no one has "mafia" in the insurance field.

Roxie 08-05-2002 03:06 PM

hmmm. I meant just for certain people to stop using him.Does buying insurance REPLACE him.

GenSec 08-05-2002 03:14 PM

Quote:

Originally posted by vdinh
Hi GenSec,
One of my users actually uses the Back button to keep stealing until he is successful ... I already set up so that if a user's money is negative, he won't be allowed to steal. However, once this user was caught and his money was below 0, he keeps hitting the Back button to go back to steal and was able to do so ...

Is there a way to stop this? Thanks :)

It should to help:
PHP Code:

// ###################### Start Verify Stealing #######################
if ($action=="stealverify") {
$getrobber=$DB_site->query_first("SELECT storep FROM user WHERE userid='$bbuserinfo[userid]'");
If (
$getrobber[storep]<0) {
    eval(
"standarderror(\"".gettemplate('store_steal_cannot')."\");");
}
$getduser=$DB_site->query_first("SELECT userid,usertitle,username,storep FROM user WHERE username='".addslashes(htmlspecialchars($stealusername))."'");
$contest $DB_site->query_first("SELECT * FROM store WHERE action='steal'");
$storeid=$contest[id]; 


GenSec 08-05-2002 03:16 PM

Quote:

Originally posted by Roxie
hmmm. I meant just for certain people to stop using him.Does buying insurance REPLACE him.
Yes. User need to chose between insurance and mafia.

Stealthy 08-06-2002 04:43 PM

GenSec, first of all, thank you for your great support for a great hack! My members really enjoy it. :D

I have a question: Is there a way to limit the number of times a user can attempt to steal in a given day?

Say, I want my members to only be able to attempt to steal twice in a 24 hr period. Is there a way to put this limit in?

dadymac 08-06-2002 08:58 PM

you really need to add http refers so that people dont just stick names in the code and have scripts where users will automatically try to steal.

Apok2002 08-09-2002 04:58 AM

As per Gensec, I used the following line (copy/paste) to make it so that people can't steal from Insurance or Godfather (it's ok to steal from admins though). I replaced his original line that he posted:

PHP Code:

if ($getduser[usergroupid]=="6" OR $getduser[userid]==$bbuserinfo[userid] OR $getduser[userid]=="GODFATHERid" OR $getduser[userid]=="INSURANCEid") { 

With the ID #'s of the Godfather and Insurance. Here is the whole code.

PHP Code:

if  $getduser[userid]==$bbuserinfo[userid] OR $getduser[userid]=="370" OR $getduser[userid]=="369") {
    eval(
"standarderror(\"".gettemplate('store_nosteal')."\");");
    } 

370 = Godfatherid, and 239 = Insuranceid. I created a new template called "store_nosteal" that simplay says you can't steal from the Godfather or Insurance.

I get the following error:
Parse error: parse error, unexpected T_VARIABLE, expecting '(' in /home/apok/public_html/forums/store.php on line 1074

What am I doing wrong? What is the fix?

Apok2002 08-09-2002 05:09 AM

Also, Gensec, as per your instructions on how to make it so that members MUST have at least $5 to steal, I copied/pasted your code, but it didn't work EXACTLY the way it's supposed to. Here is my code:

PHP Code:

if ($bbuserinfo[posts]<100 AND $bbuserinfo[storep]>5) {   // don't allow new  users to steal  -- Thief should have 100 posts
    
eval("standarderror(\"".gettemplate('store_steal_cannot')."\");");


If you have a negative balance it won't let you steal. But if you have $0 or more $$$, you CAN steal. Granted, it's just a few $$$ difference from $-1 to $5, but I'm just curious why it wouldn't work? It'd be nice to be able to control it...like making it be that even thiefs have to have $100 in the positive before they can steal. But it doesn't appear to work that way. It will only prevent theft if they are in the negative balance.

Apok2002 08-09-2002 05:38 AM

In the following code to prevent people from using the back button to steal:

PHP Code:

// ################ to prevent repeated attempts #################
if ($action=="stealverify") {
$getrobber=$DB_site->query_first("SELECT storep FROM user WHERE userid='$bbuserinfo[userid]'");
If (
$getrobber[storep]<0) {
    eval(
"standarderror(\"".gettemplate('store_steal_cannot')."\");");
}
$getduser=$DB_site->query_first("SELECT userid,usertitle,username,storep FROM user WHERE username='".addslashes(htmlspecialchars($stealusername))."'");
$contest $DB_site->query_first("SELECT * FROM store WHERE action='steal'");
$storeid=$contest[id]; 

There is NO change for me when I use this code above, as opposed the the original code of:

PHP Code:

if ($action=="stealverify") {
$getduser=$DB_site->query_first("SELECT userid,usertitle,username,storep FROM user WHERE username='".addslashes(htmlspecialchars($stealusername))."'");
$contest $DB_site->query_first("SELECT * FROM store WHERE action='steal'");
$storeid=$contest[id]; 

Can you help?

GenSec 08-09-2002 05:52 AM

You forgot ( after if
PHP Code:

if  ($getduser[userid]==$bbuserinfo[userid] OR $getduser[userid]=="370" OR $getduser[userid]=="369") { 

Sec.
Should be
PHP Code:

if ($bbuserinfo[posts]<100 AND $bbuserinfo[storep]<5

In your case members MUST have at least 100 posts and less than $5.

Apok2002 08-09-2002 06:16 AM

Thanks for your help Gensec...my members are getting ancy about me going "live" w/ this hack. I still have a few things I wanna tweak first. :)

Quote:

In your case members MUST have at least 100 posts and less than $5.
I used both OR and AND...and both allowed me to steal as long as I had $0 or more. No biggie though.

I'm more concerned w/ the "back button" bug that I listed above. Also, how do I put in html referrers so members aren't FORCED to use the back button to get back to the store, main page, or wherever they want to go. As of now...they have to use the back button which promotes the "bug" of redoing the steal over and over again.

Also, did you know that when they are penalized...they can still get around not being able to post...by simply using the Quick Reply box? Is there a code we can use to prevent them from using the Quick Reply box if they are being penalized (negative balance)?

GenSec 08-09-2002 06:40 AM

Quote:

Originally posted by Apok2002
Also, how do I put in html referrers so members aren't FORCED to use the back button to get back to the store, main page, or wherever they want to go. As of now...they have to use the back button which promotes the "bug" of redoing the steal over and over again.

Also, did you know that when they are penalized...they can still get around not being able to post...by simply using the Quick Reply box? Is there a code we can use to prevent them from using the Quick Reply box if they are being penalized (negative balance)?

You can't to prevent sophisticated user to use back button. But you can invent some rules. In the above case user can redoing steal up to he lost his money. To close Quick Reply box you should insert in Quick Reply hack the same string as for regular Newreply.php.

Frankly, I'm changing my pickpocketing rules to absolutely another direction, creating special thief clan.

Apok2002 08-09-2002 09:53 PM

Quote:

Frankly, I'm changing my pickpocketing rules to absolutely another direction, creating special thief clan
ooooohhh sounds nice. :) I'm hoping you release that publicly. :)

Also, what about this code? Why is it not working? What exactly is it supposed to do? This is the code that I posted above about using when people use the back button.

PHP Code:

// ################ to prevent repeated attempts #################
if ($action=="stealverify") {
$getrobber=$DB_site->query_first("SELECT storep FROM user WHERE userid='$bbuserinfo[userid]'");
If (
$getrobber[storep]<0) {
    eval(
"standarderror(\"".gettemplate('store_steal_cannot')."\");");
}
$getduser=$DB_site->query_first("SELECT userid,usertitle,username,storep FROM user WHERE username='".addslashes(htmlspecialchars($stealusername))."'");
$contest $DB_site->query_first("SELECT * FROM store WHERE action='steal'");
$storeid=$contest[id]; 


Apok2002 08-13-2002 02:08 AM

I've tried this a few times. I'm not doing it. I have NO idea where to put
PHP Code:

 if($bbuserinfo[storep]<0) {
             eval(
"standarderror(\"".gettemplate('error_prizon')."\");");
    } 

Can anyone help? I have Firefly's Quick Reply box installed. The above code does not appear to work in the template, and the newreply.php was never edited in the QuickReply hack, and I don't think it would go into the showthread.php file.

A new template is used for the QR box...I tried putting it in there a few places...but that doesn't seem to work either. Anyone have any ideas how to lock out the QR box?

BluSmurf 08-16-2002 03:29 PM

Quote:

Originally posted by Stealthy
GenSec, first of all, thank you for your great support for a great hack! My members really enjoy it. :D

I have a question: Is there a way to limit the number of times a user can attempt to steal in a given day?

Say, I want my members to only be able to attempt to steal twice in a 24 hr period. Is there a way to put this limit in?

i would be great if this is added as it would prevent people from abusing it :D

Apok2002 08-17-2002 06:30 AM

Agreed 100%. I have some members who will just continue hitting the back button over and over to steal from another person. They get negative balances eventually, and when they quit, they will have a lot of "begging" for $$$ to do to be able to post...but it doesn't stop the problem.

Stealthy 08-17-2002 04:32 PM

GenSec? How bout it? :D :D :D :D

Stealthy 08-18-2002 04:58 PM

Anyone else? I am getting a lot of abuse from people who cannot quit trying to steal from everyone and they are ruining the game for others. I may have to uninstall this hack if it continues. Unless we can find a way to limit the amount of times a person can attempt to steal in a given period of time.

supersimon 08-20-2002 12:23 AM

i cant run tha database modifactiosn i get errors
SQL-query : [Edit]

INSERT INTO store VALUES (NULL, 'steal', 'Crime and punishment', '0', '0', 'thief.gif', 'It is not caught - not the thief', 'Y')

MySQL said:

Column count doesn't match value count at row 1

Mr_P 08-21-2002 06:20 PM

Quote:

Originally posted by supersimon
i cant run tha database modifactiosn i get errors
SQL-query : [Edit]

INSERT INTO store VALUES (NULL, 'steal', 'Crime and punishment', '0', '0', 'thief.gif', 'It is not caught - not the thief', 'Y')


MySQL said:


Column count doesn't match value count at row 1




Look above post#93 and change to

PHP Code:

INSERT INTO store VALUES (NULL'steal''Crime and punishment''0''0''thief.gif''It is not caught - not the thief''Y','0'


critical 08-24-2002 05:35 AM

can someone explain to me whats insurance and what +++++?! what are they for?! the default description seems so ununderstandable.. thanks a lot!

Lovaboye 08-24-2002 08:09 PM

Quote:

INSERT INTO privatemessage (privatemessageid,userid,touserid,fromuserid,title ,message,dateline,showsignature,iconid,messageread ,folderid,receipt) VALUES (NULL,2,2,DMINID,'Crime','test!

Sorry, you were robed for the sum 70.


Quote:

It was very smart robbery! We didn\'t take them.
',1030222597,' Forums','',0,0,0)
mysql error: Unknown column 'DMINID' in 'field list'

mysql error number: 1054
I get this error after i rob some1, what is wrong?

critical 08-25-2002 10:24 AM

pls tell me wats the difference between +++++ and insurance?!? gladly appreciated.. my user keep pestering me

Mr_P 08-29-2002 02:08 PM

Quote:

Originally posted by Lovaboye
',1030222597,' Forums','',0,0,0)
mysql error: Unknown column 'DMINID' in 'field list'

mysql error number: 1054



I get this error after i rob some1, what is wrong?
[/QUOTE]

I got this but funny enough it went on its own.My problem is now this - the hack works perfect thiefs need to have 100 posts to steal but no money ??///


they can steal with nothing even though it is set for 200 points

Is there a fix to this as its crazy time at moment as everyone is at it.

Mr_P 09-03-2002 07:53 AM

Quote:

Originally posted by Mr_P





they can steal with nothing even though it is set for 200 points

Is there a fix to this as its crazy time at moment as everyone is at it.

anyone know how to make it charge for the thief as at moment it says its 200 but u can get it fro free somehow.

Obi-Wan 09-08-2002 08:29 AM

I did all there was to do for all I know but when I wanna insure/steal I get just this:

Quote:

// ###################### Start insurance ####################### if ($action=="insurance") { $contest = $DB_site->query_first("SELECT * FROM store WHERE action='insurance'"); $title=$contest[title]; $cost=$contest[costs]; $user++++ = $DB_site->query_first("SELECT userid,username,storep,usertitle FROM user WHERE userid=$bbuserinfo[userid]"); $points=$user++++[storep]; if ($cost>$points) { eval("standarderror(\"".gettemplate('store_error') ."\");"); } else { $DB_site->query("UPDATE user SET insurance='insurance',storep=storep-$cost WHERE userid='$bbuserinfo[userid]'"); $DB_site->query("UPDATE user SET storep=storep+$cost WHERE userid=78"); $changestorenow = $DB_site->query("UPDATE store SET sold=sold+1 WHERE action='insurance'"); $moneycheck = $DB_site->query_first("SELECT storep FROM user WHERE userid=$bbuserinfo[userid]"); $money = $moneycheck[storep]; eval("dooutput(\"".gettemplate("store_insurance"). "\");"); } } // ###################### Start mafia ####################### if ($action=="mafia") { $contest = $DB_site->query_first("SELECT * FROM store WHERE action='mafia'"); $title=$contest[title]; $cost=$contest[costs]; $user++++ = $DB_site->query_first("SELECT userid,username,storep,usertitle FROM user WHERE userid=$bbuserinfo[userid]"); $points=$user++++[storep]; if ($cost>$points) { eval("standarderror(\"".gettemplate('store_error') ."\");"); } else { $DB_site->query("UPDATE user SET insurance='mafia',storep=storep-$cost WHERE userid='$bbuserinfo[userid]'"); $DB_site->query("UPDATE user SET storep=storep+$cost WHERE userid=79"); $changestorenow = $DB_site->query("UPDATE store SET sold=sold+1 WHERE action='mafia'"); $moneycheck = $DB_site->query_first("SELECT storep FROM user WHERE userid=$bbuserinfo[userid]"); $money = $moneycheck[storep]; eval("dooutput(\"".gettemplate("store_mafia")."\") ;"); } } // ###################### Start steal Lookup ########### if ($action=="steal") { if ($bbuserinfo[posts]<100) { // victim should have more than $100 eval("standarderror(\"".gettemplate('store_steal_c annot')."\");"); } $contest = $DB_site->query_first("SELECT * FROM store WHERE action='steal'"); $storeid=$contest[id]; $title=$contest[title]; $cost=$contest[costs]; eval("dooutput(\"".gettemplate("store_steal_lookup ")."\");"); } // ###################### Start steal How Much? ####################### if ($action=="stealmoney") { if ($bbuserinfo[posts]<100) { // don't allow new users to steal -- they need to have more than $100! eval("standarderror(\"".gettemplate('store_steal_c annot')."\");"); } $getduser=$DB_site->query_first("SELECT userid,usertitle,username,storep,usergroupid FROM user WHERE username='".addslashes(htmlspecialchars($stealuser name))."'"); if ($getduser[storep]<100) { // victim should have more than $100 eval("standarderror(\"".gettemplate('store_steal_p oor')."\");"); } if $getduser[userid]==$bbuserinfo[userid] OR $getduser[userid]=="79" OR $getduser[userid]=="78") { eval("standarderror(\"".gettemplate('store_nosteal ')."\");"); } if (empty($getduser[username])) { eval("standarderror(\"".gettemplate('store_donate_ dontexist')."\");"); } else { $storeadmin = $DB_site->query_first("SELECT * FROM storeadmin"); $storename=$storeadmin[storename]; $pointname=$storeadmin[pointname]; $contest = $DB_site->query_first("SELECT * FROM store WHERE action='steal'"); eval("dooutput(\"".gettemplate("store_steal_money" )."\");"); } } // ###################### Start Verify Stealing ####################### if ($action=="stealverify") { $getduser=$DB_site->query_first("SELECT userid,usertitle,username,storep FROM user WHERE username='".addslashes(htmlspecialchars($stealuser name))."'"); $contest = $DB_site->query_first("SELECT * FROM store WHERE action='steal'"); $storeid=$contest[id]; if($stealmoney<0) { $stealmoney=-$stealmoney; } if (($getduser[storep]-$stealmoney)<20) { eval("standarderror(\"".gettemplate('store_steal_l imit')."\");"); } $need=$points + $stealmoney; $rest=$getduser[storep] - $stealmoney; if ($rest<0) { eval("standarderror(\"".gettemplate('store_steal_e rror')."\");"); } eval("dooutput(\"".gettemplate("store_steal_accept ")."\");"); } // ###################### Start steal Change ####################### if ($action=="stealchanged")
And this is just a part.
I've changed the query's, set the option that admin's can be robbed but insurance and godfather not.

Can anybody help me out with this please?

Obi-Wan 09-10-2002 08:49 AM

*bump*

Anybody ?? :D

azork 09-10-2002 01:01 PM

Very nice hack Gensec.

Now here are requests for little addons that would bring a lot of fun:
- Members can become Godfathers: they could buy it in the store if they have a lot of money
- Members can steal the store or the itemshop (from Vivi)

azork 09-11-2002 01:17 PM

Prison hack: a page where you can see all members with negative points.

Cold Steel 09-15-2002 07:14 PM

Great hack, GenSec. My members love it.

I have a couple questions/problems.
  • Some members get this when they try to steal. It only happens intermittently.

    Database error in vBulletin 2.2.6:

    Invalid SQL: UPDATE user SET storep=storep-$50 WHERE userid='1988'
    mysql error: Unknown column '$50' in 'field list'

    mysql error number: 1054

    Date: Sunday 15th of September 2002 01:52:26 PM
    Script: http://forums.asiansinc.com/store.php
    Referer: http://forums.asiansinc.com/store.php
  • I have members with negative balances that keep stealing. Is this normal?
  • If I want to change it so that thieves have to pay the Mafia the entire amount they tried to steal, or so that they have to pay MORE than they tried to steal, what should I change it to?
  • I have the quick-reply hack installed. Users who have negative balances can still post via this hack. Is there anyway to edit showthread.php around it?
  • Is there any way to change the way insurance pays out? I have people who are getting robbed for $200 (insurance paid them $602), $500 (insurance paid them $629), $500 (insurance paid them $581. Can you make it so they don't get back more than people tried to steal?

Thanks again for the great hack!

Cold Steel 09-17-2002 12:14 AM

Code:

if ($bbuserinfo[posts]<100 OR $bbuserinfo[storep]<0) {
What would the above code do, in terms of restricting people from stealing?


All times are GMT. The time now is 01:40 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.01621 seconds
  • Memory Usage 1,900KB
  • 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
  • (1)bbcode_code_printable
  • (12)bbcode_php_printable
  • (13)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
  • (40)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