vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   RPG Integration Hack (https://vborg.vbsupport.ru/forumdisplay.php?f=102)
-   -   RPG Integration Hack - Old Support Thread (https://vborg.vbsupport.ru/showthread.php?t=73868)

Revan 08-18-2004 01:09 PM

Quote:

Originally Posted by deathemperor
I tested and found two errors:


1st is database error:
you said that you cant make the posting results, so I wonder what is this for

Code:

".TABLE_PREFIX."rpg_battle_options.postresults,".TABLE_PREFIX."rpg_battle_options.battleforum,
it should be removed or when opening rpg.php it will show db error.
one more thing with this script

Code:

LEFT JOIN ".TABLE_PREFIX."user ON ".TABLE_PREFIX."user.userid=$userid
it doesn't understand $userid, if I replace it with 1, it's fine of course, I think the solution is replace $userid with $bbuserinfo['userid'], didn't test yet

This is bogus, because there has been a vital change in the way rpg.php and rpgcp.php acts.

rpg.php is to display the stats of an user, using the arg "?userid=".
rpgcp.php is to display the user browsing the file ONLY.
Why?
Because even if you were not the same user as the user you viewed rpgcp.php for, you would get the "sell" link if he owned an item.
This would either cause you to sell your own item, or create DB errors.

But I have made some small fixes to avoid this sorta thing happening again, I will update the zip.

Quote:

Originally Posted by deathemperor
and:

when I came to clans.php, it show a blank page, came to clans.php?action=view it show a database error ( cant remember, I'm away from my PC).l

This is also bogus, because clans.php is to view a specific clan with the arg "?clanid=".
I have made a similar fix as the above file to prevent this from happening again

Quote:

Originally Posted by deathemperor
and the templates as far as I've seen they weren't well-made, this could be easy changed. The manner things should be verify is the code since I'm not sure what to do when errors occurs.

Please continue to report these holes in the code because I consider them to be
a) annoying
2) spamming the admins email
d) all of the above

And I didnt make the templates, I simply took out the obvious "non-XHTML" stuff in them, and put them in an XML file.
If you know anyone/want to help me with the templates (as requested in the first post), do let me know :)


Quote:

Originally Posted by deathemperor
The spells, apart from causing HP/MP, is it possible to causes status ?

No, not yet.

Quote:

Originally Posted by deathemperor
I think you should have made it a beta testing board, problems occurs this way it's hard for you to verify --> fix all

You sayin I should create a beta board?
I already do have one, on my localhost and I have this live on my 3.0.3 (currently down btw :p ), and no errors was found during my test runs.

*zip updated*

deathemperor 08-18-2004 02:26 PM

Quote:

This is bogus, because there has been a vital change in the way rpg.php and rpgcp.php acts.

rpg.php is to display the stats of an user, using the arg "?userid=".
rpgcp.php is to display the user browsing the file ONLY.
I know this, but it doesn't work, that's the case

Revan 08-18-2004 02:34 PM

the rpg.php, it works with the arg ?userid=1
(example)
why I am sure? Because:
a) in the code it says "$userid = $_GET['userid']"
b) it works on all my test runs

and I KNOW the rpgcp.php works because theres no $userid in that code :p
:)

deathemperor 08-18-2004 02:38 PM

I know, I didn't say rpgcp.php has something wrong, just rpg.php

how about letting me make the template ? I know HDJ I think I can make it at least look like the old vb2 RPG hack.

Revan 08-18-2004 02:46 PM

What template do you mean?
If you mean the rpg.php's template then no because I spent ages on tweaking that file and its template to make it contain all the info the rpgcp.php contains (since I blocked people from viewing the rpgcp of anyone but themselves)

SB2002 08-18-2004 06:03 PM

Ok, i'm having a bit of a problem, only a small one tho, all the rpg names are displaying as the users location as opposed to users name, is there something I am missing here? I've been through the thread 4 times now and can't find anyone else with this problem..... anyone?

EDIT:

I can change the name through the admincp and it sticks, but the when the user edits it is does not change, i have tested this several times now and it keeps doing the same thing. WHen they first create it it takes on their location as their name, and then when you try to edit it after it has been changed through the user edit users function in the rpg section of the admin cp it stays with what the admin set it as, any ideas?

