Thread: Interface Scripts Guide

Page 1 of 3 123 LastLast
Results 1 to 10 of 26
  1. #1 Interface Scripts Guide 
    Discord Johnyblob22#7757


    Join Date
    Mar 2016
    Posts
    1,384
    Thanks given
    365
    Thanks received
    575
    Rep Power
    5000
    Hi today Im going to show you a few basic scripts to be used on A few interface components in 667-718



    Spoiler for Scroll Bars:

    Scroll Bars:
    Note that scroll bars are a container. not a sprite.
    With scroll bars the container you want to scroll on needs a layer height and a layer width to define how much space you have to scroll on.
    Code:
    30;-2147483645;Your component id Hash of the container you wana scroll on here;
    Attached image


    Spoiler for Simple Text Button:

    Simple Text Button:
    With one of these you need to have a container that loads these scripts, inside the container have a text component.
    Attached image
    the container generally should have a x position mode of 1.
    The general Rule for these are to load the mouse leave inside the onload
    if you dont the button will not appear until your mouse hovers over it.
    Also The text inside the container needs to have a left click option. Which will make it a clickable button.
    Code:
    Mouse Over:  94;-2147483645;
    		Mouse Leave: 92;-2147483645;
    		OnLoad: 92;-2147483645;
    Attached image



    Spoiler for Sprite with hover (Similar to bank Comps):

    (I would reccomend looking at the bank interface for this rather then following my tutorial here for this one)
    A few scripts need to be called here.
    The Sprite 1431 is what you would use.
    However these hovers (as u will see down below), need a container to hover upon.
    Everywhere u see the "hash" down below is where an empty container such as:
    Attached image
    Should be called.
    A good example of this is inside the bank interface (762)
    Attached image
    Code:
    Option hook:
    		1722;-2147483645;-2147483643;1433;1431;10;
    		
    		Mouse Repeat:
    		38;-2147483645;hash;Click here to change your preset settings.;25;150;
    		
    		Mouse leave:
    		1501;-2147483645;hash;
    		
    		Mouse over:
    		1357;-2147483645;100;



    Spoiler for Rectangle Transparency:

    This Will allow you to change the color of the FILLED rectangle you have made.
    (Key word filled. You want the rectangle to be filled.)
    In this example I have a a rectangle that is filled and has a start transparency of 200.
    Code:
    	Mouse over: 1570;225;-2147483645;
    		
    		What is this doing? 
    		Well we have 3 arguments here. 
    		1: 1570 running the script.
    		2. 225 is changing the transparency of the rectangle.
    		3. -2147483645 this has to do with mouse movement dont worry about it.
    		
    		Mouse leave:
    		1570;200;-2147483645;
    		As you can see here this is doing the same thing as above but changing it back to 200.
    Attached image





    Spoiler for Noice hover:


    What your making:
    Attached image
    That is the script being called on interface 387. Now here is all you need to do.
    make a sprite or whatever comp you want to have this hover. Now on this interface create a container that this hover will use to display the hover. (Similar to other interfaces i have told you about above.)
    Inside the script put the hash id of the empty container as the second arg.
    Code:
    4538;25362496;-2147483645;-1;Price Checker;120;3793;3793;16101953;13;4;0;-2147483647;-2147483646;
    
    Args: Widget widget0, Widget widget1, int arg2, string string3, int arg4, Sprite sprite5, Sprite sprite6, Color color7, int arg8, int arg9, int arg10, int arg11, int arg12
    
    4538;Hash id of empty container;-2147483645;-1;Price Checker;120;3793;3793;16101953;13;4;0;-2147483647;-2147483646;


    Spoiler for Premade boarders (creds to jens for finding) :):

    This Will allow you to Create boarders around a container without having actual comps there. (Im sure theres more scripts like this but i do not spend time digging in cs2)
    Code:
     
    
    (Aside from 1087 jens found another one! 581. here is what it looks like)
    Attached image
    
    Code:
    581;-2147483645;
    Script is is 1087. Run it on the onload hook. 1087;197066753;0; Here is how the script is being used. ScriptId;Hash of the container your putting this on;arg; make the arg 0 for normal boarders. (as shown above in the example) if you make the arg >0 u will have this happen if (arg1 > 0) { CHILD.createChild(widget0, 5, int4); CHILD.setPosition(0, arg1 - 5, 1, 0); CHILD.setSize(4, 32, 1, 0); CHILD.setSprite(828); CHILD.setSpriteTiling(true); int4 = int4 + 1; CHILD.createChild(widget0, 5, int4); CHILD.setPosition(0, arg1 - 3, 0, 0); CHILD.setSize(32, 32, 0, 0); CHILD.setSprite(829); int4 = int4 + 1; CHILD.createChild(widget0, 5, int4); CHILD.setPosition(0, arg1 - 3, 2, 0); CHILD.setSize(32, 32, 0, 0); CHILD.setSprite(830); int4 = int4 + 1; }
    Attached image





    Spoiler for Show inventory script:

    This ones pretty easy. This one acts like an item container from the server but with your inventory. Simply make an empty rectangle shaped container/layer. On the onload or whatever hook you want add this.
    Code:
    1448;-2147483645;
    (Thanks jens again for finding some of these! I have not had the time to dig around.)


    IF anyone has any questions or wants another script/Component To be Explained please leave a comment and ill do it.
    Reply With Quote  
     


  2. #2  
    Registered Member
    Ebp90's Avatar
    Join Date
    Apr 2018
    Posts
    238
    Thanks given
    18
    Thanks received
    158
    Rep Power
    878
    The next button in a book. What is that? It's not even clickable and I haven't been able to figure it out
    Reply With Quote  
     

  3. #3  
    Respected Member


    Kris's Avatar
    Join Date
    Jun 2016
    Age
    26
    Posts
    3,638
    Thanks given
    820
    Thanks received
    2,642
    Rep Power
    5000
    Quote Originally Posted by GeneralReposti View Post
    The next button in a book. What is that? It's not even clickable and I haven't been able to figure it out
    Dialogue button. Requires access mask #0(very first bit) to be enabled.
    Attached image
    Reply With Quote  
     

  4. #4  
    Registered Member Mr. Snow's Avatar
    Join Date
    Feb 2015
    Age
    25
    Posts
    222
    Thanks given
    42
    Thanks received
    33
    Rep Power
    61
    Dope! Thanks for this. I've been editing 718 interfaces via the cache for a while & its much harder to understand things like scroll bars when making edits in HEX.


    “On two occasions I have been asked, ‘Pray, Mr. Babbage, if
    you put into the machine wrong figures, will the right answers
    come out?’ […] I am not able rightly to apprehend the kind of
    confusion of ideas that could provoke such a question.”
    —Charles Babbage, Passages from the Life of a Philosopher
    (1864)
    Reply With Quote  
     

  5. #5  
    van 't stad

    Shnek's Avatar
    Join Date
    Oct 2013
    Posts
    1,065
    Thanks given
    343
    Thanks received
    297
    Rep Power
    109
    Goodjob, not very hard. Just reading the the array values

    Quote Originally Posted by Mr. Snow View Post
    Dope! Thanks for this. I've been editing 718 interfaces via the cache for a while & its much harder to understand things like scroll bars when making edits in HEX.
    Don't do this please, try to understand how interfaces are made
    Attached image

    Do not use the vps from ovh, blocking vps without reason and no customer support
    Reply With Quote  
     

  6. #6  
    Discord Johnyblob22#7757


    Join Date
    Mar 2016
    Posts
    1,384
    Thanks given
    365
    Thanks received
    575
    Rep Power
    5000
    Quote Originally Posted by Mr. Snow View Post
    Dope! Thanks for this. I've been editing 718 interfaces via the cache for a while & its much harder to understand things like scroll bars when making edits in HEX.
    Good to hear but editing in hex is just not a bet

    Quote Originally Posted by GeneralReposti View Post
    The next button in a book. What is that? It's not even clickable and I haven't been able to figure it out
    Show me a screenshot and an interface id.
    Attached image
    Reply With Quote  
     

  7. #7  
    Registered Member Mr. Snow's Avatar
    Join Date
    Feb 2015
    Age
    25
    Posts
    222
    Thanks given
    42
    Thanks received
    33
    Rep Power
    61
    Quote Originally Posted by Shnek View Post
    Goodjob, not very hard. Just reading the the array values



    Don't do this please, try to understand how interfaces are made
    Thanks, hex obviously isn't the best option but w/o learning that first I wouldn't have been able to make my own interface editor. Plus, what I do with my time is my own business.


    “On two occasions I have been asked, ‘Pray, Mr. Babbage, if
    you put into the machine wrong figures, will the right answers
    come out?’ […] I am not able rightly to apprehend the kind of
    confusion of ideas that could provoke such a question.”
    —Charles Babbage, Passages from the Life of a Philosopher
    (1864)
    Reply With Quote  
     

  8. #8  
    Registered Member
    24th's Avatar
    Join Date
    Oct 2016
    Posts
    250
    Thanks given
    35
    Thanks received
    85
    Rep Power
    189
    Very nice work.
    Reply With Quote  
     

  9. #9  
    van 't stad

    Shnek's Avatar
    Join Date
    Oct 2013
    Posts
    1,065
    Thanks given
    343
    Thanks received
    297
    Rep Power
    109
    Quote Originally Posted by Mr. Snow View Post
    Thanks, hex obviously isn't the best option but w/o learning that first I wouldn't have been able to make my own interface editor. Plus, what I do with my time is my own business.
    You don't need to learn hex, to understand how interfaces are created (Look in the client for IComponentDefinitions, if you need more information about how to start on your editor, just message me). It's like coding in notepad, it's possible but why would you even waste your time on doing that? You get my point?
    Attached image

    Do not use the vps from ovh, blocking vps without reason and no customer support
    Reply With Quote  
     

  10. #10  
    Registered Member Mr. Snow's Avatar
    Join Date
    Feb 2015
    Age
    25
    Posts
    222
    Thanks given
    42
    Thanks received
    33
    Rep Power
    61
    Quote Originally Posted by Shnek View Post
    You don't need to learn hex, to understand how interfaces are created (Look in the client for IComponentDefinitions, if you need more information about how to start on your editor, just message me). It's like coding in notepad, it's possible but why would you even waste your time on doing that? You get my point?
    I understand your point. Matter of fact, I already talked to you about interfaces before via skype. You're absolutely correct, learning hex makes little sense. I built my first fully cs2 functioning interface using hex though. When I made my editor, I realized how shitty it was but it was nice to see the progress I had made. Learning it this way helped me by giving me the confidence to pursue programming.


    “On two occasions I have been asked, ‘Pray, Mr. Babbage, if
    you put into the machine wrong figures, will the right answers
    come out?’ […] I am not able rightly to apprehend the kind of
    confusion of ideas that could provoke such a question.”
    —Charles Babbage, Passages from the Life of a Philosopher
    (1864)
    Reply With Quote  
     

  11. Thankful user:


Page 1 of 3 123 LastLast

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. Interface Script Id for interface 884
    By Cedia in forum Requests
    Replies: 0
    Last Post: 07-28-2014, 07:04 PM
  2. JS Interface Scripting
    By .fabian in forum Show-off
    Replies: 12
    Last Post: 07-28-2013, 01:41 AM
  3. Interface Script Loader [Kind-Of]
    By Robin Spud in forum Snippets
    Replies: 6
    Last Post: 07-11-2010, 09:52 PM
  4. [Tool] Interface Making Guide.
    By Robin Spud in forum Projects
    Replies: 4
    Last Post: 01-09-2010, 03:54 PM
  5. Interface scripts
    By BenjaR in forum Help
    Replies: 0
    Last Post: 10-15-2009, 11:03 AM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •