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)

dotagious 04-28-2003 05:38 AM

.

Nintel 04-28-2003 03:19 PM

I'm having more problems...he stuff won't show up in the threads. Shouldn't it be showing experience?

SM Tengu 04-28-2003 07:35 PM

Nintel, it's easier to understand the problem if you elaborate what you mean by that.

kaotic 04-29-2003 12:35 AM

My members keep challenging other members that are way out of their league... so I was wondering if there was a way to create a new field in the memberlist that displays each member's level. Can this be done?

dotagious 04-29-2003 04:14 PM

Quote:

Today at 12:35 AM Me! said this in Post #1535
I'm having difficulties, I installed this hack to a fresh board runninb 2.3.0. Everything installed successfuly. However I didn't do backups so once the installation was finished it said backing up the files was unable to be done since I hadn't chmod'ed them. Everything else it said was successful. Now when I go to my forum nothing shows and itemshop brings up an error.

Fatal error: Call to undefined function: getlevel() in /blahblahstuffhere/forum2/itemshop.php on line 438

Also when I go into user profile the RPG fields have no options in the drop down box. I'm not sure what else I am to do.

Did you run the install_itemshop_items.php ?

Did you add the variables to your postbit template?

Airs 04-30-2003 02:12 AM

How can i possibly remove extra templates.. like i accidentally processed the insert db of the tempaltes a few times now i have like

battle [changeorginal]
battle [changeorginal]
battle [changeorginal]
battle [changeorginal]
battle [changeorginal]

tons of duplicates; how doi remove them?

Bitsys 05-01-2003 08:11 PM

Quote:

04-23-03 at 05:49 PM Moreliator said this in Post #1517

EDIT: Okay, I did more research, and it appears these problems are coming from the fact that people with a ' in their name are screwing up syntax. I reset battle standings and told the people with ' and & in their name not to play, and so far no problem.

Any ideas on that donation error? It appears members only have success donating through the profile.

To fix the ' in peoples names, do the following:

In battleupdate.php, find:
PHP Code:

$DB_site->query("INSERT INTO battle_posts VALUES (NULL,'$battle[battlenumber]','$bbuserinfo[username]','$bbuserinfo[userid]','$battleaction')"); 

And REPLACE it with:
PHP Code:

$DB_site->query("INSERT INTO battle_posts VALUES (NULL,'$battle[battlenumber]','".addslashes($bbuserinfo[username])."','$bbuserinfo[userid]','$battleaction')"); 

Still in battleupdate.php, find:
PHP Code:

$DB_site->query("INSERT INTO battle_posts VALUES (NULL,'$battlenumber','$bbuserinfo[username]','$bbuserinfo[userid]','$battleaction')"); 

and REPLACE with:
PHP Code:

$DB_site->query("INSERT INTO battle_posts VALUES (NULL,'$battlenumber','".addslashes($bbuserinfo[username])."','$bbuserinfo[userid]','$battleaction')"); 

I am unable to solve the donation problem. For more information, search this thread and the original itemshop thread to see solutions I have tried that did not work.

For all of you getting the following error:
Fatal error: Call to undefined function: getlevel() in /hsphere/local/home/side5411/forums.nintel.com/forums/admin/functions.php

Do the following:

In admin/functions.php, find:
PHP Code:

// ###################### Start gettextareawidth ####################### 

and ABOVE it, add:
PHP Code:

// ###################### Start getlevel #######################
// This function is for the RPG Integration Hack by Bitsys.
// It calculates the level of a person, given their experience
// and the rate of experience gain.  It can return float or int.
function getlevel($experience$exprate=3$returnfloat=0) {
        if(
$returnfloat) {
                if(
$experience 0) {
                        return 
powlog10$experience), floor$exprate));
                } else {
                        return 
0;
                }
        } else {
                if(
$experience 0) {
                        return 
floorpowlog10$experience), floor$exprate))) + 1;
                } else {
                        return 
1;
                }
        }


Quote:

04-25-03 at 03:37 PM SavgeDusk said this in Post #1523
Hopefully this is what you mean. There's 12 rows. And here are the numbers in the `lastactive` column.

1051039715
1051222856
1051175646
1051170024
1050968041
1051154874
1051221181
1051229874
1051171682
1050696433
1051101281
1050888018

Wait for the next version and see if it fixes this problem.

Quote:

04-27-03 at 11:31 AM PixelFx said this in Post #1528
looks good :) I don't have spells added yet, or buffs, but if anyone wants a gander at my battle system :) http://www.xtremegames.ca/ I can't wait to test the next release of the RPG Integration Hack /w Battle.



Bitsys, spam system?

as for news system, it's part of vbhome, from vbulletin.org, I've done a lot of custom hacks, and changes custom postbit changes to the site, to link up to your rpg hack. As well as some custom profile tweaks.


Yes, I noticed that there was a spam count in the postbit. I believe I read a post stating that you can't have too many spam counts or it takes away money from the itemshop. Maybe I was dreaming :)

Quote:

04-28-03 at 01:38 AM dotagious said this in Post #1530
I installed this on a fresh version of vBulletin 2.3.0 without incident. However, I have (so far) found two after the fact problems. I don?t believe the problem has anything to do with my end of things, such as installation, other hacks, etc.

The first problem exists in usercp > edit profile. Here, most of the fields are duplicated, and the form itself displays inaccuracies and contradictions such as it indicating the form as being part of registration. I have attached my modifyprofile template, where the problem likely exists.

The second problem is in reference to the postbit template. I copied/pasted the contents of samplepostbit.txt as instructed. Unfortunately, the entire postbit area when viewed in the forums fails to display correctly. I will attach my postbit template in the post.

