Jump to content

Question

Posted (edited)

Hello rA devs, Im trying to make a random box item with cutins, how can I change the last pic stopped in cutins into the random item that you get in the list. Example I have a 10 random items (setarray .itemlist,501,502,503,504,505,506,507,508,509,510;) then i want to set the last image of the cutin will be "hb503" <- this is the example what will I get so I want to display the image of hb503 when I get the reward 503.

 

Btw this is the cutin animation script that I'm using in my script.

for(.@i=1;.@i<30;.@i++) {
cutin "hb"+.@i,4;
sleep2 100;
}

Thanks in advance.

Edited by GodKnows Jhomz

2 answers to this question

Recommended Posts

  • 0
Posted (edited)

Rather easy...

 

PS/ I added a randomisation of your cutin 'coz your script above is false, if cutin name are like hb501...

.@last_item = rand(501,510);
for(.@i=1;.@i<30;.@i++) {
  .@id = rand(501,510);
  cutin "hb"+.@id,4;
  sleep2 100;
}
cutin "hb"+.@last_item,4;
getitem .@last_item,1;
Edited by Vykimo
  • Upvote 1
  • 0
Posted

 

Rather easy...

 

PS/ I added a randomisation of your cutin 'coz your script above is false, if cutin name are like hb501...

.@last_item = rand(501,510);
for(.@i=1;.@i<30;.@i++) {
  .@id = rand(501,510);
  cutin "hb"+.@id,4;
  sleep2 100;
}
cutin "hb"+.@last_item,4;
getitem .@last_item,1;

Thank you very much! My script is now working perfectly. :D Marked as solved!

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...