Radian Posted September 23, 2019 Group: Members Topic Count: 162 Topics Per Day: 0.04 Content Count: 1546 Reputation: 192 Joined: 07/23/14 Last Seen: June 24, 2024 Share Posted September 23, 2019 Hey guys, can i request this kind of script? I am having issue on how to start on it. How it works, is If player got the item from any of the list, he/she can select to switch it 1:1 from the same list. list example: setarray .item_list, 32037,32031,32326,32035,32034,32032,32033,32036,32325,32324; I was hoping if possible to make 3 different list for it. Thank you so much. Quote Link to comment Share on other sites More sharing options...
0 crazyarashi Posted September 24, 2019 Group: Developer Topic Count: 50 Topics Per Day: 0.02 Content Count: 776 Reputation: 239 Joined: 02/11/17 Last Seen: 6 hours ago Share Posted September 24, 2019 - script item_swap -1,{ for(.@i = 0; .@i < .size; .@i++){ .@menu$ += "List " + (.@i+1) + ":"; } mes "Select a list."; next; .@s = select(.@menu$) - 1; explode(.@item$,.item_list$[.@s],","); for(.@i = 0; .@i < getarraysize(.@item$); .@i++){ .@id = atoi(.@item$[.@i]); .@item[.@i] = .@id; if(countitem(.@id)){ .@temp[getarraysize(.@temp)] = .@id; .@data$ += getitemname(.@id) + ":"; } else { continue; } } mes "Select the item you want to swap."; next; .@s = select(.@data$) - 1; .@swap_id = .@temp[.@s]; .@index = inarray(.@item,.@swap_id); for(.@i = 0; .@i < getarraysize(.@item); .@i++){ if(.@i == .@index) continue; .@swap[getarraysize(.@swap)] = .@item[.@i]; .@swap$ += getitemname(.@item[.@i]) + ":"; } mes "select the item you want to swap into."; next; .@s = select(.@swap$) - 1; delitem .@swap_id,1; getitem .@swap[.@s],1; end; OnInit: setarray .item_list$,"501,502,503,504,505","506,507,508,509,510"; .size = getarraysize(.item_list$); end; } Haven't tested this but pretty sure it will work.. 1 Quote Link to comment Share on other sites More sharing options...
0 Radian Posted September 24, 2019 Group: Members Topic Count: 162 Topics Per Day: 0.04 Content Count: 1546 Reputation: 192 Joined: 07/23/14 Last Seen: June 24, 2024 Author Share Posted September 24, 2019 Anyone got an idea how the method works? I'll work on the rest. thank you Quote Link to comment Share on other sites More sharing options...
0 Radian Posted September 25, 2019 Group: Members Topic Count: 162 Topics Per Day: 0.04 Content Count: 1546 Reputation: 192 Joined: 07/23/14 Last Seen: June 24, 2024 Author Share Posted September 25, 2019 2 hours ago, crazyarashi said: - script item_swap -1,{ for(.@i = 0; .@i < .size; .@i++){ .@menu$ += "List " + (.@i+1) + ":"; } mes "Select a list."; next; .@s = select(.@menu$) - 1; explode(.@item$,.item_list$[.@s],","); for(.@i = 0; .@i < getarraysize(.@item$); .@i++){ .@id = atoi(.@item$[.@i]); .@item[.@i] = .@id; if(countitem(.@id)){ .@temp[getarraysize(.@temp)] = .@id; .@data$ += getitemname(.@id) + ":"; } else { continue; } } mes "Select the item you want to swap."; next; .@s = select(.@data$) - 1; .@swap_id = .@temp[.@s]; .@index = inarray(.@item,.@swap_id); for(.@i = 0; .@i < getarraysize(.@item); .@i++){ if(.@i == .@index) continue; .@swap[getarraysize(.@swap)] = .@item[.@i]; .@swap$ += getitemname(.@item[.@i]) + ":"; } mes "select the item you want to swap into."; next; .@s = select(.@swap$) - 1; delitem .@swap_id,1; getitem .@swap[.@s],1; end; OnInit: setarray .item_list$,"501,502,503,504,505","506,507,508,509,510"; .size = getarraysize(.item_list$); end; } Haven't tested this but pretty sure it will work.. Thank you so much, Working perfectly! Quote Link to comment Share on other sites More sharing options...
0 Ukiram Posted September 25, 2019 Group: Members Topic Count: 45 Topics Per Day: 0.02 Content Count: 291 Reputation: 27 Joined: 12/16/17 Last Seen: December 19, 2023 Share Posted September 25, 2019 Hi, @Radian how this works? Thanks? Is this commandable? like @swap to swap the equipment? can you explain hehe Quote Link to comment Share on other sites More sharing options...
0 Radian Posted September 25, 2019 Group: Members Topic Count: 162 Topics Per Day: 0.04 Content Count: 1546 Reputation: 192 Joined: 07/23/14 Last Seen: June 24, 2024 Author Share Posted September 25, 2019 On 9/25/2019 at 8:32 AM, DevMarikuLabsan said: Hi, @Radian how this works? Thanks? Is this commandable? like @swap to swap the equipment? can you explain hehe No. It's an npc that allow players to switch from Headgear1 to Headgear2, Headgear3 or Headgear4 @crazyarashi Hi, Where do i need to change if i want to keep the refine + cards of the old headgear into the new headgear? Quote Link to comment Share on other sites More sharing options...
Question
Radian
Hey guys, can i request this kind of script? I am having issue on how to start on it.
How it works, is
Thank you so much.
Link to comment
Share on other sites
5 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.