[DISC] RPG Stats/Battle mod and more!

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment! No new topics are allowed in this forum.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: MOD Development Forum rules

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.
User avatar
Suede
Registered User
Posts: 342
Joined: Sat Dec 14, 2002 7:40 pm

Post by Suede »

me too actually - I think its the bidnow... as it happens when I hit the submit button on the confirm screen for a bid. Bid does go through anyways btw... just this fetch_array error also happens..
Drowelf
Registered User
Posts: 393
Joined: Sat Aug 02, 2003 9:49 pm
Location: USA
Contact:

Post by Drowelf »

Nuladion wrote:
Suede wrote:Moogie, I think I speak for everyone when I say


I have nothing but love for you :)


Moogie, we love ya! Image

me to :D, u work so hard, but I don't got pay pal so i cant donate :( (sucks being 13 in here)
Drowelf - Bringing you AntiAdmin entertainment since 1997
prgworld.biz
Registered User
Posts: 1
Joined: Fri Sep 12, 2003 11:09 pm

Item LVL and Class

Post by prgworld.biz »

Hi..

I'm slowly working my head around all this mod stuff but I seam to have a small problem with the items LVL and CLASS not showing on some items..

Any help on this one please.

Auzze
http://www.prgworld.biz
User avatar
Suede
Registered User
Posts: 342
Joined: Sat Dec 14, 2002 7:40 pm

Post by Suede »

Hi Auzze

okay, hopefully this is probably it...
shop_iteminfo.php

Code: Select all

# 
#-----[ FIND, INLINE ]------------------------------------------ 
#

".ucfirst($row['ldesc'])."</span>

# 
#-----[ AFTER (both instances) ADD ]------------------------------------------ 
#

".$arena_info."
see where it says both instances? go back into that file and do this for both [so that all items, whether you own them or not, will show the Battle Info]

I had to do this too hehe ;)

hope that helps!
- Suede
User avatar
Moogie
Registered User
Posts: 363
Joined: Thu Aug 22, 2002 11:39 am
Location: UK
Contact:

Post by Moogie »

Not sure why the auction is giving those header errors to some people, looks like a problem with your MySQL version or something...

Anyhoo, just found a slight problem with the script, easy to fix tho :)

It seems not to like Auctions with a ' in the title, and gives an error when it tries to send out the automated messages about these auctions.

So, in shop_auctions.php

FIND:

Code: Select all

//if the auction is over and has a winner, send a message to the winning bidder
BEFORE, ADD:

Code: Select all

$fixedtitle = str_replace("'", "\'", $row['title']);
FIND:

Code: Select all

//SEND MSG TO SELLER TO NOTIFY PAID AUCTION
BEFORE, ADD:

Code: Select all

$fixedtitle = str_replace("'", "\'", $row['title']);
FIND (all instances):

Code: Select all

(".$row[title].")
REPLACE WITH:

Code: Select all

(".$fixedtitle.")

That oughta do it ;)
Moogie
User avatar
Suede
Registered User
Posts: 342
Joined: Sat Dec 14, 2002 7:40 pm

Post by Suede »

I would think its something in here - though cannot see what offhand hehe :)

Code: Select all

