Jump to content
MakeWebGames

Better than Quantifying


Will

Recommended Posts

The quantifying mod is pointless. All you have to do which will save resources.

Basically every time an item is given to someone it checks to see if the item is already there and just adds more:

 

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

This can be modded for anything from the shops to the item send page.

Link to comment
Share on other sites

Re: Better than Quantifying

Ive wanted to add the quantifying of items to my v1 game for ages now..

I kind of realised code like this would be needed, as quantifying manually through scripts can mess the items up a lot.

Has anyone got a full list of all the scripts that need to have this code added so that items are quantified up correctly?

Oh and thanks will for this code, i'll be sure to add it to the item related scripts.

Scripts:

- itemsend.php

- itembuy.php

- itemsell.php ?

- itemmarket.php

- auctions.php ?

- ganggive.php ?

(Must be some admin functions that need to be edited too)

Link to comment
Share on other sites

Re: Better than Quantifying

That looks like all of them. If you have some kind of gang armoury It might need to be added to that; on mine I put the gang lent items separately though.

Here's my section of the code for each one:

Item send

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

Item Buy

 

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

You get the gist by now :lol:

Link to comment
Share on other sites

Re: Better than Quantifying

$rfr=mysql_query("SELECT inv_id,inv_itemid FROM inventory WHERE inv_itemid=4 AND inv_userid=$userid ",$c) or die(mysql_error());

$y=mysql_fetch_array($rfr);

{

if(mysql_num_rows($rfr) == 0)

{

//create seperate

$qut=$_GET['qty'];

mysql_query("INSERT INTO inventory VALUES('',$itemidexplo,$userid,1)",$c);

mysql_query("DELETE FROM inventory WHERE inv_qty=0", $c);

}

if(mysql_num_rows($rfr) >=1)

{

$qut=$_GET['qty'];

$itemid=$y['inv_id'];

mysql_query("UPDATE inventory SET inv_qty=+1 WHERE inv_id=$itemidexplo",$c) or die(mysql_error());

mysql_query("DELETE FROM inventory WHERE inv_qty=0", $c);

}

Anyone know whats wrong with this for street.php ?

Link to comment
Share on other sites

  • 2 weeks later...

Re: Better than Quantifying

You can do Quantifying with out having to edit a bunch of files, and the users still won't have to click any Quantifying link. They will have no idea they did this. For version 2, just rename your current inventory.php to items.php and make inventory.php...

 

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

Every time a player clicks the Inventory link, they will go to items.php and have no idea they did the Quantify!

Link to comment
Share on other sites

  • 4 weeks later...

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