EDIT 2:

Nevermind, i know Read the f**king manual.......

And yes, I actually am an IT technician, we NEVER read the manual, lol

Deimos 08-18-2004 07:55 PM

I to can't get the battles to work
I request a battle, I get a PM, so does the other person, when he clicks to approve/confirm it, it says invalid password/battle
But the page before DOES have the correct battle/password in the URL.

Dark Dragon 08-18-2004 07:58 PM

Quote:

Originally Posted by Deimos
I to can't get the battles to work
I request a battle, I get a PM, so does the other person, when he clicks to approve/confirm it, it says invalid password/battle
But the page before DOES have the correct battle/password in the URL.

Same problem here, I thought it was just me though.

Deimos 08-18-2004 08:15 PM

The fix you posted above didn't work for me
When I went to run the sql query..

ALTER TABLE `user` ADD `rpgstats` CHAR(1) NOT NULL DEFAULT '1' AFTER `limitlevel`;

It came up with..

An error occurred while attempting to execute your query. The following information was returned.
error number: 1054
error desc: Unknown column 'limitlevel' in 'user'

And if I now try and save the updated profile/update RPG info page, it says.

Database error in vBulletin 3.0.3:

Invalid SQL: UPDATE user SET element='2', rpgrace='3', alignment='3', rpggender='2', rpgclass='32', rpgtype='0', limitlevel='', rpgstats='0' WHERE userid='1686'
mysql error: Unknown column 'limitlevel' in 'field list'

***************

Edit
I just removed that fix and put the profile.php changes back that were listed in the zip file and it doesn't do it anymore
But I don't then get the option in usercp to choose wether to display stats or not, which is a shame, but I still can't use the battle system :(

SB2002 08-18-2004 08:16 PM

Quote:

Originally Posted by Dark Dragon
Same problem here, I thought it was just me though.


I'm gettin the same here too

Link14716 08-18-2004 09:41 PM

Out of curiosity, how is this integrated with uCash?

str8ballin 08-18-2004 10:00 PM

does ushop have to be installed to use the rpg shop and lottery? or does it run as a standalone all in one rpg hack?

Deimos 08-18-2004 10:08 PM

(Is a newb) but doesn't it reference the uttpoints field to calculate how many gold coins (gil) a person should have?
The most you post etc, the more gil/gold you get

deathemperor 08-19-2004 04:02 AM

Quote:

Originally Posted by SB2002
And yes, I actually am an IT technician, we NEVER read the manual, lol

don't let this thing makes you weak IT teck.

@Link: This RPG system uses the UCS point system, I cannot run as a standalone hack, hence users must install UCS first.


@Revan: I mean all the templates that you want it to be re-made. The RPG.php template messes, the table is nice but you didn't make it perfectly (what is that table sitting on the top for ? why not middle or more thing bigger ?)

I suggest you should change rpg.php to this:
find:
PHP Code:

if (empty($userid))
{
    eval(
standard_error('You did not select an user to view RPG stats for!'));


replace it with:
PHP Code:

if (empty($userid))
{
    
$_GET['userid']=$bbuserinfo['userid'];


why this ?
Because when you come to rpg.php by entering to the url --> no userid --> it should show yourself. other ways the users come to this must be linked from a profile or something like so. one more thing with this:
find
PHP Code:

} else {
    echo 
"You must be logged in.";


replace it with:

PHP Code:

} else {
    
print_no_permission();



well I'll test the battle late today. everyone, just wait.

Revan 08-19-2004 12:58 PM

For the users with the "Invalid battle or password" errors, the fix is here. :)
I tried this file and there SHOULD not be any errors in that.

And about the AFTER `limitlevel`, just scrap that.
Its for my own Level Based Limit Break mod I done for my own forums. Run the query without the AFTER part. (or redownload the TXT file if you dont know what I mean ;) )
And about that SQL error where it says unkown field, I believe I already fixed that.
Download the new zip and redo the profile.php edits. :)


Quote:

Originally Posted by Deimos
(Is a newb) but doesn't it reference the uttpoints field to calculate how many gold coins (gil) a person should have?
The most you post etc, the more gil/gold you get

