mawjustin Posted February 18, 2023 Group: Members Topic Count: 48 Topics Per Day: 0.01 Content Count: 124 Reputation: 6 Joined: 09/26/14 Last Seen: August 20, 2024 Share Posted February 18, 2023 (edited) Hi Team, How do we merge arrays and use them as a single array? Example: setarray .attr1[0],4700,4701,4702,4703,4704,4705,4706,4707,4708,4709; setarray .attr2[0],4730,4731,4732,4733,4734,4735,4736,4737,4738,4739; setarray .attr3[0],4740,4741,4742,4743,4744,4745,4746,4747,4748,4749; setarray .attr4[0],4710,4711,4712,4713,4714,4715,4716,4717,4718,4719; setarray .attr5[0],4720,4721,4722,4723,4724,4725,4726,4727,4728,4729; setarray .attr6[0],4750,4751,4752,4753,4754,4755,4756,4757,4758,4759; I want to use them as setarray .combinedArray[0], attr1, attr2, attr3, attr4, attr5, attr6; This way I can only modify a specific attribute if necessary without affecting the entire list of array, as the other .attr arrays are used in other functions. Thank you. Edited February 18, 2023 by mawjustin Removed spacing. Quote Link to comment Share on other sites More sharing options...
2 Emistry Posted February 18, 2023 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10017 Reputation: 2368 Joined: 10/28/11 Last Seen: Tuesday at 02:49 PM Share Posted February 18, 2023 setarray .combinedArray[getarraysize(.combinedArray)], .attr1, getarraysize(.attr1); setarray .combinedArray[getarraysize(.combinedArray)], .attr2, getarraysize(.attr2); setarray .combinedArray[getarraysize(.combinedArray)], .attr3, getarraysize(.attr3); setarray .combinedArray[getarraysize(.combinedArray)], .attr4, getarraysize(.attr4); setarray .combinedArray[getarraysize(.combinedArray)], .attr5, getarraysize(.attr5); setarray .combinedArray[getarraysize(.combinedArray)], .attr6, getarraysize(.attr6); Quote Link to comment Share on other sites More sharing options...
1 Rynbef Posted February 18, 2023 Group: Forum Moderator Topic Count: 47 Topics Per Day: 0.01 Content Count: 937 Reputation: 124 Joined: 05/23/12 Last Seen: Tuesday at 07:25 PM Share Posted February 18, 2023 U can use copyarray* Rynbef~ Quote Link to comment Share on other sites More sharing options...
0 mawjustin Posted February 18, 2023 Group: Members Topic Count: 48 Topics Per Day: 0.01 Content Count: 124 Reputation: 6 Joined: 09/26/14 Last Seen: August 20, 2024 Author Share Posted February 18, 2023 How do we implement this? I'm confused as to how to use this based on the instructions given on script commands.https://raw.githubusercontent.com/rathena/rathena/master/doc/script_commands.txt Quote Link to comment Share on other sites More sharing options...
0 mawjustin Posted February 19, 2023 Group: Members Topic Count: 48 Topics Per Day: 0.01 Content Count: 124 Reputation: 6 Joined: 09/26/14 Last Seen: August 20, 2024 Author Share Posted February 19, 2023 Thanks @Emistry @Rynbef Quote Link to comment Share on other sites More sharing options...
Question
mawjustin
Hi Team,
How do we merge arrays and use them as a single array?
Example:
I want to use them as
This way I can only modify a specific attribute if necessary without affecting the entire list of array, as the other .attr arrays are used in other functions.
Thank you.
Edited by mawjustinRemoved spacing.
Link to comment
Share on other sites
4 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.