Tales Posted October 17, 2015 Posted October 17, 2015 Where can increase the dificult? Are too easy to get all ranks. Quote
0 Aleos Posted October 18, 2015 Posted October 18, 2015 clif.c sd->roulette.prizeIdx = rnd()%rd.items[stage]; if (rd.flag[stage][sd->roulette.prizeIdx]&1) { clif_roulette_generate_ack(sd,GENERATE_ROULETTE_LOSING,stage,sd->roulette.prizeIdx,0); clif_roulette_getitem(sd); clif_roulette_recvitem_ack(sd, RECV_ITEM_SUCCESS); return; } This is the snippet of code that determines win or loss. There are two ways to go about this. 1) You can go to `db_roulette` and adjust more items as flag = 1 for each stage. When an item is flagged as 1, then it is considered a loss item. 2) Adjust the snippet of code above. You could make the rnd() do something like out of 100 then change the if() statment below it to check for a "%" of success. Quote
0 DanielArt Posted January 29, 2016 Posted January 29, 2016 I do this: sd->roulette.prizeStage = stage; sd->roulette.prizeIdx = rnd()%rd.items[stage]; if (rd.flag[stage][sd->roulette.prizeIdx]&1 || (rand()%8 >= stage)) { clif_roulette_generate_ack(sd,GENERATE_ROULETTE_LOSING,stage,sd->roulette.prizeIdx,0); clif_roulette_getitem(sd); clif_roulette_recvitem_ack(sd, RECV_ITEM_SUCCESS); return; } Quote
0 kazegawa Posted April 1, 2017 Posted April 1, 2017 (edited) On 30/1/2016 at 6:22 AM, DanielArt said: I do this: sd->roulette.prizeStage = stage; sd->roulette.prizeIdx = rnd()%rd.items[stage]; if (rd.flag[stage][sd->roulette.prizeIdx]&1 || (rand()%8 >= stage)) { clif_roulette_generate_ack(sd,GENERATE_ROULETTE_LOSING,stage,sd->roulette.prizeIdx,0); clif_roulette_getitem(sd); clif_roulette_recvitem_ack(sd, RECV_ITEM_SUCCESS); return; } when im editting with ur script the roulette being stuck on 1st stage only, and not animation roulette showing/running. can u fix it? and at the normal case when i get lose reward i cant press start again, and always need to recall then roulette window again. Edited April 1, 2017 by kazegawa add some statement Quote
0 t3quila Posted October 23, 2018 Posted October 23, 2018 i use this for a chance int8 rchance = rnd()%100; if( rchance > 10 ){ //if( rd.flag[sd->roulette.stage][sd->roulette.prizeIdx]&1 ){ result = GENERATE_ROULETTE_LOSING; sd->roulette.stage = 0; }else{ result = GENERATE_ROULETTE_SUCCESS; sd->roulette.stage++; } } it means, chance success just only 10% Quote Quote
Question
Tales
Where can increase the dificult? Are too easy to get all ranks.
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.