Yeah thats right :)
Whatever happens to your uCS money also affects your balance in the RPG, and vice versa :)


And death, I implemented your changes and I will send this out as a new build if everyone reports the battles confirming fine :)
EDIT: If you installed the "User select RPG Postbit" mod, you will see a link where it says "View Extended RPG Stats", with a link to rpg.php?userid=$
Thats why I put that error, I forgot that some might not have that installed ;)
Thanks :)

Deimos 08-19-2004 01:07 PM

battles seem to work aok, but....how does one equip an item?
I've got a sword, gloves and a potion, yet the system says I don't have a sword or potion during battle so I have to use my fists?

Revan 08-19-2004 01:11 PM

This could be due to several reasons:
a) You did not update the Item Type in the ACP (I think default is Non-battle Items, hence no usage in battle)
b) It is on the right type but you have to update it anyways :p
c) an error.

Please attempt a) and b), then post back if it still does not work, its then a bug. :)

Deimos 08-19-2004 01:21 PM

Will do Revan, awesome hack btw.

Quick question, you know the optional rpg display in the post bit? i ran through the instructions again and I still get the mysql levellimit error when I try to save changes
Or am I missing something? hehe

Revan 08-19-2004 01:24 PM

Damn sorry I overlooked it. :(
There took it out. Now it better goddam well be free of errors. :p

Sorry for the hassle


BTW I forgot to say in the prev post that items auto-equip ;)

Deimos 08-19-2004 01:26 PM

I removed the limitlevel from profile.php and it works ok now
Sorry about that.

Deimos 08-19-2004 01:28 PM

No problemo, you've done a great job

Btw, regarding the itemtype thing, I went into the ACP area and went to Edit Item types and they're all under "Generic"
I went to the Edit Items and manually set each one to weapons, armor or accessories
oh wait, nm i see where i have to change something :P

Revan 08-19-2004 01:31 PM

Yeah dam I didnt mean Item Type I meant alter the Category and then choose Battle Type :p

Deimos 08-19-2004 01:32 PM

Heh, no problem
Gonna go test it now

Deimos 08-19-2004 01:38 PM

Seems to be working aok, cept ......
I've got a bloodsword, I struck at someone and did 4 damage, he has no armour or weapons
The same guy punches me and does 5 hit points, lol
I'm guessing it's tied to the race, class or stats?

deathemperor 08-19-2004 01:42 PM

hope the battle.php fix works since I got that problem too.

an uncached template has been found in battle.php, you should install Erwin hack for Micro status and fix it, I forgot the template name since again I'm away from my PC.

the navigation system seems to be hard for users to surfing, you should remake it, and the items you should let users by many items to their inventory (can be limited in ACP) so that they can buy many items and equip any they like and even they can gift.

Revan 08-19-2004 01:44 PM

Quote:

Originally Posted by Deimos
Seems to be working aok, cept ......
I've got a bloodsword, I struck at someone and did 4 damage, he has no armour or weapons
The same guy punches me and does 5 hit points, lol
I'm guessing it's tied to the race, class or stats?

And the Buff of the weapon ;)
Buff = The amount of Attack being added to the regular attack (RegAtk = race + class' Atk)
Whereas fists does damage calculated based on the level of the dude you punch.

Can anyone else confirm the battle/everything else working correctly?
I wanna bring this out as build2, but only if its error free :)

Deimos 08-19-2004 01:59 PM

Good job man, it's a great hack
Do we have to manually add spells?

Revan 08-19-2004 02:12 PM

Yes, you have to manually add and choose the type of spell (heal/attack) :)
Jus remember to create the category and set correct battle type ;)


@death: Remake the navigation sys? I dont understand what you mean. With the navbars its as easy as its gonna get.
You can create as many categories as you want users to be able to equip items.
Working on the cached templates now.


Well if battles are working after Im done with this I will release build2 :)

DeMiNe0 08-19-2004 02:19 PM

This is a great hack. From what i understand from the first post, this is a conversion of bitsys's RPG integration hack with alot of code cleanup and a few more features?
If so, then I would love to help you out with this project. Under my old name; VeoMorphine, i helped bitsys out alot with the old hack, and i even made the rpgcp.

