diff --git a/README.md b/README.md index 2a20c586b..da3e76751 100644 --- a/README.md +++ b/README.md @@ -1898,7 +1898,21 @@ [**1895**](scripts/[clientscript,script1895].cs2) [**1896**](scripts/[clientscript,script1896].cs2) [**1897**](scripts/[proc,script1897].cs2) +[**1898**](scripts/[clientscript,script1898].cs2) +[**1899**](scripts/[clientscript,script1899].cs2) +[**1900**](scripts/[clientscript,script1900].cs2) +[**1901**](scripts/[clientscript,script1901].cs2) +[**1902**](scripts/[clientscript,script1902].cs2) +[**1903**](scripts/[clientscript,script1903].cs2) +[**1904**](scripts/[proc,script1904].cs2) [**1905**](scripts/[clientscript,bugreport_textinput].cs2) `[clientscript,bugreport_textinput]` +[**1906**](scripts/[clientscript,script1906].cs2) +[**1907**](scripts/[proc,script1907].cs2) +[**1908**](scripts/[clientscript,script1908].cs2) +[**1909**](scripts/[clientscript,script1909].cs2) +[**1910**](scripts/[clientscript,script1910].cs2) +[**1911**](scripts/[proc,script1911].cs2) +[**1912**](scripts/[proc,script1912].cs2) [**1926**](scripts/[clientscript,script1926].cs2) [**1934**](scripts/[proc,script1934].cs2) [**1935**](scripts/[proc,instance_check].cs2) `[proc,instance_check]` diff --git a/scripts/[clientscript,script1898].cs2 b/scripts/[clientscript,script1898].cs2 new file mode 100644 index 000000000..561d92321 --- /dev/null +++ b/scripts/[clientscript,script1898].cs2 @@ -0,0 +1,20 @@ +// 1898 +[clientscript,script1898] +def_component $component0 = interface_214:0; +def_component $component1 = interface_214:1; +def_component $component2 = interface_214:9; +def_int $width3 = if_getwidth($component1); +def_int $height4 = if_getheight($component1); +def_int $width5 = if_getwidth($component0); +def_int $int6 = ~script1912; +def_int $int7 = calc(if_getheight($component0) - $int6); +def_int $int8 = max(0, min(%varcint1170, calc($width5 - $width3))); +def_int $int9 = max($int6, min(%varcint1171, calc($int6 + $int7 - $height4))); +if_setposition($int8, $int9, ^setpos_abs_left, ^setpos_abs_top, $component1); +if (getwindowmode = ^windowmode_fixed | ~on_mobile = true) { + if_setop(1, "", $component2); + if_setondrag(null, $component2); +} else { + if_setop(1, "Move", $component2); + if_setondrag("script1899(event_mousex, event_mousey, $int8, $int9, $int6, $component0, $component1, $component2)", $component2); +} diff --git a/scripts/[clientscript,script1899].cs2 b/scripts/[clientscript,script1899].cs2 new file mode 100644 index 000000000..15c3c8eb3 --- /dev/null +++ b/scripts/[clientscript,script1899].cs2 @@ -0,0 +1,19 @@ +// 1899 +[clientscript,script1899](int $mousex0, int $mousey1, int $int2, int $int3, int $int4, component $component5, component $component6, component $component7) +def_int $height8 = if_getheight($component6); +def_int $width9 = if_getwidth($component6); +def_int $int10 = $int2; +def_int $int11 = $int3; +def_int $width12 = if_getwidth($component5); +def_int $int13 = calc(if_getheight($component5) - $int4); +$int10, $int11 = calc($int10 + ($mousex0 - $int2)), calc($int11 + ($mousey1 - $int3)); +if ($int10 < 10) { + $int10 = 0; +} +if ($int11 < calc($int4 + 10)) { + $int11 = $int4; +} +$int10 = max(0, min($int10, calc($width12 - $width9))); +$int11 = max($int4, min($int11, calc($int4 + $int13 - $height8))); +if_setposition($int10, $int11, ^setpos_abs_left, ^setpos_abs_top, $component6); +if_setontimer("script1900(calc(clientclock + 3), $int10, $int11, $int4, $component5, $component6, $component7)", $component7); diff --git a/scripts/[clientscript,script1900].cs2 b/scripts/[clientscript,script1900].cs2 new file mode 100644 index 000000000..c58c8977e --- /dev/null +++ b/scripts/[clientscript,script1900].cs2 @@ -0,0 +1,9 @@ +// 1900 +[clientscript,script1900](int $clock0, int $int1, int $int2, int $int3, component $component4, component $component5, component $component6) +if (clientclock < $clock0) { + return; +} +%varcint1170, %varcint1171 = $int1, $int2; +if_setondrag("script1899(event_mousex, event_mousey, $int1, $int2, $int3, $component4, $component5, $component6)", interface_214:9); +if_setontimer(null, $component6); +if_callonresize($component4); diff --git a/scripts/[clientscript,script1901].cs2 b/scripts/[clientscript,script1901].cs2 new file mode 100644 index 000000000..fe45da69b --- /dev/null +++ b/scripts/[clientscript,script1901].cs2 @@ -0,0 +1,6 @@ +// 1901 +[clientscript,script1901] +%varcint1168 = 0; +%varcint1169 = 0; +%varcint1170 = 0; +%varcint1171 = 0; diff --git a/scripts/[clientscript,script1902].cs2 b/scripts/[clientscript,script1902].cs2 new file mode 100644 index 000000000..c0e979f46 --- /dev/null +++ b/scripts/[clientscript,script1902].cs2 @@ -0,0 +1,61 @@ +// 1902 +[clientscript,script1902](int $int0, int $int1) +def_component $component2 = interface_860:0; +def_component $component3 = interface_860:1; +def_int $int4 = 56360963; +def_int $int5 = 56360964; +def_int $int6 = 56360965; +def_component $component7 = interface_860:2; +def_component $component8 = interface_860:8; +if (%varcint1172 ! $int0 | %varcint1173 ! $int1) { + if_setscrollpos(0, 0, $component8); +} +%varcint1172 = $int0; +%varcint1173 = $int1; +def_enum $enum9 = ~toplevel_getcomponents; +def_component $component10 = enum(component, component, $enum9, toplevel_osrs_stretch:16); +if (~on_mobile = true) { + if_setontimer("script3833($component2, $component3, 0)", $component2); +} else { + if (%varcint1170 = 0 & %varcint1171 = 0 & %varcint1168 = 0 & %varcint1169 = 0) { + %varcint1168 = if_getwidth($component10); + %varcint1169 = if_getheight($component10); + %varcint1170 = if_getx($component10); + %varcint1171 = if_gety($component10); + } + if_setontimer("script6110($component2, -1)", $component2); +} +if_setonresize("script1903", $component2); +if_sethide(false, $component3); +if_sethide(true, $component7); +if ($enum9 = enum_1132) { + if_setposition(6, 6, ^setpos_abs_centre, ^setpos_abs_centre, $component3); + if_setsize(12, 12, ^setsize_minus, ^setsize_minus, $component3); + ~script1904; + return; +} +cc_deleteall($component2); +def_int $int11 = 0; +while ($int11 < 9) { + cc_create($component2, ^iftype_graphic, $int11); + cc_settiling(true); + cc_settrans(255); + cc_setonmouserepeat("cc_settrans(event_com, event_comsubid, 200, null)"); + cc_setonmouseleave("cc_settrans(event_com, event_comsubid, 255, null)"); + cc_setdraggable($component2, -1); + cc_setdragdeadzone(1); + cc_setdragdeadtime(5); + $int11 = calc($int11 + 1); +} +cc_deleteall($component7); +$int11 = 0; +while ($int11 < 4) { + cc_create($component7, ^iftype_rectangle, $int11); + cc_setsize(calc($int11 * 2), calc($int11 * 2), ^setsize_minus, ^setsize_minus); + cc_setposition(0, 0, ^setpos_abs_centre, ^setpos_abs_centre); + cc_setcolour(0x9f9f9f); + cc_setfill(false); + cc_settrans(calc(100 + $int11 * 10)); + $int11 = calc($int11 + 1); +} +~script1911(-1, -1, $component2, $component3); diff --git a/scripts/[clientscript,script1903].cs2 b/scripts/[clientscript,script1903].cs2 new file mode 100644 index 000000000..268635adf --- /dev/null +++ b/scripts/[clientscript,script1903].cs2 @@ -0,0 +1,3 @@ +// 1903 +[clientscript,script1903] +~script1904; diff --git a/scripts/[clientscript,script1906].cs2 b/scripts/[clientscript,script1906].cs2 new file mode 100644 index 000000000..0434c1c66 --- /dev/null +++ b/scripts/[clientscript,script1906].cs2 @@ -0,0 +1,11 @@ +// 1906 +[clientscript,script1906](int $int0) +if ($int0 = %varcint1173) { + return; +} +sound_synth(interface_select1, 1, 0); +%varcint1173 = $int0; +def_component $component1 = interface_860:0; +def_component $component2 = interface_860:8; +if_callonresize($component1); +if_setscrollpos(0, 0, $component2); diff --git a/scripts/[clientscript,script1908].cs2 b/scripts/[clientscript,script1908].cs2 new file mode 100644 index 000000000..009e5c10a --- /dev/null +++ b/scripts/[clientscript,script1908].cs2 @@ -0,0 +1,65 @@ +// 1908 +[clientscript,script1908](int $comsubid0, int $mousex1, int $mousey2, int $x3, int $y4, int $int5, component $component6, component $component7, component $component8) +def_int $int9 = %varcint1168; +def_int $int10 = %varcint1169; +def_int $int11 = %varcint1170; +def_int $int12 = %varcint1171; +def_int $width13 = if_getwidth($component6); +def_int $int14 = calc(if_getheight($component6) - $int5); +def_int $int15 = 0; +if (cc_find($component6, $comsubid0) = ^true) { + cc_setgraphic(null); + switch_int ($comsubid0) { + case 0 : + $int11, $int12 = calc($int11 + ($mousex1 - $x3)), calc($int12 + ($mousey2 - $y4)); + case 1 : + $int10 = calc($int10 + ($mousey2 - $y4)); + case 2 : + $int15 = calc($mousex1 - $x3); + $int9, $int11 = calc($int9 - $int15), calc($int11 + $int15); + case 3 : + $int9 = calc($int9 + ($mousex1 - $x3)); + case 4 : + $int15 = calc($mousex1 - $x3); + $int9, $int11 = calc($int9 - $int15), calc($int11 + $int15); + $int15 = calc($mousey2 - $y4); + $int10, $int12 = calc($int10 - $int15), calc($int12 + $int15); + case 5 : + $int9 = calc($int9 + ($mousex1 - $x3)); + $int15 = calc($mousey2 - $y4); + $int10, $int12 = calc($int10 - $int15), calc($int12 + $int15); + case 6 : + $int15 = calc($mousex1 - $x3); + $int9, $int11 = calc($int9 - $int15), calc($int11 + $int15); + $int10 = calc($int10 + ($mousey2 - $y4)); + case 7 : + $int9 = calc($int9 + ($mousex1 - $x3)); + $int10 = calc($int10 + ($mousey2 - $y4)); + case 8 : + $int15 = calc($mousey2 - $y4); + $int10, $int12 = calc($int10 - $int15), calc($int12 + $int15); + } + if ($int11 < 10) { + $int9, $int11 = calc($int9 + max(0, $int11)), 0; + } + $int15 = calc($width13 - ($int11 + $int9)); + if ($int15 < 10) { + $int9 = calc($int9 + $int15); + } + if ($int12 < calc($int5 + 10)) { + $int10, $int12 = calc($int10 + max(0, calc($int12 - $int5))), $int5; + } + $int15 = calc($int14 + $int5 - ($int12 + $int10)); + if ($int15 < 10) { + $int10 = calc($int10 + $int15); + } + $int9 = max(512, min($int9, $width13)); + $int10 = max(334, min($int10, $int14)); + $int11 = max(0, min($int11, calc($width13 - $int9))); + $int12 = max($int5, min($int12, calc($int5 + $int14 - $int10))); + if_setposition($int11, $int12, ^setpos_abs_left, ^setpos_abs_top, $component8); + if_setsize($int9, $int10, ^setsize_abs, ^setsize_abs, $component8); + if_sethide(false, $component8); + if_sethide(true, $component7); + cc_setontimer("script1909(calc(clientclock + 3), $int9, $int10, $int11, $int12)"); +} diff --git a/scripts/[clientscript,script1909].cs2 b/scripts/[clientscript,script1909].cs2 new file mode 100644 index 000000000..fc8df8845 --- /dev/null +++ b/scripts/[clientscript,script1909].cs2 @@ -0,0 +1,8 @@ +// 1909 +[clientscript,script1909](int $clock0, int $int1, int $int2, int $int3, int $int4) +if (clientclock < $clock0) { + return; +} +%varcint1168, %varcint1169, %varcint1170, %varcint1171 = $int1, $int2, $int3, $int4; +def_component $component5 = interface_860:0; +if_callonresize($component5); diff --git a/scripts/[clientscript,script1910].cs2 b/scripts/[clientscript,script1910].cs2 new file mode 100644 index 000000000..189f327df --- /dev/null +++ b/scripts/[clientscript,script1910].cs2 @@ -0,0 +1,3 @@ +// 1910 +[clientscript,script1910](int $width0, int $height1, component $component2, component $component3) +~script1911($width0, $height1, $component2, $component3); diff --git a/scripts/[clientscript,skill_guide_build].cs2 b/scripts/[clientscript,skill_guide_build].cs2 index d797ce23a..194124038 100644 --- a/scripts/[clientscript,skill_guide_build].cs2 +++ b/scripts/[clientscript,skill_guide_build].cs2 @@ -1,3 +1,3 @@ // 655 -[clientscript,skill_guide_build](component $component0, component $component1, component $component2, component $component3, component $component4, component $component5, component $component6, component $component7) -~skill_guide_build($component0, $component1, $component2, $component3, $component4, $component5, $component6, $component7); +[clientscript,skill_guide_build](component $component0, component $component1, component $component2, component $component3, component $component4, component $component5, component $component6, component $component7, component $component8) +~skill_guide_build($component0, $component1, $component2, $component3, $component4, $component5, $component6, $component7, $component8); diff --git a/scripts/[clientscript,skill_guide_init].cs2 b/scripts/[clientscript,skill_guide_init].cs2 index 4c229d6be..3e8b279df 100644 --- a/scripts/[clientscript,skill_guide_init].cs2 +++ b/scripts/[clientscript,skill_guide_init].cs2 @@ -1,4 +1,19 @@ // 654 -[clientscript,skill_guide_init](component $component0, component $component1, component $component2, component $component3, component $component4, component $component5, component $component6, component $component7, component $component8) -~skill_guide_build($component1, $component2, $component3, $component4, $component5, $component6, $component7, $component8); -if_setonvartransmit("skill_guide_build($component1, $component2, $component3, $component4, $component5, $component6, $component7, $component8){var965}", $component0); +[clientscript,skill_guide_init](component $component0, component $component1, component $component2, component $component3, component $component4, component $component5, component $component6, component $component7, component $component8, component $component9) +~skill_guide_build($component1, $component2, $component3, $component4, $component5, $component6, $component7, $component8, $component9); +def_enum $enum10 = ~toplevel_getcomponents; +def_component $component11 = enum(component, component, $enum10, toplevel_osrs_stretch:16); +if (~on_mobile = true) { + if_setontimer("script3833($component9, $component0, 0)", $component9); +} else { + if (%varcint1170 = 0 & %varcint1171 = 0 & %varcint1168 = 0 & %varcint1169 = 0) { + %varcint1168 = if_getwidth($component11); + %varcint1169 = if_getheight($component11); + %varcint1170 = if_getx($component11); + %varcint1171 = if_gety($component11); + } + if_setontimer("script6110($component9, -1)", $component9); + if_setonresize("script1898", $component9); +} +if_setonvartransmit("skill_guide_build($component1, $component2, $component3, $component4, $component5, $component6, $component7, $component8, $component9){var965}", $component0); +~script1911(-1, -1, $component9, $component0); diff --git a/scripts/[clientscript,skill_guide_sidepanelop].cs2 b/scripts/[clientscript,skill_guide_sidepanelop].cs2 index 384d92622..fbab95f80 100644 --- a/scripts/[clientscript,skill_guide_sidepanelop].cs2 +++ b/scripts/[clientscript,skill_guide_sidepanelop].cs2 @@ -1,7 +1,7 @@ // 1105 -[clientscript,skill_guide_sidepanelop](int $opindex0, int $int1, component $component2, component $component3, component $component4, component $component5, component $component6, component $component7, component $component8, component $component9) +[clientscript,skill_guide_sidepanelop](int $opindex0, int $int1, component $component2, component $component3, component $component4, component $component5, component $component6, component $component7, component $component8, component $component9, component $component10) if ($opindex0 ! 1) { return; } %varbit4372 = $int1; -~skill_guide_build($component2, $component3, $component4, $component5, $component6, $component7, $component8, $component9); +~skill_guide_build($component2, $component3, $component4, $component5, $component6, $component7, $component8, $component9, $component10); diff --git a/scripts/[clientscript,skillmulti_itembutton_key].cs2 b/scripts/[clientscript,skillmulti_itembutton_key].cs2 index fb10d9ea4..901641fdf 100644 --- a/scripts/[clientscript,skillmulti_itembutton_key].cs2 +++ b/scripts/[clientscript,skillmulti_itembutton_key].cs2 @@ -1,5 +1,5 @@ // 2051 -[clientscript,skillmulti_itembutton_key](char $keychar0, int $key1, obj $obj2, component $component3, string $string0, int $int4, int $int5, int $int6) +[clientscript,skillmulti_itembutton_key](char $keychar0, int $key1, obj $obj2, component $component3, string $string0, int $int4, int $int5, int $int6, int $int7) if (~keypress_permit(interface_270, null) = 1 & ($int4 ! -1 & $key1 = $int4 | $keychar0 ! null & string_length($string0) > 0 & string_indexof_char($string0, $keychar0) ! -1)) { - ~skillmulti_itembutton_triggered($obj2, $component3, $string0, $int4, $int5, $int6); + ~skillmulti_itembutton_triggered($obj2, $component3, $string0, $int4, $int5, $int6, $int7); } diff --git a/scripts/[clientscript,skillmulti_itembutton_op].cs2 b/scripts/[clientscript,skillmulti_itembutton_op].cs2 index 3326734eb..cae03454f 100644 --- a/scripts/[clientscript,skillmulti_itembutton_op].cs2 +++ b/scripts/[clientscript,skillmulti_itembutton_op].cs2 @@ -1,5 +1,5 @@ // 2050 -[clientscript,skillmulti_itembutton_op](int $opindex0, obj $obj1, component $component2, string $string0, int $int3, int $int4, int $int5) +[clientscript,skillmulti_itembutton_op](int $opindex0, obj $obj1, component $component2, string $string0, int $int3, int $int4, int $int5, int $int6) if ($opindex0 = 1) { - ~skillmulti_itembutton_triggered($obj1, $component2, $string0, $int3, $int4, $int5); + ~skillmulti_itembutton_triggered($obj1, $component2, $string0, $int3, $int4, $int5, $int6); } diff --git a/scripts/[clientscript,skillmulti_itembutton_reset].cs2 b/scripts/[clientscript,skillmulti_itembutton_reset].cs2 index 5140b3ecc..ccd96bd5c 100644 --- a/scripts/[clientscript,skillmulti_itembutton_reset].cs2 +++ b/scripts/[clientscript,skillmulti_itembutton_reset].cs2 @@ -1,11 +1,11 @@ // 2053 -[clientscript,skillmulti_itembutton_reset](int $clock0, obj $obj1, component $component2, string $string0, int $int3, int $int4, int $int5) +[clientscript,skillmulti_itembutton_reset](int $clock0, obj $obj1, component $component2, string $string0, int $int3, int $int4, int $int5, int $int6) if (clientclock < $clock0) { return; } -~skillmulti_itembutton_draw(false, $obj1, $component2, $int4, $int5); -if_setonmouseover("skillmulti_itembutton_hover(true, $obj1, $component2, $int4, $int5)", $component2); -if_setonmouseleave("skillmulti_itembutton_hover(false, $obj1, $component2, $int4, $int5)", $component2); -if_setonop("skillmulti_itembutton_op(event_op, $obj1, $component2, $string0, $int3, $int4, $int5)", $component2); -if_setonkey("skillmulti_itembutton_key(event_keychar, event_keycode, $obj1, $component2, $string0, $int3, $int4, $int5)", $component2); +~skillmulti_itembutton_draw(false, $obj1, $component2, $int5, $int6); +if_setonmouseover("skillmulti_itembutton_hover(true, $obj1, $component2, $int5, $int6)", $component2); +if_setonmouseleave("skillmulti_itembutton_hover(false, $obj1, $component2, $int5, $int6)", $component2); +if_setonop("skillmulti_itembutton_op(event_op, $obj1, $component2, $string0, $int3, $int4, $int5, $int6)", $component2); +if_setonkey("skillmulti_itembutton_key(event_keychar, event_keycode, $obj1, $component2, $string0, $int3, $int4, $int5, $int6)", $component2); if_setontimer(null, $component2); diff --git a/scripts/[clientscript,skillmulti_setup].cs2 b/scripts/[clientscript,skillmulti_setup].cs2 index 10b83f9be..56acedb82 100644 --- a/scripts/[clientscript,skillmulti_setup].cs2 +++ b/scripts/[clientscript,skillmulti_setup].cs2 @@ -26,101 +26,110 @@ if ($obj2 = null) { def_string $string1 = ""; $string1, $string0 = ~script632($string0); if_settext($string1, interface_270:5); -if_settext("Choose a quantity, then <~text_device("click", "tap")> an item to begin.", interface_270:4); -if (enum(int, boolean, enum_1810, $int0) = true) { - $int1 = ~max(1, ~min(28, $int1)); - $int12 = ~max(1, ~min($int1, $int12)); -} else if ($int1 > 5) { - $int1 = 10; - if ($int12 > 5) { - $int12 = 10; - } else if ($int12 > 1) { - $int12 = 5; - } else { - $int12 = 1; - } -} else if ($int1 > 1) { - $int1 = 5; - if ($int12 > 1) { - $int12 = 5; +def_boolean $boolean13 = enum(int, boolean, enum_5178, $int0); +if ($boolean13 = true) { + if_settext("Choose a quantity, then <~text_device("click", "tap")> an item to begin.", interface_270:4); +} else { + if_settext("<~text_device("Click", "Tap")> an item to begin.", interface_270:4); + if_sethide(true, interface_270:6); + if_setsize(480, 30, ^setsize_abs, ^setsize_abs, interface_270:3); +} +if ($boolean13 = true) { + if (enum(int, boolean, enum_1810, $int0) = true) { + $int1 = ~max(1, ~min(28, $int1)); + $int12 = ~max(1, ~min($int1, $int12)); + } else if ($int1 > 5) { + $int1 = 10; + if ($int12 > 5) { + $int12 = 10; + } else if ($int12 > 1) { + $int12 = 5; + } else { + $int12 = 1; + } + } else if ($int1 > 1) { + $int1 = 5; + if ($int12 > 1) { + $int12 = 5; + } else { + $int12 = 1; + } } else { - $int12 = 1; + $int1, $int12 = 1, 1; } -} else { - $int1, $int12 = 1, 1; + %varcint200, %varcint201 = $int12, $int12; + ~skillmulti_quantitybuttons_set($int0, $int1); } -%varcint200, %varcint201 = $int12, $int12; -~skillmulti_quantitybuttons_set($int0, $int1); -def_int $int13 = 10; +def_int $int14 = 10; if ($obj3 = null) { - $int13 = 1; + $int14 = 1; } else if ($obj4 = null) { - $int13 = 2; + $int14 = 2; } else if ($obj5 = null) { - $int13 = 3; + $int14 = 3; } else if ($obj6 = null) { - $int13 = 4; + $int14 = 4; } else if ($obj7 = null) { - $int13 = 5; + $int14 = 5; } else if ($obj8 = null) { - $int13 = 6; + $int14 = 6; } else if ($obj9 = null) { - $int13 = 7; + $int14 = 7; } else if ($obj10 = null) { - $int13 = 8; + $int14 = 8; } else if ($obj11 = null) { - $int13 = 9; + $int14 = 9; } -def_int $int14 = calc(if_getwidth(interface_270:0) - 20); -def_int $int15 = 100; -def_int $int16 = 20; -def_int $int17 = calc($int13 - 1); -def_int $int18 = 4; -def_int $int19 = 0; -def_int $y20 = 0; -def_int $setposv21 = ^setpos_abs_centre; -def_int $int22 = 75; +def_int $int15 = calc(if_getwidth(interface_270:0) - 20); +def_int $int16 = 100; +def_int $int17 = 20; +def_int $int18 = calc($int14 - 1); +def_int $int19 = 4; +def_int $int20 = 0; +def_int $y21 = 0; +def_int $setposv22 = ^setpos_abs_centre; +def_int $int23 = 75; cc_deleteall(interface_270:13); -def_int $int23 = 0; -if ($int13 > 1) { - if (calc($int15 * $int13 + $int16 * $int17) > $int14) { - $int16 = calc(($int14 - $int15 * $int13) / $int17); - $int18 = calc($int18 + 2 * ~max(0, calc(7 - $int13))); - if ($int16 < $int18) { - $int15, $int16 = calc(($int14 - $int18 * $int17) / $int13), $int18; +def_int $int24 = 0; +if ($int14 > 1) { + if (calc($int16 * $int14 + $int17 * $int18) > $int15) { + $int17 = calc(($int15 - $int16 * $int14) / $int18); + $int19 = calc($int19 + 2 * ~max(0, calc(7 - $int14))); + if ($int17 < $int19) { + $int16, $int17 = calc(($int15 - $int19 * $int18) / $int14), $int19; } } - $int19 = calc($int15 + $int16); - $y20, $setposv21, $int22 = 14, ^setpos_abs_bottom, calc(75 - 3); - while ($int23 < $int13) { - cc_create(interface_270:13, ^iftype_text, $int23); - cc_setposition(calc($int23 * $int19), 0, ^setpos_abs_left, ^setpos_abs_bottom); - cc_setsize($int15, 14, ^setsize_abs, ^setsize_abs); + $int20 = calc($int16 + $int17); + $y21, $setposv22, $int23 = 14, ^setpos_abs_bottom, calc(75 - 3); + while ($int24 < $int14) { + cc_create(interface_270:13, ^iftype_text, $int24); + cc_setposition(calc($int24 * $int20), 0, ^setpos_abs_left, ^setpos_abs_bottom); + cc_setsize($int16, 14, ^setsize_abs, ^setsize_abs); cc_setcolour(0x403020); cc_settextfont(p11_full); cc_settextalign(^settextalign_centre, ^settextalign_centre, 0); cc_settextshadow(false); - if ($int23 = %var2673 & ~on_mobile = false) { + if ($int24 = %var2673 & ~on_mobile = false) { cc_settext(enum(int, string, enum_1812, 36)); } else { - cc_settext(enum(int, string, enum_1812, $int23)); + cc_settext(enum(int, string, enum_1812, $int24)); } - $int23 = calc($int23 + 1); + $int24 = calc($int24 + 1); } } else { - $int19 = $int15; + $int20 = $int16; } -if_setposition(calc(0 * $int19), $y20, ^setpos_abs_left, $setposv21, interface_270:14); -if_setposition(calc(1 * $int19), $y20, ^setpos_abs_left, $setposv21, interface_270:15); -if_setposition(calc(2 * $int19), $y20, ^setpos_abs_left, $setposv21, interface_270:16); -if_setposition(calc(3 * $int19), $y20, ^setpos_abs_left, $setposv21, interface_270:17); -if_setposition(calc(4 * $int19), $y20, ^setpos_abs_left, $setposv21, interface_270:18); -if_setposition(calc(5 * $int19), $y20, ^setpos_abs_left, $setposv21, interface_270:19); -if_setposition(calc(6 * $int19), $y20, ^setpos_abs_left, $setposv21, interface_270:20); -if_setposition(calc(7 * $int19), $y20, ^setpos_abs_left, $setposv21, interface_270:21); -if_setposition(calc(8 * $int19), $y20, ^setpos_abs_left, $setposv21, interface_270:22); -if_setposition(calc(9 * $int19), $y20, ^setpos_abs_left, $setposv21, interface_270:23); -if_setsize(calc($int13 * $int15 + $int17 * $int16), 50, ^setsize_abs, ^setsize_minus, interface_270:13); +if_setposition(calc(0 * $int20), $y21, ^setpos_abs_left, $setposv22, interface_270:14); +if_setposition(calc(1 * $int20), $y21, ^setpos_abs_left, $setposv22, interface_270:15); +if_setposition(calc(2 * $int20), $y21, ^setpos_abs_left, $setposv22, interface_270:16); +if_setposition(calc(3 * $int20), $y21, ^setpos_abs_left, $setposv22, interface_270:17); +if_setposition(calc(4 * $int20), $y21, ^setpos_abs_left, $setposv22, interface_270:18); +if_setposition(calc(5 * $int20), $y21, ^setpos_abs_left, $setposv22, interface_270:19); +if_setposition(calc(6 * $int20), $y21, ^setpos_abs_left, $setposv22, interface_270:20); +if_setposition(calc(7 * $int20), $y21, ^setpos_abs_left, $setposv22, interface_270:21); +if_setposition(calc(8 * $int20), $y21, ^setpos_abs_left, $setposv22, interface_270:22); +if_setposition(calc(9 * $int20), $y21, ^setpos_abs_left, $setposv22, interface_270:23); +if_setsize(calc($int14 * $int16 + $int18 * $int17), 50, ^setsize_abs, ^setsize_minus, interface_270:13); def_int $intarray0(10); $intarray0(0) = -1; $intarray0(1) = -1; @@ -132,36 +141,36 @@ $intarray0(6) = -1; $intarray0(7) = -1; $intarray0(8) = -1; $intarray0(9) = -1; -if ($int13 >= 1) { +if ($int14 >= 1) { $intarray0(%var2673) = 83; $string1, $string0 = ~script632($string0); - ~skillmulti_itembutton_init(0, $obj2, $string1, interface_270:14, $intarray0(0), $int0, $int15, $int22); - if ($int13 >= 2) { + ~skillmulti_itembutton_init(0, $obj2, $string1, interface_270:14, $intarray0(0), $int0, $int16, $int23); + if ($int14 >= 2) { $string1, $string0 = ~script632($string0); - ~skillmulti_itembutton_init(1, $obj3, $string1, interface_270:15, $intarray0(1), $int0, $int15, $int22); - if ($int13 >= 3) { + ~skillmulti_itembutton_init(1, $obj3, $string1, interface_270:15, $intarray0(1), $int0, $int16, $int23); + if ($int14 >= 3) { $string1, $string0 = ~script632($string0); - ~skillmulti_itembutton_init(2, $obj4, $string1, interface_270:16, $intarray0(2), $int0, $int15, $int22); - if ($int13 >= 4) { + ~skillmulti_itembutton_init(2, $obj4, $string1, interface_270:16, $intarray0(2), $int0, $int16, $int23); + if ($int14 >= 4) { $string1, $string0 = ~script632($string0); - ~skillmulti_itembutton_init(3, $obj5, $string1, interface_270:17, $intarray0(3), $int0, $int15, $int22); - if ($int13 >= 5) { + ~skillmulti_itembutton_init(3, $obj5, $string1, interface_270:17, $intarray0(3), $int0, $int16, $int23); + if ($int14 >= 5) { $string1, $string0 = ~script632($string0); - ~skillmulti_itembutton_init(4, $obj6, $string1, interface_270:18, $intarray0(4), $int0, $int15, $int22); - if ($int13 >= 6) { + ~skillmulti_itembutton_init(4, $obj6, $string1, interface_270:18, $intarray0(4), $int0, $int16, $int23); + if ($int14 >= 6) { $string1, $string0 = ~script632($string0); - ~skillmulti_itembutton_init(5, $obj7, $string1, interface_270:19, $intarray0(5), $int0, $int15, $int22); - if ($int13 >= 7) { + ~skillmulti_itembutton_init(5, $obj7, $string1, interface_270:19, $intarray0(5), $int0, $int16, $int23); + if ($int14 >= 7) { $string1, $string0 = ~script632($string0); - ~skillmulti_itembutton_init(6, $obj8, $string1, interface_270:20, $intarray0(6), $int0, $int15, $int22); - if ($int13 >= 8) { + ~skillmulti_itembutton_init(6, $obj8, $string1, interface_270:20, $intarray0(6), $int0, $int16, $int23); + if ($int14 >= 8) { $string1, $string0 = ~script632($string0); - ~skillmulti_itembutton_init(7, $obj9, $string1, interface_270:21, $intarray0(7), $int0, $int15, $int22); - if ($int13 >= 9) { + ~skillmulti_itembutton_init(7, $obj9, $string1, interface_270:21, $intarray0(7), $int0, $int16, $int23); + if ($int14 >= 9) { $string1, $string0 = ~script632($string0); - ~skillmulti_itembutton_init(8, $obj10, $string1, interface_270:22, $intarray0(8), $int0, $int15, $int22); - if ($int13 >= 10) { - ~skillmulti_itembutton_init(9, $obj11, $string0, interface_270:23, $intarray0(9), $int0, $int15, $int22); + ~skillmulti_itembutton_init(8, $obj10, $string1, interface_270:22, $intarray0(8), $int0, $int16, $int23); + if ($int14 >= 10) { + ~skillmulti_itembutton_init(9, $obj11, $string0, interface_270:23, $intarray0(9), $int0, $int16, $int23); } } } diff --git a/scripts/[proc,autocast_tooltip].cs2 b/scripts/[proc,autocast_tooltip].cs2 index c29d0a730..583397faa 100644 --- a/scripts/[proc,autocast_tooltip].cs2 +++ b/scripts/[proc,autocast_tooltip].cs2 @@ -82,11 +82,11 @@ switch_obj ($obj1) { } case wind_wave_3313 : if (~script1897 = 1 & inv_total(inv, blighted_surge_sack_26705) > 0) { - $obj6, $int7 = dummy_priest_gown_26704, 1; + $obj6, $int7 = blighted_surge_sack_26705, 1; } case water_wave_3315, earth_wave_3319, fire_wave_3321 : if (~script1897 = 1 & inv_total(inv, blighted_surge_sack_26705) > 0) { - $obj8, $int9 = dummy_priest_gown_26704, 1; + $obj8, $int9 = blighted_surge_sack_26705, 1; } case wind_surge_21876 : if (~script1897 = 1 & inv_total(inv, blighted_surge_sack_26705) > 0) { diff --git a/scripts/[proc,script1904].cs2 b/scripts/[proc,script1904].cs2 new file mode 100644 index 000000000..0c98a04d9 --- /dev/null +++ b/scripts/[proc,script1904].cs2 @@ -0,0 +1,231 @@ +// 1904 +[proc,script1904] +def_component $component0 = interface_860:0; +def_component $component1 = interface_860:1; +def_component $component2 = interface_860:3; +def_component $component3 = interface_860:4; +def_component $component4 = interface_860:5; +def_component $component5 = interface_860:2; +def_int $width6 = if_getwidth($component1); +def_int $height7 = if_getheight($component1); +def_int $width8 = if_getwidth($component0); +def_int $int9 = ~script1912; +def_int $int10 = calc(if_getheight($component0) - $int9); +def_int $int11 = 0; +if (~on_mobile = true | getwindowmode = ^windowmode_fixed) { + $int11 = 1; +} +def_int $int12 = 512; +def_int $int13 = 334; +def_int $int14 = 0; +def_int $int15 = 0; +if_sethide(false, $component1); +if_sethide(true, $component5); +if ($int11 = 0) { + $int12 = max(512, min(%varcint1168, $width8)); + $int13 = max(334, min(%varcint1169, $int10)); + $int14 = max(0, min(%varcint1170, calc($width8 - %varcint1168))); + $int15 = max($int9, min(%varcint1171, calc($int9 + $int10 - %varcint1169))); +} +if (~on_mobile = false) { + if_setposition($int14, $int15, ^setpos_abs_left, ^setpos_abs_top, $component1); + if_setsize($int12, $int13, ^setsize_abs, ^setsize_abs, $component1); +} +def_string $string0 = ""; +def_int $int16 = 0; +$string0, $int16 = ~skill_guide_subsection(%varcint1172, %varcint1173); +if ($int16 = 1) { + $string0 = "<$string0> (Members Only)"; +} +if ($int11 = 1) { + ~steelborder($component2, " - <$string0> ", 1); +} else { + ~steelborder($component2, " - <$string0> ", 19); +} +~script1785($component4); +~script4215($component3, "Close"); +if_setonop("opsound(event_op, 2)", $component3); +if_setopkey(1, ^key_escape, 0, $component3); +def_int $int17 = calc((if_gety($component4) - if_getheight($component3)) / 2); +if_setposition(calc($int17 - 3), $int17, ^setpos_abs_right, ^setpos_abs_top, $component3); +def_int $height18 = calc($int13 - 6 * 2); +def_int $width19 = calc($int12 - 6 * 2); +def_int $x20 = calc($int14 + $int12 - 6); +def_int $y21 = calc($int15 + $int13 - 6); +if ($int11 = 0) { + if (cc_find($component0, 0) = ^true) { + cc_setsize($width19, calc(if_gety($component4) - 2 * 6), ^setsize_abs, ^setsize_abs); + cc_setposition(calc($int14 + 6), calc($int15 + 6), ^setpos_abs_left, ^setpos_abs_top); + ~script1907($int9, $component0, $component1, $component5); + } + if (cc_find($component0, 1) = ^true) { + cc_setsize($width19, 6, ^setsize_abs, ^setsize_abs); + cc_setposition(calc($int14 + 6), $y21, ^setpos_abs_left, ^setpos_abs_top); + ~script1907($int9, $component0, $component1, $component5); + } + if (cc_find($component0, 2) = ^true) { + cc_setsize(6, $height18, ^setsize_abs, ^setsize_abs); + cc_setposition($int14, calc($int15 + 6), ^setpos_abs_left, ^setpos_abs_top); + ~script1907($int9, $component0, $component1, $component5); + } + if (cc_find($component0, 3) = ^true) { + cc_setsize(6, $height18, ^setsize_abs, ^setsize_abs); + cc_setposition($x20, calc($int15 + 6), ^setpos_abs_left, ^setpos_abs_top); + ~script1907($int9, $component0, $component1, $component5); + } + if (cc_find($component0, 4) = ^true) { + cc_setsize(6, 6, ^setsize_abs, ^setsize_abs); + cc_setposition($int14, $int15, ^setpos_abs_left, ^setpos_abs_top); + ~script1907($int9, $component0, $component1, $component5); + } + if (cc_find($component0, 5) = ^true) { + cc_setsize(6, 6, ^setsize_abs, ^setsize_abs); + cc_setposition($x20, $int15, ^setpos_abs_left, ^setpos_abs_top); + ~script1907($int9, $component0, $component1, $component5); + } + if (cc_find($component0, 6) = ^true) { + cc_setsize(6, 6, ^setsize_abs, ^setsize_abs); + cc_setposition($int14, $y21, ^setpos_abs_left, ^setpos_abs_top); + ~script1907($int9, $component0, $component1, $component5); + } + if (cc_find($component0, 7) = ^true) { + cc_setsize(6, 6, ^setsize_abs, ^setsize_abs); + cc_setposition($x20, $y21, ^setpos_abs_left, ^setpos_abs_top); + ~script1907($int9, $component0, $component1, $component5); + } + if (cc_find($component0, 8) = ^true) { + cc_setsize($width19, 6, ^setsize_abs, ^setsize_abs); + cc_setposition(calc($int14 + 6), $int15, ^setpos_abs_left, ^setpos_abs_top); + ~script1907($int9, $component0, $component1, $component5); + } +} +def_component $component22 = interface_860:7; +def_component $component23 = interface_860:6; +def_component $component24 = interface_860:8; +def_component $component25 = interface_860:10; +def_int $int26 = 20; +def_int $int27 = 0; +def_fontmetrics $fontmetrics28 = p12_full; +def_fontmetrics $fontmetrics29 = p12_full; +def_int $int30 = 1; +def_int $int31 = 6; +def_int $int32 = 36; +def_int $int33 = 16; +switch_int (%varcint988) { + case 1 : + $int33 = 17; + case 2 : + $int33 = 18; + case 3 : + $int33 = 20; +} +def_int $int34 = if_getheight($component23); +if ($int34 >= 392) { + $int26, $int27, $int30 = 26, 2, 4; +} else if ($int34 >= 350) { + $int26, $int27, $int30 = 24, 1, 3; +} else if ($int34 >= 308) { + $int26, $int27, $int30 = 21, 1, 3; +} else if ($int34 >= 294) { + $int26 = 21; +} +cc_deleteall($component22); +def_int $int35 = 0; +def_int $int36 = 0; +$string0, $int16 = ~skill_guide_subsection(%varcint1172, $int36); +while (string_length($string0) > 0) { + $int35 = ~script5291($component22, $int35, $int36, $int26, $int27, 0x726451, $string0, $fontmetrics28, 0xff981f, $int30, null, 0, 0, 0, 0, ~is_equal($int36, %varcint1173)); + cc_setonop("script1906($int36)"); + $int36 = calc($int36 + 1); + $string0, $int16 = ~skill_guide_subsection(%varcint1172, $int36); +} +~script5288($component23, 0, 0, 0, if_getwidth($component23), if_getheight($component23), struct_3712, 0x726451); +cc_deleteall($component24); +$int35 = 0; +$int36 = 0; +def_int $int37 = 0; +def_int $int38 = 0; +def_int $int39 = calc(if_getwidth($component24) - 66 - $int31 * 2); +def_int $width40 = $int39; +$int34 = $int32; +def_namedobj $namedobj41 = null; +$int37, $namedobj41, $string0 = ~skill_guide_data(%varcint1172, %varcint1173, $int36); +while ($namedobj41 ! null) { + if ($int37 < 0 & $namedobj41 = obj_7620) { + $width40 = calc($int39 + 66); + } else { + $width40 = $int39; + } + $int34 = max(calc(paraheight($string0, $width40, $fontmetrics29) * $int33 + $int31 * 2), $int32); + cc_create($component24, ^iftype_rectangle, $int35); + cc_setposition(0, $int38, ^setpos_abs_left, ^setpos_abs_top); + cc_setsize(0, $int34, ^setsize_minus, ^setsize_abs); + cc_setfill(true); + cc_setcolour(^black); + if (calc($int36 % 2) = 0) { + cc_settrans(200); + } else { + cc_settrans(220); + } + $int35 = calc($int35 + 1); + cc_create($component24, ^iftype_text, $int35); + cc_setposition($int31, $int38, ^setpos_abs_left, ^setpos_abs_top); + cc_setsize(16, $int32, ^setsize_abs, ^setsize_abs); + cc_settextalign(^settextalign_left, ^settextalign_centre, 0); + cc_settextshadow(true); + cc_settextfont($fontmetrics28); + cc_setcolour(0xff981f); + cc_settext(tostring($int37)); + if ($int37 = -1) { + cc_sethide(true); + } + $int35 = calc($int35 + 1); + cc_create($component24, ^iftype_graphic, $int35); + if (oc_param($namedobj41, param_1757) ! null) { + cc_setgraphic(oc_param($namedobj41, param_1757)); + cc_setsize(30, 30, ^setsize_abs, ^setsize_abs); + cc_setposition(calc($int31 + 25), calc($int38 + 3), ^setpos_abs_left, ^setpos_abs_top); + } else if (%varcint1172 = 4 & oc_param($namedobj41, spell_graphic1_on) ! null) { + cc_setgraphic(oc_param($namedobj41, spell_graphic1_on)); + cc_setsize(24, 24, ^setsize_abs, ^setsize_abs); + cc_setposition(calc($int31 + 28), calc($int38 + 6), ^setpos_abs_left, ^setpos_abs_top); + cc_setop(1, "Check runes"); + cc_setonop("skill_guide_magic_op($namedobj41)"); + } else { + cc_setobject($namedobj41, -1); + cc_setsize(36, 32, ^setsize_abs, ^setsize_abs); + cc_setposition(calc($int31 + 25), calc($int38 + 3), ^setpos_abs_left, ^setpos_abs_top); + } + if (%varcint1172 = 22 & %varcint1173 >= 1 & %varcint1173 <= 11) { + cc_setop(1, "Check materials"); + } + cc_setgraphicshadow(0x333333); + cc_setoutline(1); + $int35 = calc($int35 + 1); + cc_create($component24, ^iftype_text, $int35); + cc_setposition($int31, calc($int38 + $int31), ^setpos_abs_right, ^setpos_abs_top); + cc_setsize($width40, calc($int34 - $int31 * 2), ^setsize_abs, ^setsize_abs); + cc_settextalign(^settextalign_left, ^settextalign_centre, $int33); + cc_settextshadow(true); + cc_settextfont($fontmetrics28); + cc_setcolour(0xff981f); + cc_settext($string0); + $int35 = calc($int35 + 1); + $int38 = calc($int38 + $int34); + $int36 = calc($int36 + 1); + $int37, $namedobj41, $string0 = ~skill_guide_data(%varcint1172, %varcint1173, $int36); +} +cc_create($component24, ^iftype_rectangle, $int35); +cc_setposition(0, $int38, ^setpos_abs_left, ^setpos_abs_top); +cc_setsize(0, if_getheight($component24), ^setsize_minus, ^setsize_abs); +cc_setfill(true); +cc_setcolour(^black); +if (calc($int36 % 2) = 0) { + cc_settrans(200); +} else { + cc_settrans(220); +} +$int35 = calc($int35 + 1); +if_setscrollsize(if_getwidth($component24), $int38, $component24); +~scrollbar_vertical($component25, $component24, "scrollbar_dragger_v2,3", "scrollbar_dragger_v2,0", "scrollbar_dragger_v2,1", "scrollbar_dragger_v2,2", "scrollbar_v2,0", "scrollbar_v2,1"); +~scrollbar_vertical_rebuild($component25, $component24); diff --git a/scripts/[proc,script1907].cs2 b/scripts/[proc,script1907].cs2 new file mode 100644 index 000000000..a80c5c7ef --- /dev/null +++ b/scripts/[proc,script1907].cs2 @@ -0,0 +1,5 @@ +// 1907 +[proc,script1907](int $int0, component $component1, component $component2, component $component3) +cc_setgraphic("tradebacking_light"); +cc_setontimer(null); +cc_setondrag("script1908(event_comsubid, event_mousex, event_mousey, cc_getx, cc_gety, $int0, $component1, $component2, $component3)"); diff --git a/scripts/[proc,script1911].cs2 b/scripts/[proc,script1911].cs2 new file mode 100644 index 000000000..af04e3401 --- /dev/null +++ b/scripts/[proc,script1911].cs2 @@ -0,0 +1,9 @@ +// 1911 +[proc,script1911](int $width0, int $height1, component $component2, component $component3) +def_int $width4 = if_getwidth($component2); +def_int $height5 = if_getheight($component2); +if ($width0 = $width4 & $height1 = $height5) { + return; +} +if_setontimer("script1910($width4, $height5, $component2, $component3)", $component3); +if_callonresize($component2); diff --git a/scripts/[proc,script1912].cs2 b/scripts/[proc,script1912].cs2 new file mode 100644 index 000000000..c426e1749 --- /dev/null +++ b/scripts/[proc,script1912].cs2 @@ -0,0 +1,6 @@ +// 1912 +[proc,script1912]()(int) +if (~on_mobile = true) { + return(calc(165 - (23 + 30))); +} +return(0); diff --git a/scripts/[proc,settings_clicked_toggle].cs2 b/scripts/[proc,settings_clicked_toggle].cs2 index 497ed2e6e..a06d0be1a 100644 --- a/scripts/[proc,settings_clicked_toggle].cs2 +++ b/scripts/[proc,settings_clicked_toggle].cs2 @@ -456,6 +456,8 @@ switch_int ($setting0) { ~script7119; case 348 : %varbit4137 = calc(1 - %varbit4137); + case 360 : + %varbit15321 = calc(1 - %varbit15321); case 352 : %varbit6068 = calc(1 - %varbit6068); case 353 : diff --git a/scripts/[proc,settings_get_toggle].cs2 b/scripts/[proc,settings_get_toggle].cs2 index 884d50a36..cc9ef6e61 100644 --- a/scripts/[proc,settings_get_toggle].cs2 +++ b/scripts/[proc,settings_get_toggle].cs2 @@ -455,6 +455,8 @@ switch_int ($setting0) { return(%varbit14878); case 348 : return(%varbit4137); + case 360 : + return(%varbit15321); case 352 : return(%varbit6068); case 353 : diff --git a/scripts/[proc,skill_guide_addentry].cs2 b/scripts/[proc,skill_guide_addentry].cs2 index 35459ae87..0e8de6e7a 100644 --- a/scripts/[proc,skill_guide_addentry].cs2 +++ b/scripts/[proc,skill_guide_addentry].cs2 @@ -49,7 +49,10 @@ switch_int (%varbit4371) { } } cc_create($component2, ^iftype_text, calc($int6 * 2 + 1)); -$int9 = ~max(~max(calc(paraheight($string0, $int4, p12_full) * 12 + 5), $int9), 32); +if ($int0 < 0 & $namedobj1 = obj_7620) { + $int4 = calc($int4 + 36 + 25); +} +$int9 = max(max(calc(paraheight($string0, $int4, p12_full) * 12 + 5), $int9), 32); cc_setsize($int4, $int9, ^setsize_abs, ^setsize_abs); cc_setposition(calc(if_getwidth($component2) - $int4), $height7, ^setpos_abs_left, ^setpos_abs_top); cc_settextalign(^settextalign_left, ^settextalign_top, 0); diff --git a/scripts/[proc,skill_guide_build].cs2 b/scripts/[proc,skill_guide_build].cs2 index 08d19a45d..194ec1d62 100644 --- a/scripts/[proc,skill_guide_build].cs2 +++ b/scripts/[proc,skill_guide_build].cs2 @@ -1,75 +1,79 @@ // 656 -[proc,skill_guide_build](component $component0, component $component1, component $component2, component $component3, component $component4, component $component5, component $component6, component $component7) +[proc,skill_guide_build](component $component0, component $component1, component $component2, component $component3, component $component4, component $component5, component $component6, component $component7, component $component8) if_settext(enum(int, string, enum_108, %varbit4371), $component0); -def_int $int8 = 0; def_int $int9 = 0; def_int $int10 = 0; +def_int $int11 = 0; def_string $string0 = ""; -def_component $component11 = enum(int, component, enum_990, $int9); -$string0, $int10 = ~skill_guide_subsection(%varbit4371, $int9); -while ($component11 ! null & string_length($string0) > 0) { - if_settext($string0, $component11); - if (%varbit4372 = $int9) { - if ($int10 = 1) { +def_component $component12 = enum(int, component, enum_990, $int10); +$string0, $int11 = ~skill_guide_subsection(%varbit4371, $int10); +def_int $int13 = 14024704; +def_int $int14 = 14024705; +def_int $int15 = 14024713; +if_setopkey(1, ^key_escape, 0, interface_214:26); +while ($component12 ! null & string_length($string0) > 0) { + if_settext($string0, $component12); + if (%varbit4372 = $int10) { + if ($int11 = 1) { if_settext(append($string0, " - Members Only"), $component1); } else { if_settext($string0, $component1); } - $int8 = $int9; + $int9 = $int10; } - $int9 = calc($int9 + 1); - $component11 = enum(int, component, enum_990, $int9); - $string0, $int10 = ~skill_guide_subsection(%varbit4371, $int9); + $int10 = calc($int10 + 1); + $component12 = enum(int, component, enum_990, $int10); + $string0, $int11 = ~skill_guide_subsection(%varbit4371, $int10); } -def_int $int12 = $int9; -$int9 = 0; -if ($int12 >= 2) { +def_int $int16 = $int10; +$int10 = 0; +if ($int16 >= 2) { if_sethide(false, $component5); if_sethide(false, $component6); if_sethide(false, $component7); - if_setmodel(enum(int, model, enum_991, $int12), $component6); - if_setposition(if_getx($component7), enum(int, int, enum_992, $int12), ^setpos_abs_left, ^setpos_abs_top, $component7); - $component11 = enum(int, component, enum_990, $int9); - while ($component11 ! null) { - if ($int9 < $int12) { - if_sethide(false, $component11); - if_setonop("skill_guide_sidepanelop(event_op, $int9, $component0, $component1, $component2, $component3, $component4, $component5, $component6, $component7)", $component11); + if_setmodel(enum(int, model, enum_991, $int16), $component6); + if_setposition(if_getx($component7), enum(int, int, enum_992, $int16), ^setpos_abs_left, ^setpos_abs_top, $component7); + $component12 = enum(int, component, enum_990, $int10); + while ($component12 ! null) { + if ($int10 < $int16) { + if_sethide(false, $component12); + if_setonop("skill_guide_sidepanelop(event_op, $int10, $component0, $component1, $component2, $component3, $component4, $component5, $component6, $component7, $component8)", $component12); } else { - if_sethide(true, $component11); - if_setonop(null, $component11); + if_sethide(true, $component12); + if_setonop(null, $component12); } - $int9 = calc($int9 + 1); - $component11 = enum(int, component, enum_990, $int9); + $int10 = calc($int10 + 1); + $component12 = enum(int, component, enum_990, $int10); } } else { if_sethide(true, $component5); if_sethide(true, $component6); if_sethide(true, $component7); - $component11 = enum(int, component, enum_990, $int9); - while ($component11 ! null) { - if_sethide(true, $component11); - $int9 = calc($int9 + 1); - $component11 = enum(int, component, enum_990, $int9); + $component12 = enum(int, component, enum_990, $int10); + while ($component12 ! null) { + if_sethide(true, $component12); + $int10 = calc($int10 + 1); + $component12 = enum(int, component, enum_990, $int10); } } cc_deleteall($component2); cc_deleteall($component3); cc_deleteall($component4); -def_int $int13 = calc(if_getwidth($component2) - (28 + 36 + 3)); -def_int $height14 = 3; -$int9 = 0; -def_int $int15 = 0; -def_namedobj $namedobj16 = null; -$int15, $namedobj16, $string0 = ~skill_guide_data(%varbit4371, $int8, $int9); -while ($namedobj16 ! null) { - $height14 = ~skill_guide_addentry($int15, $namedobj16, $string0, $component2, $component3, $int13, $int8, $int9, $height14); - $int9 = calc($int9 + 1); - $int15, $namedobj16, $string0 = ~skill_guide_data(%varbit4371, $int8, $int9); +def_int $int17 = calc(if_getwidth($component2) - (28 + 36 + 3)); +def_int $height18 = 3; +$int10 = 0; +def_int $int19 = 0; +def_namedobj $namedobj20 = null; +$int19, $namedobj20, $string0 = ~skill_guide_data(%varbit4371, $int9, $int10); +while ($namedobj20 ! null) { + $height18 = ~skill_guide_addentry($int19, $namedobj20, $string0, $component2, $component3, $int17, $int9, $int10, $height18); + $int10 = calc($int10 + 1); + $int19, $namedobj20, $string0 = ~skill_guide_data(%varbit4371, $int9, $int10); } -if_setsize(if_getwidth($component2), $height14, ^setsize_abs, ^setsize_abs, $component3); +if_setsize(if_getwidth($component2), $height18, ^setsize_abs, ^setsize_abs, $component3); if_setscrollpos(0, 0, $component2); -if ($height14 > if_getheight($component2)) { - if_setscrollsize(0, $height14, $component2); +if ($height18 > if_getheight($component2)) { + if_setscrollsize(0, $height18, $component2); ~scrollbar_vertical($component4, $component2, "scrollbar_parchment_dragger_v2,3", "scrollbar_parchment_dragger_v2,0", "scrollbar_parchment_dragger_v2,1", "scrollbar_parchment_dragger_v2,2", "scrollbar_parchment_v2,0", "scrollbar_parchment_v2,1"); } else { if_setscrollsize(0, 0, $component2); diff --git a/scripts/[proc,skill_guide_data].cs2 b/scripts/[proc,skill_guide_data].cs2 index 4cad88527..876f14a1e 100644 --- a/scripts/[proc,skill_guide_data].cs2 +++ b/scripts/[proc,skill_guide_data].cs2 @@ -1,5 +1,11 @@ // 661 [proc,skill_guide_data](int $int0, int $int1, int $int2)(int, namedobj, string) +def_string $string0 = ""; +if (%varbit15321 = 0) { + $string0 = ""; +} else { + $string0 = ""; +} switch_int ($int0) { case 1 : return(~skill_guide_data_attack($int1, $int2)); @@ -760,7 +766,7 @@ switch_int ($int0) { case 3 : switch_int ($int2) { case 0 : - return(-1, obj_7620, "Potions may be strong, standard or weak, depending on your Herblore level."); + return(-1, obj_7620, "Potions may be <$string0>strong, <$string0>standard or <$string0>weak, depending on your Herblore level."); case 1 : return(47, golpar_20905, "Weak Golpar potions:"); case 2 : @@ -802,7 +808,7 @@ switch_int ($int0) { } case 4 : if ($int2 = 0) { - return(31, herbiboar_21511, "Harvest herbs from the Herbiboar on Fossil Island (with 80 Hunter)."); + return(31, herbiboar_21511, "Harvest herbs from the <$string0>Herbiboar on <$string0>Fossil Island (with 80 Hunter)."); } if ($int2 = 1) { return(58, herb_sack_13226, "Use the Herb Sack reward item, purchased from the Tithe Farm or Slayer Masters."); @@ -1576,26 +1582,28 @@ switch_int ($int0) { case 22 : return(60, daeyalt_essence_24704, "Members: Daeyalt essence
(after Sins of the Father)"); case 23 : - return(65, lovakite_ore_13356, "Members: Lovakite ore"); + return(64, tainted_essence_chunk_28591, "Members: Tainted essence chunk"); case 24 : - return(70, adamantite_ore_449, "Adamantite ore"); + return(65, lovakite_ore_13356, "Members: Lovakite ore"); case 25 : - return(70, soft_clay_1761, "Members: Soft clay"); + return(70, adamantite_ore_449, "Adamantite ore"); case 26 : - return(72, pay_dirt_12011, "Members: Motherlode mine (upper level)"); + return(70, soft_clay_1761, "Members: Soft clay"); case 27 : - return(72, te_salt_22593, "Members: Te Salt"); + return(72, pay_dirt_12011, "Members: Motherlode mine (upper level)"); case 28 : - return(72, efh_salt_22595, "Members: Efh Salt"); + return(72, te_salt_22593, "Members: Te Salt"); case 29 : - return(72, urt_salt_22597, "Members: Urt Salt"); + return(72, efh_salt_22595, "Members: Efh Salt"); case 30 : - return(72, basalt_22603, "Members: Basalt"); + return(72, urt_salt_22597, "Members: Urt Salt"); case 31 : - return(75, ancient_essence_50_27619, "Members: Ancient essence
(after Secrets of the North)"); + return(72, basalt_22603, "Members: Basalt"); case 32 : - return(85, runite_ore_451, "Runite ore"); + return(75, ancient_essence_50_27619, "Members: Ancient essence
(after Secrets of the North)"); case 33 : + return(85, runite_ore_451, "Runite ore"); + case 34 : return(92, amethyst_21347, "Members: Amethyst"); case default : return(-1, null, ""); diff --git a/scripts/[proc,skill_guide_data_construction].cs2 b/scripts/[proc,skill_guide_data_construction].cs2 index 0bb260841..8a6957a2e 100644 --- a/scripts/[proc,skill_guide_data_construction].cs2 +++ b/scripts/[proc,skill_guide_data_construction].cs2 @@ -1028,7 +1028,7 @@ switch_int ($int0) { case 12 : switch_int ($int1) { case 0 : - return(-1, obj_7620, "Servants can be hired at the
Ardougne Domestic Service Agency."); + return(-1, obj_7620, "Servants can be hired at the Ardougne Domestic Service Agency."); case 1 : return(20, grail_bell_17, "Rick"); case 2 : diff --git a/scripts/[proc,skill_guide_data_magic].cs2 b/scripts/[proc,skill_guide_data_magic].cs2 index 1f11cedfe..91a88c769 100644 --- a/scripts/[proc,skill_guide_data_magic].cs2 +++ b/scripts/[proc,skill_guide_data_magic].cs2 @@ -12,7 +12,7 @@ switch_int ($int0) { $string1 = "you can see what each spell does by activating the spellbook's Info mode, then tapping the spells."; $string2 = "Click a spell icon below to see the required runes to cast each spell.

