[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
malitic
Registered User
Posts: 168
Joined: Fri Jul 18, 2003 4:05 pm

Post by malitic »

i dont know were you can get it officailly but i uploaded my copy herefor you
You have been reading this thread for Image Minutes and Image Image
User avatar
Synbios
Registered User
Posts: 15
Joined: Sat Sep 13, 2003 9:00 pm
Contact:

Post by Synbios »

malitic wrote: i dont know were you can get it officailly but i uploaded my copy herefor you


Thanks so much, malitic! 8)

Such a relief to have this version now, it seems to be *very* rare. I'm going to install it now and later install Moogie's RPG battle system.

You rock!

Cheers!

Synbios.
Drowelf
Registered User
Posts: 393
Joined: Sat Aug 02, 2003 9:49 pm
Location: USA
Contact:

Post by Drowelf »

malitic wrote: 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> 


u lost me wat is this for?
Suede wrote: 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!

Thanks to both of you! i gotta put this in my txt doc!
Drowelf - Bringing you AntiAdmin entertainment since 1997
User avatar
malitic
Registered User
Posts: 168
Joined: Fri Jul 18, 2003 4:05 pm

Post by malitic »

whoops thats for the admin.php it is the part that adds the new options when adding items.
You have been reading this thread for Image Minutes and Image Image
Drowelf
Registered User
Posts: 393
Joined: Sat Aug 02, 2003 9:49 pm
Location: USA
Contact:

Post by Drowelf »

so u put up the changed version for 2.6 i suppose?
Drowelf - Bringing you AntiAdmin entertainment since 1997
User avatar
malitic
Registered User
Posts: 168
Joined: Fri Jul 18, 2003 4:05 pm

Post by malitic »

yup i stopped before i got to the sql cause i had alot of work to do with my board and i dont have a test board
You have been reading this thread for Image Minutes and Image Image
Drowelf
Registered User
Posts: 393
Joined: Sat Aug 02, 2003 9:49 pm
Location: USA
Contact:

Post by Drowelf »

wouldnt the SQL functions be the same?
Drowelf - Bringing you AntiAdmin entertainment since 1997
User avatar
malitic
Registered User
Posts: 168
Joined: Fri Jul 18, 2003 4:05 pm

Post by malitic »

no in the new version of the shopmod they are coded slightly differently so after you install moogies it has an error adding it to the database
You have been reading this thread for Image Minutes and Image Image
Drako
Registered User
Posts: 70
Joined: Sun Aug 31, 2003 2:16 pm

Post by Drako »

thanks for posting the shop 2.6 tweaks.

i already have the rpg mod and shop 1.2 installed. if i follow what suede and malitic posted, will shop 2.6 work ok?

or do i have to wait for malitic to post this thing about the SQL? i really want to get shop 2.6 working asap with the rpg mod

thanks
User avatar
malitic
Registered User
Posts: 168
Joined: Fri Jul 18, 2003 4:05 pm

Post by malitic »

i wont be doing the sql i have no test board and really cant afford to spend the time removeing and reinstalling the shop
You have been reading this thread for Image Minutes and Image Image
Drako
Registered User
Posts: 70
Joined: Sun Aug 31, 2003 2:16 pm

Post by Drako »

i have a test forum, i'll try upgrading to shop 2.6 on there, add all the tweaks given on here and see what needs to be done

canyou give me a hint Malitic as to what extra needs to be done?
Drowelf
Registered User
Posts: 393
Joined: Sat Aug 02, 2003 9:49 pm
Location: USA
Contact:

Post by Drowelf »

u could always give him FTP access, then change the password after 8O
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 »

I just installed the new changes to get the shop working with the rpg mod, and I don't have any errors that I have noticed yet.

I did have some parse errors, but that's just a stray ' with no \ before it, fairly easy to spot if you use a good highlighting editor.

The problem is, aside from being able to select a class when registering, and seeing some of the class info on profiles, it seems like nothing else from the rpg mod works.

See faerun-nights.com/forums and log in as testuser/testuser to see what I mean.

I'm going to go back and check through everything again, see if I fatfingered something.
Drako
Registered User
Posts: 70
Joined: Sun Aug 31, 2003 2:16 pm

Post by Drako »

Malitic - i added your twaks to my admin_shop.php to add the rpg itemoxes, but the drop down menus do not show up. ??

i simple modififed the new admin_shop.php. have i forgotten to mod it for rpg mod too? if so, im just going to check it
Drowelf
Registered User
Posts: 393
Joined: Sat Aug 02, 2003 9:49 pm
Location: USA
Contact:

Post by Drowelf »

its probubly due to the sql problems :(
Drowelf - Bringing you AntiAdmin entertainment since 1997
Locked

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