BluntMan Posted February 9, 2009 Posted February 9, 2009 I was wondering if anyone can help me, i have this in my sql for increaseing brave: a:4:{s:4:"stat";s:5:"brave";s:3:"dir";s:3:"pos";s:8:"inc_type";s:7:"percent";s:10:"inc_amount";i:100;} i want a permanent increase not a refill. If anyone could help it would be appreciated :D :mrgreen: Quote
gurpreet Posted February 9, 2009 Posted February 9, 2009 Re: Permenant Increase? What do you mean by a "permanent increase"? Quote
BluntMan Posted February 9, 2009 Author Posted February 9, 2009 Re: Permenant Increase? i mean add to your max brave rather than just fill it up Quote
Dave Posted February 10, 2009 Posted February 10, 2009 Re: Permenant Increase? So modify the users Max brave instead of just there brave? No idea if this will work but looking over the itemuse code i think it should. a:4:{s:4:"stat";s:5:"maxbrave";s:3:"dir";s:3:"pos";s:8:"inc_type";s:7:"percent";s:10:"inc_amount";i:100;} Quote
BluntMan Posted February 10, 2009 Author Posted February 10, 2009 Re: Permenant Increase? it looked good but i used the item and got this: QUERY ERROR: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '= '0' WHERE userid=2' at line 1 Query was UPDATE `users` SET = '0' WHERE userid=2 Quote
Dave Posted February 10, 2009 Posted February 10, 2009 Re: Permenant Increase? ok keep that code and open itemuse.php find if(in_array($einfo['stat'],array('energy','will','brave','hp'))) replace that with if(in_array($einfo['stat'],array('energy','will','brave','hp','maxbrave'))) Again not tested. Quote
REGGIE KRAY Posted February 10, 2009 Posted February 10, 2009 Re: Permenant Increase? Im not sure if im on the right tracks but this could work <?php include "globals.php"; { print "<h3>Inrease Your Stats</h3> <table border=2> <th>Stat</th> <th>Description</th> <th>Buy</th> <tr> <td>Brave</td> <td>100 Crystals For increased Brave</td> <td>Buy</td> </tr> </table>"; if($_GET['trade'] == brave) { if($ir['crystals'] < 100) { print "Error, you dont have enough crystals"; } else { print "You trade in 100 crystal for a brave increase!"; $db->query("UPDATE users SET maxbrave = maxbrave + 2, crystals = crystals - 100 WHERE userid = $userid"); } } } $h->endpage(); ?> Quote
BluntMan Posted February 10, 2009 Author Posted February 10, 2009 Re: Permenant Increase? same error. basically im trying to create an item that when used will increase max brave by 3. if that helps at all Quote
Eternal Posted February 10, 2009 Posted February 10, 2009 Re: Permenant Increase? in itemuse.php if($i['itmname'] == 'Brave Boost') { $max=amount you want here; $db->query("UPDATE users SET maxbrave=maxbrave+{$max} WHERE userid=$userid",$c); print "You Use the item and gain more max brave."; } Then create a normal item blank stats and power name it Brave Boost But this is just coding it in the page. Basicly taken from the donator pack page posted on here... Quote
gideon prewett Posted February 11, 2009 Posted February 11, 2009 Re: Permenant Increase? i just tryed that and it dont work if u leave the item blank of any use u cant use it Quote
TMan Posted February 15, 2009 Posted February 15, 2009 Re: Permenant Increase? Would you want to add it as an effect to the 'item' your creating.... Couldn't you just go to staff_items.php Scroll to the effect sections and add this line to each of them? <option value='maxbrave'>Max Brave</option> This way you can just make your item in the staff panel and select the Max Brave as your effect. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.