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)

deathemperor 10-03-2003 01:56 AM

much thanks, Telchar
the battle works perfectly :)
great hack, by the way ^ ^

sweet22 10-04-2003 08:14 PM

Wow thanks telchar=) ur the best=) but i still am having problems with stats being displayed in the postbit and rpgcp lvl's and postbit lvl's not matching each other.

hume 10-05-2003 09:26 AM

i have a question
how long, vbb 3.0 beta xx have Mod RPGames.?
i very need it.

legendarysk8er 10-05-2003 11:24 PM

Ok, my rpg was a hit for the first couple months, but now it's seemed to have died down. Members are losing interest in it. I really wish someone would creat a monster arena hack of some sort so when no one wanted to battle, they could still gain experience, and gil. Also it would be a good way to help newbs get started. As the monsters went up, they got harder and the more experience and gil went up along too. I really wish someone would make this addition, I'm even willing to pay for it.

deathemperor 10-06-2003 12:42 PM

Quote:

Originally Posted by sweet22
Wow thanks telchar=) ur the best=) but i still am having problems with stats being displayed in the postbit and rpgcp lvl's and postbit lvl's not matching each other.

well, you should tell your user they must check the "Update Stats" when edit their characters. so it'll display the correct things in postbit and others :)

sweet22 10-06-2003 02:42 PM

i mean some things dont show up at all in the postbit. Like money and # of battles and if the play is alive or dead. It doesnt show any of that regardless of updating. Also the levels keep climbing in the posbit regardless that you've died in battle, even if u update. So i think there is something wrong with my rpg hack.

deathemperor 10-07-2003 02:20 AM

first: if there is no trouble, then reinstall it :p
2nd: ur level grow without battling due to u set users are able to gain EXP per post :devil:
and, have u added the code to show in postbit template ? if u did, then add one more thing in the zip file of this hack: add the auto update stats. i think it will work fine

sweet22 10-07-2003 07:53 PM

i have the postbit stuff but not all of it is showing up. also i know you gain lvls/exp through posting but rpgpcp and postbit say the same thing no matter wut. so.... i need someone to help me fix it. i dont want to reinstall>_<

deathemperor 10-08-2003 01:41 AM

Quote:

i have the postbit stuff but not all of it is showing up. also i know you gain lvls/exp through posting but rpgpcp and postbit say the same thing no matter wut. so.... i need someone to help me fix it. i dont want to reinstall>_<
u dont know what I MEANT ? ohhhhh, poor me.
let's me say it again:
IF you want your status like HP, MP, AP, PP, EXP and your level show correctly in postbit after you gain EXP and/or level up. then YOU MUST, yes, sorry but i said you MUST update your stats by modify your profile and check the box "Update Stats" , then click the Submit Modifications button. After that, your things will be changed for sure.
And, Please Please make sure that you put in code in postbit all correct.
And, as I've mentioned above, you could let your stats auto up-to-date by doing the THIS:
Code:

In newreply.php and newthread.php, between

    // End Itemshop code by Mewtwo and Battle Code by Bitsys

and

    // send email to moderators

