Thread: [#154/CS2] OSRS Decompiled ClientScripts

Results 1 to 7 of 7
  1. #1 [#154/CS2] OSRS Decompiled ClientScripts 
    Registered Member

    Join Date
    Feb 2010
    Posts
    715
    Thanks given
    133
    Thanks received
    363
    Rep Power
    550
    [Only registered and activated users can see links. ]

    Some sample scripts:
    Code:
    void script_1685(int arg0, int arg1, string string2) {
    	int int2;
    	int int3;
    	int int4;
    	string str1;
    	VARC[11] = 1;
    	if (widget(162, 31).isHidden() == false) {
    		script_299(1, 1);
    	}
    	script_927(0);
    	_ = script_228(widget(590, 1), string2, 0);
    	widget(590, 0).clearChildren();
    	int2 = 0;
    	int3 = 0;
    	int4 = script_1686(widget(590, 2), 1, "Ring of Dueling", 2552, arg0);
    	int2, int3 = script_1687(widget(590, 2), 3);
    	int4, int2 = script_1688(widget(590, 2), 1, "Duel Arena", int3, arg0, int4, int2, 0);
    	int4, int2 = script_1688(widget(590, 2), 1, "Castle Wars", int3, arg0, int4, int2, 1);
    	int4, int2 = script_1688(widget(590, 2), 1, "Clan Wars", int3, arg0, int4, int2, 2);
    	int4 = script_1686(widget(590, 3), 1, "Games Necklace", 3853, arg0);
    	int2, int3 = script_1687(widget(590, 3), 5);
    	int4, int2 = script_1688(widget(590, 3), 1, "Burthorpe", int3, arg0, int4, int2, 3);
    	int4, int2 = script_1688(widget(590, 3), 1, "Barbarian Outpost", int3, arg0, int4, int2, 4);
    	int4, int2 = script_1688(widget(590, 3), 1, "Corporeal Beast", int3, arg0, int4, int2, 5);
    	str1 = "Tears of Guthix";
    	if (isBitFlagged(arg1, 0) == false) {
    		str1 = "<str>" + str1 + "</str>";
    	}
    	int4, int2 = script_1688(widget(590, 3), 1, str1, int3, arg0, int4, int2, 6);
    	str1 = "Wintertodt Camp";
    	if (isBitFlagged(arg1, 1) == false) {
    		str1 = "<str>" + str1 + "</str>";
    	}
    	int4, int2 = script_1688(widget(590, 3), 1, str1, int3, arg0, int4, int2, 7);
    	int4 = script_1686(widget(590, 4), 2, "Combat bracelet", 11972, arg0);
    	int2, int3 = script_1687(widget(590, 4), 4);
    	int4, int2 = script_1688(widget(590, 4), 2, "Warriors' Guild", int3, arg0, int4, int2, 8);
    	int4, int2 = script_1688(widget(590, 4), 2, "Champions' Guild", int3, arg0, int4, int2, 9);
    	int4, int2 = script_1688(widget(590, 4), 2, "Monastery", int3, arg0, int4, int2, 10);
    	int4, int2 = script_1688(widget(590, 4), 2, "Ranging Guild", int3, arg0, int4, int2, 11);
    	int4 = script_1686(widget(590, 5), 2, "Skills necklace", 11968, arg0);
    	int2, int3 = script_1687(widget(590, 5), 5);
    	int4, int2 = script_1688(widget(590, 5), 2, "Fishing Guild", int3, arg0, int4, int2, 12);
    	int4, int2 = script_1688(widget(590, 5), 2, "Mining Guild", int3, arg0, int4, int2, 13);
    	int4, int2 = script_1688(widget(590, 5), 2, "Crafting Guild", int3, arg0, int4, int2, 14);
    	int4, int2 = script_1688(widget(590, 5), 2, "Cooking Guild", int3, arg0, int4, int2, 15);
    	str1 = "Woodcutting Guild";
    	if (isBitFlagged(arg1, 1) == false) {
    		str1 = "<str>" + str1 + "</str>";
    	}
    	int4, int2 = script_1688(widget(590, 5), 2, str1, int3, arg0, int4, int2, 16);
    	int4 = script_1686(widget(590, 6), 3, "Ring of Wealth", 11980, arg0);
    	int2, int3 = script_1687(widget(590, 6), 4);
    	str1 = "Miscellania";
    	if (isBitFlagged(arg1, 2) == false) {
    		str1 = "<str>" + str1 + "</str>";
    	}
    	int4, int2 = script_1688(widget(590, 6), 3, str1, int3, arg0, int4, int2, 17);
    	int4, int2 = script_1688(widget(590, 6), 3, "Grand Exchange", int3, arg0, int4, int2, 18);
    	int4, int2 = script_1688(widget(590, 6), 3, "Falador Park", int3, arg0, int4, int2, 19);
    	str1 = "Dondakan's Rock";
    	if (isBitFlagged(arg1, 3) == false) {
    		str1 = "<str>" + str1 + "</str>";
    	}
    	int4, int2 = script_1688(widget(590, 6), 3, str1, int3, arg0, int4, int2, 20);
    	int4 = script_1686(widget(590, 7), 3, "Amulet of Glory", 11978, arg0);
    	int2, int3 = script_1687(widget(590, 7), 4);
    	int4, int2 = script_1688(widget(590, 7), 3, "Edgeville", int3, arg0, int4, int2, 21);
    	int4, int2 = script_1688(widget(590, 7), 3, "Karamja", int3, arg0, int4, int2, 22);
    	int4, int2 = script_1688(widget(590, 7), 3, "Draynor Village", int3, arg0, int4, int2, 23);
    	int4, int2 = script_1688(widget(590, 7), 3, "Al Kharid", int3, arg0, int4, int2, 24);
    	return;
    }
    Code:
    void script_414(boolean arg0, int arg1, string arg2, Widget widget3, Widget widget4, Widget widget5, Widget widget6, Widget widget7, int arg8) {
    	int int8;
    	string str1;
    	string str2;
    	string str3;
    	playSoundEffect(2266, 1, 0);
    	widget3.setIsHidden(true);
    	widget4.setIsHidden(false);
    	widget6.clearChildren();
    	widget7.setPosition(33, 165, 0, 0);
    	widget6.setIsHidden(false);
    	str1 = "Extend everything";
    	str2 = "Confirm";
    	str3 = "";
    	if (arg1 == 38 + 9) {
    		str3 = "<u=ff981f>" + str1 + "</u>" + "<br>" + "<br>" + "All task extensions will be unlocked. You can re-lock them individually later, but will not receive a refund." + "<br>" + "<br>" + "<col=ff0000>" + "Pay " + arg8 + " points?" + "</col>";
    	} else if (arg1 == 35 && arg0 == false) {
    		str1 = datamap('i', 's', 834, arg1);
    		if (VARPBIT[5362] == 1) {
    			str2 = "Enable";
    			str3 = "<u=ff981f>" + str1 + "</u>" + "<br>" + "<br>" + arg2 + "<br>" + "<br>" + "<col=00ff00>" + "Really enable it? It will " + "</col>" + "<col=ffffff>" + "not cost you any points" + "</col>" + "<col=00ff00>" + " as you have unlocked this previously." + "</col>";
    		} else {
    			str2 = "Disable";
    			str3 = "<u=ff981f>" + str1 + "</u>" + "<br>" + "<br>" + arg2 + "<br>" + "<br>" + "<col=00ff00>" + "Really disable it? This feature can be toggled at your leisure for " + "</col>" + "<col=ffffff>" + "no future cost" + "</col>" + "<col=00ff00>" + "." + "</col>";
    		}
    	} else if (arg0 == true) {
    		str1 = datamap('i', 's', 834, arg1);
    		str2 = "Unlock";
    		str3 = "<u=ff981f>" + str1 + "</u>" + "<br>" + "<br>" + arg2 + "<br>" + "<br>" + "<col=ff0000>" + "Pay " + datamap('i', 'i', 836, arg1) + " points?" + "</col>";
    	} else {
    		str1 = datamap('i', 's', 834, arg1);
    		str2 = "Disable";
    		str3 = "<u=ff981f>" + str1 + "</u>" + "<br>" + "<br>" + "Really disable it?" + "<br>" + "<br>" + "<col=ff0000>" + "You will not get your points back." + "</col>";
    	}
    	widget5.setText(str3);
    	int8 = 0;
    	while (int8 < arg1) {
    		CHILD.createChild(widget6, 3, int8);
    		CHILD.setHidden(true);
    		int8 = int8 + 1;
    	}
    	CHILD.createChild(widget6, 3, arg1);
    	CHILD.setSize(0, 0, 1, 1);
    	CHILD.setPosition(0, 0, 1, 1);
    	CHILD.setFilled(true);
    	CHILD.setTrans(255);
    	CHILD.setContextMenuOption(1, str2);
    	CHILD.setOptionBase("<col=ff9040>" + str1);
    	CHILD.hookOptionClick(&script_319(true, CTX_MENU_OPTION, widget3, widget4, widget5, widget6, widget7));
    	widget7.setContextMenuOption(1, "Back");
    	widget7.hookOptionClick(&script_319(false, CTX_MENU_OPTION, widget3, widget4, widget5, widget6, widget7));
    	return;
    }
    Most instructions come from my work on 667 refactoring as most of the instruction set is the same. Instructions that were missing/incompatible with 667 ones have been fixed up and given a generic name. All scripts are decompiled without any errors, but let me know if you still find issues

    Decompiler + Compiler will be released soon
    Reply With Quote  
     


  2. #2  
    Banned

    Join Date
    Apr 2013
    Posts
    1,623
    Thanks given
    410
    Thanks received
    474
    Rep Power
    0
    "Decompiler + Compiler will be released soon"
    Yes please, thanks for scripts.
    Reply With Quote  
     

  3. #3  
    Registered Member
    Vip3r's Avatar
    Join Date
    Oct 2011
    Age
    24
    Posts
    2,566
    Thanks given
    1,027
    Thanks received
    1,168
    Rep Power
    414
    tysm you legend !
    [Only registered and activated users can see links. ]
    Reply With Quote  
     

  4. #4  
    Registered Member

    Join Date
    Feb 2010
    Posts
    715
    Thanks given
    133
    Thanks received
    363
    Rep Power
    550
    Quote Originally Posted by trees View Post
    Yes please, thanks for scripts.
    Well there are a few features I still need/want to finish and some things that need to be done to make it more user friendly but can't seem to find a lot of time lately to work on it.
    If you want to test out CS2 I'll happily compile scripts if you want to write any
    Reply With Quote  
     

  5. Thankful user:


  6. #5  
    Registered Member

    Join Date
    Nov 2015
    Age
    21
    Posts
    2,002
    Thanks given
    333
    Thanks received
    1,049
    Rep Power
    5000
    much appreciated!
    Reply With Quote  
     

  7. #6  
    Registered Member

    Join Date
    Jul 2016
    Age
    21
    Posts
    126
    Thanks given
    200
    Thanks received
    63
    Rep Power
    315
    This will be very useful, thanks!
    [Only registered and activated users can see links. ]

    Spoiler for Info:
    Discord: Jesse#0420
    Youtube: DaGreenRs
    Skype: Jesse.forsberg1
    Reply With Quote  
     

  8. #7  
    Registered Member

    Join Date
    Jul 2015
    Posts
    707
    Thanks given
    269
    Thanks received
    361
    Rep Power
    713
    Can you release this for the current OSRS revision?
    link removed
    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. [667/CS2] Decompiled Clientscripts
    By Vincent in forum Downloads
    Replies: 19
    Last Post: 09-06-2017, 06:23 PM
  2. [700+] Decompiled cs2 scripts
    By mgi125 in forum Downloads
    Replies: 13
    Last Post: 05-19-2016, 07:47 PM
  3. RS3 [812] 9960 decompiled cs2 scripts
    By mgi125 in forum Downloads
    Replies: 21
    Last Post: 10-08-2015, 04:14 AM
  4. ClientScript 2 Decompiler
    By Velocity in forum Show-off
    Replies: 4
    Last Post: 03-15-2014, 10:32 PM
  5. CS2 Decompiler
    By mgi125 in forum Projects
    Replies: 23
    Last Post: 01-15-2012, 06:52 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
  •