Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Pickpocket in Lesane Store Details »»
Pickpocket in Lesane Store
Version: 1.00, by GenSec GenSec is offline
Developer Last Online: Jun 2010 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 05-06-2002 Last Update: Never Installs: 32
 
No support by the author.

As promised It's new version of steal addon to the Lesane Store.
At last the crime on my board is under control.
I translated all templates, but It's not the best english version.
Hope the instruction is full and understandable.
Have a fun.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #132  
Old 08-05-2002, 03:06 PM
Roxie's Avatar
Roxie Roxie is offline
 
Join Date: May 2002
Location: on vb.org
Posts: 526
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hmmm. I meant just for certain people to stop using him.Does buying insurance REPLACE him.
Reply With Quote
  #133  
Old 08-05-2002, 03:14 PM
GenSec GenSec is offline
 
Join Date: Oct 2001
Posts: 156
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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]; 
Reply With Quote
  #134  
Old 08-05-2002, 03:16 PM
GenSec GenSec is offline
 
Join Date: Oct 2001
Posts: 156
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #135  
Old 08-06-2002, 04:43 PM
Stealthy Stealthy is offline
 
Join Date: May 2002
Posts: 26
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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

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?
Reply With Quote
  #136  
Old 08-06-2002, 08:58 PM
dadymac dadymac is offline
 
Join Date: Nov 2001
Posts: 56
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #137  
Old 08-09-2002, 04:58 AM
Apok2002 Apok2002 is offline
 
Join Date: Feb 2002
Posts: 114
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
  #138  
Old 08-09-2002, 05:09 AM
Apok2002 Apok2002 is offline
 
Join Date: Feb 2002
Posts: 114
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #139  
Old 08-09-2002, 05:38 AM
Apok2002 Apok2002 is offline
 
Join Date: Feb 2002
Posts: 114
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
  #140  
Old 08-09-2002, 05:52 AM
GenSec GenSec is offline
 
Join Date: Oct 2001
Posts: 156
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #141  
Old 08-09-2002, 06:16 AM
Apok2002 Apok2002 is offline
 
Join Date: Feb 2002
Posts: 114
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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)?
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 08:50 PM.


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.05977 seconds
  • Memory Usage 2,336KB
  • Queries Executed 27 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (8)bbcode_php
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete