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)

jakob330 09-26-2003 01:07 PM

>So, can you verify that users can put negative costs for personal itemshop items using the latest version of my hack?

verifed.. v.68. Still broken

sweet22 09-26-2003 06:25 PM

anyone have an answer to mine?

Blaine0002 09-27-2003 05:24 PM

Bitsy can you implement some AI so people can battle regular monsters? me and jakob330 made it so you cant get EXP for posting but only for battling. so our users would like some monsters to battle :P

Madacc 09-27-2003 06:53 PM

Quote:

Originally Posted by Blaine0002
Bitsy can you implement some AI so people can battle regular monsters? me and jakob330 made it so you cant get EXP for posting but only for battling. so our users would like some monsters to battle :P

TOTALLY AGREED!

This would make my pure RPG game board a lot more fun!

And you'd have to make it so you get money from fighting mobs too

PixelFx 09-27-2003 08:59 PM

AI was something we talked about a long time ago, some people had said they made one, but then they never released it to the masses ;)

It would be nice to have a monster AI for the RPG system.

I've been slowly working on a visual update for this hack :) It's slowly turning into a full art package, I've been making it for my own site, but was thinking of releasing a lite version for vb.org as well.

Features:
- Around 250 News Pieces of Armor, Weapons, Spells, Books, Potions Etc.
- Support for dark & lite backgrounds eg nearly 500 hi res gifs
- New 3D Mini Characters, on High Res 3d Battle Scenes.
- My self and a 3d max artist are working on the project
- Still working on weapon & Item descriptions etc.

build time so far 3 months on and off :) I've talked to bitsys about a possible release for vb 3.0 and vb 2.3.2 :)

We've kicked around the idea of adding possible monsters but would need someone to write AI / addon for that side of it. I'm working on a few hack addons, but in relation to this hack it should give ya guys a small idea of what I have been up to :)

sweet22 09-28-2003 03:42 PM

can someone plz help fix my battle system.

and for some reason everytime i die my lvl goes back to 1 and my rpgcp shows the right lvl but my postbit wont update the lvl, also for some reason things wont display in my postbit, like money and #of battles. y doesnt this stuff work?

Blaine0002 09-28-2003 04:38 PM

oh PIxelFX another thing you should consider is makeing an rpg in FLASH! that would be soo kewl and you can use all of the variables in exported XML. Somtime next year jakob33 is going to try and learn flash and make one for our site.

We also have a problem. Im not sure what happned. but whenever you go to edit classes nothing comes up.. when you click update m/f Classes you get this error.

Warning: Variable passed to each() is not an array or object in /**/**/**/forums/admin/rpgadmin.php on line 182

line 182 is this

