Jump to content
MakeWebGames

[mccode v1] DONATION PACKS TO ITEMS


CraigF

Recommended Posts

RIGHT!

Im tired of people asking how to make donation packs into items, this may not be the most convenient way but still:

Make an item called Pack 1

Yes its using a different itemuse but thats because i got loads of errors when i did it in the itemuse.php file so here it is fully working!

 

make the file:

usep1.php

You're unable to view this code.

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

(MAKE SURE YOU CHANGE DDAYS TO THE AMOUNT, CRYSTALS TO THE AMOUNT, MONEY TO THE AMOUNT, IQ TO THE AMOUNT.

 

and then in inventory, add:

You're unable to view this code.

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

 

Now you are done :) hope it helped

If you want to make another pack just do the same but change what it gives you and the file name and item name!

Link to comment
Share on other sites

  • 1 month later...

Re: [v1][FREE] DONATION PACKS TO ITEMS

<?php

include "globals.php";

{

print "Invalid use of file";

}

else

{

$i=mysql_query("SELECT iv.*,i.*,it.* FROM inventory iv LEFT JOIN items i ON iv.inv_itemid=i.itmid LEFT JOIN itemtypes it ON i.itmtype=it.itmtypeid WHERE iv.inv_id={$_GET['ID']} AND iv.inv_userid=$userid",$c);

}

if(mysql_num_rows($i) == 0)

{

print "Invalid item ID";

}

else

{

$r=mysql_fetch_array($i);

if($r['itmname'] == 'Pack 1')

{

mysql_query("DELETE FROM inventory WHERE inv_id={$_GET['ID']}",$c);

mysql_query("UPDATE users SET money=money+MONEY WHERE userid=$userid",$c);

mysql_query("UPDATE users SET donatordays=donatordays+DDAYS WHERE userid=$userid",$c);

mysql_query("UPDATE users SET crystals=crystals+CRYSTALS WHERE userid=$userid",$c);

mysql_query("UPDATE userstats SET IQ=IQ+IQ WHERE userid=$userid",$c);

print "You have used the pack, thanks for helping the game!";

}

}

$h->endpage();

?>

 

 

try that maybe not right

Link to comment
Share on other sites

Re: [v1][FREE] DONATION PACKS TO ITEMS

ok here it is for v2

RIGHT!

Im tired of people asking how to make donation packs into items, this may not be the most convenient way but still:

Make an item called Pack 1

Yes its using a different itemuse but thats because i got loads of errors when i did it in the itemuse.php file so here it is fully working!

 

make the file:

usep1.php

You're unable to view this code.

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

(MAKE SURE YOU CHANGE DDAYS TO THE AMOUNT, CRYSTALS TO THE AMOUNT, MONEY TO THE AMOUNT, IQ TO THE AMOUNT.

 

and then in inventory, add:

You're unable to view this code.

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

 

Now you are done :) hope it helped

If you want to make another pack just do the same but change what it gives you and the file name and item name!

Link to comment
Share on other sites

  • 1 month later...

Re: [v1][FREE] DONATION PACKS TO ITEMS

Yes, one problem you haven't included.

It just deletes the inventory row regardless of inventory quantities, If you have 3x as one row e.g. "DP Pack x3" you'll get the benefits as one pack.

 

Its not your fault, It's free. :cry:

:roll: But now it's out of my mind.. :mrgreen:

Link to comment
Share on other sites

  • 4 weeks later...
  • 1 month later...

Re: [v1][FREE] DONATION PACKS TO ITEMS

 

ok here it is for v2

RIGHT!

Im tired of people asking how to make donation packs into items, this may not be the most convenient way but still:

Make an item called Pack 1

Yes its using a different itemuse but thats because i got loads of errors when i did it in the itemuse.php file so here it is fully working!

 

make the file:

usep1.php

You're unable to view this code.

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

(MAKE SURE YOU CHANGE DDAYS TO THE AMOUNT, CRYSTALS TO THE AMOUNT, MONEY TO THE AMOUNT, IQ TO THE AMOUNT.

 

and then in inventory, add:

You're unable to view this code.

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

 

Now you are done :) hope it helped

If you want to make another pack just do the same but change what it gives you and the file name and item name!

this does not work for v2

Link to comment
Share on other sites

  • 7 months later...

Re: [v1][FREE] DONATION PACKS TO ITEMS

 

if i want it to have my 5 donator packs in items wot do i change it to

Logic would say that you create a file called pack2.php pack3.php..... and soo on, then copy the code from the First 1 and then do the required edits and Changing the "Pack 1" in the code to "pack 2" etc and adding the items....Thats what i would do if i was using this script.

Link to comment
Share on other sites

  • 1 month 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...