Again, this hack was installed on s a fresh version of vBulletin 2.3.0 and has not a single hack or other modification made to it. I had no error messages displayed and did not come upon any problems during installation. I would greatly appreciate text files with the corrections made. Thanks for a great hack? I hope the momentum continues.

Delete the first instance of
Code:

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


Try the attached postbit.

I will see about changing that template edit so that it quits duplicating.

Quote:

04-28-03 at 11:19 AM Nintel said this in Post #1532
I'm having more problems...he stuff won't show up in the threads. Shouldn't it be showing experience?
Could you provide a link or a screenshot?

Quote:

04-28-03 at 08:35 PM kaotic said this in Post #1534
My members keep challenging other members that are way out of their league... so I was wondering if there was a way to create a new field in the memberlist that displays each member's level. Can this be done?

Yes, it can be done. Someone was working on it a while ago.

Quote:

04-28-03 at 11:35 PM Me! said this in Post #1535
I'm having difficulties, I installed this hack to a fresh board runninb 2.3.0. Everything installed successfuly. However I didn't do backups so once the installation was finished it said backing up the files was unable to be done since I hadn't chmod'ed them. Everything else it said was successful. Now when I go to my forum nothing shows and itemshop brings up an error.

Fatal error: Call to undefined function: getlevel() in /blahblahstuffhere/forum2/itemshop.php on line 438

Also when I go into user profile the RPG fields have no options in the drop down box. I'm not sure what else I am to do.


Can you go into phpmyadmin and verify that the appropriate data is in the tables? Just make sure the table that begin with rpg_ aren't empty.

Quote:

04-29-03 at 10:12 PM Airs said this in Post #1538
How can i possibly remove extra templates.. like i accidentally processed the insert db of the tempaltes a few times now i have like

battle [changeorginal]
battle [changeorginal]
battle [changeorginal]
battle [changeorginal]
battle [changeorginal]

tons of duplicates; how doi remove them?


You will need to go into phpmyadmin, find the template table, and delete them manually.


As for why I haven't responded in a while, well, I had a rough week. Internet keeps going out, power went out for a few hours, fire alarm keeps malfunctioning, etc. Plus, it is exam week.

PixelFx 05-01-2003 10:01 PM

Quote:


quote:
04-27-03 at 11:31 AM PixelFx said this in Post #1528
looks good I don't have spells added yet, or buffs, but if anyone wants a gander at my battle system http://www.xtremegames.ca/ I can't wait to test the next release of the RPG Integration Hack /w Battle.

Bitsys, spam system?

as for news system, it's part of vbhome, from vbulletin.org, I've done a lot of custom hacks, and changes custom postbit changes to the site, to link up to your rpg hack. As well as some custom profile tweaks.

Yes, I noticed that there was a spam count in the postbit. I believe I read a post stating that you can't have too many spam counts or it takes away money from the itemshop. Maybe I was dreaming

Ah ok, well I have store hack installed, using an addon called anti spam for that, basically if people post too many short replys to my site the system would take store points away.

hacks added,
Added Store Hack by Lesane
Added Spam Killer Hack (store version) by g-force2k2
Added Rpg Battle System to the site by Bitsys
Added Update to Store Hack, seperate from battle system

after adding some of these hacks, I had to custom edit the postbit/profile to make the contents show up for each of these systems which was a great learning exterience, and about 2 hours of juggling and tweaking.

Example shots of how it looks:
my custom postbit,
http://www.xtremegames.ca/code/imgs/new_postbit1.gif

what profile link in postbit looks like
http://www.xtremegames.ca/code/imgs/new_profile.gif

Try talking to g-force2k2 to see if a version could get setup for your next release / future release of the rgg battle system.

I tried to fix most of the bugs I found, my bad, I'll be installing it again on my other site so will make bug list and post it here, and what I changed.

as for requests, I'd love to see away to change what type of currency the rgp system uses, and also have room to add userfields for adding possible multi-currency types to the rpg hack. aka pyreal, Platinum, Gold, Silver, Bronze, etc.

sorry for the long message ... :)

SM Tengu 05-02-2003 09:51 AM

I made a very small add-on that makes the hack even more RPG like.

If you fight a high level opponent it would make sense if you gained more experience than if you fight a low level opponent. So what this hack does is simply to multiply the experience-factor that you set for winning the battle with the opponents level.

Open battleupdate.php and find:
-------

if($battleopt[givewinexp] == 1 && $battleopt[expperwin] > 0) {
if($battle[winnerid] > 0)
$DB_site->query("UPDATE user SET xp=xp+$battleopt[expperwin] WHERE userid='$battle[winnerid]'");
}

-------

And replace with:
-------

if($battleopt[givewinexp] == 1 && $battleopt[expperwin] > 0) {
if($battle[winnerid] > 0)
$DB_site->query("UPDATE user SET xp=xp+($opponentlevel*$battleopt[expperwin];) WHERE userid='$battle[winnerid]'");
}

-------

Very simple hack, but it can prevent some abuse of the fighting system. For example the so called Bottom-feeding.

Perhaps this could be included in the next update? Personally, I think it would make more sense than the current system =)

Bitsys, would it be possible to make different forums gain you a different amount of creds and exp? I've made a raw code hack now, but I have to alter it through the code instead of the admin panel.

For example, I want my users to gain more experience and credits for posting in a serious forum such as "Forum Suggestions". And less if they use "General Discussions".

Perhaps implent a multiplier in the Forum Moderation-system.

Sun Boy 05-02-2003 03:31 PM

Hi,

this's a nice hack

1. when i go to the itemshop and then click on bank nothing change, i am still in the itemshop

2. i don't want to fight a user, i want to add a battle room without a password and any user can come and fight me , can i do that ?

sorry 4 my bad english ;)

thanks, :)
Sun Boy :cool:


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