GamerzPlanet - For All Your Online Gaming Needs!!

Go Back   GamerzPlanet - For All Your Online Gaming Needs!! > ijji Games > Gunz Online > Gunz Hacks/Bots Discussion

Gunz Hacks/Bots Discussion Gunz Hacks/Bots Discussion only. No begging.



Help with code

Gunz Hacks/Bots Discussion


Reply
 
Thread Tools Display Modes
Old 08-21-2008, 07:13 AM   #1
Registered User
 
Last Online: 11-24-2008 06:10 AM
Join Date: Nov 2005
Posts: 244
Thanks: 17
Thanked 493 Times in 42 Posts
KingHELLZ is on a distinguished road
iTrader: 0 / 0%
Points: 46,345.40
Bank: 0.00
Total Points: 46,345.40
Help with code

I tried to do a thing that if you type in game !spam:on it will start spamming random sentences (out of 5 ) But when i inject , and type !spam:on nothing happens :\
Code:
  1. if(LastInput()=="!spam:on")
  2. {
  3. while(LastInput()!="!spam:off")
  4. {
  5. int i = rand()%5;
  6. if(i==1)
  7. {
  8. for(int a=0;a<7;++a)
  9. {
  10. ZPostPeerChat("^1Good morning niggaz!",0);
  11. }
  12. }
  13. else if(i==2)
  14. {
  15. for(int a=0;a<7;++a)
  16. {
  17. ZPostPeerChat("^2Pool's closed!",0);
  18. }
  19. }
  20. else if(i==3)
  21. {
  22. for(int a=0;a<7;++a)
  23. {
  24. ZPostPeerChat("^3KingHELLZ Pwnz!",0);
  25. }
  26. }
  27. else if(i==4)
  28. {
  29. for(int a=0;a<7;++a)
  30. {
  31. ZPostPeerChat("^4Jackie Chan's hangs like a horse!",0);
  32. }
  33. }
  34. else
  35. {
  36. for(int a=0;a<7;++a)
  37. {
  38. ZPostPeerChat("^5But Chuck Norrises' is way bigger!",0);
  39. }
  40. }
  41. }
  42. }

Also I tried to change the last input to a key but it started spamming first spam sentence and froze my computer, here is how that looked like
Code:
if(GetAsyncKeyState(VK_NEXT))
{

    bool spamming = true;
    
    while(spamming = true)
    {
        int i = rand()%5;

        if(i==1)
        {
            for(int a=0;a<7;++a)
            {
                ZPostPeerChat("^1Good morning niggaz!",0);
            }
        }

        else if(i==2)
        {
            for(int a=0;a<7;++a)
            {
                ZPostPeerChat("^2Pool's closed!",0);
            }
        }

        else if(i==3)
        {
            for(int a=0;a<7;++a)
            {
                ZPostPeerChat("^3KingHELLZ Pwnz!",0);
            }
        }

        else if(i==4)
        {
            for(int a=0;a<7;++a)
            {
                ZPostPeerChat("^4Jackie Chan's hangs like a horse!",0);
            }
        }

        else
        {
            for(int a=0;a<7;++a)
            {
                ZPostPeerChat("^5But Chuck Norrises' is way bigger!",0);
            }
        }

        if(GetAsyncKeyState('O'))
        {
            spamming = false;
        }
    }
}
any one know the problem?
KingHELLZ is offline   Reply With Quote
Sponsored Links
Old 08-21-2008, 08:20 AM   #2
AHHH Selfish jean
 
hitachihex's Avatar
 
Last Online: 11-28-2008 09:29 PM
Join Date: Dec 2005
Posts: 240
Thanks: 3
Thanked 52 Times in 24 Posts
hitachihex is an unknown quantity at this point
iTrader: 0 / 0%
Points: 2,116.27
Bank: 1.07
Total Points: 2,117.34
 
Re: Help with code

int r=0;

//

