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)

chrisz 02-23-2003 12:46 AM

It works fine on my forum.
Some little bugs but they have all been fixed by the great Bitsys.
Thnx DarkWaltz your always a big help ;)
And yes about listing the RPG members...
Like how there is the memberlist can you make one of those except they are RPG characters?
Thnx a bunch everyone.
EDIT: How do I make it when they go to the Itemshop it automaticly take it to the items available in their Item Type like generic, ranger or whatever.
Like at DarkWaltz forum.

Bitsys 02-23-2003 01:29 AM

Quote:

Originally posted by Moreliator
Thanks bitsy!

Say, is there an easy way to import your RPG settings to another board (excuse me for my ignorance)... Like a template upload or something?

Not really.

Quote:

Originally posted by Moreliator
Also, just a quick question regarding a user's character... are there any penalties for switching characters (like XP loss or level loss) or can users constantly change characters without any consequences?
They can switch constantly with no penalties.

Quote:

Originally posted by Moreliator
If this is the case, is there anything stopping a user from buying an item with an allowable RPG type and then switching types, illegaly using an item with an RPG type he shouldn't be? Hopefully thats clear enough, if not I'll expand on the question.
Thanks for your quick and thorough answers bitsy.

If they have an item that is meant for a different type, then they will get an error message in battle telling them to sell the weapon. They won't be able to use the weapon.

Quote:

Originally posted by chrisz
Hey how can I close my itemshop?
I am adding a idea and closed the battle but how do I do the same to the Itemshop???

Do what Darkwaltz4 said.

Quote:

Originally posted by DaPro
Itemshop items have always been ok, just clases and what not not working, it is really weird, and when I ran the install again, it worked like I installed it for the first time, but when I went to user cp, still empty drop downs. ran the db fix 3 times, same response and no change, please help.
Installing it more than once without uninstalling first is very bad. When you do this, it sometimes adds the code edits more than once. It also adds all of the items more than once, and has the possibility to add the classes/types more than once. This will make the hack function in an unpredictable way. When I went to your itemshop, I noticed that the items were installed 3 times. That's not good.

Before installing this hack, you should have saved copies of the .php files that were edited. Re-upload these original files in order to remove the hack. Go back to vbhacker. Start to install the hack. This time, however, don't run the template edits, don't run the new templates, and don't run the database queries. Only do the file edits. Make sure you record what goes wrong, if anything. Vbhacker will tell you if something goes wrong, make sure to pay attention.

Back to the emtpy drop downs. Go back to vbhacker and select my hack. Before clicking on the continue button, make sure you click the radio button that says "Generate a text file". After doing this, click the continue button. It should give you a text file. In this text file, look for the edits that are done to member.php. Once you find them, try to manually apply them to member.php. If they are already there, then don't re-apply them.

Quote:

Originally posted by PSI|Dr-X
Idea till the next version?
Nope.

Quote:

Originally posted by Mystic Gohan
I think there should be like a rafle thing that all the members that pay like so much can get a large sum of money when ypi choose. I think there is hack like this for Lesane's Store could that be ported to this hack?
I am not familiar with that hack. I guess it could be ported with minimal effort. I really don't know though.

Quote:

Originally posted by sonic3d
i was wondering can some1 (it can be ne1) make a page where it will list all the members with the rpname, lvl, class, alignment, element. i think its very easy to do.

l8er
sonic

That seems fairly easy to do. It would require some more templates though.

Quote:

Originally posted by Colon33
How stable is this version yet? My members are really eager


Are there any MAJOR bugs with it yet?

Its fairly stable. There will be at least 3 bug fixes in the next version though. There have been well over 40 bug fixes in the past, from version 0.50 to the current version.

chrisz 02-23-2003 01:33 AM

Ok sounds cool what about my last post bitsys?

Vivi Ornitier 02-23-2003 04:13 AM

when's the summon thing com eout? my members are too hyped about it

