MrEvilChaos Posted March 17, 2011 Posted March 17, 2011 Well Since I wont be selling it here is my healing arua FREE!! and remember this is my first code that I made so Thanks and let me know how it works. Make a file called heal.php and add You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Then add Heal to your admin or Owner Panel Thanks for Useing my codes and tell me how it works for you Quote
rulerofzu Posted March 17, 2011 Posted March 17, 2011 Well this is exactly why it was not worth what you asked for it. The whole thing would be better as a staff file using the sglobals and perhaps using the define method used in 2.0.3 or another securing method. user_level = 7 // ok you have changed the number but no explanation to those who wish to use the mod. reduce the whole code by 14 lines by combining your sql query $q=$db->query('UPDATE users SET brave=maxbrave,will=maxwill,hp=maxhp........ etc No need for single lines. Points towards you have no real understanding of PHP and just cut and pasted the code from the cron_day.php file Quote
MrEvilChaos Posted March 17, 2011 Author Posted March 17, 2011 well Like I said I'm still learning and no This was not cut and paste -.- but Thanks for the being able to reduce this into one line Quote
Uridium Posted March 17, 2011 Posted March 17, 2011 << COMMENT REMOVED >> And appologise to both Robert and Alex... The script above is true to form and does work correctly My misadventure was i was testing on myelf and couldnt see any outcomes from it.. When the script itself updates users other than yourself... So again apologise to both... Quote
Equinox Posted March 17, 2011 Posted March 17, 2011 Not tested, may not work, who knows? You tell me. Less lines of code needed, does the same thing...Enjoy You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Quote
Danny696 Posted March 18, 2011 Posted March 18, 2011 also, why add You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. below the inclusion of globals.?? Quote
MrEvilChaos Posted March 19, 2011 Author Posted March 19, 2011 Removed post, therefore removed quote... No it updates everyone Quote
Paul Evans Posted March 19, 2011 Posted March 19, 2011 no your code updates everyone but the person running it, Eq's version would work perfectly. Quote
MrEvilChaos Posted March 19, 2011 Author Posted March 19, 2011 no your code updates everyone but the person running it, Eq's version would work perfectly.have you tried it cause it work when I useit -.- Quote
Paul Evans Posted March 19, 2011 Posted March 19, 2011 Sadly i did test it just to be sure but i do actually know how to code... had afew years experience (5) Quote
MrEvilChaos Posted March 19, 2011 Author Posted March 19, 2011 okay and you will see it updates the user as well as everyone else Quote
Paul Evans Posted March 19, 2011 Posted March 19, 2011 You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Add that to index.php then goto it and see it doesn't edit your staff notes (see them in profile if your staff) but it will edit everyone elses, Don't believe i actually had to explain this in this much detail... worrying sometimes. Quote
MrEvilChaos Posted March 19, 2011 Author Posted March 19, 2011 man all I know is that it works for me and it updates who ever is using it so i'm sorry but your wrong here Quote
Paul Evans Posted March 19, 2011 Posted March 19, 2011 The only thing that will work for all users is the events :) Quote
MrEvilChaos Posted March 19, 2011 Author Posted March 19, 2011 No go put your self in the hospital or jail and use it you will see it lets you out X( Quote
Paul Evans Posted March 19, 2011 Posted March 19, 2011 You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. The above would work on all users but the user You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. The above will work on just the user You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. The above should be how it's done FFS just pay attention to what people are suggesting or we could plainly not even try and help you... Quote
Danny696 Posted March 19, 2011 Posted March 19, 2011 man all I know is that it works for me and it updates who ever is using it so i'm sorry but your wrong here Surely if more than one person is telling you somethings wrong, then it more than likely is. Especially when its someone like paul or equinox. Quote
MrEvilChaos Posted March 19, 2011 Author Posted March 19, 2011 Well then you tell me why it works for me but no one else ? I would suggest you trying it cause it dose work :evil: Quote
Dominion Posted March 19, 2011 Posted March 19, 2011 It does update everyone, but they are right that you don't need 13 queries to do the update. Also there seems to be a query extra for yourself? Unless I am missing something, and that's to do with allowing the member to use it? Quote
MrEvilChaos Posted March 19, 2011 Author Posted March 19, 2011 Well like i said its my first mod and i'm still learning so I can see in making the codes smaller but them telling me it wont update the user using it well that grinds my gears and it will only let an Owner use it hence the user level 7 Quote
Dominion Posted March 19, 2011 Posted March 19, 2011 Well like i said its my first mod and i'm still learning so I can see in making the codes smaller but them telling me it wont update the user using it well that grinds my gears and it will only let an Owner use it hence the user level 7 V2 has no user_level as the owner – unless it's in the new patch – so user_level 7 does not exist. They made a small mistake, not a big deal. At least they are helping you improve in the long run by pointing out a better way to do it... :) Quote
Paul Evans Posted March 19, 2011 Posted March 19, 2011 I have the new patch user_level 2 is still admin, i was only trying to help but when someone doesn't see their own mistakes it REALLY pisses me off you were wrong me and EQ pointed out the mistake if you couldn't understand that then i really suggest you RTFM Quote
Djkanna Posted March 20, 2011 Posted March 20, 2011 != is "not equal" therefore what the previous guys have told you is correct, how about showing some respect to people trying to help you? Quote
Dominion Posted March 20, 2011 Posted March 20, 2011 There are 2 sets of queries “ != $userid “ then “ = $userid “ So well they are right in helping him in the way he has done it, the mod itself does work as he has stated... :whistling: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Quote
Djkanna Posted March 20, 2011 Posted March 20, 2011 Bah I didn't read all the code but hey point still valid... 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.