in both files, place the following code:

  //begin auto-update stats add-on for the RPG Integration Hack by Bitsys
    $userstats = $DB_site->query_first("SELECT inbattle, hp, maxhp, element, ma, maxma, pp, maxpp, ap, posts, xp FROM user WHERE userid='$bbuserinfo[userid]'");
    if ($userstats[inbattle] == 0) {
      //$debugmessage .= "You must be out of a battle in order to update your stats.  Please exit or complete battle $userinbattle[inbattle] and try again.";
      //exit;
      $extrastats = $DB_site->query_first("SELECT rpg_element.hp AS elehp, rpg_element.ma AS elema, rpg_element.pp AS elepp, rpg_element.ap AS eleap,
                                        battle_options.exprate, battle_options.hpmodifier, battle_options.mamodifier, battle_options.ppmodifier
                                        FROM battle_options, rpg_element
                                        WHERE rpg_element.elementid = $userstats[element]
                                        ");
      $hp = $userstats[hp];
      $maxhp = $userstats[maxhp];
      $ele = $userstats[element];
      $ma = $userstats[ma];
      $maxma = $userstats[maxma];
      $pp = $userstats[pp];
      $maxpp = $userstats[maxpp];
      $ap = $userstats[ap];
      $posts = $userstats[posts];
      $debugmessage .=  "HP: $hp | MaxHP: $maxhp | Element: $ele | MA: $ma | MaxMA: $maxma | PP: $pp | MaxPP: $maxpp | AP: $ap | Posts: $posts<br>\n";
      $jointime = (time() - $bbuserinfo[joindate]) / 86400;
      if ($jointime < 1) {
        $postsperday = "$posts";
      } else {
        $postsperday = sprintf("%.2f",($posts / $jointime));
      }
      $debugmessage .=  "Jointime: $jointime<br>\n";
      //$battleopt = $DB_site->query_first("SELECT * FROM battle_options");
        $level = getlevel($userstats[xp], $extrastats[exprate], 1);
        $ep = floor (100 * ($level - floor ($level)));
        $showlevel = floor ($level + 1);
      $debugmessage .=  "Level: $level | Showlevel: $showlevel<br>\n";
      $hpmulti =round ($postsperday / 4, 1);
      if ($hpmulti > 7.5)
        $hpmulti = 3;
      if ($hpmulti > 2.5)
        $hpmulti = 1.5;
      if ($hpmulti < 1)
        $hpmulti = 1;
      $debugmessage .=  "HPMulti: $hpmulti<br>\n";
      //$element = $DB_site->query_first("SELECT * FROM rpg_element WHERE elementid='$ele'");
      $hpmodifier = $extrastats[elehp];
      $mamodifier = $extrastats[elema];
      $ppmodifier = $extrastats[elepp];
      $apmodifier = $extrastats[eleap];
      $debugmessage .=  "HPmodifier: $hpmodifier | MAmodifier:  $mamodifier | PPmodifier: $ppmodifier | APmodifier: $apmodifier<br>\n";
      $maxhpupdate = ( $level * $extrastats[hpmodifier] * $hpmulti) + $hpmodifier;
      $maxhpupdate= floor ($maxhpupdate);
      $maxmaupdate = $mamodifier + ($jointime * $level * $extrastats[mamodifier]) / 5;
      $maxmaupdate = floor ($maxmaupdate);
      $maxppupdate = $ppmodifier + ($jointime * $level * $extrastats[ppmodifier]) / 3;
      $maxppupdate = floor ($maxppupdate);
      If ($maxhpupdate < 0)
        $maxhpupdate = 0;
      If ($maxmaupdate < 0)
        $maxmaupdate = 0;
      If ($maxppupdate < 0)
        $maxppupdate = 0;
      If ($apmodifier < 0)
        $apmodifier = 0;
      If ($maxhp != 0 && $maxhpupdate != 0)
        $newhp = $hp * ($maxhpupdate / $maxhp);
      else
        $newhp = $maxhpupdate;
      If ($maxma != 0 && $maxmaupdate != 0)
        $newma = $ma * ($maxmaupdate / $maxma);
      else
        $newma = $maxmaupdate;
      If ($maxpp != 0 && $maxppupdate != 0)
        $newpp = $pp * ($maxppupdate / $maxpp);
      else
        $newpp = $maxppupdate;
      $debugmessage .=  "MaxHPupdate: $maxhpupdate | MaxMAupdate: $maxmaupdate | MaxPPupdate: $maxppupdate<br>\n";
      $debugmessage .=  "NewHP: $newhp | NewMA: $newma | NewPP: $newpp<br>\n";
      $DB_site->query("UPDATE user SET maxhp='$maxhpupdate', hp='$newhp', maxma='$maxmaupdate', ma='$newma', maxpp='$maxppupdate', pp='$newpp' WHERE userid='$bbuserinfo[userid]'");

      $debugmessage .=  "Stats Updated.";
    } else {
      $debugmessage .=  "You are in Battle.";
    }

    //end auto-update stats add-on for the RPG Integration Hack by Bitsys



That's it!

P.S: this is going to be my last time to guide u something very easy understanding like this, sorry, but if go on, I'll go MAD

Darkwaltz 10-08-2003 12:13 PM

okay a few questions.

ummm why dont potions work?

armour doesnt seem to do anything neither do any oth the other accessories.

when i add sheilds how do they work?

and is this hack still being worked on...as in more features being added...

that is all for now...


All times are GMT. The time now is 07:41 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.02836 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
  • (1)bbcode_code_printable
  • (2)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