Thread: Question about RunScript 108

Results 1 to 4 of 4
  1. #1 Question about RunScript 108 
    Registered Member Enyll's Avatar
    Join Date
    Aug 2016
    Posts
    121
    Thanks given
    21
    Thanks received
    1
    Rep Power
    13
    Code:
    player.getPackets().sendRunScript(108, new Object[] { "TEXT" });
    How can I make it so the user can only type an integer? Also, how can I store whatever the user has typed as an integer into the variable, is it possible?

    Basically, what I want to do is do everything this command does but using RunScript 108

    Code:
    case "r":
    	cmd = cmd[1].split(",");
    	int red = Integer.valueOf(cmd[0]);
    	player.getAppearence().cr = red;
    	player.getAppearence().ce = true;
    	player.getAppearence().generateAppearenceData();
    	return true;
    Reply With Quote  
     

  2. #2  
    Respected Member


    Polar's Avatar
    Join Date
    Sep 2015
    Age
    28
    Posts
    420
    Thanks given
    0
    Thanks received
    418
    Rep Power
    3098
    Script 108 only allows numbers, and a select few of chars. The chars being (both upper and lowercase) "K", "M", and "T" (only if using a language that uses T). Allowing those chars is what allows you to do something like "1m" to equal 1000000. To store it look at one of the enter string packets in WorldPacketDecoder, the only difference is that it reads an integer instead of a string. Someone released a better way to handle input when sending that script so you might be able to find that in the snippets/tutorials section.
    Reply With Quote  
     

  3. Thankful user:


  4. #3  
    Registered Member Enyll's Avatar
    Join Date
    Aug 2016
    Posts
    121
    Thanks given
    21
    Thanks received
    1
    Rep Power
    13
    Quote Originally Posted by Polar View Post
    Script 108 only allows numbers, and a select few of chars. The chars being (both upper and lowercase) "K", "M", and "T" (only if using a language that uses T). Allowing those chars is what allows you to do something like "1m" to equal 1000000. To store it look at one of the enter string packets in WorldPacketDecoder, the only difference is that it reads an integer instead of a string. Someone released a better way to handle input when sending that script so you might be able to find that in the snippets/tutorials section.
    Okay, thank you, i'll let you know what I find
    Reply With Quote  
     

  5. #4  
    Registered Member

    Join Date
    Feb 2013
    Age
    28
    Posts
    664
    Thanks given
    46
    Thanks received
    196
    Rep Power
    127
    Please refer here
    Reply With Quote  
     


Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Similar Threads

  1. question about sprites
    By zedex ranger in forum Graphics
    Replies: 3
    Last Post: 05-23-2008, 10:35 PM
  2. Question about custom sprites
    By Mikey` in forum RS2 Client
    Replies: 1
    Last Post: 04-10-2008, 01:16 AM
  3. Private Servers, Question about legality.
    By alongu in forum RS2 Server
    Replies: 10
    Last Post: 01-12-2008, 09:44 AM
  4. Lol noob question about renamed clients
    By newservermaker in forum RS2 Client
    Replies: 4
    Last Post: 01-05-2008, 11:42 PM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •