Kudo Posted August 3, 2020 Group: Members Topic Count: 56 Topics Per Day: 0.01 Content Count: 140 Reputation: 0 Joined: 08/18/12 Last Seen: June 21, 2024 Share Posted August 3, 2020 (edited) pa request naman script ng 2 random box box 1 = pag inopen ko sya mag bibigay sya ng 1 custom items na random between 20001 - 20020 or more.. box 2 = pag inopen ko sya mag bibigay sya ng 10pcs custom items na random between 20001 - 20020 or more... Edited August 3, 2020 by aksehc Quote Link to comment Share on other sites More sharing options...
shatowolf Posted August 3, 2020 Group: Members Topic Count: 3 Topics Per Day: 0.00 Content Count: 259 Reputation: 35 Joined: 11/19/11 Last Seen: Thursday at 11:19 AM Share Posted August 3, 2020 1 hour ago, aksehc said: pa request naman script ng 2 random box box 1 = pag inopen ko sya mag bibigay sya ng 1 custom items na random between 20001 - 20020 or more.. box 2 = pag inopen ko sya mag bibigay sya ng 10pcs custom items na random between 20001 - 20020 or more... // ======================================================================================================== //{ callfunc "CustomBox"; },{},{} function script CustomBox { set .@Total,9; //<%>,<ItemID>,<Amount> setarray .@P1[0],1,512,1; //Gallon Hat of Flame setarray .@P2[0],2,512,1; //Crow_Tengu_Mask setarray .@P3[0],3,512,1; //Canopy setarray .@P4[0],5,7179,10; //PODS setarray .@P5[0],30,969,150; //(Gold) setarray .@P6[0],80,12016,10; //Speed_Up_Potion setarray .@P7[0],90,12214,5; //12214 setarray .@P8[0],95,12412,5; //HE_Bubble_Gum setarray .@P9[0],70,12103,5; //Bubble Gum setarray .@Default[0],rand(969,512),rand(1,5); set .@i, rand(1,.@Total); if (rand(1,100) > getd(".@P"+.@i+"[0]")) { for(set .@j,0; .@j<getarraysize(.@Default); set .@j,.@j+2) { getitem .@Default[.@j], .@Default[.@j+1]; if(!.@k[0]) setarray .@k[0], .@Default[.@j], .@Default[.@j+1]; } } else{ for(set .@j,1; .@j<getarraysize(getd(".@P"+.@i)); set .@j,.@j+2) { getitem getd(".@P"+.@i+"["+.@j+"]"), getd(".@P"+.@i+"["+(.@j+1)+"]"); if (!.@k[0]) { set .@gz,.@i; setarray .@k[0], getd(".@P"+.@i+"["+.@j+"]"), getd(".@P"+.@i+"["+(.@j+1)+"]"); break; } } } if(1<=.@gz&&.@gz<=9) announce ""+strcharinfo(0)+" has opened Egg Scroll and reward ["+getitemname(.@k[0])+" x "+.@k[1]+"]!",0; specialeffect2 251; end; } Quote Link to comment Share on other sites More sharing options...
Kudo Posted August 3, 2020 Group: Members Topic Count: 56 Topics Per Day: 0.01 Content Count: 140 Reputation: 0 Joined: 08/18/12 Last Seen: June 21, 2024 Author Share Posted August 3, 2020 47 minutes ago, shatowolf said: // ======================================================================================================== //{ callfunc "CustomBox"; },{},{} function script CustomBox { set .@Total,9; //<%>,<ItemID>,<Amount> setarray .@P1[0],1,512,1; //Gallon Hat of Flame setarray .@P2[0],2,512,1; //Crow_Tengu_Mask setarray .@P3[0],3,512,1; //Canopy setarray .@P4[0],5,7179,10; //PODS setarray .@P5[0],30,969,150; //(Gold) setarray .@P6[0],80,12016,10; //Speed_Up_Potion setarray .@P7[0],90,12214,5; //12214 setarray .@P8[0],95,12412,5; //HE_Bubble_Gum setarray .@P9[0],70,12103,5; //Bubble Gum setarray .@Default[0],rand(969,512),rand(1,5); set .@i, rand(1,.@Total); if (rand(1,100) > getd(".@P"+.@i+"[0]")) { for(set .@j,0; .@j<getarraysize(.@Default); set .@j,.@j+2) { getitem .@Default[.@j], .@Default[.@j+1]; if(!.@k[0]) setarray .@k[0], .@Default[.@j], .@Default[.@j+1]; } } else{ for(set .@j,1; .@j<getarraysize(getd(".@P"+.@i)); set .@j,.@j+2) { getitem getd(".@P"+.@i+"["+.@j+"]"), getd(".@P"+.@i+"["+(.@j+1)+"]"); if (!.@k[0]) { set .@gz,.@i; setarray .@k[0], getd(".@P"+.@i+"["+.@j+"]"), getd(".@P"+.@i+"["+(.@j+1)+"]"); break; } } } if(1<=.@gz&&.@gz<=9) announce ""+strcharinfo(0)+" has opened Egg Scroll and reward ["+getitemname(.@k[0])+" x "+.@k[1]+"]!",0; specialeffect2 251; end; } is this for box 1 only or box 2? Quote Link to comment Share on other sites More sharing options...
shatowolf Posted August 3, 2020 Group: Members Topic Count: 3 Topics Per Day: 0.00 Content Count: 259 Reputation: 35 Joined: 11/19/11 Last Seen: Thursday at 11:19 AM Share Posted August 3, 2020 in this line //{ callfunc "CustomBox"; },{},{} function script CustomBox { copy paste mo lang then. edit the line //{ callfunc "CustomBox2"; },{},{} function script CustomBox2 { para sa box2. Quote Link to comment Share on other sites More sharing options...
Kudo Posted August 4, 2020 Group: Members Topic Count: 56 Topics Per Day: 0.01 Content Count: 140 Reputation: 0 Joined: 08/18/12 Last Seen: June 21, 2024 Author Share Posted August 4, 2020 23 hours ago, shatowolf said: in this line //{ callfunc "CustomBox"; },{},{} function script CustomBox { copy paste mo lang then. edit the line //{ callfunc "CustomBox2"; },{},{} function script CustomBox2 { para sa box2. boss need pa ba ako mag lagay ng item sa group item ba yun na? Quote Link to comment Share on other sites More sharing options...
Yonko Posted August 5, 2020 Group: Members Topic Count: 166 Topics Per Day: 0.04 Content Count: 789 Reputation: 50 Joined: 04/16/12 Last Seen: July 8, 2022 Share Posted August 5, 2020 17 hours ago, aksehc said: boss need pa ba ako mag lagay ng item sa group item ba yun na? uulitin mo lang yung script ng CustomBox papalitan mo lang yung function head ng CustomBox2. Quote Link to comment Share on other sites More sharing options...
Kudo Posted August 5, 2020 Group: Members Topic Count: 56 Topics Per Day: 0.01 Content Count: 140 Reputation: 0 Joined: 08/18/12 Last Seen: June 21, 2024 Author Share Posted August 5, 2020 5 hours ago, Yonko said: uulitin mo lang yung script ng CustomBox papalitan mo lang yung function head ng CustomBox2. oo gets ko na yan boss ang tinatanong ko kung need pa ba sya ilagay sa item_group yung mga items ko na ilalagay dyan? Quote Link to comment Share on other sites More sharing options...
Yonko Posted August 5, 2020 Group: Members Topic Count: 166 Topics Per Day: 0.04 Content Count: 789 Reputation: 50 Joined: 04/16/12 Last Seen: July 8, 2022 Share Posted August 5, 2020 di na need. Quote Link to comment Share on other sites More sharing options...
Kudo Posted August 5, 2020 Group: Members Topic Count: 56 Topics Per Day: 0.01 Content Count: 140 Reputation: 0 Joined: 08/18/12 Last Seen: June 21, 2024 Author Share Posted August 5, 2020 oks salamat sa reply boss.. pwede din ba tong maging 10pcs custom set ang ma re receive sa 2nd box? instead of 1 random item lang? 10 items depende sa % ng custom items Quote Link to comment Share on other sites More sharing options...
Kudo Posted August 5, 2020 Group: Members Topic Count: 56 Topics Per Day: 0.01 Content Count: 140 Reputation: 0 Joined: 08/18/12 Last Seen: June 21, 2024 Author Share Posted August 5, 2020 On 8/2/2020 at 9:50 PM, aksehc said: pano ko sya mapapagana mga boss after ko sya ilagay sa script npc then script_custom.conf meron pa bang dapat ilagay or anything sa itemDB? pano ko maku2ha yung box? Quote Link to comment Share on other sites More sharing options...
shatowolf Posted August 5, 2020 Group: Members Topic Count: 3 Topics Per Day: 0.00 Content Count: 259 Reputation: 35 Joined: 11/19/11 Last Seen: Thursday at 11:19 AM Share Posted August 5, 2020 10 minutes ago, aksehc said: pano ko sya mapapagana mga boss after ko sya ilagay sa script npc then script_custom.conf meron pa bang dapat ilagay or anything sa itemDB? pano ko maku2ha yung box? sa itemdb mo lagay mo to : { callfunc "CustomBox"; },{},{} Quote Link to comment Share on other sites More sharing options...
Kudo Posted August 5, 2020 Group: Members Topic Count: 56 Topics Per Day: 0.01 Content Count: 140 Reputation: 0 Joined: 08/18/12 Last Seen: June 21, 2024 Author Share Posted August 5, 2020 Just now, shatowolf said: sa itemdb mo lagay mo to : { callfunc "CustomBox"; },{},{} ok na boss.. working na possible ba na pwedeng ganito 1 box = 10 random items? Quote Link to comment Share on other sites More sharing options...
shatowolf Posted August 5, 2020 Group: Members Topic Count: 3 Topics Per Day: 0.00 Content Count: 259 Reputation: 35 Joined: 11/19/11 Last Seen: Thursday at 11:19 AM Share Posted August 5, 2020 2 minutes ago, aksehc said: ok na boss.. working na possible ba na pwedeng ganito 1 box = 10 random items? you mean aalisin na ung default ? item 969 and item 512. setarray .@Default[0],rand(969,512),rand(1,5); Quote Link to comment Share on other sites More sharing options...
Kudo Posted August 5, 2020 Group: Members Topic Count: 56 Topics Per Day: 0.01 Content Count: 140 Reputation: 0 Joined: 08/18/12 Last Seen: June 21, 2024 Author Share Posted August 5, 2020 Just now, shatowolf said: you mean aalisin na ung default ? item 969 and item 512. setarray .@Default[0],rand(969,512),rand(1,5); hindi boss what i mean is diba etong script na to ay 1 item lang ang maku2ha nya kapag click nya ang item na may call function... ang gusto ko sana mangyari eh instead na 1 item lang eh makaka kuha ako ng 10 random items Quote Link to comment Share on other sites More sharing options...
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.