Its a shame that i wont have the time in the next few days to install this hack, but once i do get the time, i will start looking over your code and shooting ideas at ya.

Good job and keep up the great work. I'll keep you informed if i run into any problems.

Revan 08-19-2004 02:33 PM

Great this sounds cool :D
After all Im adding more new ++++ to it and between that, these errors and school (translation: mom being a beeatch :p ) theres not much time left. ;)
Do ya have MSN? Easier to chat there and specially about new stuff that I wanna surprise people with ;)


On a side note, I cleaned up the battle.php and everything, so I release build2 now.
This is a cumulative fix with all the errors reported fixed, and seems to be error free.
:)

Deimos 08-19-2004 02:36 PM

I don't see the zip :P
hehe

---

Got it
Is there anything new I should change since our last communication?

Revan 08-19-2004 02:51 PM

the rpg.php, battle.php and battlefight.php are updated in build2. :)


Since all the errors reported so far is fixed, I probs wont be releasing a new build unless theres new features added or new critical errors fixed.
This means that people might mod the files themselves for addons for their own board, and a reupload of files would then mean extra hassle.
Hence I will start creating a changelog that includes patches (as long as not too much or an unknown piece of coding are changed) for the files to fix the errors. This will be sent out with the "Send Update" for this hack ONLY, so if you dont click the install button, you'll hav tae monitor the thread and just overwrite the files ;)

During the weekend I will start the conversion of the Monster Arena. :)

Deimos 08-19-2004 04:08 PM

Slight problem...I think
If somoene's doing a battle and it's at "Determining" in the status box, when you click "view" it says invalid battle or password.
Or can't you view it until it starts?

Revan 08-19-2004 04:24 PM

That is correct. If theres no battle to view, you cannot view it ;)
Note that it IS an error if this happens to one of the 2 users that actually wants to start a battle, is this the case?
Or is it a 3rd party trying to view?

I will code a small patch that gives a more descriptive error later :)

Deimos 08-19-2004 05:07 PM

3rd party
I had a feeling it was that, so np :)

GamerzWorld 08-19-2004 05:37 PM

Any example forums i can look at ?

Deimos 08-19-2004 05:40 PM

I've got it installed
http://www.uoforums.com/forums/index.php?

Deimos 08-19-2004 05:59 PM

Next question...

When someone dies, it says they have to goto the healing centre
Well, i'm in there on a dead character and there's nothing in here to do?
IT says my hit points are full (0/0), so is my MA (0/0)

The Heal me button doesn't do anything, just refreshes the screen......

------

Also, when trying to cancel a battle when it's waiting for a response from the challenged party, it comes up with a sql error saying the battle table doesn't exist.

SB2002 08-19-2004 06:37 PM

I've just encountered an sql error in the clancp admin. I changed some details of my clan, and then tried to save and got the following:

Invalid SQL: UPDATE rpg_clan SET
title='Empire Of The Fist',
pass='******',
logo='',
ally='5',
enemy='0',
sb_settings='',
col1='0',
col2='0',
col3='0',
col4='0',
sb_col_access='',
cm_col_access='0',
ci_col_access='0',
rm_col_access='0',
WHERE clanid=1
mysql error: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE clanid=1' at line 16

I've not put the password in for obvious reasons

DeMiNe0 08-19-2004 06:42 PM

Quote:

Originally Posted by Revan
Great this sounds cool :D
After all Im adding more new ++++ to it and between that, these errors and school (translation: mom being a beeatch :p ) theres not much time left. ;)
Do ya have MSN? Easier to chat there and specially about new stuff that I wanna surprise people with ;)


On a side note, I cleaned up the battle.php and everything, so I release build2 now.
This is a cumulative fix with all the errors reported fixed, and seems to be error free.
:)

Check your PMs here. I send my MSN there.
Looking foward talking to you.


All times are GMT. The time now is 08:28 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.01679 seconds
  • Memory Usage 1,852KB
  • 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
  • (2)bbcode_code_printable
  • (4)bbcode_php_printable
  • (12)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)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