-
Posts
804 -
Joined
-
Last visited
-
Feedback
100%
Everything posted by Reid
-
Thanks man
-
http://www.reiddacosta.com thoughts?
-
i cant stop laughing public class GUI extends JFrame { public GUI(){ //code here } } public class woodcutter extends Script { @manifest GUI gui; public void onStart(){ gui = new GUI(); gui.setVisible(true); } } this should help you out, if not then pls learn java
-
So pretty much my client is not receiving the text that that was sent to the server, been stuck at this for a few hours now if you can help that would be awesome thanks! Client.java import java.awt.event.KeyEvent; import java.awt.event.KeyListener; import java.io.IOException; import java.net.DatagramPacket; import java.net.DatagramSocket; import java.net.InetAddress; import java.net.SocketException; import java.net.UnknownHostException; import java.text.SimpleDateFormat; import java.util.Date; import javax.swing.JFrame; import javax.swing.JOptionPane; import javax.swing.JPanel; import javax.swing.JScrollPane; import javax.swing.JTextArea; import javax.swing.border.EmptyBorder; /** * * @author reid dacosta * */ public class Client implements Runnable { private JPanel contentPane; private boolean running = false; private JFrame frame; private JTextArea messageArea; private JTextArea sendMessageArea; private JScrollPane scrollPane; private JScrollPane scrollPane_1; private JScrollPane scrollPane_2; private static String userName; private static DatagramSocket socket; private static InetAddress ip; private Thread send,listen; public static void main(String[] args) throws IOException { userName = JOptionPane.showInputDialog("Please enter your name!"); new Client(); } public void run() { listen(); } public Client() { frame = new JFrame(); frame.setTitle("rChat - [1.01 BETA]"); frame.setResizable(false); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.setBounds(100, 100, 478, 340); contentPane = new JPanel(); contentPane.setBorder(new EmptyBorder(5, 5, 5, 5)); frame.setContentPane(contentPane); contentPane.setLayout(null); scrollPane = new JScrollPane(); scrollPane.setBounds(6, 6, 322, 223); contentPane.add(scrollPane); scrollPane_1 = new JScrollPane(); scrollPane_1.setBounds(334, 6, 138, 306); contentPane.add(scrollPane_1); scrollPane_2 = new JScrollPane(); scrollPane_2.setBounds(6, 235, 322, 78); contentPane.add(scrollPane_2); messageArea = new JTextArea(); scrollPane.setViewportView(messageArea); messageArea.setEditable(false); messageArea.setLineWrap(true); JTextArea onlineArea = new JTextArea(); scrollPane_1.setViewportView(onlineArea); onlineArea.setEditable(false); sendMessageArea = new JTextArea(); scrollPane_2.setViewportView(sendMessageArea); sendMessageArea.addKeyListener(new KeyListener() { @Override public void keyPressed(KeyEvent e) { if (e.getKeyCode() == KeyEvent.VK_ENTER) { e.consume(); send(sendMessageArea.getText()); } } @Override public void keyTyped(KeyEvent e) { } @Override public void keyReleased(KeyEvent e) { } }); frame.setVisible(true); sendMessageArea.requestFocusInWindow(); openConnection(); running = true; } private void openConnection() { try { socket = new DatagramSocket(); ip = InetAddress.getByName("localhost"); } catch (UnknownHostException e) { e.printStackTrace(); } catch (SocketException e) { e.printStackTrace(); } } private void send(String message) { //log(message); send(message.getBytes()); sendMessageArea.setText(""); } private void send(final byte[] data) { send = new Thread("Send") { public void run() { DatagramPacket packet = new DatagramPacket(data, data.length,ip, 1996); try { socket.send(packet); } catch (IOException e) { e.printStackTrace(); } } }; send.start(); } public String receive() { byte[] data = new byte[1024]; DatagramPacket packet = new DatagramPacket(data, data.length); try { socket.receive(packet); } catch (IOException e) { e.printStackTrace(); } String message = new String(packet.getData()); return message; } public void listen() { listen = new Thread("Listen") { public void run() { while (running) { String message = receive(); System.out.println(message); log(message); } } }; listen.start(); } private void log(String str) { Date today = new Date(); SimpleDateFormat dateFormat = new SimpleDateFormat("hh:mm:ss"); String date = dateFormat.format(today); messageArea.append(String.format("(" + date + ") " + userName + ": " + str + "\n")); } } Server.java import java.io.IOException; import java.net.DatagramPacket; import java.net.DatagramSocket; import java.net.SocketException; import javax.swing.JFrame; import javax.swing.JPanel; import javax.swing.JScrollPane; import javax.swing.JTextArea; import javax.swing.border.EmptyBorder; import javax.swing.text.DefaultCaret; /** * * @author reid dacosta * */ public class Server extends JFrame implements Runnable { private static final long serialVersionUID = 1L; private JPanel contentPane; private JTextArea textArea; private DatagramSocket socket; private static final int PORT = 1996; private boolean running = false; private Thread run, recive; public Server() { setTitle("rChat Server"); setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); setBounds(100, 100, 450, 200); contentPane = new JPanel(); contentPane.setBorder(new EmptyBorder(5, 5, 5, 5)); setContentPane(contentPane); contentPane.setLayout(null); JScrollPane scrollPane = new JScrollPane(); scrollPane.setBounds(6, 6, 438, 166); contentPane.add(scrollPane); textArea = new JTextArea(); textArea.setLineWrap(true); textArea.setEditable(false); scrollPane.setViewportView(textArea); DefaultCaret caret = (DefaultCaret)textArea.getCaret(); caret.setUpdatePolicy(DefaultCaret.ALWAYS_UPDATE); setVisible(true); startServer(); } public static void main(String[] args) { new Server(); } @Override public void run() { running = true; recive(); } private void startServer() { try { socket = new DatagramSocket(PORT); } catch (SocketException e) { e.printStackTrace(); } run = new Thread(this, "Server"); run.start(); } private void recive() { recive = new Thread("Receive") { public void run() { while (running) { byte[] data = new byte[1024]; DatagramPacket packet = new DatagramPacket(data,data.length); try { socket.receive(packet); } catch (IOException e) { e.printStackTrace(); } String str = new String(packet.getData()); log(str); } } }; recive.start(); } private void log(String str) { textArea.append("Someone said : " + str + "\n"); } }
-
@Swizzbeat add me to it
- 28 replies
-
- Beginner
- Intermediate
-
(and 1 more)
Tagged with:
-
reported for making multiple accounts @Dog_
-
loling
-
rip update pls
-
The United Nation of Dogs (UND) 2003 parny_fan2003 founded this conversation (aka @Dog_) 2011 - bartos was born 2012 bartos guided parny_fan2003 to make some friends - leonid - waterlord - bone code -anjew (segregation pls) - he wanted a way to talk to them faster so he created a group convo - parny_fan2003 and leonid goldfarmed air runecrafting (relevant) early 2013 - convo is known as dogs r us/dogs r us and not them/dogs r us and not them and wahey parny_fan2003 made some new friends, though not close friends copyrights static purplekush(reid) red abonor coke harrynoob falixus frank gregdw whopperfury chizzy early/mid 2013 more people are added into the convo by parny_fan2003 - parnassian - speed - whopperfury - reid - coke - aonor - red - harrynoob - frank - chizzy - tekno - britney - kevmeister late 2013 there are some changes in the UND convo - anjew/fox gets butthurt 2much so kicked - paradox - frank leaves - aonor died - red kicked for inactivity - coke (????????) - maruku added - arbiter added why the UND is amazing parny_fan2003 has united us, those who hated each other are now friends the UND has been stable for over a year, thanks to parny_fan2003 if anyone is interested in joining this conversastion please contact parny_fan2003
-
eric you fkin genious!
-
private Condition attackNPC = new Condition(){ NPC npc; @Override public boolean validate() { s.npcs.closest(GUI.npcToKill); return npc != null && !isDoingSomething() && !npc.isUnderAttack() && npc.getHealth() >= 2 && npc.exists(); } @Override public void execute() throws InterruptedException { s.camera.toEntity(npc); npc.interact("Attack"); Script.sleep(Script.random(3000,6000)); while (isDoingSomething()) { Script.sleep(10); } } }; literally works fine in one of my script but im trying to use the same method in another one of my scripts and IT DOESNT WANT TO WORK! FUCK!
-
lmao, i have found so much hentai shit
-
done : https://www.virustotal.com/ca/file/0b45b4c6983fd4b759cfd78e441b4d98f04c03080186a5a08e3f8b965cbfc5ce/analysis/1401657457/
-
Using my program you can generate and find random images hosted via imgur! This is the internet there is some fucked up shit to say the least! Post your findings below! Note: **Just keep clicking generate new image till a new image appears!** Download program : https://www.dropbox.com/s/ubkikkqbth0rowv/ImgurGrabber.jar What the program looks like SOME FINDS: VIRUS SCAN: https://www.virustotal.com/ca/file/0b45b4c6983fd4b759cfd78e441b4d98f04c03080186a5a08e3f8b965cbfc5ce/analysis/1401657457/
-
Is it just me or is it something with the api? private Condition canPickupBones = new Condition(){ GroundItem bone; @Override public boolean validate() { bone = s.groundItems.closest(526,532); return bone != null && !s.inventory.isFull() && bone.getPosition().distance(s.myPlayer().getPosition()) <= 5 && dFighterGUI.tglbtnBp.isSelected(); } @Override public void execute() throws InterruptedException { bone.interact("Take"); Script.sleep(Script.random(2000)); } }; ERROR : [ERROR][Bot #1][06/01 01:11:14 PM]: Error in script executor! java.lang.NullPointerException at org.dscripts.drunescape.scripts.dFighter$3.validate(dFighter.java:67) at org.dscripts.drunescape.scripts.dFighter.executeScript(dFighter.java:23) at org.dscripts.drunescape.dRunescape.onLoop(dRunescape.java:31) at org.osbot.rs07.event.ScriptExecutor$InternalExecutor.run(zm:105) at java.lang.Thread.run(Unknown Source)
-
worked like a charm thanks