Advertisement
Guest User

Untitled

a guest
Jul 29th, 2023
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.32 KB | None | 0 0
  1. alias ClientConnecterConnectionAttempts {
  2. //sockopen %ClientConnecterServer ClientConnecterConnection %ClientConnecterPort
  3. //timerClientConnecterConnectionAttempts 4 30 //sockopen %ClientConnecterServer ClientConnecterConnection %ClientConnecterPort
  4. //timerClientConnecterConnectionAttemptsMaxReached 1 $calc(30*5) //did -ra ClientConnecter 2 Not connected
  5. }
  6.  
  7. on *:dialog:ClientConnecter:init:0: {
  8. if (!%ClientConnecterServer) {
  9. //set %ClientConnecterServer 127.0.0.1
  10. }
  11. if (!%ClientConnecterPort) {
  12. //set %ClientConnecterPort 6667
  13. }
  14. }
  15.  
  16. dialog ClientConnecter {
  17. title "ClientConnecter"
  18. size -1 -1 176 48
  19. option dbu
  20. text "Status:", 1, 8 8 20 6
  21. text "Not connected", 2, 26 8 62 6
  22. button "Connect", 3, 88 6 30 10
  23. button "Disconnect", 4, 120 6 30 10, disable
  24. button "Ping", 5, 152 6 22 10, disable
  25. edit "", 6, 8 32 126 8, disable
  26. button "Send", 7, 136 32 22 10, disable
  27. text "Port:", 8, 8 24 14 6
  28. text "6667", 9, 24 24 22 6
  29. text "Server/Network:", 10, 8 16 38 6
  30. text "127.0.0.1", 11, 48 16 70 6
  31. }
  32.  
  33. on *:dialog:ClientConnecter:sclick:3: {
  34. //ClientConnecterConnectionAttempts
  35. //did -ra ClientConnecter 2 Attempting to connect...
  36. //timerClientConnecterConnectionAttempts
  37. }
  38.  
  39. on *:sockopen:ClientConnecterConnection:*: {
  40. //did -ra ClientConnecter 2 Connected
  41. }
  42.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement