//warp portal 128 45, 141 150// warp portal prontera 139 150 ,prt_in 128 43//effect 47 light torchprontera,139,150,0warp CraftyChest#11,1,prt_in,128,43prt_in,128,45,0warp CraftyChest#21,1,prontera,141,150//By Skorm version 2.1prt_in,132,29,3 script Crafty Kreg 407,{setcell"prt_in",116,41,137,16,cell_shootable,0;setcell"prt_in",133,32,134,31,cell_walkable,0;set .npc$, "[Kreg]";//set @price,50;//getmapxy(.@map$,.@x,.@y,0);mes"(^00CC77So far "+$MaxCName$+" is the best at this game with "+$MaxCRound+" Rounds^000000)";set @price,100000;mes .npc$;mes"Hello, Do you want to try your luck at a game of Crafty Chest? But it's not cheap 50k to play.";//if(getmapusers("force_3-1")!=0) { mes "Room Status: [^FF0000Occupied^000000]"; close; } else//mes "Room Status: [^0000FFOpen^000000]";if(getgmlevel()>80){mes"Oh! Sir thanks for coming what would you like to do?";if(select("Continue to normal menu:Reset Best At game")-1){set $MaxCName,"";set $MaxCRound,0;mes"Done"; close;}}switch(select("uhhmm yeah, sure I'll give it a shot.","Nawh this things a scam!","Can you Explain what that is first?","Rewards")){case1:if(Zeny < @price){mes"Sorry you don't have enough zeny to play this game, it costs 50,000 Zeny to play."; close; end; }elsesetZeny,Zeny-@price;next;mes .npc$;mes"Ok Just Pick a chest kill it if you win then you'll move on.";next;set CRound,0;warp"prt_in",137,32;callfunc"Crafty-chest";case2:close;case3:mes"Sure It's pretty self explained, you kill a chest, if you pick the right one you win and move on to the next round.";close;case4:switch(select("1-5:6-9:10+")){if(@menu==1){for(set .@a,0; .@a<getarraysize(.PrizeR); set .@a,.@a +1){mesgetitemname(.PrizeR[.@a])+",";if(!(.@a%10))next;if(.@a==(getarraysize(.PrizeR)-1))close;}}if(@menu==2){for(set .@a,0; .@a<getarraysize(.pos); set .@a,.@a +1){mesgetitemname(.pos[.@a])+",";if(!(.@a%10))next;if(.@a==(getarraysize(.pos)-1))close;}}if(@menu==3){for(set .@a,0; .@a<getarraysize(.PrizeRs); set .@a,.@a +1){mesgetitemname(.PrizeRs[.@a])+",";if(!(.@a%10))next;if(.@a==(getarraysize(.PrizeRs)-1))close;}}}}OnInit:setcell"prt_in",116,41,137,16,cell_shootable,0;setcell"prt_in",133,32,134,31,cell_walkable,0;end;OnNPCKillEvent:if(getgmlevel()>10)end;getmapxy(@map$,.@x,.@y,0);if((killedrid==2288)&&(@map$ =="prt_in")){if(getequipid(EQI_HAND_L)!=-1){warp"prt_in",131,32; mes"Sorry you can't use weapons or shields."; close; end; }elseif(getequipid(EQI_HAND_R)!=-1){warp"prt_in",131,32; mes"Sorry you can't use weapons."; close; end; }else setArray .PrizeR[1],619, 0, 12016, 1000, 604, 678, 570, 645, 501, 0,0, 0, 501, 502, 503, 504, 505, 506, 507, 12116,0, 0, 9003, 0, 0, 601, 602, 603, 604, 12114,605, 606, 607, 608, 609, 610, 611, 612, 0, 12117; setArray .pos[0],2,572,10,21007,11,12208,12,12264,21,13804,22,20465,24,12020,25,12214,39,12115;for(set .@a,0; .@a < getarraysize(.pos); set .@a,.@a +2){set .@val,.@a +1;set .PrizeR[.pos[.@a]],.pos[.@val];} setArray .PrizeRs[1], 4365, 4441, 4403, 4342, 12103, 512, 4359, 4509, 25539, 4302;if(CRound>=10){if(rand(1,20)==1){emotione_grat,0; if(rand(0,1)){set .@pz,rand(1,10); getitem .PrizeRs[.@pz],1; announcestrcharinfo(0)+" made it to Round "+ CRound +" in crafty chest and got a ["+getitemname(.PrizeRs[.@pz])+"].",bc_blue;}dispbottom"awesome Round!."; emotione_omg,1; callfunc"Crafty-chest"; }atcommand"@effect 1"; warp"prt_in",131,32; dispbottom"You lose."; set CRound,0; end;}if(CRound>=8){if(((CRound>=9)?rand(1,10)==1:rand(1,3)==1)){emotione_grat,0; getitem .PrizeR[rand(1,40)],CRound; dispbottom"awesome Round!."; emotione_omg,1; callfunc"Crafty-chest"; }atcommand"@effect 1"; warp"prt_in",131,32; dispbottom"You lose."; set CRound,0; end;}if(rand(1,2)==1){emotione_grat,0; if(CRound>=3){getitem .PrizeR[rand(1,40)],CRound; }dispbottom"awesome Round!."; emotione_omg,1; callfunc"Crafty-chest"; }atcommand"@effect 1"; warp"prt_in",131,32; dispbottom"You lose."; set CRound,0; end;}else{end;}}function script Crafty-chest {if(getequipid(EQI_HAND_L)!=-1)unequipEQI_HAND_L;if(getequipid(EQI_HAND_R)!=-1)unequipEQI_HAND_R; setArray .CraftyR[1],1, 2, 3, 4, 5, 6, 7, 8, 9, 10,11, 12, 13, 14, 15, 16, 17, 18, 19, 20;set CRound,CRound +1;if(CRound>=$MaxCRound){set $MaxCRound,CRound; set $MaxCName$,""+strcharinfo(0)+""; }elsekillmonsterall"prt_in";monster"prt_in",136,34,"Crafty Chest-1",2288,1,"";monster"prt_in",136,32,"Crafty Chest-2",2288,1,"";if(CRound>=3){monster"prt_in",136,30,"Crafty Chest-3",2288,1,""; }elseif(CRound>=8){monster"prt_in",136,28,"Crafty Chest-4",2288,1,""; }elseif(CRound==getarraysize(.CraftyR[1])){warp"prt_in",131,32; }elsedispbottom"Round "+CRound;// atcommand "@localbroadcast Round "+CRound+""+@localbroadcast$;mapannounce"prt_in",strcharinfo(0)+" made it to Round "+ CRound +"",bc_map | bc_blue;}prt_in mapflag nowarpprt_in mapflag nomemoprt_in mapflag nosaveprt_in mapflag noskillprt_in mapflag nodrop