chrisz 02-23-2003 04:23 AM

Yeah I know.
Bitsys came on a few times but I didnt think he noticed the posts I really wanna finish all I need is the summons, and some small requests that I made like RPG memberlist and the Itemshop mod that Darkwaltz has.

Bitsys 02-23-2003 01:16 PM

Quote:

Originally posted by chrisz
EDIT: How do I make it when they go to the Itemshop it automaticly take it to the items available in their Item Type like generic, ranger or whatever.
Like at DarkWaltz forum.

Quote:

Originally posted by Darkwaltz4
all basically done by tacking ?itemtype=$bbuserinfo[rpgtype] to all itemshop.php urls.
From https://vborg.vbsupport.ru/showthrea...710#post347710

I guess that is how he did it. He can probably write you some instructions or something if you need them.

chrisz 02-23-2003 01:23 PM

Ok thnx I will wait for him to post.
Can you make the RPG memberlist Bitsys?
EDIT: Also Ithink that has alreay been answered but anyways..
Is there anyway to make the person who goes first random?
EDIT: Also how do I add the users avatar next to what his says while battling?

Bitsys 02-23-2003 01:55 PM

Quote:

Originally posted by chrisz
Ok thnx I will wait for him to post.
Can you make the RPG memberlist Bitsys?

Not right now.

Quote:

Originally posted by chrisz
EDIT: Also Ithink that has alreay been answered but anyways..
Is there anyway to make the person who goes first random?

Not really. I wouldn't suggest doing it either. The reason why the battle starter doesn't get to go first is so that the person who is challenged doesn't get roped into a battle and die without getting a chance to fight. It seems more fair this way.

Quote:

Originally posted by chrisz
EDIT: Also what file do I edit the stuff they say during battle like
Username taunts or Username misses Username gains 15ap?

All of that is in battleupdate.php.

chrisz 02-23-2003 01:57 PM

Ok I found that how do I add the persons avatar next to what they said during battle?

Bitsys 02-23-2003 02:40 PM

Quote:

Originally posted by chrisz
Ok I found that how do I add the persons avatar next to what they said during battle?
In battlefight.php, find:
PHP Code:

/*
                $owneravatarurl=getavatarurl($ownerstats[userid]);
                $oppavatarurl=getavatarurl($oppstats[userid]);
                if (isset($owneravatarurl) and !empty($owneravatarurl)) {
                        $owneravatar = "<img src=\"$owneravatarurl\"></img>";
                } else {
                        $owneravatar = "<br>";
                }
                if (isset($oppavatarurl) and !empty($oppavatarurl)) {
                        $oppavatar = "<img src=\"$oppavatarurl\"></img>";
                } else {
                        $oppavatar = "<br>";
                }
                */ 

and change it to:
PHP Code:

                $owneravatarurl=getavatarurl($ownerstats[userid]);
                
$oppavatarurl=getavatarurl($oppstats[userid]);
                if (isset(
$owneravatarurl) and !empty($owneravatarurl)) {
                        
$owneravatar "<img src=\"$owneravatarurl\"></img>";
                } else {
                        
$owneravatar "<br>";
                }
                if (isset(
$oppavatarurl) and !empty($oppavatarurl)) {
                        
$oppavatar "<img src=\"$oppavatarurl\"></img>";
                } else {
                        
$oppavatar "<br>";
                } 

Then, in the battle_postbit and battle_postbit2 templates, add $owneravatar where you want the owner's avatat and $oppavatar where you want the opponent's avatar.

I have not tested this in a long time, so it may not work. Also, doing this will add at least 2 queries to battlefight.php.

chrisz 02-23-2003 03:07 PM