//--------------------BID NOW--------------------------//
if ($action == 'bidnow') {

$sql = "SELECT * FROM phpbb_shopauctions WHERE id=$auctionid";
if( !($result = $db->sql_query($sql)) )
{message_die(GENERAL_ERROR, 'Could not query auction info', '', __LINE__, __FILE__, $sql);}
$row = $db->sql_fetchrow($result);

$numrows = mysql_num_rows($result);
if ($numrows == 0) {message_die(GENERAL_MESSAGE,"No such auction exists!");}
like I said though - honking error or not, its not a showstopper as bid goes through [error is atop the confirmation screen for bid being made...]
Earthk
Registered User
Posts: 19
Joined: Wed Aug 13, 2003 7:21 am

Post by Earthk »

Does this mod works with zarath's new shop mod version 2.60?
Drowelf
Registered User
Posts: 393
Joined: Sat Aug 02, 2003 9:49 pm
Location: USA
Contact:

Post by Drowelf »

with some modifications it does

if someone can find em, i'd put them in a TXT doc
Drowelf - Bringing you AntiAdmin entertainment since 1997
niksa
Registered User
Posts: 612
Joined: Mon Sep 08, 2003 7:20 pm
Location: Future birthplace of James T. Kirk
Contact:

Post by niksa »

Just wanted to say I was happily using php nuke's integrated phpbb forum when lo and behold, I stumble across a forum with some type of RPG forum system. Well, I just had to check that out, so I played with it, checked out the code a bit, read some posts about it, and decided it was just too cool. So to make a long story short, I am dumping a month's worth of mods on an established nuke forum and am currently porting all my users to phpbb so we can use Moogie's RPG mods (among a few others that can't/won't be ported to nuke). :D

(If anyone is curious, each mod made for phpbb has to be individually ported over to nuke's phpbb, so the time of remaking and porting users was less than porting all the cool mods, so easy choice, not a big loss.)

ANYWAY... thanks for the great stuff Moogie! :D I am very impressed at your skill... you say you're not really a coder, but this is really good work!

Can't wait to get it running on my own site. (Waiting on modifications for shop 2.6 stuff, etc, cuz I didn't realize we needed shop 1.x to use it first.. d'oh :oops: )

Oh yeah, if people tick you off or something, just remember that most people don't post thanks because they figure you hear it all the time.. but everyone who has a gripe posts of course.. so think of all the loving lurkers. ;)
User avatar
Suede
Registered User
Posts: 342
Joined: Sat Dec 14, 2002 7:40 pm

Post by Suede »

OK - Narc0sis sent me these fixes for 2.6.0 that he made and was holding off on posting them here as he was deferring to Moogie to have the optiion to upgrade the Battle mod if she was up to doing so. She doesn't use the new shop, so wont be updating - and well, I was just sitting on these, so with Narc0sis's blessing [I hope!] these are the changes to date that were sent to me. I havent installed myself yet [as was hoping for the fixes to be documented first hehe] but in an effort to get the ball rolling here we go :)

Thank you Narc0sis! :)
Narc0sis wrote: i noticed you mentioned something about a patch for the new shop. Ive got the battle mod working with the new shop on my board. I thought id send you the edits ive come up with so far. Ive got it all fixed for 2.6.0 of the item shop mod except for the admin_shop.php file. The admin_shop.php file in 1.2.0 and 2.6.0 are way different so i just use the old one that i had edited. Ive already sent all these to moogie to help her out, just havent posted them all because i figure moogie will want to post them all at once whenever the admin part is fixed as well.

-usable items

Code: Select all

# 
#-----[ OPEN ]------------------------------------------ 
# 

shop.php 

# 
#-----[ FIND ]------------------------------------------ 
# 
else { $itemfilext = 'gif'; } 

# 
#-----[ AFTER, ADD ]------------------------------------------ 
# 

$itemlinkstart = ""; 
$itemlinkend = ""; 
$itemlinktxt = ""; 
if (file_exists($itemarray[$xe].".php") && $userdata[username] == $searchname) { $itemlinkstart = "<a href=\"".$itemarray[$xe].".php\">"; $itemlinkend = "</a>"; $itemlinktxt = "Click here to use... ";} 

# 
#-----[ FIND ]------------------------------------------ 
# 

$playeritems .= '<tr><td class="row2"><span class="gensmall"><img src="shop/images/'.$itemarray[$xe].'.'.$itemfilext.'" title="'.$itemarray[$xe].'" alt="'.$itemarray[$xe].'"></span></td><td class="row2"><span class="gensmall">'.ucwords($itemarray[$xe]).'</span></td><td class="row2"><span class="gensmall">'.$descrow['ldesc'].'</td>'; 

# 
#-----[ REPLACE WITH ]------------------------------------------ 
# 

$playeritems .= '<tr><td class="row2"><span class="gensmall">'.$itemlinkstart.'<img src="shop/images/'.$itemarray[$xe].'.'.$itemfilext.'" title="'.$itemlinktxt.$itemarray[$xe].'" alt="'.$itemlinktxt.$itemarray[$xe].'" border="0">'.$itemlinkend.'</span></td><td class="row2"><span class="gensmall">'.ucwords($itemarray[$xe]).'</span></td><td class="row2"><span class="gensmall">'.$descrow['ldesc'].'</td>'; 
-battle and stats mod
There isnt an shop_iteminfo.php with the new shop so do these edits to shop_inventory.php instead

Code: Select all


#-----[ OPEN ]------------------------------------------ 
#

shop_inventory.php

# 
#-----[ FIND ]------------------------------------------ 
#

	//make sure item exists & shop is not a special/admin shop
	$sql = "select * from phpbb_shopitems where id='{$_REQUEST['item']}' order by id";
	if ( !($result = $db->sql_query($sql)) ) { message_die(GENERAL_MESSAGE, 'Fatal Error: '.mysql_error()); }
	$row = mysql_fetch_array($result);
	if (mysql_num_rows($result) < 1) { message_die(GENERAL_MESSAGE, 'No such item exists!'); }

# 
#-----[ AFTER, ADD ]------------------------------------------ 
#

//SET ARENA INFO
$arena_info = '';

	$classarray = str_replace("Þ", "", $row['class']);
	$classarray = explode('ß',$classarray);
	$classcount = count ($classarray);
	$classlist = '';
     	for ($xc = 0; $xc < $classcount; $xc++)
	{
		if ($classarray[$xc] != NULL) { $classlist .= $classarray[$xc]; if ($xc < ($classcount - 1)) { $classlist .= ", "; }}
	}

$arena_mp = ($row['mp_cost'] != '0') ? '    <b>MP Cost:</b> '.$row['mp_cost'] : '';
$arena_level = ceil($row['battle_effect']/3);
$arena_info = ($row['battle_effect'] != '0') ? '<span CLASS="gensmall"><BR><b>Level:</b> '.$arena_level.$arena_mp.'<BR><B>Class:</B> '.$classlist.'</span>' : ''; 


# 
#-----[ FIND ]------------------------------------------ 
#

class="gensmall">'.ucfirst($row['ldesc']).'</span>

# 
#-----[ AFTER, ADD (Add it in the line directly after </span>  
#

'.$arena_info.'

# 
#-----[ Apply that last step twice. There are two instances of it.  
#
This is basically using the directions from before, just sticking them in the right place in the new shop mod. You'll also notice that ".$arena_info." has to be '.$arena_info.' now. I cant figure out how to edit admin_shop.php to work with the new item shop mod but the forum part works just fine


-adding preview to the give action (just like shop_give.php had)

Code: Select all

#-----[ OPEN ]------------------------------------------ 
# 

shop_actions.php 

# 
#-----[ FIND ]------------------------------------------ 
# 

Your items:</b></span></td><td class="row1"><select name="itemname">'.$user_items.'</select></td>

# 
#-----[ REPLACE WITH ]------------------------------------------ 
# 

Your items:</b></span></td><td class="row1"><select name="itemname" onChange="showitem(this);" align="absmiddle">'.$user_items.'</select> <img src="shop/blank.gif" name="itemview" onError="document.images[\'itemview\'].src=\'shop/images/\'+itemname.options[itemname.selectedIndex].value+\'.jpg\';"></td>

#-----[ OPEN ]------------------------------------------ 
# 

shop_body.tpl

# 
#-----[ ADD ABOVE THE FIRST LINE  
#

<SCRIPT LANGUAGE="JavaScript">
<!-- 
function showitem(itemlist) 
{ 
var itemname = itemlist.options[itemlist.selectedIndex].value; 
document.images['itemview'].src = 'shop/images/'+itemname+'.gif';
}
//--> 
</SCRIPT> 
You can do a similar edit for the trade part as well


if these are a go - then we still need the admin area for the shop... but this may be a large chunk of the changes needed to be made. Narc0sis you rock :) thanks again!
User avatar
Synbios
Registered User
Posts: 15
Joined: Sat Sep 13, 2003 9:00 pm
Contact:

Post by Synbios »

Hi Moogie and all,

I want to install this RPG battle mod in my forums, but I need the older version of Item Shop Mod right? I can't seem to find it anywhere, I only find 2.6.0 and I've heard it won't work with Moogie's awesome mod.

Can anyone send me a link?

Thanks.
User avatar
Suede
Registered User
Posts: 342
Joined: Sat Dec 14, 2002 7:40 pm

Re: ok

Post by Suede »

garofwar wrote: I download the AUCTION mod..
did a test run so when i bid i get this on the top off the page

Code: Select all

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/rpgwo/public_html/db/mysql4.php on line 214

Warning: Cannot modify header information - headers already sent by (output started at /home/rpgwo/public_html/db/mysql4.php:214) in /home/rpgwo/public_html/includes/page_header.php on line 485

Warning: Cannot modify header information - headers already sent by (output started at /home/rpgwo/public_html/db/mysql4.php:214) in /home/rpgwo/public_html/includes/page_header.php on line 487

Warning: Cannot modify header information - headers already sent by (output started at /home/rpgwo/public_html/db/mysql4.php:214) in /home/rpgwo/public_html/includes/page_header.php on line 488


Im getting this too - can anyone help? Im using phpbb 2.0.3... my php is PHP Version 4.3.0 - I even swapped out mysql.php with the 2.0.4 one but that didnt help hehe ;-p

I want this mod bad, lol - so if you can, gimme a hand if you have any ideas. Thanks!
User avatar
malitic
Registered User
Posts: 168
Joined: Fri Jul 18, 2003 4:05 pm

Post by malitic »

Here is the boxes and such part to inpute into the admin shop, i havent done the sql though

Code: Select all

#
#-----[ FIND (INLINE) ]------------------------------------------
#

<tr><td class=\"row2\"><span class=\"gensmall\">Max Stock</span></td><td class=\"row2\"><span class=\"gensmall\"><input type=\"text\" name=\"maxstock\" size=\"32\" maxlength=\"3\"></span></td></tr>

