CraigF Posted June 14, 2007 Posted June 14, 2007 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! Quote
iseeyou94056 Posted July 17, 2007 Posted July 17, 2007 Re: [v1][FREE] DONATION PACKS TO ITEMS works great thanks +1 Quote
YoungGold Posted July 17, 2007 Posted July 17, 2007 Re: [v1][FREE] DONATION PACKS TO ITEMS anyone have this in v2 Quote
-Matt- Posted July 17, 2007 Posted July 17, 2007 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 Quote
Satans_Pimp Posted July 18, 2007 Posted July 18, 2007 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! Quote
iseeyou94056 Posted September 4, 2007 Posted September 4, 2007 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? Quote
Absolute Zero Posted September 5, 2007 Posted September 5, 2007 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". Quote
iseeyou94056 Posted September 6, 2007 Posted September 6, 2007 Re: [v1][FREE] DONATION PACKS TO ITEMS i know Quote
Absolute Zero Posted September 6, 2007 Posted September 6, 2007 Re: [v1][FREE] DONATION PACKS TO ITEMS So use that to give the item in this case donator pack to the user. Quote
oxidati0n Posted September 6, 2007 Posted September 6, 2007 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: Quote
Solid Snake Posted October 4, 2007 Posted October 4, 2007 Re: [v1][FREE] DONATION PACKS TO ITEMS i done everything said but it aint making DPs into items whats wrong Quote
HITMAN 17 Posted November 9, 2007 Posted November 9, 2007 Re: [v1][FREE] DONATION PACKS TO ITEMS ye same for me Quote
gurpreet Posted November 9, 2007 Posted November 9, 2007 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." Quote
HITMAN 17 Posted November 10, 2007 Posted November 10, 2007 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 Quote
HITMAN 17 Posted November 10, 2007 Posted November 10, 2007 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 Quote
dementor Posted November 10, 2007 Posted November 10, 2007 Re: [v1][FREE] DONATION PACKS TO ITEMS if u have mutiple DP offers then dont bother with this Quote
HITMAN 17 Posted November 18, 2007 Posted November 18, 2007 Re: [v1][FREE] DONATION PACKS TO ITEMS You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. that bit do i change on there to put amount in on each one Quote
HITMAN 17 Posted November 18, 2007 Posted November 18, 2007 Re: [v1][FREE] DONATION PACKS TO ITEMS i cant get it to work i made an item called pack1 and it wont work still and done everything wat said Quote
ignite Posted November 25, 2007 Posted November 25, 2007 Re: [v1][FREE] DONATION PACKS TO ITEMS It must be exaclty the same so it's not pack1 it's Pack 1 Quote
Reaper Posted July 17, 2008 Posted July 17, 2008 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 Quote
radio_active Posted July 18, 2008 Posted July 18, 2008 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. Quote
Reaper Posted July 18, 2008 Posted July 18, 2008 Re: [v1][FREE] DONATION PACKS TO ITEMS thanks mate Quote
Reaper Posted July 18, 2008 Posted July 18, 2008 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 Quote
CHAMAVELI Posted September 5, 2008 Posted September 5, 2008 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. Quote
dementor Posted September 5, 2008 Posted September 5, 2008 Re: [v1][FREE] DONATION PACKS TO ITEMS I am just wondering should I post my working code or not :roll: 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.