ok thats fine. All I need is that Itemshop mod by Darkwaltz and i can open :(

Mystic Gohan 02-23-2003 03:47 PM

chrisz you didnt come up with the idea of member list of RPG stats that was sonic3d

chrisz 02-23-2003 03:51 PM

I didnt say i did. I said i would like it.
Also is there any way to limit the Battle Sytem and Itemshop to certain member groups. (I need this or my whole RPG is ruined)
I dont want people who dont want to play the RPG to use them so is there any way I can do this?

Bitsys 02-23-2003 04:36 PM

Quote:

Originally posted by chrisz
I didnt say i did. I said i would like it.
Also is there any way to limit the Battle Sytem and Itemshop to certain member groups. (I need this or my whole RPG is ruined)
I dont want people who dont want to play the RPG to use them so is there any way I can do this?

At the top of battleupdate.php, battlefight.php, battle.php, and heal.php you will find code that checks to see if the user is in the correct usergroup. It looks something like:
PHP Code:

If ($bbuserinfo[userid] != && $bbuserinfo[usergroupid] != && $bbuserinfo[usergroupid] != && $bbuserinfo[usergroupid] != 1){ 

All you need to do is add the usergroup that you don't want to have access to the rpg battle system. Like this:

PHP Code:

If ($bbuserinfo[userid] != && $bbuserinfo[usergroupid] != && $bbuserinfo[usergroupid] != && $bbuserinfo[usergroupid] != && $bbuserinfo[usergroupid] != XX){ 

replace XX with the ID that you don't want to have access. When someone from this usergroup goes to the pages, they will get a no permission screen.

If you want to cut off access to other files, then it will take a little bit more work. You will have to add similar code to itemshop.php, rpgcp.php, and rpgmanual.php. If you don't want them to be able to select the different races/classes/genders in their profile, then you will have to edit member.php to show a simple "You cannot access this feature" message in all of the drop-down boxes.

Mijae 02-23-2003 06:36 PM

Bitsys, how safe is the battle hack for a public board?

Moreliator 02-23-2003 08:15 PM

Bitsy,
Then would it be possible to add a function that causes a user's character to lose lets say 5 levels if they switch their character?

Thanks again bitsy, you've outdone youself!

chrisz 02-23-2003 08:23 PM

Well when i used the latest version there were only little bugs it worked fine after I fixed them.
By the way thnx again Bitsys
EDIT: Is there anyway to have twin battles like 2 vs 2?
Say there is one team and they do whaever they do normally but the can pick who to attack and they cant attack until they are both ready. Then the other team goes and so on and so forth.

Darkwaltz4 02-24-2003 12:14 AM

ahhh the itemshop--my fav part of the whole rpg hack, and yeah...ive done tons to it....*sits down and takes out pipe*

since itemtype is determined by rpgtype from class, simply place $bbuserinfo[rpgtype] at the end of any link to the itemshop. so, when clicking it, you auto-go to your type's itemshop. u may want to go into itemshop.php and add that url ending to all the redirects too, so when someone purchases, sell, whatever, it kicks them to their itemshop. there are also a few templates you can do this to as well, like the bank 'itemshop' link in the navline

i did this because my members never found where they could get their items from. clicking the itemshop returned them to the empty page, and some confusing links at the bottom. i got rid of the links, and added to the itemshop.php page, to figure out what type ppl were, and it would display it at the top of the page. 'You are currently a Magician Type' for instance. i also had to make a separate display variable for which shop you are in, so it would say something like 'As a Fighter Type, you have these items available for purchase'
later, i added a redirect link next to the 'ur a whatever type' in case you werent in your itemshop. at the very bottom of the page, i have links to the other itemshops, cause ppl like to know what theyre missin

i wrote an itemshop faq (which needs rewriting now...) so i included a link to the top to avoid questions. if someone was registered, it would say 'edit ur character' under the what type you are. when not registered, it would say 'You are currently a person without a type' and there would be a register-now line under it. tons of fun little edits. i also worked on my editprofile page, and added a target to it, so that i could post links to directly edit character stuff....(cause absolutely no one could figure it out -_-)

also, u should set up a rpg type which has no classes on it, called 'Certain Type' (so it says, you need to be a certain type to purchase) and have all items available through it--this creates a 'see-all' store, so anyone without a character can see it, or with direct links-- to do this, go into itemshop.php, and find where it says
PHP Code:

if($itemtype == "")
        
$itemtype "0"

and add the typeid of your combo itemshop...(so its not 0)

with all that said and done....heres my itemshop...(326 items, 14 categories, all item types available)

http://ffgods.ffextreme.com/forums/itemshop.php

in regards to the summons addon, i _somehow_ broke battlefight.php, but there are 2 weird things going on with it: even the original file says this error, and it says the error is on the line AFTER ALL THE OTHER LINES (past ?>) so...-_- ill gotta hunt that out...

mli 02-24-2003 12:24 AM

Ok, I installed this hack and I have two major problems:

1. The RPG ControlPanel does not work correctly. There are no statistics. Everything is blank. It's like it doesn't actually read the user's stats. It can't find them or something....

2. The healing center does not work for some people including me. It says +5% HP $11 and I choose that. Then I click Heal me. And it doesn't do anything...

mr e 02-24-2003 12:58 AM

darkwaltz, that means there is a missing } somewhere in the code

Moreliator 02-24-2003 12:59 AM

Bitsy, it appears I MAY have found a glitch, too.

It goes back to that problem I had where sometimes when you go to the RPG Cetner (rpgcp.php) it doesn't recognize you, and it just has a bunch of apostrophes "S's" instead of the persons name.

Well I've done further testing, and it turns out that it is certain classes that make this happen. Ive installed the hack many times, sometimes with default classes, sometimes with my own, and each time something like this happens. Usually it is just a couple classes/characters. In some cases, I was able to fix the error by adding the character in the class causing trouble to the FEMALE class. When I added female counterparts to all the male classes that would not work, BINGO, it sovled many, but there are still some that do not work. It appears that all the female classes have always worked.

Anyway, ihopefully that information helps you somewhat.

Darkwaltz4 02-24-2003 01:01 AM

Quote:

Originally posted by mr e
darkwaltz, that means there is a missing } somewhere in the code
no its not, conditionals with only one thing to do, dont require braces ;)

also, i revised the donation queue, it no longer has that nasty reset button, and now displays names, and is generally nicer ;) and i revised the installation page, and moved it into moderate.php, so that the 'ur not an admin!' thing doesnt bother ppl--

mr e 02-24-2003 01:24 AM

if it says there's an error past the last line of your code then in my experiance it's a missing }

Darkwaltz4 02-24-2003 01:31 AM

number 1, that is how it appears in the original files by bitsys
number 2, i said change the "0" to "#" which is your 'combination type id'

so, just change that number, there is nothing to change beyond that

Davey 02-24-2003 01:40 AM

Just one little thing, it seems to add the Points and RPG Name fields twice in the admin edit users section...

Dave.

Bitsys 02-24-2003 01:43 AM

Quote:

Originally posted by v0id
Bitsys, how safe is the battle hack for a public board?
It is relatively safe. I would wait for the final version so that I can stamp out all of the bugs.

Quote:

Originally posted by Moreliator
Bitsy,
Then would it be possible to add a function that causes a user's character to lose lets say 5 levels if they switch their character?

Thanks again bitsy, you've outdone youself!

It is possible, but not very feasible.

Quote:

Originally posted by chrisz
EDIT: Is there anyway to have twin battles like 2 vs 2?
Say there is one team and they do whaever they do normally but the can pick who to attack and they cant attack until they are both ready. Then the other team goes and so on and so forth.

That would involve re-working a lot of the battle system. I don't think it is feasible.

Quote:

Originally posted by Darkwaltz4
but there are 2 weird things going on with it: even the original file says this error, and it says the error is on the line AFTER ALL THE OTHER LINES (past ?> ) so...-_- ill gotta hunt that out...
Make sure there aren't any spaces after the ?> .

Quote:

Originally posted by mli
Ok, I installed this hack and I have two major problems:

1. The RPG ControlPanel does not work correctly. There are no statistics. Everything is blank. It's like it doesn't actually read the user's stats. It can't find them or something....

That's one of the bugs that will be fixed in the next version. This bug also occurs in the Member Profile Add-on. Both will be fixed in the next version.

Quote:

Originally posted by mli
2. The healing center does not work for some people including me. It says +5% HP $11 and I choose that. Then I click Heal me. And it doesn't do anything...
What are your battle options set to, which monetary system are you using (itemshop or Lesane's), what is your HP/MA, and how much money do you have in the bank/pocket/store?


Quote:

Originally posted by Moreliator
Bitsy, it appears I MAY have found a glitch, too.

It goes back to that problem I had where sometimes when you go to the RPG Cetner (rpgcp.php) it doesn't recognize you, and it just has a bunch of apostrophes "S's" instead of the persons name.

Well I've done further testing, and it turns out that it is certain classes that make this happen. Ive installed the hack many times, sometimes with default classes, sometimes with my own, and each time something like this happens. Usually it is just a couple classes/characters. In some cases, I was able to fix the error by adding the character in the class causing trouble to the FEMALE class. When I added female counterparts to all the male classes that would not work, BINGO, it sovled many, but there are still some that do not work. It appears that all the female classes have always worked.

Anyway, ihopefully that information helps you somewhat.

That was reported earlier and will be fixed in the next version. Thanks for reporting it :)

Quote:

Originally posted by Davey
Just one little thing, it seems to add the Points and RPG Name fields twice in the admin edit users section...

Dave.

Could you explain a little more?

chrisz 02-24-2003 05:34 AM

Thnx DW4 One more thing how did you do the Your a $rpgtype. blan bla bla?
Its really neat thnx again.
And as for the summons... IM GOING CRAZY!!! *Calms Down sips coke* :D

VeoMorphine 02-24-2003 10:15 AM

Quote:

Originally posted by Moreliator
Bitsy, it appears I MAY have found a glitch, too.

It goes back to that problem I had where sometimes when you go to the RPG Cetner (rpgcp.php) it doesn't recognize you, and it just has a bunch of apostrophes "S's" instead of the persons name.

Well I've done further testing, and it turns out that it is certain classes that make this happen. Ive installed the hack many times, sometimes with default classes, sometimes with my own, and each time something like this happens. Usually it is just a couple classes/characters. In some cases, I was able to fix the error by adding the character in the class causing trouble to the FEMALE class. When I added female counterparts to all the male classes that would not work, BINGO, it sovled many, but there are still some that do not work. It appears that all the female classes have always worked.

Anyway, ihopefully that information helps you somewhat.

Im having the same EXACT problem. I have it all on local host right now though so i cant show you the board.

If for some reasen you cant manage to see that problem i'll send you my vbb files and DB with an admin user and pass.

But like bitsys said it'll be fixed in the next version. Any ETA on the next version? B/c this class bug is a bug that makes the RPG system almost unusable. If you can do you think you can give us a temp fix?

Also another idea. There are some people on my board that dont like seeing the RPG hack stuff :P. Maybe in the next version can you include a option to turn off the rpg hack or just use a few diferent templates so it does not appear.

chrisz 02-24-2003 10:45 AM

Ok everything is good so far, Bitsys have you shortened that Auto update yet? and have you made the RPG memberlist?

sonic3d 02-24-2003 03:59 PM

chrisz, Bitsys said he wont be doing the rpg memberlist(i think)

l8er
sonic

geniuscrew 02-24-2003 05:25 PM

hey Bitsys

Not to rush you or anything, but do you think there will be status' such as sleep, silence etc, in future versions?

Bitsys 02-24-2003 06:09 PM

Quote:

