Jump to content
  • 0

Question

Posted
how do i put the selection on my array here
 
announce ""+strcharinfo(0)+": "+.Message$+"",bc_all,0;
 
if i make an array like this of hex codes
 
setarray .color$[0],"0xFF0000","0xFF4000","0xFF8000","0xFFBF00","0xFFFF00","0xBFFF00","0x80FF00","0x40FF00","0xFA5882","0x0101DF","0x7401DF";

set .@menu$,implode(.color$, ":");
set .@selection, select(.@menu$) -1;

 

3 answers to this question

Recommended Posts

Posted (edited)

wow it's such a complicated code..
 
If I were you, I probably will do something like this:
 

set .@choice$,"0xFF0000","0xFF4000","0xFF8000","0xFFBF00","0xFFFF00","0xBFFF00","0x80FF00","0x40FF00","0xFA5882","0x0101DF","0x7401DF";
select .@choice$;

explode(.@option$,.@choice$,":");
 
<then on the broadcast>
 
announce ""+strcharinfo(0)+": "+.Message$+"",bc_all,.@option$[@menu-1];
 

reference: rathena.org/wiki/Select

Edited by Winz
Posted (edited)

thanks man, figured it out i did it this way instead.

setarray .@cname$[0],"Green","Red","Purple","Pink","Orange";
setarray .@color$[0],"0x33FF33","0xD20000","0xCC00FF","0xFF33CC","0xFF9900";

then i set menu

 

for (set .@c, 0; .@c < getarraysize(.@cname$); set .@c, .@c + 1){
set .@menu_cname$[getarraysize(.@menu_cname$)], .@cname$[.@c];
set .@menu_index[getarraysize(.@menu_index)], .@c;
set .@menu$, .@menu_cname$[0];
for (set .@c, 1; .@c < getarraysize(.@menu_cname$); set .@c, .@c + 1) {
set .@menu$, .@menu$ + ":" + .@menu_cname$[.@c];
}

set .@c, select(.@menu$) - 1; 
input .Message$;
next;
announce ""+strcharinfo(0)+": "+.Message$+"",bc_all,.@color$[.@c];

 

Edited by SilverMayCry

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...