Page 108 of 185

Posted: Mon Sep 15, 2003 4:43 am
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

Posted: Mon Sep 15, 2003 10:53 am
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??

Posted: Mon Sep 15, 2003 1:54 pm
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> 

Help

Posted: Mon Sep 15, 2003 10:21 pm
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

Posted: Tue Sep 16, 2003 1:44 am
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

Re: Help

Posted: Tue Sep 16, 2003 1:44 am
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

Posted: Tue Sep 16, 2003 2:54 am
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.

Posted: Tue Sep 16, 2003 3:54 am
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)

Re: Help

Posted: Tue Sep 16, 2003 7:19 am
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

Posted: Tue Sep 16, 2003 7:37 am
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.

Posted: Tue Sep 16, 2003 7:58 am
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!

old shop

Posted: Tue Sep 16, 2003 8:24 am
by garofwar

Posted: Tue Sep 16, 2003 1:15 pm
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.

Posted: Tue Sep 16, 2003 3:19 pm
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 :)

Posted: Tue Sep 16, 2003 4:44 pm
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.