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)

VeoMorphine 01-28-2003 03:40 PM

Quote:

Originally posted by Riddel
Oh, another thing to ask: I don't know if this might help any in pinpointing the problems/errors I'm getting (item shop not working), but even though there are members with 1000+ posts, the itemshop only allows them to purchase level 0 item. However, when I tried to purchase a level 0 item, I received a databse error:


Database error in vBulletin 2.2.9:

Invalid SQL: SELECT userpostcount,levelfield,exprate FROM battle_options
mysql error: Unknown column 'userpostcount' in 'field list'

mysql error number: 1054

Date: Tuesday 28th of January 2003 08:54:20 AM
Script: /metropolis/itemshop.php?action=buy&cat=1&item=Javelin&itemtyp e=0
Referer: http://www.zanarkand.net/metropolis/...l=1&itemtype=0


I think this error might be contained only to the itemshop since members' stats are looking normal, so I'm guessing that I probably messed up the code somewhere. Would uploading a fresh copy of itemshop.php help, or are there other files I will need to upload?

Btw, thanks a lot for helping us out! This hack is really awesome.

It looks to me like one of the querys did not run on the install. Try re-running the install script and make it recreate the battle_options table. Make sure it creates it with the userpostcount, levelfield, and exprate collums.

VeoMorphine 01-28-2003 03:57 PM

Another Release.

This is just a getinfo template with everything in it allready for the member profile add-on. it's attached a zip, just replace the templates with the ones labled in the text files.

http://www.neurofreeze.net/forums/me...tinfo&userid=3

This should also work on ANY style.

There is an example/demo of the getinfo

VeoMorphine 01-28-2003 07:18 PM

I feel giving today :P

bitsys forgot to put this witht he postbit vars. So here is the code to put on the profile addon/postbit to let mods take and give money from bank/pocket.


For Pocket
PHP Code:

                    <a href="javascript:void(window.open('moderator.php?s=$session[sessionhash]&action=points&userid=$userinfo[userid]', '', 'toolbar=no,scrollbars=no,resizable=no,width=500,height=250'));">Money in Pocket:</a$rpgcash<br


For Bank
PHP Code:

                    <a href="javascript:void(window.open('moderator.php?s=$session[sessionhash]&action=bankmod&userid=$userinfo[userid]', '', 'toolbar=no,scrollbars=no,resizable=no,width=500,height=250'));">Money in Bank:</a$rpgbank<br


Darkwaltz4 01-29-2003 01:43 AM

heey--veomorphine, ur contributions are pretty good ^_^

i love the template setup for the profile, and the admin manual (while useless for me, since i long memorized how to set stuff up) will be great so i dont have to explain it all to my other admin. he probably wont read it all....

i have some stuff i did to the itemshop templates and added some code to it (lol, the itemshop is my favorite part of this)

first, when i tried to remove the link to buy a personal itemshop (i dont like them, and i intend to apply a link to my own hack soon in its area), the links that go to the item types dissappeared. and i dont know why since they did not appear to be variables, and i certainly did not take any out from the template. so, to go around that, i came up with lines to say to ppl, which explain which itemshop they are in, what type they are (it will display a link to their itemshop if they are in the wrong one), an 'edit your character link' (its a 'register' link when you are not logged in) a link to the itemshop faq i wrote, and links to the other itemshop. in addition, all of the buying messages that appear throughout the itemshop page, now dump you at your itemshop, instead of the plain itemshop.php. and the links from the homepage and postbits now has a link that will take you directly to your itemshop. all basically done by tacking ?itemtype=$bbuserinfo[rpgtype] to all itemshop.php urls. my members especially like not having to go through the before-complicating lists of types, and i didnt like how it displayed them either, and now im rambling...

anyway, yes...

saint_seiya 01-29-2003 01:45 AM

BitSys, I will tell you what the error is as soon as i see that noone is browsing the forums (so i can make the change and get the error again ;) )

mr e 01-29-2003 02:18 AM

Here's a hack I created by me, quite useful too.

Special Classes for Mod/Admin only - mr e

Basically this makes it so only mods/admins can see/use certain classes you upload, 1 for any user, 0 for only mods/admins, also puts an * by any that are mod/admin specific so you can distinguish them in the drop down list.