Originally posted by VeoMorphine
Any ETA on the next version? B/c this class bug is a bug that makes the RPG system almost unusable. If you can do you think you can give us a temp fix?
No ETA yet. Can't give you a temp fix until I am sure that it actually fixes the problem.

Quote:

Originally posted by chrisz
Ok everything is good so far, Bitsys have you shortened that Auto update yet? and have you made the RPG memberlist?
Haven't shortened it yet. I fix bugs before I work on add-ons. I have no plans to make the memberlist at this time.

Quote:

Originally posted by geniuscrew
hey Bitsys

Not to rush you or anything, but do you think there will be status' such as sleep, silence etc, in future versions?

Nope. The way I have planned out status modifiers would take too long to code and debug.

Dribbles 02-24-2003 06:11 PM

keep up the great work :)

Darkwaltz4 02-24-2003 07:40 PM

Quote:

Originally posted by chrisz
Thnx DW4 One more thing how did you do the Your a $rpgtype. blan bla bla?
Its really neat thnx again.
And as for the summons... IM GOING CRAZY!!! *Calms Down sips coke* :D

okay, these are the little things ive added--some were a tad static, like this one...(it was done all the way @v .56)

first, figure out what the typeids are for whatever type u wanna display...

then run if loops at the end of itemshop.php, sorta like
PHP Code:

if($bbuserinfo[rpgtype] == 1) {
$curtype "Fighter";
} elseif(
$bbuserinfo[rpgtype] == 2) {
$curtype "Magician";
} elseif(
$bbuserinfo[rpgtype] == 3) {
$curtype "Loner";
} elseif(
$bbuserinfo[rpgtype] == 4) {
$curtype "Special";
} else {
$curtype "Person without a";


Then, for display on which ur on...

PHP Code:

if($itemtype == 1) {
$distype "Fighter";
} elseif ....... 

then in the template 'itemshop'
add wherever you want, however you want:
You are Currently a $curtype Type
(if ur missing a type, or are not registered, itll say 'You are Currently a Person without a Type' ;))

and then
'As a $distype, you have these items available for purchase'

now, this is a very rough desrciption of what i did, plus i added a bunch of other variables, which youd recognize if you were registered and looking at the itemshop



oh and bitsys, heres the actual error:

Parse error: parse error, unexpected $ in /home/virtual/site19/fst/var/www/html/forums/battlefight.php on line 529

but like i said, that line is directly after the ?>, and there are no spaces after it...
now, if i move the ?> up or down, the line changes with it...and that particular error is with my edited file ^, but like i said, it now does it with the original......and i dont know why, it just started doing that 3 days ago, twas perfect up til then

chrisz 02-24-2003 08:13 PM

Thnx DW you rock

jazza 02-24-2003 08:27 PM

yo bitsy, great job so far, i just have one problem, i cant use items....

i have baught items, but whilst in a battle it shows them, but wont let me use them...

any idea whats up ??

sonic3d 02-24-2003 08:28 PM

i get this error when i try to delete a category.

Database error in vBulletin Control Panel 2.2.9:

Invalid SQL: ALTER TABLE items_user DROP item8, DROP points8, DROP description8, DROP icon8, DROP itid8
mysql error: Can't DROP 'item8'. Check that column/key exists

mysql error number: 1091

Date: Monday 24th of February 2003 05:23:10 PM
Script: www.rpgadvance.com/admin/itemadmin.php
Referer: http://www.rpgadvance.com/admin/item...tecat&cateid=8

how do i fix this?

l8er
sonic

chrisz 02-24-2003 08:43 PM

Strange errors... I wonder why some get them and other dont??

VeoMorphine 02-24-2003 08:47 PM

dono, this release has alot of bugs though, May be better off waiting for the next one. Right now to me it seems unusable right now.

chrisz 02-24-2003 09:04 PM

Not mine all the bugs are fixed for me


All times are GMT. The time now is 09:00 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.03889 seconds
  • Memory Usage 1,925KB
  • 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
  • (7)bbcode_php_printable
  • (30)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