Jump to content

How to prevent sending packages to a certain ip?


Recommended Posts

I want to make a prank/joke program wich would make you lag like hell in online games.

Basically what i want to do is to have the ping for a certain ip never drop below a specified value.

It would work like you would have to set a minimum ping at the starting of the program, then it would ask for ip and port, finally you could activate and deactivate the "lag machine" by a hotkey.

When you activate the function to make the lag, a command would be run to block the connection on the specified ip and port, sleep the minimum lag amount, then unblock the connection for 100 miliseconds, then again block it(wend).

Here would be the example code:

$minping = inputbox("The Lag Machine" , "Please enter the minimum ping to suffer:")
$ipport = inputbox("The Lag Machine" , "Please enter the ip:port of the game server")
iniwrite ( @scriptdir&"/data.ini" , "Data" , "minping" , $minping)
iniwrite ( @scriptdir&"/data.ini" , "Data" , "ipport" , $ipport)
call ( "wait")
func wait()
    tooltip ( "Press F3 to start lagging" , 0 , 0 , "The Lag Machine")
    hotkeyset (  "{F3}" , "lag")
    while 1
    sleep (1000)
    WEnd
EndFunc
func lag()
    $minping = iniread ( @scriptdir&"/data.ini" , "Data" , "minping", "400")
    $ipport = iniread (@scriptdir&"/data.ini" , "Data" , "ipport", "1.0.0.7")
    tooltip ("")
    hotkeyset ( "{F3}" , "wait")
    while 1
    ;block connection command needed here
        sleep ($minping)
    ;unblock connection command needed here
        sleep (100)
    wend
    endfunc

If anyone could help me with the command i'm looking for, or any other way, please post!

:)

Link to comment
Share on other sites

I want to make a prank/joke program wich would make you lag like hell in online games.

Basically what i want to do is to have the ping for a certain ip never drop below a specified value.

...

what game areyou trying to do tis with
Link to comment
Share on other sites

  • Developers

Lets stay away from pranks/jokes as they turn into something else in general.

..and you 7h331337 knew this already ..right?

*click*

Edited by Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...