Edit: Fixed small error

mr e 01-29-2003 02:22 AM

Screenshot...I'll be releasing the hack to change the options to look like this, easier viewing for me at least, probably tomorrow at the latest.

mr e 01-29-2003 03:15 AM

Here's the hack to make your CP look like mine did with tables and such

Easier Labels - mr e
Basically makes the list's into tables instead with improved viewing, or at least for me it' much easier, this changes your edit classes/races/elements pages.

Screenshot 1 post up

VeoMorphine 01-29-2003 07:55 PM

looks like i started a trait to adding addons :P

ill be releasing a Manual for Users on how to do things in the RPG hack and i'll also be releaing a central panel for the RPG hack :)

Mystic Gohan 01-29-2003 08:26 PM

PHP Code:

Database error in vBulletin Control Panel 2.2.9:

Invalid SQLALTER TABLE rpg_classf ADD visible SMALLINT(5NOT NULL DEFAULT=1
mysql error
You have an error in your SQL syntax near '=1' at line 1

mysql error number
1064

Date
Wednesday 29th of January 2003 05:16:13 PM
Script
: [url]http://www.gotdbz.com/forum/forum/admin/specclasses.php?action=yes[/url]
Referer: [url]http://www.gotdbz.com/forum/admin/specclasses.php[/url] 

i got that for when i tried to run specclassed? can u help me mr e?

Mystic Gohan 01-29-2003 08:55 PM

Quote:

Originally posted by VeoMorphine
Another Release.

This is just a getinfo template with everything in it allready for the member profile add-on. it's attached a zip, just replace the templates with the ones labled in the text files.

http://www.neurofreeze.net/forums/me...tinfo&userid=3

This should also work on ANY style.

There is an example/demo of the getinfo

none of the stats show up even thought i edited member.php

mr e 01-29-2003 09:24 PM

my bad, redownload, zip file is fixed

Quote:

Originally posted by Mystic Gohan
PHP Code:

Database error in vBulletin Control Panel 2.2.9:

Invalid SQLALTER TABLE rpg_classf ADD visible SMALLINT(5NOT NULL DEFAULT=1
mysql error
You have an error in your SQL syntax near '=1' at line 1

mysql error number
1064

Date
Wednesday 29th of January 2003 05:16:13 PM
Script
: [url]http://www.gotdbz.com/forum/forum/admin/specclasses.php?action=yes[/url]
Referer: [url]http://www.gotdbz.com/forum/admin/specclasses.php[/url] 

i got that for when i tried to run specclassed? can u help me mr e?


Mystic Gohan 01-29-2003 09:27 PM

its still the same. can u just tell me what queries should i run, and i will do it via phpmyadmin.

VeoMorphine 01-29-2003 10:38 PM

Now for my next release is RPG CP/User Manual v1(theres gona be a version 2 when bitsys gets on aol :P) This basicly is 2 hacks in one.

Basicly what this does is add a menu were all your RPG stuff can be accessed from. It also add's an in deph manual on how to use the RPG system for users.

This will show your RPG stats As well. Attached here is a Screen shot. The release is a few posts down.

It can be found here:
https://vborg.vbsupport.ru/showthrea...377#post348377

*edited for the v2 reelase.*

mr e 01-30-2003 12:22 AM

what's the query, maybe i can help

@Mystic Gohan sorry, redownload, it'd help if i uploaded the new file, which i just now did

Mystic Gohan 01-30-2003 12:34 AM

thanx,it worked.

saint_seiya 01-30-2003 02:08 PM

The error was

Quote:


Parse error: parse error, unexpected T_CHARACTER, expecting ']' in /usr/local/psa/home/vhosts/vgcity.com/httpdocs/forum/admin/functions.php(452) : eval()'d code on line 32

Parse error: parse error, unexpected T_CHARACTER, expecting ']' in /usr/local/psa/home/vhosts/vgcity.com/httpdocs/forum/admin/functions.php(452) : eval()'d code on line 32

Parse error: parse error, unexpected T_CHARACTER, expecting ']' in /usr/local/psa/home/vhosts/vgcity.com/httpdocs/forum/admin/functions.php(452) : eval()'d code on line 32

Parse error: parse error, unexpected T_CHARACTER, expecting ']' in /usr/local/psa/home/vhosts/vgcity.com/httpdocs/forum/admin/functions.php(452) : eval()'d code on line 32

Parse error: parse error, unexpected T_CHARACTER, expecting ']' in /usr/local/psa/home/vhosts/vgcity.com/httpdocs/forum/admin/functions.php(452) : eval()'d code on line 32

Parse error: parse error, unexpected T_CHARACTER, expecting ']' in /usr/local/psa/home/vhosts/vgcity.com/httpdocs/forum/admin/functions.php(452) : eval()'d code on line 32

Parse error: parse error, unexpected T_CHARACTER, expecting ']' in /usr/local/psa/home/vhosts/vgcity.com/httpdocs/forum/admin/functions.php(452) : eval()'d code on line 32

Parse error: parse error, unexpected T_CHARACTER, expecting ']' in /usr/local/psa/home/vhosts/vgcity.com/httpdocs/forum/admin/functions.php(452) : eval()'d code on line 32

Parse error: parse error, unexpected T_CHARACTER, expecting ']' in /usr/local/psa/home/vhosts/vgcity.com/httpdocs/forum/admin/functions.php(452) : eval()'d code on line 32

Parse error: parse error, unexpected T_CHARACTER, expecting ']' in /usr/local/psa/home/vhosts/vgcity.com/httpdocs/forum/admin/functions.php(452) : eval()'d code on line 32

Parse error: parse error, unexpected T_CHARACTER, expecting ']' in /usr/local/psa/home/vhosts/vgcity.com/httpdocs/forum/admin/functions.php(452) : eval()'d code on line 32

Parse error: parse error, unexpected T_CHARACTER, expecting ']' in /usr/local/psa/home/vhosts/vgcity.com/httpdocs/forum/admin/functions.php(452) : eval()'d code on line 32

Parse error: parse error, unexpected T_CHARACTER, expecting ']' in /usr/local/psa/home/vhosts/vgcity.com/httpdocs/forum/admin/functions.php(452) : eval()'d code on line 32

Parse error: parse error, unexpected T_CHARACTER, expecting ']' in /usr/local/psa/home/vhosts/vgcity.com/httpdocs/forum/admin/functions.php(452) : eval()'d code on line 32

Parse error: parse error, unexpected T_CHARACTER, expecting ']' in /usr/local/psa/home/vhosts/vgcity.com/httpdocs/forum/admin/functions.php(452) : eval()'d code on line 32
I am going to try to fix it, i will update you.

saint_seiya 01-30-2003 02:12 PM

I have attached the functions.php file since i cant find the parse error :( Hope you can help.

Bitsys 01-30-2003 03:39 PM

Hey guys, I am back now. I was sick for a few days and I couldn't use a computer.

Quote:

Originally posted by Riddel
Oh, another thing to ask: I don't know if this might help any in pinpointing the problems/errors I'm getting (item shop not working), but even though there are members with 1000+ posts, the itemshop only allows them to purchase level 0 item. However, when I tried to purchase a level 0 item, I received a databse error:


Database error in vBulletin 2.2.9:

Invalid SQL: SELECT userpostcount,levelfield,exprate FROM battle_options
mysql error: Unknown column 'userpostcount' in 'field list'

mysql error number: 1054

Date: Tuesday 28th of January 2003 08:54:20 AM
Script: /metropolis/itemshop.php?action=buy&cat=1&item=Javelin&itemtyp e=0
Referer: http://www.zanarkand.net/metropolis/...l=1&itemtype=0


I think this error might be contained only to the itemshop since members' stats are looking normal, so I'm guessing that I probably messed up the code somewhere. Would uploading a fresh copy of itemshop.php help, or are there other files I will need to upload?

Btw, thanks a lot for helping us out! This hack is really awesome.

Could you explain the database structure of the battle_options table using phpmyadmin?


VeoMorphine:
Mind if I include the following add-ons you created in the next release?
  • RPG Admin Manual
  • Getinfo templates (will be in a folder called "Member Profile Add-on" with the Member Profile Add-on.txt file)
Credits will be given in Credits.txt, as always.

I will wait for when we talk on AIM to include the RPG CP/User Manual add-on
The links for the rpgbank and rpgcash are already in the postbit template, and I added them to the Member Profile Add-on. Should be there in the next release.

mr e:
Mind if I include both of your add-ons in the next release?

Credits will be given in Credits.txt, as always.


saint_seiya:
What code is around line 32 of your postbit template?

saint_seiya 01-30-2003 04:23 PM

I thought the error was in funtions php but that error appears when i post any code you put in install.php . That time i put the link to the battle results... but as i said it happens with any code :(

Bitsys 01-30-2003 04:42 PM

Quote:

Originally posted by saint_seiya
I thought the error was in funtions php but that error appears when i post any code you put in install.php . That time i put the link to the battle results... but as i said it happens with any code :(
And you don't get the error when you don't paste any code from install.txt?

saint_seiya 01-30-2003 04:46 PM

I dont know, i am gonna test that. Ok, one more thing.

Quote:

xTooeyx: "There seems to have been a slight problem with the VGCity Forums database."
xTooeyx: I get that message
DAV N Y P D: when you do what
xTooeyx: click "submit" when I click what I wanna do
Man, i think its messed up :(

saint_seiya 01-30-2003 04:48 PM

that problem of the error is fixed.

The only erros i still have:

I cant put any rpg variables in my postbit or i get the error:

Parse error: parse error, unexpected T_CHARACTER, expecting ']' in /usr/local/psa/home/vhosts/vgcity.com/httpdocs/forum/admin/functions.php(452) : eval()'d code on line 32
Maybe this happens because i have the + - hack installed, the shrink hack. :alien:

Top 10 Battle Stats are not working well. It just shows the stats for 10 users.

Bitsys 01-30-2003 05:09 PM

Quote:

Originally posted by saint_seiya
that problem of the error is fixed.

The only erros i still have:

I cant put any rpg variables in my postbit or i get the error:

Parse error: parse error, unexpected T_CHARACTER, expecting ']' in /usr/local/psa/home/vhosts/vgcity.com/httpdocs/forum/admin/functions.php(452) : eval()'d code on line 32
Maybe this happens because i have the + - hack installed, the shrink hack. :alien:


Top 10 Battle Stats are not working well. It just shows the stats for 10 users.

The + - hack might have something to do with it. I will go check that hack out.

Your Battle Stats Top 10 page is not working because no one has one any battles yet. By default, the Top 10 page shows the users with the most wins. Since none of your members have one any battles, it appears like it is not working. However, after 10 of your users win a battle, it look fine.

saint_seiya 01-30-2003 05:12 PM

I see, so draws dont count eh :)

vdinh 01-30-2003 06:20 PM

Hi Bitsys,
Is there an easy way to let others bet on each battle with each other, not with the server?

For example, user A bet that Fighter 1 will win battle X; User B bets the other Fighter, Fighter 2 will win that battle ... so he took that bet. At the end of the battle, if Fighter 1 wins, user A was given the money he bets, and user B's money was taken away automatically.

Also, can we post the battle result in one post instead of separating each comment? Thanks.

Bitsys 01-30-2003 09:07 PM

After working with saint_seiya, we figured out the problem. If you are getting the error message

Parse error: parse error, unexpected T_CHARACTER, expecting ']' in /usr/local/psa/home/vhosts/vgcity.com/httpdocs/forum/admin/functions.php(452) : eval()'d code on line 32

or a slight variation of it (the exact line numbers may be different), then open your postbit template, and find:

<a href="battle.php?action=showuserstats&userid=$post[userid">Battle Record</a>

and replace it with

<a href="battle.php?action=showuserstats&userid=$post[userid]">Battle Record</a>

If you can't find this code, then you are probably getting some other error that may or may not be related to this hack.


Quote:

Originally posted by vdinh
Hi Bitsys,
Is there an easy way to let others bet on each battle with each other, not with the server?

For example, user A bet that Fighter 1 will win battle X; User B bets the other Fighter, Fighter 2 will win that battle ... so he took that bet. At the end of the battle, if Fighter 1 wins, user A was given the money he bets, and user B's money was taken away automatically.

Also, can we post the battle result in one post instead of separating each comment? Thanks.

Currently, there is not an easy way to do this. Some of the problems with doing it: When would people get to bet on the battle? When would betting stop? What kinds of bets could be made? Ex: bets on retreats, draws, wins, etc.

The battle results can be made into one post. This is a battleupdate.php edit.

VeoMorphine 01-30-2003 10:03 PM

RPG CP v2
Setup Time: 5 Minutes
Upgrade from v1 time: 5 Minutes
File Edits: None
File Uploads: 2
Template Edits: 1
Templates to Add: 2
Screen Shot: https://vborg.vbsupport.ru/attachmen...&postid=348021
Demo: http://www.neurofreeze.net/rpgcp.php

Basicly what this does is add a menu were all your RPG stuff can be accessed from. It also add's an in deph manual on how to use the RPG system for users. It also shows your RPG stats on the CP.

Update Changes from v1 to v2.
- RPG Stats added.
- No permission if your not logged in shows up now.

Mystic Gohan 01-30-2003 10:51 PM

thanx VeoMorphine, it worked perfect

mr e 01-31-2003 12:46 AM

ya bitsys you can use my stuff :D

btw did you read your email? tell me if i should continue to work on that hack or would it not be practical?

Bitsys 01-31-2003 02:24 AM

Quote:

Originally posted by mr e
ya bitsys you can use my stuff :D

btw did you read your email? tell me if i should continue to work on that hack or would it not be practical?

I sent you a reply via e-mail. If you can answer the questions I asked, then I think it is possible.

Mijae 01-31-2003 04:29 AM

Bitsys, did you get my PM?

Bitsys 01-31-2003 10:47 AM

Quote:

Originally posted by v0id
Bitsys, did you get my PM?
Hmm...nope. I only see the old ones. When did you send it?

Mijae 01-31-2003 02:29 PM

After you went into my CP and told me you got no error. Then I went in myself and took a screenshot of the error.

VeoMorphine 01-31-2003 04:54 PM

A small bug i found.

In the item shop, when your one level lower then the level thats required to use the item you can buy that item. You dont get the item though, yet you spend the money. Its anoying people on my board :P

http://www.neurofreeze.net/forums/rpgcp.php

saint_seiya 01-31-2003 07:32 PM

Bytsis, how does the Bank 10% work. I told my users that it gives them 10% daily interest on the money they have deposited. Was I right :(

Bitsys 02-01-2003 12:31 AM

Quote:

Originally posted by v0id
After you went into my CP and told me you got no error. Then I went in myself and took a screenshot of the error.
Ok, I found the PM, sorry about that. That is the same error as last time, correct? Tell me, does this happen every time you try to do the same thing? Also, maybe I attempted to reproduce it incorectly, so, can you give me the exact steps you took to cause the error? Maybe a screenshot of the screen before the error?

VeoMorphine:
What version are you running? This should have been fixed in version 0.61.

saint_seiya:
Well, that is how it is supposed to work, with 10% being the default amount of interest (this is adjustable in itemshop.php, search this thread to find out how). However, there are a few quirks. One of the members of my board noted that if you visit the bank, then the timer is reset. So, let's say you deposit $200 at 8:00am. Then, you deposit $600 at 6:00pm. You won't gain interest until 6:00pm on the next day. Every time you visit the bank, the timer restarts. I might be able to fix this, but I am not sure, since it is a bug with the original itemshop code that I didn't write. If I didn't explain it well here, then I will try to get my member to explain it, since he recognized what was going on.

VeoMorphine 02-01-2003 12:43 AM

im running 61 :)

go on AOL.

Mrpolish 02-01-2003 02:43 AM

Any signs of the final version or update Bitsys ?

saint_seiya 02-01-2003 03:47 AM

Bitsys, about the bank problem, i think you could just make it give interest at midnight or something, that would fix the problem. Right?


All times are GMT. The time now is 04:57 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.02792 seconds
  • Memory Usage 1,870KB
  • 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
  • (4)bbcode_php_printable
  • (12)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