#
#-----[ AFTER (INLINE) ADD ]------------------------------------------
#

<tr><td colspan=\"2\" class=\"row1\"><span class=\"genmed\"><center><b>Item's RPG Battle System Information</b></center></span></td></tr><tr><td class=\"row2\"><span class=\"gensmall\">Item Type<BR>See Arena Ticket instructions for full details.</span></td><td class=\"row2\">".$itemtype_list."</td></tr><tr><td class=\"row2\"><span class=\"gensmall\">Classes<BR>Classes that can use this item, multiple selections allowed.<BR>Selecting 'ALL' allows all classes to use this item, no need to select any other classes if you use this.<BR>Leave as n/a if this item isn't usable in battle.</span></td><td class=\"row2\">".$class_list."<BR><span class=\"gensmall\">(Hold CTRL for multiple selections)</span></td></tr><tr><td class=\"row2\"><span class=\"gensmall\">Battle Effect<BR>This number is used in different ways depending on the item type (see documentation). Users can use items with a battle effect of up to 3 times their level, eg at level 1 items up to 3 can be used, at level 3 items up to 9 etc.</span></td><td class=\"row2\"><input name=\"battle_effect\" type=\"text\" size=\"32\" maxlength=\"3\" value=\"0\"></td></tr><tr><td class=\"row2\"><span class=\"gensmall\">MP Cost<BR>Magic Points cost for using this item in battle. Only applies to certain types, see documentation.</span></td><td class=\"row2\"><input name=\"mpcost\" type=\"text\" size=\"32\" maxlength=\"3\" value=\"0\"></td></tr>
should be

Code: Select all


#
#-----[ FIND (INLINE) ]------------------------------------------
#

<tr><td class="row2"><span class="gensmall">Max Stock</span></td><td class="row2"><input type="text" class="post" name="maxstock" size="32" maxlength="3"></td></tr>

#
#-----[ AFTER (INLINE) ADD ]------------------------------------------
#

<tr><td class="row2"><span class="gensmall">Item Type<BR>See Arena Ticket instructions for full details.</span></td><td class="row2">'.$itemtype_list.'</td></tr>
<tr><td class="row2"><span class="gensmall">Classes<BR>Classes that can use this item, multiple selections allowed.</span></td><td class="row2">'.$class_list.'</td></tr>
<tr><td class="row2"><span class="gensmall">Battle Effect<BR>This number is used in different ways depending on the item type (see documentation). Users can use items with a battle effect of up to 3 times their level, eg at level 1 items up to 3 can be used, at level 3 items up to 9 etc.</span></td><td class="row2"><input name="battle_effect" type="text" size="32" maxlength="3" value="0"></td></tr>
<tr><td class="row2"><span class="gensmall">MP Cost<BR>Magic Points cost for using this item in battle. Only applies to certain types, see documentation.</span></td><td class="row2"><input name="mpcost" type="text" size="32" maxlength="3" value="0"></td></tr> 
You have been reading this thread for Image Minutes and Image Image
pokemaster
Registered User
Posts: 361
Joined: Fri Aug 22, 2003 8:10 am
Location: UK

Post by pokemaster »

please help i have ran the install file and it says this...

Code: Select all

ALTER TABLE pokem_shopitems ADD battle_effect tinyint(3) unsigned NOT NULL default '0' 
+++ Error: Table 'pokevall_site3.pokem_shopitems' doesn't exist 

ALTER TABLE pokem_shopitems ADD mp_cost tinyint(3) unsigned NOT NULL default '0' 
+++ Error: Table 'pokevall_site3.pokem_shopitems' doesn't exist 

ALTER TABLE pokem_shopitems ADD type varchar(32) NOT NULL default '' 
+++ Error: Table 'pokevall_site3.pokem_shopitems' doesn't exist 

ALTER TABLE pokem_shopitems ADD class text NOT NULL default '' 
+++ Error: Table 'pokevall_site3.pokem_shopitems' doesn't exist 

i think i need the item mod's tables does anyone know where i can download the item mod!

also i do have the shop mod on my board but i need the tables can anyone tell me how to get them?

i can install them

thanx

pokemaster
User avatar
Synbios
Registered User
Posts: 15
Joined: Sat Sep 13, 2003 9:00 pm
Contact:

Post by Synbios »

Hi Moogie and all,

I want to install this RPG battle mod in my forums, but I need the older version of Item Shop Mod right? I can't seem to find it anywhere, I only find 2.6.0 and I've heard it won't work with Moogie's awesome mod.

Can anyone send me a link?

Thanks.
Locked

Return to “[2.0.x] MODs in Development”