[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 »

Duskwalker wrote: =
On another note, Ive read about a quest being 50% done, is there any way possible I may get my hands on that, that would be a very nice option, and add a lovely RPG feel to everything. But hey, I have lots to do to my forums/site to get it looking smooth and being able to run smooth with these mods, all in appearence of course.

-Dusk

there is a different version that is almost to beta
You have been reading this thread for Image Minutes and Image Image
Earthk
Registered User
Posts: 19
Joined: Wed Aug 13, 2003 7:21 am

Post by Earthk »

Duskwalker wrote: Ok, i have installed newest CashMod and ShopMod and moogies RPG mod

I have done lots of changing to try and get new shopmod compatible with rpg mod, and so far everything works EXCEPT when i go to the Arena, it will not allow me to equip any weapons....

Anyone know how to fix this, and also, is it too late for me to go back and install the correct shopmod?

EDIT: I fixed this error............

So you managed to get moogis's RGP mod to work with the new shop
mod? Can you let us know how it is done??
Drowelf
Registered User
Posts: 393
Joined: Sat Aug 02, 2003 9:49 pm
Location: USA
Contact:

Post by Drowelf »

yea wat fixes did u do?

aslo did you use these:
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!
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> 
Drowelf - Bringing you AntiAdmin entertainment since 1997
User avatar
garofwar
Registered User
Posts: 54
Joined: Tue Oct 01, 2002 1:38 pm
Contact:

Help

Post by garofwar »

Can some one help me please the dead.gif is making my Avatar go all funny it not looking right you can veiw it here http://www.rpgworld.biz/viewtopic.php?t=2
Duskwalker
Registered User
Posts: 29
Joined: Mon Dec 16, 2002 12:14 am
Contact:

Post by Duskwalker »

Drowelf, yes i used those, but i had to mess with the admin_shop.php alittle. I consider myself unexperienced, but i get lucky with php sometimes. I had to add an addtion code for the item id, because for some reason it was not in my coding.

I do not have alot of time to work on it, so i still havent installed bank, lottery, auction, slot machine, slot machine items, etc.

The only problem i have with my forums now, is the fact that after i win a battle there is a Fatal error :cry:

Edit: Lol, problem was with cash mod, ok all better

but eventually ill get that worked out.

-Dusk




EDIT: Ok, when i look at my inventory, i see my items perfect, but for the items that should be usable, i do not see a link.. any ideas? using the new shop mod
Last edited by Duskwalker on Tue Sep 16, 2003 2:33 am, edited 2 times in total.
PhantasyRPG :: Free Web Based MMORPG
GangsterRPG :: Free Gangster Game
CollegePie.com :: Entertainment Portal (Funny Videos, Pics, etc)
ForumBolt.com :: Friend's Free Phpbb Forum Host w/o ads
fateorfantasy
Registered User
Posts: 318
Joined: Tue Jul 01, 2003 6:54 pm
Location: Canada
Contact:

Re: Help

Post by fateorfantasy »

garofwar wrote: Can some one help me please the dead.gif is making my Avatar go all funny it not looking right you can veiw it here http://www.rpgworld.biz/viewtopic.php?t=2
you can change the default settings (to make it not change the size of the picture, but I have no idea how to make them overlay on top of each other exactly, someone had this problem before
Shinji Mekamori
Registered User
Posts: 9
Joined: Tue Aug 12, 2003 12:45 am

Post by Shinji Mekamori »

I have a question for Moody. Is it ok if I convert this to IBF, as I want to use it for my new Xtreme RPG mod? Of course, all copyrights and such will remain there. Thanks.
addy
Registered User
Posts: 9
Joined: Sun Sep 14, 2003 7:30 pm

Post by addy »

Duskwalker: you need to install the usuable items mod (in moogies RPG mod zip)

(edit: that bits easy.. i had it going first time i tried it)
Q-Zar
Registered User
Posts: 779
Joined: Sun Nov 17, 2002 8:30 pm
Location: Brussels
Contact:

Re: Help

Post by Q-Zar »

fateorfantasy wrote:
garofwar wrote:Can some one help me please the dead.gif is making my Avatar go all funny it not looking right you can veiw it here http://www.rpgworld.biz/viewtopic.php?t=2
you can change the default settings (to make it not change the size of the picture, but I have no idea how to make them overlay on top of each other exactly, someone had this problem before


I think the problem was with the browser you'reusing to view it, i.e. it works fine with Internet Explorer, but it's screwed up with Mozilla.

Shinji Mekamori : It's Moogie
Traductions : Cash Mod v2.2.2 (Getting Started) / Dice Mod v1.2.3 / Activity Mod Plus 1.0.8
Remember this. Please read the F.A.Q/Troubleshooting of a mod before asking questions.
Image
Narc0sis
Registered User
Posts: 662
Joined: Tue Apr 09, 2002 12:59 am
Contact:

Post by Narc0sis »

Thank you Narc0sis


no problem guys. If someone can get the edits to the 2.6.0 admin_shop.php done, the battle mod will then be pretty much updated for it. I wont attempt it cause im too lazy. But the others should work fine, at least they do on my board.
Earthk
Registered User
Posts: 19
Joined: Wed Aug 13, 2003 7:21 am

Post by Earthk »

I've finally decided to switch to the older shop version. Unfortunately all
links for the old shop files are removed. Anyone knows where to get the
file? Moogie's mod will be incomplete without the shop mod :(

---Edit---
Got it!
User avatar
garofwar
Registered User
Posts: 54
Joined: Tue Oct 01, 2002 1:38 pm
Contact:

old shop

Post by garofwar »

Silmarillion
Registered User
Posts: 56
Joined: Sat Sep 14, 2002 5:19 am
Location: DC
Contact:

Post by Silmarillion »

Not really sure where to put this, but since the "Give/Trade" mod was in the download for this mod, I thought I'd add it here.

I found that the message that displayed in the shop telling people that someone gave them something wasn't really sufficient. I wanted it to PM the person when someone Gave them something from the shop. So, I coded it in to do so and thought I would just post it here in case someone else wanted to do the same.

Now, what I did was create an account on my forum named : "Auto Board Messenger" I did this because I plan on using it for a few other things as well. It's user_id = 1

Then added this code in the shop_give.php

Code: Select all


# 
#-----[ FIND ]------------------------------------------ 
#
//send receiver message 
   $usermessage = $row['user_specmsg']; 
   $usermessage .= '<br><span class="genmed">'.$userdata['username'].' has given you a '.$itemname.'!</span>'; 

# 
#-----[ AFTER, ADD ]------------------------------------------ 
#
$user_id = $give_to_user['user_id'];
$sql = "UPDATE phpbb_users 
   		SET user_new_privmsg = '1', user_last_privmsg = '9999999999'
   				WHERE user_id = '$user_id'";
   		if ( !($result = $db->sql_query($sql)) )
           {
   		    message_die(GENERAL_ERROR, 'Could not update users table', '', __LINE__, __FILE__, $sql);
        }
        
   $gift_pm_subject = $lang['gift_pm_subject'];
           $gift_pm = $lang['gift_pm'];
           $privmsgs_date = date("U");
           $sql = "INSERT INTO phpbb_privmsgs (privmsgs_type, privmsgs_subject, privmsgs_from_userid, privmsgs_to_userid, privmsgs_date, privmsgs_enable_html, privmsgs_enable_bbcode, privmsgs_enable_smilies, privmsgs_attach_sig) VALUES ('0', '$gift_pm_subject', '1', '$user_id', '$privmsgs_date', '0', '1', '1', '0')";
           if ( !$db->sql_query($sql) )
   		{
   			message_die(GENERAL_ERROR, 'Could not insert private message sent info', '', __LINE__, __FILE__, $sql);
   		}
   
   		$privmsg_sent_id = $db->sql_nextid();
   		$privmsgs_text = $lang['gift_pm_subject'];
           //
           $sql = "INSERT INTO phpbb_privmsgs_text (privmsgs_text_id, privmsgs_text) VALUES ($privmsg_sent_id, '" . str_replace("\'", "''", addslashes(sprintf($gift_pm,$userdata['username'],$itemname))) . "')";
           if ( !$db->sql_query($sql) )
   		{
   			message_die(GENERAL_ERROR, 'Could not insert private message sent text', '', __LINE__, __FILE__, $sql);
		}
In the script, I have the "private_message_from" user_id hard coded to 1....this is because I wanted it to come from the Board Messenger Account I created and that's it's user_id. If you create an account like that as well, you'd have to change the user_id number accordingly in this line (after $gift_pm_subject)

Code: Select all

('0', '$gift_pm_subject', '1', '$user_id', '$privmsgs_date', '0', '1', '1', '0')";

Then in your lang_main.php, set the variables for the give message subject and text. Just add something like this to your lang_main.php file

Code: Select all


$lang['gift_pm_subject'] = 'You have received a gift!';
$lang['gift_pm'] = '%s has given you a %s. Check your inventory!';


Just thought I'd share. :) I'm going to mess with it some more. I'd like to allow the giver to send a message to the recipient as well. And, I'd also like to actually PM the Item given to the recipient along with the message. Or, at least a link to the item. Gotta work on that though.
Earthk
Registered User
Posts: 19
Joined: Wed Aug 13, 2003 7:21 am

Post by Earthk »

After installing the mod, all are fine except the headquarters.php which
gave out a "Template->make_filename(): Error - file does not exist".
I've no idea what file it is referring to, and I've rechecked that all files
are uploaded.

Any help please? :)

-----Edit-----
Okay the instruction.txt didn't mention that I need to install the "Usable
Items Mod" in order to use the Stats System and Arena Ticket. All is well
now :)
User avatar
Moogie
Registered User
Posts: 369
Joined: Thu Aug 22, 2002 11:39 am
Location: UK
Contact:

Post by Moogie »

Earthk wrote: -----Edit-----
Okay the instruction.txt didn't mention that I need to install the "Usable
Items Mod" in order to use the Stats System and Arena Ticket. All is well
now :)


Er, yes it does:
## Author Notes: IMPORTANT
## Requires Zarath's Item Shop Mod, the Points Mod & my original
## usable items mod (see other files in zip).


:p ;)

Anyhoo, just came along to say I've just finished off a Heal Spell usable item script, which can be cast on other members. Going to do a Detox (unpoison) script tomorrow. When I've tested them a bit more at my forums, I'll post them.



Shinji Mekamori:
Go ahead :) I don't know what IBF is, but as long as my credit remains intact, and you're making a profit from it, all's good :)



Looks as though almost all the required fixes have been posted for making this work with the new shop. Narc0sis has said I may include them in the next (final, I hope) zip of the mod, which I hope to get together this week.
Moogie
Locked

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