Some hacking fixes

Posts 16–30 of 31 · Page 2 of 3
Quote Originally Posted by Transferred View Post
Hacking servers has become a big and easy thing to do, so i will progressively post more and more fixes here.

How to fix Duping and weapon slot glitch

 
Ability spam (not running out of mana)


Go to player.useitem.cs

and find
Code:
void Activate(RealmTime time, Item item, Position target)
Next you should see
Code:
MP -= item.MpCost;
Under that add this line

Code:
            if (MP - item.MpCost < 0 || HasConditionEffect(ConditionEffects.Quiet) || HasConditionEffect(ConditionEffects.Paused))
            {
                return;
            }
            else
            {
you should get an error scroll all the way down to that error and write "}"

Done.


Thanks to @BlackRayquaza for showing me the mp/spam abiltiy thing
Awesome tutorial(s) )))) -Thanks
Quote Originally Posted by sgrawsreghawrhgwrhgr View Post
and how exactly is it a bad code, it works (didn't try it tho xd) you make it seem as if the { } being there affects anything significantly which it does not
it makes your code more readable, I mean you are right, both versions work the same, but its way more readable in my opinion

its like this, why making things complicated when you have an easy way:

pain for my eyes:


good and clean code:
Quote Originally Posted by ossimc82 View Post
pain for my eyes:
My eyes... they are bleeding.

Quote Originally Posted by sgrawsreghawrhgwrhgr View Post
I know, but i dont think it matters for such a small code, I can see it in use if its a block of code, but for such small code I dont think it really matters if its clean or not because its easy to understand either way xd
With that logic you're going to have some shitty programs down the line...
Quote Originally Posted by Kushala Daora View Post
My eyes... they are bleeding.



With that logic you're going to have some shitty programs down the line...
Dude, the programs he is gonna make is not gonna be bad or unfunctional just because the code is not clean ._.
Quote Originally Posted by lkdjnfoskjednfblksjdfn View Post
Dude, the programs he is gonna make is not gonna be bad or unfunctional just because the code is not clean ._.
Stuff can add up.
Quote Originally Posted by Kushala Daora View Post
Stuff can add up.
Yes i assume thats right, but this guy might have atleast a bit of experience or maybe more? I don't know you that good @sgrawsreghawrhgwrhgr, soz .
Quote Originally Posted by DimitriSavage View Post
So he makes a temporary patch for the MP and you guys talk about clean code.........whatever idgaf kek
one day u will understand how important it is to write clean code, the biggest pain is if you do MVC Razor stuff, because you are forced to use { }

its just a pain:
Quote Originally Posted by ossimc82 View Post
one day u will understand how important it is to write clean code, the biggest pain is if you do MVC Razor stuff, because you are forced to use { }

its just a pain
I know more then anyone about clean code but when you are dealing with easy to read code for anyone to understand...even for the people to rarely code or don't code at all it is important that you cross your t's and dot your i's and make sure that everything is accounted for even if adding {} this is unnecessary it may be necessary for the one reading it as he or she may not understand it without it.
Quote Originally Posted by Kushala Daora View Post
My eyes... they are bleeding.



With that logic you're going to have some shitty programs down the line...
it be nice if you could read mine post first
Quote Originally Posted by DimitriSavage View Post


I know more then anyone about clean code but when you are dealing with easy to read code for anyone to understand...even for the people to rarely code or don't code at all it is important that you cross your t's and dot your i's and make sure that everything is accounted for even if adding {} this is unnecessary it may be necessary for the one reading it as he or she may not understand it without it.
@ossimc82 could rek you any time
Quote Originally Posted by sgrawsreghawrhgwrhgr View Post
and how exactly is it a bad code, it works (didn't try it tho xd) you make it seem as if the { } being there affects anything significantly which it does not
Clean code = Good code.


Clean code:

Is code that is simple, easy to understand and structured. If you have alot of unneccessary stuff in your code as the {} ossi mentioned, its not clean. (((:
Quote Originally Posted by lkdjnfoskjednfblksjdfn View Post
Clean code = Good code.


Clean code:

Is code that is simple, easy to understand and structured. If you have alot of unneccessary stuff in your code as the {} ossi mentioned, its not clean. (((:
I know, but i dont think it matters for such a small code, I can see it in use if its a block of code, but for such small code I dont think it really matters if its clean or not because its easy to understand either way xd
Quote Originally Posted by sgrawsreghawrhgwrhgr View Post
I know, but i dont think it matters for such a small code, I can see it in use if its a block of code, but for such small code I dont think it really matters if its clean or not because its easy to understand either way xd
Ur right, but we all know atleast 1 perfectionist xD
So he makes a temporary patch for the MP and you guys talk about clean code.........whatever idgaf kek

- - - Updated - - -
@Transferred

Here is a tip for the Enemy hitting themselves

players cannot hit players...make enemies do the same

Projectile Look around
Quote Originally Posted by DimitriSavage View Post
I know more then anyone about clean code
yeah, sure... best example (Old Post from you):


1. Naming conventions, public members always start with uppercase char in C#
2. Members in a class with the same name as the class, should always be a constructor, no matter if the case does match or not
3. Nested code is bad, you end up with giant nested code, which makes it not really readable
4. "if" in "if" is bad, reduce them as much as possible to a single if
5. If you just have a method to check something, replace the if with return and everything will be fine
6. Use clear member/parameter names
 
MSDN

(7. make a use of the "params" keyword, use it to create universal methods like the check method)

so dont tell me something about clear code now...


Result:
Code:
internal class Password
{
    public static bool Check(string toCheck1, string password1, string toCheck2, string password2, string toCheck3, string password3)
    {
        return toCheck1 == password1 && toCheck2 == password2 && toCheck3 == password3;
    }
}
Result with 7.:
Code:
internal class Password
{
    public static bool Check(string toCheck, string password, params Tuple<string, string>[] rest)
    {
        return toCheck == password && rest.All(_ => _.Item1 == _.Item2);
    }
}
Posts 16–30 of 31 · Page 2 of 3

Post a Reply

Similar Threads

Tags for this Thread

None

Talk with us