Jump to content
MakeWebGames

Recommended Posts

Posted

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:

Posted

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;}
Posted

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

Posted

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.

Posted

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();

?>

Posted

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...

Posted

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.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...