"; $string3 = "Tap a spell icon below to see the required runes to cast each spell.

"; - return(-1, battlestaff_1391, "<~text_device($string2, $string3)>By opening the spellbook icon on the side interface,<~text_device($string0, $string1)>"); + return(-1, battlestaff_1391, "<~text_device($string2, $string3)>By opening the spellbook icon on the side interface, <~text_device($string0, $string1)>"); case 1 : if (~league_world = 1 & %varbit10032 = 1) { return(-1, kourend_home_teleport_24369, "Home teleport (Kourend)"); diff --git a/scripts/[proc,skillmulti_itembutton_init].cs2 b/scripts/[proc,skillmulti_itembutton_init].cs2 index e9d78d1df..a1820dfbe 100644 --- a/scripts/[proc,skillmulti_itembutton_init].cs2 +++ b/scripts/[proc,skillmulti_itembutton_init].cs2 @@ -9,8 +9,8 @@ if (string_length($string1) > 0) { $string2 = append("(<$string1>) ", $string2); } if_setonmouserepeat("tooltip_mouserepeat($component2, -1, interface_270:24, $string2, 25, 479)", $component2); -if_setonop("skillmulti_itembutton_op(event_op, $obj1, $component2, $string1, $int3, $int5, $int6)", $component2); -if_setonkey("skillmulti_itembutton_key(event_keychar, event_keycode, $obj1, $component2, $string1, $int3, $int5, $int6)", $component2); +if_setonop("skillmulti_itembutton_op(event_op, $obj1, $component2, $string1, $int3, $int4, $int5, $int6)", $component2); +if_setonkey("skillmulti_itembutton_key(event_keychar, event_keycode, $obj1, $component2, $string1, $int3, $int4, $int5, $int6)", $component2); if_setontimer(null, $component2); if_setop(1, enum(int, string, enum_1809, $int4), $component2); if_setopbase("<$string0>", $component2); diff --git a/scripts/[proc,skillmulti_itembutton_triggered].cs2 b/scripts/[proc,skillmulti_itembutton_triggered].cs2 index 5c39819e1..0f6c99d66 100644 --- a/scripts/[proc,skillmulti_itembutton_triggered].cs2 +++ b/scripts/[proc,skillmulti_itembutton_triggered].cs2 @@ -1,12 +1,18 @@ // 2052 -[proc,skillmulti_itembutton_triggered](obj $obj0, component $component1, string $string0, int $int2, int $int3, int $int4) -~skillmulti_itembutton_draw(true, null, $component1, $int3, $int4); +[proc,skillmulti_itembutton_triggered](obj $obj0, component $component1, string $string0, int $int2, int $int3, int $int4, int $int5) +~skillmulti_itembutton_draw(true, null, $component1, $int4, $int5); if_setonmouseover(null, $component1); if_setonmouseleave("deltooltip(interface_270:24)", $component1); if_setonop(null, $component1); if_setonkey(null, $component1); -if_setontimer("skillmulti_itembutton_reset(calc(clientclock + 40), $obj0, $component1, $string0, $int2, $int3, $int4)", $component1); -if (%varcint200 >= 1 & %varcint200 <= 28) { +if_setontimer("skillmulti_itembutton_reset(calc(clientclock + 40), $obj0, $component1, $string0, $int2, $int3, $int4, $int5)", $component1); +def_boolean $boolean6 = enum(int, boolean, enum_5178, $int3); +if ($boolean6 = false) { + sound_synth(interface_select1, 1, 0); + if (cc_find($component1, 0) = ^true) { + cc_resume_pausebutton; + } +} else if (%varcint200 >= 1 & %varcint200 <= 28) { sound_synth(interface_select1, 1, 0); if (cc_find($component1, %varcint200) = ^true) { cc_resume_pausebutton; diff --git a/scripts/[proc,skillmulti_quantitybutton_x_receive].cs2 b/scripts/[proc,skillmulti_quantitybutton_x_receive].cs2 index ffa1bc72c..5df201295 100644 --- a/scripts/[proc,skillmulti_quantitybutton_x_receive].cs2 +++ b/scripts/[proc,skillmulti_quantitybutton_x_receive].cs2 @@ -3,17 +3,19 @@ sound_synth(interface_select1, 1, 0); $string0 = ~script212($string0); def_int $int0 = string_length($string0); -def_int $length1 = string_length(tostring(28)); -if ($int0 > $length1) { - %varcint200 = 28; +def_int $int1 = 28; +def_int $length2 = string_length(tostring($int1)); +if ($int0 > $length2) { + %varcint200 = $int1; return; } -def_int $int2 = 0; def_int $int3 = 0; +def_int $int4 = 0; while ($int0 > 0) { - $int2 = string_indexof_string("0123456789", substring($string0, 0, 1), 0); - $int3 = calc($int3 + $int2 * pow(10, calc($int0 - 1))); + $int3 = string_indexof_string("0123456789", substring($string0, 0, 1), 0); + $int4 = calc($int4 + $int3 * pow(10, calc($int0 - 1))); $string0 = substring($string0, 1, $int0); $int0 = calc($int0 - 1); } -%varcint200 = $int3; +%varcint200 = $int4; +%varcstring1167 = $string0;