blakbord Posted May 8, 2016 Group: Members Topic Count: 30 Topics Per Day: 0.01 Content Count: 108 Reputation: 1 Joined: 02/10/12 Last Seen: March 10 Share Posted May 8, 2016 (edited) i want to hide this NPC after 30minutes and will be back after 5hours, how to do that? thanks in advance.. guild_vs2,50,49,3 script Mega Lotto 563,{ progressbar "",1; delitem .Cost[0], .Cost[1]; 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]) setarray .@k[0], getd(".P"+.@i+"["+.@j+"]"), getd(".P"+.@i+"["+(.@j+1)+"]"); } } announce "Congratulations to "+strcharinfo(0)+" for getting "+.@k[1]+"x "+getitemname(.@k[0])+"!",0; specialeffect2 248; close; OnInit: waitingroom "Play Lotto Here!",0; // Format: <%>,<item ID>,<count>{,...}; setarray .P1[0],100,607,5; setarray .P2[0],80,607,5; setarray .P3[0],70,607,5; setarray .P4[0],60,607,5; setarray .P5[0],50,607,5; setarray .P6[0],50,607,20; setarray .P7[0],40,607,25; setarray .P8[0],30,607,30; setarray .P9[0],20,607,25; setarray .P10[0],10,607,50; setarray .P11[0],100,30487,10; setarray .P12[0],90,30487,10; setarray .P13[0],50,12202,10; setarray .P14[0],50,12203,10; setarray .P15[0],50,12204,10; setarray .P16[0],50,12205,10; setarray .P17[0],50,12206,10; setarray .P18[0],50,12207,10; setarray .P19[0],20,30487,20; setarray .P20[0],10,30487,25; setarray .P21[0],50,12103,5; setarray .P22[0],40,12103,5; setarray .P23[0],30,12103,5; setarray .P24[0],20,12103,5; setarray .P25[0],10,12103,10; setarray .P26[0],50,12202,5; setarray .P27[0],50,12103,5; setarray .P28[0],50,12204,5; setarray .P29[0],50,12205,5; setarray .P30[0],50,12206,5; setarray .P31[0],50,12207,5; setarray .P32[0],5,7073,1; setarray .P33[0],5,7074,1; setarray .P34[0],5,7075,1; setarray .P35[0],5,7076,1; setarray .P36[0],5,7077,1; setarray .P37[0],5,7078,1; setarray .P38[0],5,7079,1; setarray .P39[0],5,7080,1; setarray .P40[0],5,7081,1; setarray .P41[0],5,7082,1; setarray .P42[0],5,7083,1; setarray .P43[0],5,7084,1; setarray .P44[0],5,7085,1; setarray .P45[0],5,7086,1; setarray .P46[0],5,7087,1; setarray .P47[0],5,7088,1; setarray .P48[0],5,7089,1; setarray .P49[0],5,7090,1; setarray .P50[0],5,7091,1; setarray .P51[0],5,7092,1; setarray .P52[0],1,4395,1; setarray .Default[0],30272,1; setarray .Cost[0],7368,1; set .Total,52; end; } and also how to change it to only 1% item will be announced? BUMP!! BUMP !! Edited May 8, 2016 by blakbord Quote Link to comment Share on other sites More sharing options...
0 Skorm Posted May 10, 2016 Group: Forum Moderator Topic Count: 33 Topics Per Day: 0.01 Content Count: 1268 Reputation: 382 Joined: 02/03/12 Last Seen: April 28 Share Posted May 10, 2016 i want to hide this NPC after 30minutes and will be back after 5hours, how to do that? thanks in advance.. and also how to change it to only 1% item will be announced? guild_vs2,50,49,3 script Mega Lotto 563,{ progressbar "",1; delitem .Cost[0], .Cost[1]; 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]) setarray .@k[0], getd(".P"+.@i+"["+.@j+"]"), getd(".P"+.@i+"["+(.@j+1)+"]"); } } if( getd(".P"+.@i+"[0]") == 1 ) announce "Congratulations to "+strcharinfo(0)+" for getting "+.@k[1]+"x "+getitemname(.@k[0])+"!",0; specialeffect2 248; close; OnTimer1800000: //30 Minutes. announce "I'd like to thank all of our lucky contestants. I'll be back in 5 Hours!",0; disablenpc strnpcinfo(3); end; OnTimer18000000: //5 Hours. initnpctimer; announce "Come test your luck at the Mega Lotta. Only avaliable for the next 30 Minutes!",0; enablenpc strnpcinfo(3); end; OnInit: initnpctimer; waitingroom "Play Lotto Here!",0; // Format: <%>,<item ID>,<count>{,...}; setarray .P1[0],100,607,5; setarray .P2[0],80,607,5; setarray .P3[0],70,607,5; setarray .P4[0],60,607,5; setarray .P5[0],50,607,5; setarray .P6[0],50,607,20; setarray .P7[0],40,607,25; setarray .P8[0],30,607,30; setarray .P9[0],20,607,25; setarray .P10[0],10,607,50; setarray .P11[0],100,30487,10; setarray .P12[0],90,30487,10; setarray .P13[0],50,12202,10; setarray .P14[0],50,12203,10; setarray .P15[0],50,12204,10; setarray .P16[0],50,12205,10; setarray .P17[0],50,12206,10; setarray .P18[0],50,12207,10; setarray .P19[0],20,30487,20; setarray .P20[0],10,30487,25; setarray .P21[0],50,12103,5; setarray .P22[0],40,12103,5; setarray .P23[0],30,12103,5; setarray .P24[0],20,12103,5; setarray .P25[0],10,12103,10; setarray .P26[0],50,12202,5; setarray .P27[0],50,12103,5; setarray .P28[0],50,12204,5; setarray .P29[0],50,12205,5; setarray .P30[0],50,12206,5; setarray .P31[0],50,12207,5; setarray .P32[0],5,7073,1; setarray .P33[0],5,7074,1; setarray .P34[0],5,7075,1; setarray .P35[0],5,7076,1; setarray .P36[0],5,7077,1; setarray .P37[0],5,7078,1; setarray .P38[0],5,7079,1; setarray .P39[0],5,7080,1; setarray .P40[0],5,7081,1; setarray .P41[0],5,7082,1; setarray .P42[0],5,7083,1; setarray .P43[0],5,7084,1; setarray .P44[0],5,7085,1; setarray .P45[0],5,7086,1; setarray .P46[0],5,7087,1; setarray .P47[0],5,7088,1; setarray .P48[0],5,7089,1; setarray .P49[0],5,7090,1; setarray .P50[0],5,7091,1; setarray .P51[0],5,7092,1; setarray .P52[0],1,4395,1; setarray .Default[0],30272,1; setarray .Cost[0],7368,1; set .Total,52; announce "Come test your luck at the Mega Lotta. Only avaliable for the next 30 Minutes!",0; end; } Quote Link to comment Share on other sites More sharing options...
0 blakbord Posted May 12, 2016 Group: Members Topic Count: 30 Topics Per Day: 0.01 Content Count: 108 Reputation: 1 Joined: 02/10/12 Last Seen: March 10 Author Share Posted May 12, 2016 thanks for responding sir @Skorm but why does it announce the default prize instead of the grand prize which is thanatos card? Quote Link to comment Share on other sites More sharing options...
0 Skorm Posted May 21, 2016 Group: Forum Moderator Topic Count: 33 Topics Per Day: 0.01 Content Count: 1268 Reputation: 382 Joined: 02/03/12 Last Seen: April 28 Share Posted May 21, 2016 thanks for responding sir @Skorm but why does it announce the default prize instead of the grand prize which is thanatos card? I assumed the script was functioning correctly before hand. guild_vs2,50,49,3 script Mega Lotto 563,{ progressbar "",1; delitem .Cost[0], .Cost[1]; 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]; } else { for(set .@j,1; .@j<getarraysize(getd(".P"+.@i)); set .@j,.@j+2) { setarray .@k[0], getd(".P"+.@i+"["+.@j+"]"), getd(".P"+.@i+"["+(.@j+1)+"]"); getitem .@k[0], .@k[1]; if( getd(".P"+.@i+"[0]") == 1 ) announce "Congratulations to "+strcharinfo(0)+" for getting "+.@k[1]+"x "+getitemname(.@k[0])+"!",0; } } specialeffect2 248; close; OnTimer1800000: //30 Minutes. announce "I'd like to thank all of our lucky contestants. I'll be back in 5 Hours!",0; disablenpc strnpcinfo(3); end; OnTimer18000000: //5 Hours. initnpctimer; announce "Come test your luck at the Mega Lotta. Only avaliable for the next 30 Minutes!",0; enablenpc strnpcinfo(3); end; OnInit: initnpctimer; waitingroom "Play Lotto Here!",0; // Format: <%>,<item ID>,<count>{,...}; setarray .P1[0],100,607,5; setarray .P2[0],80,607,5; setarray .P3[0],70,607,5; setarray .P4[0],60,607,5; setarray .P5[0],50,607,5; setarray .P6[0],50,607,20; setarray .P7[0],40,607,25; setarray .P8[0],30,607,30; setarray .P9[0],20,607,25; setarray .P10[0],10,607,50; setarray .P11[0],100,30487,10; setarray .P12[0],90,30487,10; setarray .P13[0],50,12202,10; setarray .P14[0],50,12203,10; setarray .P15[0],50,12204,10; setarray .P16[0],50,12205,10; setarray .P17[0],50,12206,10; setarray .P18[0],50,12207,10; setarray .P19[0],20,30487,20; setarray .P20[0],10,30487,25; setarray .P21[0],50,12103,5; setarray .P22[0],40,12103,5; setarray .P23[0],30,12103,5; setarray .P24[0],20,12103,5; setarray .P25[0],10,12103,10; setarray .P26[0],50,12202,5; setarray .P27[0],50,12103,5; setarray .P28[0],50,12204,5; setarray .P29[0],50,12205,5; setarray .P30[0],50,12206,5; setarray .P31[0],50,12207,5; setarray .P32[0],5,7073,1; setarray .P33[0],5,7074,1; setarray .P34[0],5,7075,1; setarray .P35[0],5,7076,1; setarray .P36[0],5,7077,1; setarray .P37[0],5,7078,1; setarray .P38[0],5,7079,1; setarray .P39[0],5,7080,1; setarray .P40[0],5,7081,1; setarray .P41[0],5,7082,1; setarray .P42[0],5,7083,1; setarray .P43[0],5,7084,1; setarray .P44[0],5,7085,1; setarray .P45[0],5,7086,1; setarray .P46[0],5,7087,1; setarray .P47[0],5,7088,1; setarray .P48[0],5,7089,1; setarray .P49[0],5,7090,1; setarray .P50[0],5,7091,1; setarray .P51[0],5,7092,1; setarray .P52[0],1,4395,1; setarray .Default[0],30272,1; setarray .Cost[0],7368,1; set .Total,52; announce "Come test your luck at the Mega Lotta. Only avaliable for the next 30 Minutes!",0; end; } Quote Link to comment Share on other sites More sharing options...
Question
blakbord
i want to hide this NPC after 30minutes and will be back after 5hours, how to do that? thanks in advance..
and also how to change it to only 1% item will be announced?
BUMP!!
BUMP !!
Edited by blakbordLink to comment
Share on other sites
3 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.