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)

mr e 01-01-2003 06:41 PM

3. in your faq you have Elements listed twice, the whole category, and you can tell the info was copy and pasted, not a big error

Plus to HP: This field specifies the amount of HP to give the user to start out with. If you set this field to 40, then when the user first updates his/her stats and is using this element, then they will have 40HP. All additional HP is calculated by the user's post count and forum activity.
Plus to MA: This field specifies the amount of MA to give the user to start out with. If you set this field to 40, then when the user first updates his/her stats and is using this element, then they will have 40HP. All additional MA is calculated by the user's post count and forum activity.
Plus to PP: This field specifies the amount of PP to give the user to start out with. If you set this field to 40, then when the user first updates his/her stats and is using this element, then they will have 40HP. All additional PP is calculated by the user's post count and forum activity.

PSI|Dr-X 01-01-2003 06:46 PM

I hope the new version will come out soon

it also will be better what i had said with that 2 profiles under the battlescene just like that terribly asci ;) lol

and plz think to add features

like :) clan

you can make a clan with a password then if someones wanna join then you can pm the password then he can join and there is a clan top statistic and a clan may have maximum 5 members and on your postbit $clanname <a href"clan.php?$clanbattlestats> and there you can view the whole clan won and lose and maybe that you can trade items WITHIN the clan like accepting a battle accepting a item for another

That will be cool

Bitsys 01-01-2003 08:46 PM

Quote:

Originally posted by mr e
1. for the images, just make them all face the same way and in either the left or right image do a "style=fliph" to flip it around.
According to http://msdn.microsoft.com/library/de...ters/fliph.asp that only works in IE 5.5+. I would like a solution that can be a little more retroactive towards older browsers.

Quote:

Originally posted by mr e
2. make the "alt" text of your weapons etc in postbit the name of the item so all you have to do is hover over it to find out what it is.

that's all for now :D

Good idea! That will be in the next version.

Quote:

Originally posted by mr e
3. in your faq you have Elements listed twice, the whole category, and you can tell the info was copy and pasted, not a big error

Plus to HP: This field specifies the amount of HP to give the user to start out with. If you set this field to 40, then when the user first updates his/her stats and is using this element, then they will have 40HP. All additional HP is calculated by the user's post count and forum activity.
Plus to MA: This field specifies the amount of MA to give the user to start out with. If you set this field to 40, then when the user first updates his/her stats and is using this element, then they will have 40HP. All additional MA is calculated by the user's post count and forum activity.
Plus to PP: This field specifies the amount of PP to give the user to start out with. If you set this field to 40, then when the user first updates his/her stats and is using this element, then they will have 40HP. All additional PP is calculated by the user's post count and forum activity.

Hehe, you've discovered my secret ;) Actually, in order to cover all angles, I decided to copy and paste certain parts so that they would be easier to find. Remember, the help doc is simply a reference material, and not meant to be read straight through. The way I see it, the more places and ways I can present the same information, the more likely people will be able to find it, thus enhancing the usefulness of the document.

Thanks for finding the typos, they will be corrected in the next version.


PSI|Dr-X:
I must agree that the clan idea is a very good one, and I like your suggestions/additions to it. However, if I were to make it, then this hack wouldn't come out of beta for at least another month and a half.

SpyGuy007 01-01-2003 10:12 PM

Quote:

Originally posted by Bitsys
I must agree that the clan idea is a very good one, and I like your suggestions/additions to it. However, if I were to make it, then this hack wouldn't come out of beta for at least another month and a half.
Does it matter? The beta works very well! :)

Bitsys 01-01-2003 10:18 PM

Quote:

Originally posted by SpyGuy007


Does it matter? The beta works very well! :)

It matters to me ;)

geniuscrew 01-02-2003 12:17 AM

Hey,

Are there any plans for

i) a spell system O:-) [you know how badly i want it!]
ii) integration with lesane's store [the points]

Thanks for a cool hack already

SpyGuy007 01-02-2003 12:18 AM

Quote:

Originally posted by Bitsys


It matters to me ;)

Oh, fine, have it your way. :p

Bitsys 01-02-2003 12:43 AM

geniuscrew:
i)Maybe after final release ;)
ii)After Final Release, I will make a new version that works with the store hack

SpyGuy007 01-02-2003 02:19 AM

Bitsys, you may be able to help me. I'm trying to display the richest user's username and amount of points they have on my forum home page.

So far, I've gotten it to display a username and the amount of points they have on hand, but it's not showing the richest user.

Here's the code:
PHP Code:

$mostpoints=$DB_site->query_first("SELECT userid,field5 FROM userfield ORDER BY field5 DESC LIMIT 1");
$richest=$mostpoints[userid];
$richuser=$DB_site->query_first("SELECT userid,username FROM user WHERE userid=$richest");
$richestuser=$richuser[username]; 

Again, it displays a username and their matching amount of points they have on hand, but they are not the richest, nor the poorest either.

Any hints?

Bitsys 01-02-2003 03:35 AM

SpyGuy007:
The user's points are stored in a field that is VARCHAR. String sorting is different from numeric sorting, so you can't query the database in the numeric sense. If you have phpmyadmin, you can verify this by going to the userfield table, clicking on browse, then clicking the field5 column. Note how the values appear to be out of place based onwhat you would expect. There might be another way to do it, however.

EDIT: After a little research, I think this will work:
PHP Code:

$mostpoints $DB_site->query_first("SELECT round(userfield.field5) as field5,userfield.userid,user.username FROM userfield LEFT JOIN user ON user.userid=userfield.userid ORDER BY field5 DESC"); 

In the forumhome template, you can now try using the following variables:

$mostpoints[userid] - User ID of the person with the most points
$mostpoints[username] - Username of the person with the most points
$mostpoints[field5] - Amount of points the person with the most points has.

EDIT2:
I just did a little more experimentation. I realized that since there are two separate places where you store the amount of money the user has, then you may want to show the person who has the most overall money. The person with the most overall money is the person that has the most money in their pocket (most points) AND the most money in the bank. To do all of this in one query, you can do the following:

PHP Code:

$mostpoints $DB_site->query_first("SELECT round(userfield.field5) as field5,items_user.bankval,round(userfield.field5+items_user.bankval) AS total,userfield.userid,user.username
                                        FROM userfield
                                        LEFT JOIN user ON user.userid=userfield.userid
                                        LEFT JOIN items_user ON items_user.userid=userfield.userid
                                        ORDER BY total DESC"
); 

In the forumhome template, you can now try using the following variables:

$mostpoints[userid] - User ID of the person with the most overall money
$mostpoints[username] - Username of the person with the most overall money
$mostpoints[field5] - Amount of points the person with the most overall money has
$mostpoints[bankval] - Amount of money the person with the most overall money has in the bank
$mostpoints[total] - Amount of money the person with the most overall money has total (points + bank)

On my test forums, this was a rather fast query:
Code:

Time before: 0.0881650447845
Time after:  0.0895960330963



All times are GMT. The time now is 11:54 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.02666 seconds
  • Memory Usage 1,767KB
  • 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
  • (3)bbcode_php_printable
  • (6)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