vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Beta Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=5)
-   -   RPG Integration Hack /w Battle (BETA) (https://vborg.vbsupport.ru/showthread.php?t=46417)

Legendary Kid 08-02-2003 01:28 AM

You have to install them seperatly, btw, is the anyway to use spells yet? Because I haven't found a way :-/

Triade 08-02-2003 07:27 AM

Legendary Kid, what do you mean? I use them... No problems in there.

Another question (sorry but i'm n00b in this hack):
i read in the faq, a user can have a guild, having a own alignment with 5 classes.
Can the user do it by himself, or the Admin have to do it by Admin CP?

Pricyber 08-02-2003 07:52 AM

Ok there's alot of stuff there to pick through so I figure it'd just be easier to ask my questions and see if they were answered already (though I'm sure they weren't..)

1. I would like to maintain my use of Lesane's Store Hack, however at this time it does not allow me to use the bank feature. Is there a way to make it work?

If not, would it be possible just to install the bank hack, and then the bank to store integration for Lesane's?

2. When you are in usercp and you select your gender & alignment, you must submit that information before the ability to choose a race comes up, etc. Is there a way to make those combo boxes auto-fill upon choosing without having to submit and reload?

3. I would really like to be able to make it possible for users to not change their characters once they have been created (unless maybe purchasing the ability to do so at Lesane's Store). Is there a way to block a character from being eligable for battle or from buying items until the forum user clicks on 'Finalize Character' and it locks it from being edited?

4. Is there a way you could adapt this so an admin may edit characters through the admin cp?

Also, many thanks for your time and effort, this is a great hack and has given my forum users so much more to do!!!

Pricyber 08-02-2003 12:27 PM

Well I found out how to get the bank feature working for those using Lesane's Store Hack.

Goto itemshop.php

Find:
Code:

// ###################### display bank stuff #######################
// credit goes to  ----  mem  ----
if(!$options[lesanestore]) {

Change to:
Code:

// ###################### display bank stuff #######################
// credit goes to  ----  mem  ----
if($options[lesanestore]) {

Find:
Code:

// ###################### get bank #######################
if($action==bank && !$options[lesanestore]) {
eval("dooutput(\"".gettemplate("itemshop_bank")."\");");
exit;
}

Change to:
Code:

// ###################### get bank #######################
if($action==bank && $options[lesanestore]) {
eval("dooutput(\"".gettemplate("itemshop_bank")."\");");
exit;
}

Find:
Code:

if ($HTTP_POST_VARS['action']=="save" && !$options[lesanestore]) {

$bank=trim(addslashes($moneysave));
        for($i=0;$i<strlen($bank);$i++)
                if (!((substr($bank,$i,1)<="9")&&(substr($bank,$i,1)>="0"))) {
                eval("standarderror(\"".gettemplate("itemshop_error-banknumber")."\");");
                exit;
                }
$bank=intval($bank);

        if ($bank>$points) {
        eval("standarderror(\"".gettemplate("itemshop_error-banknumber")."\");");
        } else {
        $DB_site->query("UPDATE items_user SET bankval=bankval+$bank,btime='".time()."' WHERE userid=$bbuserinfo[userid]");
        $DB_site->query("UPDATE userfield SET $pointfield=$points-$bank WHERE userid=$bbuserinfo[userid]");
        eval("standardredirect(\"".gettemplate("itemshop_redir-bankthanks")."\",\"itemshop.php?action=bank\");");
        }
}

Change to:
Code:

if ($HTTP_POST_VARS['action']=="save" && $options[lesanestore]) {

$bank=trim(addslashes($moneysave));
        for($i=0;$i<strlen($bank);$i++)
                if (!((substr($bank,$i,1)<="9")&&(substr($bank,$i,1)>="0"))) {
                eval("standarderror(\"".gettemplate("itemshop_error-banknumber")."\");");
                exit;
                }
$bank=intval($bank);

        if ($bank>$points) {
        eval("standarderror(\"".gettemplate("itemshop_error-banknumber")."\");");
        } else {
        $DB_site->query("UPDATE items_user SET bankval=bankval+$bank,btime='".time()."' WHERE userid=$bbuserinfo[userid]");
        $DB_site->query("UPDATE user SET storep=$points-$bank WHERE userid=$bbuserinfo[userid]");
        eval("standardredirect(\"".gettemplate("itemshop_redir-bankthanks")."\",\"itemshop.php?action=bank\");");
        }
}

Find:
Code:

if ($HTTP_POST_VARS['action']=="load" && !$options[lesanestore]) {

$bank=trim(addslashes($loadmoney));
        for($i=0;$i<strlen($bank);$i++)
                if (!((substr($bank,$i,1)<="9")&&(substr($bank,$i,1)>="0"))) {
                eval("standarderror(\"".gettemplate("itemshop_error-banknumber")."\");");
                exit;
                }
$bank=intval($bank);

        if ($bank>$bankuser[bankval]) {
        eval("standarderror(\"".gettemplate("itemshop_error-banknumber")."\");");
        } else {
        $DB_site->query("UPDATE items_user SET bankval=bankval-$bank,btime='".time()."' WHERE userid=$bbuserinfo[userid]");
        $DB_site->query("UPDATE userfield SET $pointfield=$points+$bank WHERE userid=$bbuserinfo[userid]");
        eval("standardredirect(\"".gettemplate("itemshop_redir-bankthanks")."\",\"itemshop.php?action=bank\");");
        }
}

Change to:
Code:

if ($HTTP_POST_VARS['action']=="load" && $options[lesanestore]) {

$bank=trim(addslashes($loadmoney));
        for($i=0;$i<strlen($bank);$i++)
                if (!((substr($bank,$i,1)<="9")&&(substr($bank,$i,1)>="0"))) {
                eval("standarderror(\"".gettemplate("itemshop_error-banknumber")."\");");
                exit;
                }
$bank=intval($bank);

        if ($bank>$bankuser[bankval]) {
        eval("standarderror(\"".gettemplate("itemshop_error-banknumber")."\");");
        } else {
        $DB_site->query("UPDATE items_user SET bankval=bankval-$bank,btime='".time()."' WHERE userid=$bbuserinfo[userid]");
        $DB_site->query("UPDATE user SET storep=$points+$bank WHERE userid=$bbuserinfo[userid]");
        eval("standardredirect(\"".gettemplate("itemshop_redir-bankthanks")."\",\"itemshop.php?action=bank\");");
        }
}

That wasn't overly difficult however I'm trying to figure out how to:

A) Make the top 10 richest show users based on gold on hand plus their gold in bank.

B) Make the postbit show gold on hand plus gold in bank.

Any help would be appreciated.

MSX 08-02-2003 02:22 PM

When I installed the hack, it didn't add the Alignment, ect. to the User CP > Profile part of the User CP

www.impactanime.com

I'm talking about where you enter your RPG Name...the rest of the RPG fields arent there...help?

Triade 08-02-2003 02:39 PM

Another question: Personal shop

No way to add icons in user items...
No way to add buff in user items...

So... what's the personal shop for?
Am i missing some step or it's in this way?

kaotic 08-02-2003 04:34 PM

Try to imagine what would happen to you local economy if the users could define the cost and buff on their own. :p

Jimmy011991 08-02-2003 05:44 PM

I installed this hack this morning and found a bug in the battle system. Even though i have an item the bubble thing at the bottom says that i don't and will only let me use my fists. Is there any way this can be fixed? My VB version is 2.3.0. Thanks in advance!

Legendary Kid 08-02-2003 07:01 PM

This was for versions 2.2.6, 2.2.7, 2.2.8, and 2.2.9 mainly so there are probably a few bugs with version 2.3.0.

================================

Quote:

Legendary Kid, what do you mean? I use them... No problems in there.
How do you get it so you can use magic and it uses mp or whatever it is called? (lol)

================================

Good Job With the Bank-Store Hack Intergration Hack, I made a .txt file of it here it is:

Pricyber 08-02-2003 10:27 PM

With a little help from my friend I was able to make the top 10 richest show the bankval + storep value.

In store.php

Find:
Code:

$topresult = $DB_site->query("SELECT * FROM user ORDER BY storep DESC LIMIT 10");
while ($top = mysql_fetch_array($topresult)) {

Replace with:
Code:

$topresult = $DB_site->query("SELECT user.*,bankval+storep as total FROM user,items_user WHERE user.userid = items_user.userid ORDER BY total DESC LIMIT 10");
I didn't find a way to combine the two in the postbit section, simply because the $post query was far too complicated to mess with.

If you want to show Bank: underneath Gold: where each user's avatar is in the showposts, just add:

Bank: $store[bankval]


All times are GMT. The time now is 09:11 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.03965 seconds
  • Memory Usage 1,768KB
  • 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
  • (10)bbcode_code_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (4)pagenav_pagelinkrel
  • (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