#define GetOneKey(key) if(GetAsyncKeyState(key) & 0x8000)


//

GetOneKey(VK_NEXT)
{
r = rand () % 5;
switch(r)
{
case 1:
//
break;
case 2:
//
break;
case 3:
// etc..
break;
default:
//etc
}
}
//

also..

use memcmp withlastinput, ... [Only registered and activated users can see links. ]

e.g if(memcmp(lastinput(), "Something", 9) == 0)
{
bBool = !bBool;
}

then in another thread, or the same thread //

if(bBool) // true?
{
// do stuff
}

Last edited by hitachihex; 08-21-2008 at 08:24 AM..
hitachihex is offline   Reply With Quote
The Following User Says Thank You to hitachihex For This Useful Post:
KingHELLZ (08-21-2008)
Old 08-21-2008, 11:43 AM   #3
Registered User
 
Last Online: 11-24-2008 06:10 AM
Join Date: Nov 2005
Posts: 244
Thanks: 17
Thanked 493 Times in 42 Posts
KingHELLZ is on a distinguished road
iTrader: 0 / 0%
Points: 46,345.40
Bank: 0.00
Total Points: 46,345.40
Re: Help with code

Ok I changed my code to this now
Code:
SPAMS()
{
    //Random spam messsage
    if(memcmp(LastInput(),"!spam:on",8)==0)
    {
        while(memcmp(LastInput(),"!spam:off",8)!=0)
        {
            int r = rand()%5;

            switch(r)
            {
                case 1:
                {
                    for(int a=0;a<2;++a)
                    {
                        ZPostPeerChat("^1Good morning niggaz!",0);
                        Sleep(10);
                    }
                }
                case 2:
                {
                    for(int a=0;a<2;++a)
                    {
                        ZPostPeerChat("^2Pool's closed!",0);
                        Sleep(10);
                    }
                }
                case 3:
                {
                    for(int a=0;a<2;++a)
                    {
                        ZPostPeerChat("^3KingHELLZ Pwnz!",0);
                        Sleep(10);
                    }
                }                        
                case 4:
                {
                    for(int a=0;a<2;++a)
                    {
                        ZPostPeerChat("^4Jackie Chan's hangs like a horse!",0);
                        Sleep(10);
                    }
                }
                default:
                {
                    for(int a=0;a<2;++a)
                    {
                        ZPostPeerChat("^5You all are ******s!",0);
                        Sleep(10);
                    }
                }
            }
        }
    }
    //END of random spam message        
}
but it still ignores when i type !spam:on and nothing happens
KingHELLZ is offline   Reply With Quote
Old 08-21-2008, 11:58 AM   #4
AHHH Selfish jean
 
hitachihex's Avatar
 
Last Online: 11-28-2008 09:29 PM
Join Date: Dec 2005
Posts: 240
Thanks: 3
Thanked 52 Times in 24 Posts
hitachihex is an unknown quantity at this point
iTrader: 0 / 0%
Points: 2,116.27
Bank: 1.07
Total Points: 2,117.34
 
Re: Help with code

while(memcmp(LastInput(),"!spam:off",8)!=0)
{

that line right there is full of fail, completly remove it,
create a global boolean variable, such as bool bSpam = false;

once memcmp(lastinput(), "@spam", 5) == 0){
bSpam = !bSpam;
}

// then in another threa,d or the same thread

if(bSpam){

// do whatever you want..
}
hitachihex is offline   Reply With Quote
The Following User Says Thank You to hitachihex For This Useful Post:
KingHELLZ (08-21-2008)
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

All times are GMT +1. The time now is 12:58 AM.


Powered by: vBulletin
Copyright ©2008, GamerzPlanet.Net
SEO by vBSEO 3.2.0 ©2008, Crawlability, Inc.
Network: GamerzPlanet | ForumzPlanet | GzPUpload | GzPArcade | GzP Host | Australian Poker | Watch Desperate Housewives | Visits: