Jump to content
MakeWebGames

[mccode v2] Improved Security on Attack System


KiX
 Share

Recommended Posts

Well, I got tired of ppl refreshing and pressing the back button to beat our npcs. So I made this little mod. There are a few out there, but I do not think they are safe enough. Yes, I know you can do this with cookies, but I am just a noob at this coding stuff. I did not know how to do it, so I did it this way. :)

You will need to edit all the attack files. So lets start.

attacktake.php - Find this line

You're unable to view this code.

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

 

and add underneath

You're unable to view this code.

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

 

attacklost.php - Find this line

You're unable to view this code.

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

 

and add underneath

You're unable to view this code.

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

 

attackbeat.php - Find this line

You're unable to view this code.

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

 

and add underneath

You're unable to view this code.

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

 

attackwon.php - Find this line

You're unable to view this code.

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

 

and add underneath

You're unable to view this code.

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

 

and finally ....

attack.php - Find this line

You're unable to view this code.

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

 

and add ON TOP OF IT, NOT UNDERNEATH

You're unable to view this code.

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

 

Find this line

You're unable to view this code.

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

 

and add underneath

You're unable to view this code.

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

 

You will need to add attchk to your users table

 

You're unable to view this code.

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

 

And that is it. :) enjoy!!

Link to comment
Share on other sites

Re: [mccode v2] Improved Security on Attack System

 

You're unable to view this code.

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

 

...

 

You're unable to view this code.

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

 

And the point of the test addition in user tables would be because ? shouldnt you have just actually edited it slighty, You know that people on here can be lazy and are just here to use CE for its mods and not join in with the actuall help, although thinking about it, people should look at the mod there adding before doing so lol

Thanks,

Jc

Oh, p.s isn't there a much easier way of just say, blocking the back button whilst attacking, or bringing up a message like "Dont you just wish you could go back in time in a fight!" would need to use the database less i suppose if you did it this way... (:

Link to comment
Share on other sites

Re: [mccode v2] Improved Security on Attack System

Shouldn't really have apologised i was in the wrong i barely read the bottom bit, the sql just caught my eye, didn't really see the warning message above mate lool,

OK mod although i don't think ill be using it I'm going to create and design one my own way :wink:

Thanks for the mod though :)

Jc

Ahh oh and another thing wouldn't there be a little use in a cron for the to refresh the database say every night ? keep the tables clean more manageable and keep the size for the backup down a little especially if you have 100's of members :)

Link to comment
Share on other sites

  • 4 months later...

Re: [mccode v2] Improved Security on Attack System

 

I am not sure where the user tables part is, where do I place:

ALTER TABLE `users` ADD `test` INT(2) NOT NULL DEFAULT '1';

Access cPanel, then go to PhpMyAdmin, Then select your database, then go to "SQL", in the SQL box input the sql you wish to execute. Then click "Go". Also replace `test` with `attchk`.

Link to comment
Share on other sites

Re: [mccode v2] Improved Security on Attack System

 

I am not sure where the user tables part is, where do I place:

ALTER TABLE `users` ADD `test` INT(2) NOT NULL DEFAULT '1';

Oh Gawd :-o

That makes me feel good about myself lol

lol me 2 lmao but we were all like that once lmao

Link to comment
Share on other sites

  • 2 weeks later...
  • 1 month later...

Re: [mccode v2] Improved Security on Attack System

Im a bit lost here or maybe im tired.. But usually a switch uses two actions 0=off 1=on

My question is when someone is attacking which of the switches tells the SQL that they are no longer in a fight and can leave the screen ?

As i can see the deafult is 1 and 1 being that they are atacking ?

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.

 Share

×
×
  • Create New...