Jump to content
MakeWebGames

[mccode] Reset your users without deleating them


Redeye

Recommended Posts

Hey all,

This mod was made by me for people who want to keep all their users with their ids and login names and passwors etc.

I know some can code this in a couple of mins and I defently know I am a avarage coder compared to certain ce coders but I wanted to share this mod for all the people who cannot code as good as me...

 

Name it reset.php

 

You're unable to view this code.

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

Link to comment
Share on other sites

Re: [v1 & v2]Reset your users without deleating them

 

Does this have any security feature to keep players from loading the page and reseting everyone!! I'm guessing it's best to only have this script uploaded when you actually want to do this!

Just Add This To The Top

You're unable to view this code.

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

Link to comment
Share on other sites

  • 2 months later...

Re: [v1 & v2]Reset your users without deleating them

Is there an easy way to do this with out the NPC's geting reset? I'm guessing something like

UPDATE users SET hp=100 WHERE user_level=1;

though there is no user_level code in the userstats table.

Link to comment
Share on other sites

Re: [v1 & v2]Reset your users without deleating them

Read my post again, there is no user_level in userstats so that won't work.

userid int(11) NOT NULL default '10',

strength bigint(25) NOT NULL default '10',

agility bigint(25) NOT NULL default '10',

guard bigint(25) NOT NULL default '10',

labour bigint(25) NOT NULL default '10',

IQ bigint(25) NOT NULL default '10'

You have to add some

$q=$db->query("SELECT userstats.*, users.* FROM blah blah blah...",$c);

code if it can be made to work.

Link to comment
Share on other sites

Re: [v1 & v2]Reset your users without deleating them

For stats and NPCs, I think the easiest way would be to create user_level in the userstats

ALTER TABLE `userstats` ADD `user_level` int(11) NOT NULL default 1;

and change the user_level there for any one not at Level 1. Then

mysql_query("UPDATE userstats SET strength=10,agility=10,guard=10,labour=10,IQ=10 WHERE user_level=1", $c) or die(mysql_error());

would work.

Link to comment
Share on other sites

  • 2 weeks later...
  • 2 months later...

Re: [v1 & v2]Reset your users without deleating them

Parse error: syntax error, unexpected T_STRING in /home/reaper66/public_html/reset.php on line 10

 

i get that when i add it in i got the link in there but i click it to test it and i get that message how do i fix it i used the updated version for v2

Link to comment
Share on other sites

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