Jump to content
MakeWebGames

Recommended Posts

Posted

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!

  • 1 month later...
Posted

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

Posted

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!

  • 1 month later...
Posted

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

 

this works great +1 but it there a way to make it so if you give user donator pack through the admin panel it will give them that?

In V1 theres something in admin panel called "give item to user".

Posted

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:

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

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

Ok heres mine. I have everything done, but theres no "Use" button :( Any ideas how to fix?

Edit: I got a use button ut it says "Sorry, this item cannot be used as it has no effect."

Posted

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

Posted

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

but it still dont work for v1 error

invalid use of file

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/tbgaming/public_html/userp1.php on line 28

Invalid item ID

  • 7 months later...
Posted

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.

Posted

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

so for this mod i have to make a items on my game called Pack 1 then Pack 2 and so on to Pack 5 for all 5 donator packs

  • 1 month later...
Posted

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

Ok i've got the DP items working now but how do I make it credit the user with the DP item when they donate? Thats the only problem I have, If someone could please help me it would be great.

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