while (list($key,$val)=each($name) AND list($key,$val2)=each($folder) AND list($key,$val3)=each($regatt) AND list($key,$val4)=each($magicatt) AND list($key,$val5)=each($magicdef) AND list($key,$val6)=each($regdef) AND list($key,$val7)=each($speed) AND list($key,$val8)=each($evade) AND list($key,$val9)=each($visible)) {

anyone help?

sweet22 09-29-2003 06:11 PM

plz can someone help me fix my rpg hack!

sweet22 09-29-2003 08:11 PM

ok my postbit's lvl and experience no way match my rpg cp's lvl and experience! y dont they match?

sweet22 09-30-2003 08:59 PM

i would really like some help with this...

sweet22 10-01-2003 09:21 AM

plz! someone help!

NightWalk8r 10-01-2003 11:41 PM

can someone please tell me how to get rid of the extra rpgname field??

*Screenshot Attached*

Blaine0002 10-02-2003 01:22 AM

ew that happned to me when i reinstalled.. i went into phpmyadmin and searched for %name% and found the one in modifyprofile, you should see 2 rpg name rows so delete the one with the higher ID number.

NightWalk8r 10-02-2003 01:57 AM

Code:

{htmldoctype}
<html>
<head>
<title>$bbtitle - Update profile</title>
$headinclude
</head>
<body>
<SCRIPT LANGUAGE="JAVASCRIPT">
<!--
$racearrays
$classarrays
$typearrays
function updateRaces(){
  with (document.profile.alignment){
    var choice = options[selectedIndex].value;
  }
  document.profile.rpgrace.length = 0;
    choice = eval(choice);
  for (var i=0;i<choice.length;i++){
    with (document.profile.rpgrace){
      options[length] = new Option(choice[i],choice[++i],false,false);
    }
  }
  if ((parseInt(navigator.appVersion) < 5) && (navigator.appName == "Netscape"))  {        history.go(0);
  }
}

function updateType(){
  with (document.profile.rpggender){
    var gender = options[selectedIndex].value;
  }
  if (gender == "gd1"){
    with (document.profile.rpgclass){
      var rclass = options.selectedIndex;
    }
    rclass = eval(rclass);
    document.profile.rpgtypename.value = typename1[rclass];
    document.profile.rpgtypeid.value = typeid1[rclass];

  } else if(gender == "gd2") {
    with (document.profile.rpgclass){
      var rclass = options.selectedIndex;
    }
    rclass = eval(rclass);
    document.profile.rpgtypename.value = typename2[rclass];
    document.profile.rpgtypeid.value = typeid2[rclass];
  } else {
    document.profile.rpgtypename.value = typename0[0];
    document.profile.rpgtypeid.value = typeid0[0];

  }
  if ((parseInt(navigator.appVersion) < 5) && (navigator.appName == "Netscape"))  {        history.go(0);
  }
}

function updateClasses(){
  with (document.profile.rpggender){
    var choice = options[selectedIndex].value;
  }
  document.profile.rpgclass.length = 0;
    choice = eval(choice);
  for (var i=0;i<choice.length;i++){
    with (document.profile.rpgclass){
      options[length] = new Option(choice[i],choice[++i],false,false);
    }
  }
  document.profile.rpgtypename.value = typename0[0];
  document.profile.rpgtypeid.value = typeid0[0];
  updateType();
  if ((parseInt(navigator.appVersion) < 5) && (navigator.appName == "Netscape"))  {        history.go(0);
  }
}
//-->
</script>
$header

<!-- breadcrumb -->
<table cellpadding="2" cellspacing="0" border="0" width="{contenttablewidth}" {tableinvisibleextra} align="center">
<tr>
        <td width="100%"><img src="{imagesfolder}/vb_bullet.gif" align="middle" alt="vBulletin">
        <normalfont><b><a href="index.php?s=$session[sessionhash]">$bbtitle</a> &gt;
        <a href="usercp.php?s=$session[sessionhash]">User Control Panel For $bbuserinfo[username]</a> &gt;
        Edit Profile</b></normalfont></td>
</tr>
</table>
<!-- /breadcrumb -->

<br>
$cpnav
<br>

<center>$coppatext</center>

<form name="profile" action="member.php" method="post">
<input type="hidden" name="s" value="$session[sessionhash]">

<table cellpadding="{tableouterborderwidth}" cellspacing="0" border="0" bgcolor="{tablebordercolor}" {tableouterextra} width="{contenttablewidth}" align="center"><tr><td>
<table cellpadding="4" cellspacing="{tableinnerborderwidth}" border="0" {tableinnerextra} width="100%">
<tr>
        <td bgcolor="{categorybackcolor}" colspan="2"><normalfont color="{categoryfontcolor}"><b>Edit Profile - $bbuserinfo[username]</b></normalfont></td>
</tr>
<tr>
        <td bgcolor="{tableheadbgcolor}" colspan="2"><normalfont color="{tableheadtextcolor}" class="thtcolor"><b>Registration: Required Information</b></normalfont>
        <smallfont color="{tableheadtextcolor}" class="thtcolor">All fields are required.</smallfont></td>
</tr>
$parentemail
<tr>
        <td bgcolor="{secondaltcolor}"><normalfont><b>Email Address:</b></normalfont></td>
        <td bgcolor="{secondaltcolor}"><normalfont><input type="text" class="bginput" name="email" value="$bbuserinfo[email]" size="30" maxlength="150"></normalfont></td>
</tr>
<tr>
        <td bgcolor="{secondaltcolor}"><normalfont><b>Confirm Email Address:</b></normalfont></td>
        <td bgcolor="{secondaltcolor}"><normalfont><input type="text" class="bginput" name="emailconfirm" value="$bbuserinfo[email]" size="30" maxlength="150"></normalfont></td>
</tr>


<tr>
        <td bgcolor="{tableheadbgcolor}" colspan="2"><normalfont color="{tableheadtextcolor}" class="thtcolor"><b>Optional Information</b></normalfont> <smallfont color="{tableheadtextcolor}" class=thtcolor>All information will be viewable by other $bbtitle members.</smallfont></td>
</tr>



<tr>
        <td bgcolor="{secondaltcolor}"><b><normalfont>Homepage:</normalfont></b></td>
        <td bgcolor="{secondaltcolor}"><normalfont><input type="text" class="bginput" name="homepage" value="$bbuserinfo[homepage]" size="30" maxlength="200"></normalfont></td>
</tr>
<tr>
        <td bgcolor="{firstaltcolor}"><b><normalfont>ICQ Number:</normalfont></b></td>
        <td bgcolor="{firstaltcolor}"><normalfont><input type="text" class="bginput" name="icq" value="$bbuserinfo[icq]" size="30" maxlength="30"></normalfont></td>
</tr>
<tr bgcolor="{secondaltcolor}">
        <td><b><normalfont>AOL Instant Messenger Handle:</normalfont></b></td>
        <td><normalfont><input type="text" class="bginput" name="aim" value="$bbuserinfo[aim]" size="30" maxlength="30"></normalfont></td>
</tr>
<tr>
        <td bgcolor="{firstaltcolor}"><b><normalfont>Yahoo Messenger Handle:</normalfont></b></td>
        <td bgcolor="{firstaltcolor}"><normalfont><input type="text" class="bginput" name="yahoo" value="$bbuserinfo[yahoo]" size="30" maxlength="30"></normalfont></td>
</tr>
<tr>
        <td bgcolor="{secondaltcolor}" valign="top"><b><normalfont>Signature:</normalfont></b><br>
        <smallfont>Optional signature you may use to appear at bottom of your posts.</smallfont>
                <p><smallfont>HTML code is $htmlonoff<br>
                <a href="misc.php?s=$session[sessionhash]&amp;action=bbcode">vB Code</A> is $bbcodeonoff<br>
                [img] code is $imgcodeonoff<br>
                <a href="misc.php?s=$session[sessionhash]&amp;action=showsmilies">Smilies</a> are $smiliesonoff
                </smallfont></p></td>
        <td bgcolor="{secondaltcolor}"><textarea name="signature" rows="6" cols="40">$signature</textarea></td>
</tr>
$birthday
$customtext
<tr>
        <td bgcolor="{tableheadbgcolor}" colspan="2"><normalfont color="{tableheadtextcolor}" class="thtcolor"><b>Additional Information</b></normalfont></td>
</tr>
$customfields
<tr>

<td bgcolor="$bgcolor"><normalfont><b>Element Type:</b></normalfont><br>
                <smallfont>The Element type you want to be at the boards.</smallfont></td>
                <td bgcolor="$bgcolor"><normalfont>

                <select name="element">
                              $elementoptions
                </select>

                </normalfont></td>
                </tr>
<tr>
                <td bgcolor="$bgcolor"><normalfont><b>RPG Alignment:</b></normalfont><br>
                <smallfont>The side you want your character to be on the RPG.</smallfont></td>
                <td bgcolor="$bgcolor"><normalfont>
                    <select name="alignment" onchange="updateRaces()">
        $alignmentoptions
                    </select></normalfont></td>
</tr>
<tr>
                <td bgcolor="$bgcolor"><normalfont><b>RPG Race:</b></normalfont><br>
                <smallfont>The Race you want your character to be on the RPG.</smallfont></td>
                <td bgcolor="$bgcolor"><normalfont>
                            <select name="rpgrace">
        $raceoptions
                    </select></normalfont></td>
</tr>
<tr>
                <td bgcolor="$bgcolor"><normalfont><b>RPG Gender:</b></normalfont><br>
                <smallfont>This would be your RPG Character's Gender, not your gender in real life.</smallfont></td>
                <td bgcolor="$bgcolor"><normalfont>
                    <select name="rpggender" onchange="updateClasses()">
        $genderoptions
                    </select></normalfont></td>
</tr>

<tr>
                <td bgcolor="$bgcolor"><normalfont><b>RPG Class:</b></normalfont><br>
                <smallfont>The Class you want your character to be on the RPG.</td>
                <td bgcolor="$bgcolor"><smallfont>
                <select name="rpgclass" onchange="updateType()">
$classoptions
</select></smallfont>

</td>
</tr>
<tr>
<td bgcolor="$bgcolor"><normalfont><b>RPG Type:</b></normalfont><br><smallfont>Your type is automatically determined by your class.</smallfont></td>

<td bgcolor="$bgcolor" >
<input type="text" class="bginput" name="rpgtypename" value="$rpgtypename" length="30" READONLY><input type="hidden" name="rpgtypeid" value="$rpgtypeid">
</td>
</tr>
<tr>
                <td bgcolor="$bgcolor"><normalfont><b>Build Stats</b></normalfont><br>
                <smallfont>Click here if you want to have stats shown on the board.</smallfont></td>
                <td bgcolor="$bgcolor"><normalfont>
<input type="checkbox" name="updatestats">Update stats
                </normalfont></td>
                </tr>

</table>
</td></tr></table>

<br>

<table cellpadding="2" cellspacing="0" border="0" width="{contenttablewidth}" {tableinvisibleextra} align="center">
<tr>
        <td align="center"><normalfont>
        <input type="hidden" name="action" value="updateprofile">
        <input type="submit" class="bginput" name="Submit" value="Submit Modifications" accesskey="s">
        <input type="reset" class="bginput" name="Reset" value="Reset Fields">
        </normalfont></td>
</tr>
</table>

</form>

$footer

</body>
</html>

ok.......that's my modifyprofile template.
what's wrong w/ it? =(
TIA~

deathemperor 10-02-2003 03:27 AM

ok. i installed this, and everything goes steady, EXCEPT:
when my friend and me try to make a battle, he created a challenge, i received a message like "You have been challenged.It is battle number 3 and is called death. There is $0 at stake in this battle. Your battle password is ''. To go to your battle click here"
I gave no changes for that quote, and as you may see, the password is not displayed. The password was created is "123" ( without the quote ), and when i click "here" it shew the accept/decline, I chose accept. AND THE NEXT PAGE, it said "invalid password or battle id" ( or something mostly like that ).
We tried it several times after that, and it show the same. Even when I used the adminCP to make a password for the battle ( it shows no password when admin view battles ), it still says error >_< .
How can i get over this things ? quick help please...
thanks

mr e 10-02-2003 04:25 AM

NightWalk8r, go into your PHPMyAdmin and go into the vBulletin database, then go to the "profilefield" table and go to Browse, from there find the second RPG name field and click Delete.

Darkwaltz 10-02-2003 11:54 AM

could someone paste all there battle options here as all mine seeem out of proportion. As in my hp is low but attacks take off loads..

deathemperor 10-02-2003 12:25 PM

sorry, I have my post here again, just to make sure that there will be someone solve it for me

Quote:

ok. i installed this, and everything goes steady, EXCEPT:
when my friend and me try to make a battle, he created a challenge, i received a message like "You have been challenged.It is battle number 3 and is called death. There is $0 at stake in this battle. Your battle password is ''. To go to your battle click here"
I gave no changes for that quote, and as you may see, the password is not displayed. The password was created is "123" ( without the quote ), and when i click "here" it shew the accept/decline, I chose accept. AND THE NEXT PAGE, it said "invalid password or battle id" ( or something mostly like that ).
We tried it several times after that, and it show the same. Even when I used the adminCP to make a password for the battle ( it shows no password when admin view battles ), it still says error >_< .
How can i get over this things ? quick help please...
thanks

NightWalk8r 10-02-2003 12:36 PM

awesome!!!!
thx a lot mr e :D

Telchar 10-02-2003 02:08 PM

Quote:

Originally Posted by deathemperor1st
ok. i installed this, and everything goes steady, EXCEPT:
when my friend and me try to make a battle, he created a challenge, i received a message like "You have been challenged.It is battle number 3 and is called death. There is $0 at stake in this battle. Your battle password is ''. To go to your battle click here"
I gave no changes for that quote, and as you may see, the password is not displayed. The password was created is "123" ( without the quote ), and when i click "here" it shew the accept/decline, I chose accept. AND THE NEXT PAGE, it said "invalid password or battle id" ( or something mostly like that ).
We tried it several times after that, and it show the same. Even when I used the adminCP to make a password for the battle ( it shows no password when admin view battles ), it still says error >_< .
How can i get over this things ? quick help please...
thanks

Replace all "$key" with "$key1" in battle.php.
Then, in template battle_newbattle, find "key" and replace it with "key1".

Bitsys posted the solution to this in https://vborg.vbsupport.ru/showpost....postcount=2216

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...

deathemperor 10-09-2003 03:07 AM

well, about those things: I am having the same problem.
but, do your weapons work ?
if there is nothing works, then go to your ACP, edit items, chose the catagory that they should be in. Something like: Swords: in Weapon cuz they are used to attacked....
and, you should read the RPG admin Manual, it's very useful for these help.

sweet22 10-11-2003 04:55 PM

Quote:

Originally Posted by deathemperor1st
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

this doesnt solve the problem that the user's rpg cash and battle info doesnt show up.

Darkwaltz4 10-11-2003 11:38 PM

Quote:

Originally Posted by Darkwaltz
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...

eh, havent been here in an incredibly long time (been workin on tt)

and i guess ive been bored so i might help a few strugglers a bit :-p so, to answer the first thing i saw when logged here (posted by...Darkwaltz...(wtf??))

shields (which i did) deflect damage based on their buff when you set them at battle (if however you changed this bitsys, forgive me, i havent been paying any attention :-p) then when you use a shield in battle, it will deflect any attack under that amount. (magical or physcial or both, i dont know what bitsys installed it as)

and im gunna go lok through some of these pages to see if i can answer anything else :-p so i might edit this..

Darkwaltz 10-12-2003 08:39 AM

does armour act the same as a sheild then or something or does it not do anything? and potions still dont work :s

sweet22 10-12-2003 11:06 AM

I think a sheild gives to defense and gives you a chance to block. im not sure really>_>

mr e 10-12-2003 07:18 PM

As far as I know armor reduces the damage while the shield will prevent all damage if the damage is under a certain amount.

sweet22 10-14-2003 08:21 PM

can anyone help me fix my rpg hack?

Darkwaltz4 10-17-2003 10:48 PM

does sound too hard. probably just a rendered list based on categories when you run a serach for a user (if i do it i might link it to already-there edit users screen)

then with the dropdowns you pick available items, or no items. and then when you submit it updates accordingly....hmm, doesnt sound overly depressing to do:-p when i have time i might do it

Darkwaltz 10-18-2003 10:41 PM

this hack seems to have stopped completly. i know Bitsys is working on vb 3 hacks but is he going to come back to this?

legendarysk8er 10-18-2003 11:19 PM

I think in the admin cp you should be able to edit the user's items too.


All times are GMT. The time now is 01:55 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.04105 seconds
  • Memory Usage 1,936KB
  • 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
  • (3)bbcode_code_printable
  • (7)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (2)pagenav_pagelinkrel
  • (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