Akash Posted April 14, 2008 Share Posted April 14, 2008 Ok, I know I posted this in Mod Requests after The Corpse requested it, but seeing as it's free, I thought I add it here too, so people will actually make use of it instead of it being hidden halfway through another topic. This mod gives a user a starter pack when they begin the game. It credits the user with money, donatordays, vip days or whatever you guys have in your game. It's easy to modify, and there's instructions in the file to help you. For V1 Find in explore.php You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Add under it You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. For V2 Find in explore.php You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Add under it You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. UPDATED(Ability to give out an item too!) For Both V1 and V2 (Made compatible) Then create a file called starterkit.php You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. EDIT:I just made the mod V1 and V2 compatible, all you need to do is change the You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. into You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. AND: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. into You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Then add the following sql You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. And there it is, you're done :mrgreen: P.S If you would like to remove this feature after a few days in the game, the best way is just to empty the starterkit.php and remove the line from explore.php. However, if you want it done quickly, just use a query in phpMyAdmin that sets the field donatorpack in the users table to one. This will just make sure if anyone goes onto the starter pack file, that they will not get a pack, but just get a message saying you have got the pack already. Hope you like it, and please feel free to contact me on [email protected] for converting. Also, any bugs you may find, which I doubt, as it's been tested, just post them here. A final thing, if anyone can make this slightly more secure, then just post your version here. Thanks Quote Link to comment Share on other sites More sharing options...
Halo Posted April 14, 2008 Share Posted April 14, 2008 Re: Free Starter Pack Nice Mod, This Is A Mod I Might Use But After My Game Has Finished Testing Quote Link to comment Share on other sites More sharing options...
Akash Posted April 14, 2008 Author Share Posted April 14, 2008 Re: Free Starter Pack Thanks...I just made it V1+V2 compatible, all you have to do is edit one tiny thing, it's all written up there. Hope everyone likes it :) Quote Link to comment Share on other sites More sharing options...
Danger-Hazard Posted April 14, 2008 Share Posted April 14, 2008 Re: Free Starter Pack Love It :) I Think this Has Been Made Before But Thanks For Sharing It With Us Unlike People Who Won't To Keep There Mods To Themselves. Quote Link to comment Share on other sites More sharing options...
Strats Posted April 14, 2008 Share Posted April 14, 2008 Re: Free Starter Pack Brilliant! Quote Link to comment Share on other sites More sharing options...
zbirc3 Posted April 14, 2008 Share Posted April 14, 2008 Re: Free Starter Pack Can you please add hospital and jail items to the starter kit? Just give me an example of where to put it and where to put the id. I don't know how to do it as its not in the users table. lol. Quote Link to comment Share on other sites More sharing options...
POG1 Posted April 14, 2008 Share Posted April 14, 2008 Re: Free Starter Pack to help stop multies you could have it like this.... if ($ir[donatorpack] == 0 && $ir[daysold]) Quote Link to comment Share on other sites More sharing options...
Akash Posted April 14, 2008 Author Share Posted April 14, 2008 Re: Free Starter Pack Thank You everyone for the positive comments :). My first mod, a bit simple, but still glad you all like it. Pog, did you mean to stop people getting it more than once? As in they can only claim the pack if donatordays=0 and daysold=0? If yes, then great...just add it, nice idea. Zbirc3, do you mean that you want the starter pack to credit users with items like morphines? Just post on here or PM me to explain, I didn't quite understand what you were trying to say... Anyway, again, thanks guys, I appreciate the good comments :D Quote Link to comment Share on other sites More sharing options...
zbirc3 Posted April 14, 2008 Share Posted April 14, 2008 Re: Free Starter Pack I decided to PM you! ^_^ Quote Link to comment Share on other sites More sharing options...
Ragnar Posted April 15, 2008 Share Posted April 15, 2008 Re: Free Starter Pack Is there any way to have the Starter Pack in item form, an item that spits out money, crystals, doner days, items...? Where right when they register, it shows up in their inventory ready to use? Quote Link to comment Share on other sites More sharing options...
gulley Posted May 19, 2008 Share Posted May 19, 2008 Re: Free Starter Pack What do i put in here $db->escape= Thanks - Gulley Quote Link to comment Share on other sites More sharing options...
Zero-Affect Posted May 20, 2008 Share Posted May 20, 2008 Re: Free Starter Pack why do this when you can just add it in globals You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. then simply add a new row in users table called "Kit": You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Quote Link to comment Share on other sites More sharing options...
Zero-Affect Posted May 20, 2008 Share Posted May 20, 2008 Re: Free Starter Pack good point but they want it to do it after they actually sign in and move... so others can't just steal it from the inactives i believe i would say register also mate Quote Link to comment Share on other sites More sharing options...
Akash Posted May 20, 2008 Author Share Posted May 20, 2008 Re: Free Starter Pack Both ways are good :). But Zero, your way, like Lost One said would load on evey page. :wink: Anyway Gulley, in $db->escape, you'd have to learn a bit more php :S...I'll try and explain. Basically, is used this as a query You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. The stuff in $db->escape actually make up all the %s etc. So I used You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. The first %s means nothing, because there's no money, crystals, points or whatever. So in $db->escape I put this You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. The word money now turns that first %s into money :). I'd do the same thing for the next, so the next %s after the = sign, would also be money. So now my code would look like this You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. %s I think would always be used for words and %d/%u for numbers (and other stuff ...I think...which I have no idea about :p) You'd continue to do this for all of the values so an example of %s = %s + %d. Lets say that %s is money and %d is a value you want to add on ($10,000). In $db->escape you would put $db->escape(money, money, 10000) Sorry if it's a bit confusing, not very good at explaining :( Quote Link to comment Share on other sites More sharing options...
Zero-Affect Posted May 20, 2008 Share Posted May 20, 2008 Re: Free Starter Pack yeah mine supposed to load on every page thats the point it only ever loads the give script once though ;) read it... and that would be effective since when they login... or even better add it in the loggedin page Quote Link to comment Share on other sites More sharing options...
swindonsaleshosting Posted June 1, 2008 Share Posted June 1, 2008 Re: Free Starter Pack Good mod, however i get this error ? error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE (`userid` = 0)' at line 7 Query was UPDATE `users` SET `money` = `money` + 10000, `crystals` = `crystals` + 100, `donatordays` = `donatordays` + 5, WHERE (`userid` = 0) Any idea why? Quote Link to comment Share on other sites More sharing options...
Zero-Affect Posted June 1, 2008 Share Posted June 1, 2008 Re: Free Starter Pack $db defined? Quote Link to comment Share on other sites More sharing options...
camster98 Posted June 22, 2008 Share Posted June 22, 2008 Re: Free Starter Pack i removed the vip days from the pack and got this Warning: sprintf() [function.sprintf]: Too few arguments in /home/jezebel/public_html/starterkit.php on line 45 QUERY ERROR: Query was empty Query was Quote Link to comment Share on other sites More sharing options...
-Genocide- Posted July 1, 2008 Share Posted July 1, 2008 Re: Free Starter Pack Great mod, this is exactly what I was looking for to help people get started out in my game....gets them addicted quick :P Great Work. Peace :mrgreen: Quote Link to comment Share on other sites More sharing options...
Akash Posted July 1, 2008 Author Share Posted July 1, 2008 Re: Free Starter Pack i removed the vip days from the pack and got this Warning: sprintf() [function.sprintf]: Too few arguments in /home/jezebel/public_html/starterkit.php on line 45 QUERY ERROR: Query was empty Query was Okay guys...lemme try and explain again. I only have myself to blame, as the coding of the starter pack was not very good, I've made it slightly better. Basically, sprintf is used to secure the query. Here is an example of a sprintf query, and how to edit it, to ensure you do not get errors. You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Basically, the '%d' is a number. It is the number of crystals / money you want the user to get. At present, %d has not been defined, however, after you get to the center of the query...right after ", you will notice a few numbers and a userid (100,500,$ir['userid']). These define the %d's and the %u in the query. So the money will be +100, crystals +500 and userid $ir['userid']. Now if you did not have crystals for example in your game, you would have to remove the part that says: `crystals` = `crystals` + '%d' but also the bit that says 500, as it defines the crystals. For anyone who didn't understand this, go to http://www.php.net and learn it. It's simple once you know it and contact me if you need more help. Quote Link to comment Share on other sites More sharing options...
KingRise Posted July 4, 2008 Share Posted July 4, 2008 Re: Free Starter Pack i like this Free Starter Kit Mod its a real nice idea for people to get some items and money as a nice starter good idea :-P alothough i really dont know how to make it work once its been installed Quote Link to comment Share on other sites More sharing options...
redsnake420 Posted July 23, 2008 Share Posted July 23, 2008 Re: Free Starter Pack ive seen on a couple games after the person uses this its still in the explore i wanna know before i add it to mine if that just how they added and messed it up on there game or is that how its supposed to be shouldn't it disappear after they use it? also great mod akash very helpful for newbies i plan on adding this to my logged in page Quote Link to comment Share on other sites More sharing options...
Tonka Posted July 23, 2008 Share Posted July 23, 2008 Re: Free Starter Pack INSERT INTO `inventory` (`inv_id`, `inv_itemid`, `inv_userid`, `inv_qty`) VALUES Open your register.php Find You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Add below You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. here is how the values work (`inv_id`, `inv_itemid`, `inv_userid`, `inv_qty`) don't remove the $i Quote Link to comment Share on other sites More sharing options...
avguste Posted October 19, 2008 Share Posted October 19, 2008 Re: Free Starter Pack ive seen on a couple games after the person uses this its still in the explore i wanna know before i add it to mine if that just how they added and messed it up on there game or is that how its supposed to be shouldn't it disappear after they use it? also great mod akash very helpful for newbies i plan on adding this to my logged in page This also something I also would like to know Quote Link to comment Share on other sites More sharing options...
AlabamaHit Posted November 16, 2008 Share Posted November 16, 2008 Re: [mccode] Free Starter Pack Next time you make a complatible...give some credit to the guy who showed you how to do that...... And dont use $db-> Use only mysql_ V2 uses it just fine..and no need to change it later. Quote Link to comment Share on other sites More sharing options...
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.