Download, Present, and receive support for third party WoWRoster AddOns and modifications
WoWRoster AddOns and Mods are supported by the author only
Please understand that some AddOns and Mods may require advanced skills to employ
by Ulminia » Fri Sep 08, 2006 10:03 am
ok after scripting for a cuple of days i came up with this its just a function to insert and all it does is add a colem in the recipe page to tell hoe many of a recipe the player can make with a query of items in the players invintory and bank see my screenshoot
and for an example see
here
if there is intrest i will post a install how too for you all
- Attachments
-
- screenshoot
- canmake.jpg (53.12 KiB) Viewed 869 times
Last edited by
Ulminia on Fri Sep 08, 2006 10:06 am, edited 2 times in total.
-
Ulminia
- WoWRoster.net Dev Team
- Roster AddOn Dev
-
- Posts: 1223
- Joined: Tue Jul 04, 2006 4:41 pm
- Location: New Brunswick, Canada
- Realm: Zangarmarsh (PvE) - US
- gmail/gtalk: ulminia@gmail.com
by PleegWat » Fri Sep 08, 2006 2:04 pm
Should be possible to code this as an addon. Copy the relevant code from what you've modded if needed.
I <3 /bin/bash
-
PleegWat
- WoWRoster.net Dev Team
-
- Posts: 1636
- Joined: Tue Jul 04, 2006 1:43 pm
by Ulminia » Mon Sep 11, 2006 4:28 pm
ok here we go to have this work follow these instructions...
open commonfunctions.lib.php go to the end and add this code
- Code: Select all
function can_make($recipe){
$result = mysql_query("SELECT * FROM `".ROSTER_RECIPESTABLE."` WHERE `recipe_name` = '".$recipe."'");
$recipes = mysql_fetch_array($result);
$reag1 = explode("<br>", $recipes['reagents']);
$c = count($reag1);
$c1 = $c;
$i = 0;
$reag1 = explode("<br>", $recipes['reagents']);
$comp = array();
while($i < $c){
list($r, $num) = explode(" x", $reag1[$i]);
$resulta = mysql_query("SELECT * FROM `".ROSTER_ITEMSTABLE."` WHERE `item_name` = '".$r."'");
$quantity = mysql_fetch_array($resulta);
if ($quantity['item_quantity'] == ''){
$quant = '0';
}
else
{
$quant = $quantity['item_quantity'];
}
$av = ($quant / $num);
$avl = number_format($av, 0, '', '');
$comp[''.$r.''] = ''.$avl.'';
$i++;
}
return min($comp);
}
then open char.php in the lib folder
find
- Code: Select all
<th class="membersHeader">'.$url.'&action=recipes&s=type">'.$wordings[$lang]['type'].'</a></th>
add this after
- Code: Select all
<th class="membersHeader">Can Make</th>
then find this
- Code: Select all
<td class="membersRow'.$stripe.'"> '.$recipe->data['recipe_type'].' </td>
add this after
- Code: Select all
<td class="membersRow'.$stripe.'">'.can_make($recipe->data['recipe_name']).'</td>
thats it all done enjoy
-
Ulminia
- WoWRoster.net Dev Team
- Roster AddOn Dev
-
- Posts: 1223
- Joined: Tue Jul 04, 2006 4:41 pm
- Location: New Brunswick, Canada
- Realm: Zangarmarsh (PvE) - US
- gmail/gtalk: ulminia@gmail.com
by IslandStyle » Mon Oct 30, 2006 12:26 pm
I get error messages when trying to do this saying
- Code: Select all
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /hsphere/local/home/kalimdor/kalimdortribe.com/roster/lib/commonfunctions.lib.php on line 705
Warning: Division by zero in /hsphere/local/home/kalimdor/kalimdortribe.com/roster/lib/commonfunctions.lib.php on line 730
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /hsphere/local/home/kalimdor/kalimdortribe.com/roster/lib/commonfunctions.lib.php on line 705
Warning: Division by zero in /hsphere/local/home/kalimdor/kalimdortribe.com/roster/lib/commonfunctions.lib.php on line 730
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /hsphere/local/home/kalimdor/kalimdortribe.com/roster/lib/commonfunctions.lib.php on line 705
Warning: Division by zero in /hsphere/local/home/kalimdor/kalimdortribe.com/roster/lib/commonfunctions.lib.php on line 730
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /hsphere/local/home/kalimdor/kalimdortribe.com/roster/lib/commonfunctions.lib.php on line 705
Warning: Division by zero in /hsphere/local/home/kalimdor/kalimdortribe.com/roster/lib/commonfunctions.lib.php on line 730
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /hsphere/local/home/kalimdor/kalimdortribe.com/roster/lib/commonfunctions.lib.php on line 705
Warning: Division by zero in /hsphere/local/home/kalimdor/kalimdortribe.com/roster/lib/commonfunctions.lib.php on line 730
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /hsphere/local/home/kalimdor/kalimdortribe.com/roster/lib/commonfunctions.lib.php on line 705
Warning: Division by zero in /hsphere/local/home/kalimdor/kalimdortribe.com/roster/lib/commonfunctions.lib.php on line 730
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /hsphere/local/home/kalimdor/kalimdortribe.com/roster/lib/commonfunctions.lib.php on line 705
Warning: Division by zero in /hsphere/local/home/kalimdor/kalimdortribe.com/roster/lib/commonfunctions.lib.php on line 730
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /hsphere/local/home/kalimdor/kalimdortribe.com/roster/lib/commonfunctions.lib.php on line 721
Recipe List
not sure what is causing it.
site is at
Kalimdor Tribe
any ideas would be great.
-
IslandStyle
- WR.net Apprentice
-
- Posts: 41
- Joined: Tue Jul 11, 2006 8:57 am
Return to AddOns and Mods
Who is online
Users browsing this forum: No registered users and 0 guests