andrew0960 Posted October 25, 2016 Posted October 25, 2016 if (.@i) { morphembryo; hommutate 6047+.@i; set Zeny,Zeny - 50000; } else { set $@humm,rand(5); hommutate 6047+$@humm;}; close; my npc can mutate just fine using selection .@i but it i choose random... it wont mutate pls help!! Quote
0 Smoke Posted October 25, 2016 Posted October 25, 2016 Well, you didn't add a morphembryo; in the second case. 1 Quote
0 Smoke Posted October 25, 2016 Posted October 25, 2016 (edited) According to the rA documentation - *rand(<number>{,<number>}); This function returns a number ... (if you specify one) ... randomly positioned between 0 and the number you specify -1. (if you specify two) ... randomly positioned between the two numbers you specify. rand(10) would result in 0,1,2,3,4,5,6,7,8 or 9 rand(0,9) would result in 0,1,2,3,4,5,6,7,8 or 9 rand(2,5) would result in 2,3,4 or 5 in your case, the rand can range 0~4 (6047 ~ 6051) where homunculus 6047 doesn't exist. Edited October 25, 2016 by Smoke Quote
0 andrew0960 Posted October 25, 2016 Author Posted October 25, 2016 According to the rA documentation - *rand(<number>{,<number>}); This function returns a number ... (if you specify one) ... randomly positioned between 0 and the number you specify -1. (if you specify two) ... randomly positioned between the two numbers you specify. rand(10) would result in 0,1,2,3,4,5,6,7,8 or 9 rand(0,9) would result in 0,1,2,3,4,5,6,7,8 or 9 rand(2,5) would result in 2,3,4 or 5 in your case, the rand can range 0~4 (6047 ~ 6051) where homunculus 6047 doesn't exist. thx for helping, i now tried else { set $@humm,rand(5); hommutate 6048+$@humm;}; close; else { set $@humm,rand(1,5); hommutate 6047+$@humm;}; close; both couldnt work Quote
0 Smoke Posted October 25, 2016 Posted October 25, 2016 You might want to show the rest of the script for better help? Quote
0 andrew0960 Posted October 25, 2016 Author Posted October 25, 2016 (edited) You might want to show the rest of the script for better help? prontera,164,98,3 script A 982,{ if((Class == 4071) || (Class == 4078) || (Class == 4107)){ mes "[A]"; mes "Hello "+strcharinfo(0)+","; mes "what can i do for you?"; next; switch(select("Please mutate my hom:about homS:cancel")){ case 1: mes "[A]"; if(!getskilllv("AM_BIOETHICS")){ mes "you don't have the required skill."; close;} if(!gethominfo(1)){ mes "Please summon your homunculus!"; close; } if(gethominfo(1) < 6009){ mes "You need to evolve your homunculus first"; close;} if(gethominfo(6) < 99){ mes "your homunculus hasnt reach lv99 yet。"; mes "come back later!."; close;} if(gethominfo(1) == 6048 || gethominfo(1) == 6049 || gethominfo(1) == 6050 || gethominfo(1) == 6051 || gethominfo(1) == 6052){ mes "nice!"; mes "you have reach the basic requirement!。"; close;} mes "lets do this!"; mes "hehehe!"; next; mes "[A]"; mes "you can choose to pay and mutate to one u like"; mes "or free, but random"; mes "what do you think?"; next; switch(Select("ill choose!:let it be random!:cancel")){ case 1: if(Zeny < 50000){ mes "[A]"; mes "wheres da zeny bro"; close; } mes "[A]"; mes "tell me which form u would like?"; next; set .@i, select("a:b:c:d:e:cancel"); if (.@i == 6) { mes "[A]"; mes "come again!"; close; } case 2: mes "[A]"; mes "give me some time!"; mes "fsdfsdg...."; next; mes "[A]"; mes "Abra..."; next; mes "[A]"; mes "Kadabra..."; next; mes "[A]"; mes "Simsala!"; mes "..."; mes "Oo~~p~!!!"; mes "~~~~..."; next; mes "[A]"; mes "here you go!!"; if (.@i) { morphembryo; hommutate 6047+.@i; set Zeny,Zeny - 50000; } else { set $@humm,rand(5); hommutate 6047+$@humm;}; close; case 3: mes "[A]"; mes "ill bbe waiting!!"; close;} case 2: mes "[A]"; mes "infofgfdgd。"; mes "gdfgdfgd"; mes "dfgdfg"; mes "fgdfgd"; close; case 3: mes "[A]"; mes "Ill be waiting!!"; close; } } mes "[A]"; mes "?????"; mes "youre not allow to have one!!"; close; } here you go! thanks for the help really appreciate your help!!!! Edited October 25, 2016 by andrew0960 Quote
0 andrew0960 Posted October 25, 2016 Author Posted October 25, 2016 Well, you didn't add a morphembryo; in the second case. thank you sir for spotting the error ;0 Quote
Question
andrew0960
my npc can mutate just fine using selection .@i
but it i choose random... it wont mutate
pls help!!
6 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.