Jump to content

BlindRO

Members
  • Posts

    25
  • Joined

  • Last visited

Everything posted by BlindRO

  1. prontera,176,177,4 script Gacha Machine 563,{ .@name$ = strcharinfo(0); .@rand = rand(.chances); .@i = 0; if( countitem(.itm_p) < .itm_a ){ mes .n$; mes "You don't have any"; mes "^FF0000"+getitemname(.itm_p)+" x "+.itm_a+"^000000"; mes "in your inventory."; mes " "; mes "Please come back to me if you have it already."; close; } mes .n$; mes rand(2) ? ""+callfunc("F_Hi")+" ^0000FFGacha Machine^000000." : ""+callfunc("F_Hi")+" ^0000FFI'm Gacha Machine^000000"; mes "Required Item: ^CC00FF"+getitemname(.itm_p)+" x1 ^000000"; mes " "; next; mes .n$; mes "Prizes are:"; mes "^CC00FF-^000000 Red Potion"; mes "^CC00FF-^000000 Yggdrasil Berry"; mes "^CC00FF-^000000 Yggdrasil Seed"; next; mes "Would you risk to play this game?"; next; if( select("- Play Game","- Cancel") == 2 ) { mes .n$; mes "Alright! "+ strcharinfo(0) +" come back anytime you want."; close; } while (( .@rand -= .item_Rate[.@i] ) >= 0 ) .@i++; progressbar "0x11CC99",.loading; specialeffect2 EF_REMOVETRAP; if (.item_Rate[.@i] <= 10) { announce "[ Gacha Machine ]: Player "+ .@name$ +" obtained "+.item_Amt[.@i]+"x "+ getitemname(.item_ID[.@i]) +"",0; getitem .item_ID[.@i], .item_Amt[.@i]; delitem .itm_p, .itm_a; mes .n$; mes "You have obtained "+.item_Amt[.@i]+"x ^FF3000"+ getitemname(.item_ID[.@i]) +"^000000"; close; }else{ getitem .item_ID[.@i], .item_Amt[.@i]; delitem .itm_p, .itm_a; mes .n$; mes "You have obtained "+.item_Amt[.@i]+"x ^FF3000"+ getitemname(.item_ID[.@i]) +"^000000"; close; } OnInit: .n$ = "[ Gacha Machine ]"; .loading = 1; // 0 = No Delay .itm_p = 33017;608;607; // Required Item .itm_a = 1;1;1; // Required Amount setarray .item_ID, 12074,12075,12089,12090,12084,12085,12079,12080,12094,12095,12099,12100,6286,6293,12214,38802,12429,12430,12431,12432,12433,12434,14601,14601,6292,6291,33017,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501; // Item ID List setarray .item_Amt, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1; // Item ID List setarray .item_Rate, 99,99,99,99,99,99,99,99,99,99,99,99,60,60,50,50,40,40,40,40,40,40,35,35,30,30,30; // Item ID Chances .@i = 0; while ( .item_ID[.@i] ) { .chances += .item_Rate[.@i]; .@i++; } end; }
  2. - script MobInvaInit -1,{ function DELAY; OnTimer1000: // Every Second stopnpctimer; set .s,.s + 1; if(.debug) // Showing Debug every minute only. if(.s%60 == 0) debugmes .n$+": Delay Timer: "+.s+" seconds (Minutes: "+(.s/60)+"), Delay Function returns: "+DELAY(.delay_type,.delay_pos,1)+", Invasion Re-/Starts: "+.time[.delay_pos]+" (in seconds), Force End: "+.inva_fend+" (in seconds)"; if(.delay == 1 && .s == DELAY(.delay_type,.delay_pos,1) ) donpcevent strnpcinfo(0)+"::OnInvaInit"; if(.inva_status && .s == .inva_fend) donpcevent strnpcinfo(0)+"::OnInvaForceEnd"; initnpctimer; end; OnClock0100: // 1:00 AM OnClock0700: // 7:00 AM OnClock1300: // 1:00 PM OnClock1900: // 7:00 PM if(.delay == 1) // Delay Usage active end; OnInvaInit: if(.inva_status) end; if(getvariableofnpc(.rew_type,"Invasion Rewarder") > 0) disablenpc "Invasion Rewarder"; switch(.inva_type) { // Single Town Invasion case 1: if(!.s_inva_spec) { // No Map Specification > Random if(rand(1,2) <= 1) { // 50% chance to use either a big city or a small one set .t,rand(getarraysize(.map_b$)); set .map_use,1; // Use big Maps } else { set .t,rand(getarraysize(.map_s$)); set .map_use,2; // Use small Maps } } else { set .map_use,.s_inva_spec; set .t,.s_inva_pos; } if(.map_use == 1) { for ( set .@m,0; .@m < getarraysize(getd(".mob_"+.map_post_b$[.t])); set .@m,.@m + 1) { monster .map_b$[.t],0,0,""+getmonsterinfo(getd(".mob_"+.map_post_b$[.t]+"["+.@m+"]"),0),getd(".mob_"+.map_post_b$[.t]+"["+.@m+"]"),getd(".mam_"+.map_post_b$),strnpcinfo(0)+"::OnMobSingleKilled"; set .MobSKilled,.MobSKilled + getd(".mam_"+.map_post_b$); } announce .n$+": The town "+.map_b$[.t]+" is being invaded by "+.MobSKilled+" monsters, please help use to defend it.",0; } else if(.map_use == 2) { for ( set .@m,0; .@m < getarraysize(getd(".mob_"+.map_post_s$[.t])); set .@m,.@m + 1) { monster .map_s$[.t],0,0,""+getmonsterinfo(getd(".mob_"+.map_post_s$[.t]+"["+.@m+"]"),0),getd(".mob_"+.map_post_s$[.t]+"["+.@m+"]"),getd(".mam_"+.map_post_s$),strnpcinfo(0)+"::OnMobSingleKilled"; set .MobSKilled,.MobSKilled + getd(".mam_"+.map_post_s$); } announce .n$+": The town "+.map_s$[.t]+" is being invaded by "+.MobSKilled+" monsters, please help use to defend it.",0; } break; // Multiply Town Invasion case 2: if( .inva_spawn == 1) { for ( set .@t,0; .@t < getarraysize(.map_b$); set .@t,.@t + 1) { for ( set .@m,0; .@m < getarraysize(getd(".mob_"+.map_post_b$[.@t])); set .@m,.@m + 1) { monster .map_b$[.@t],0,0,""+getmonsterinfo(getd(".mob_"+.map_post_b$[.@t]+"["+.@m+"]"),0),getd(".mob_"+.map_post_b$[.@t]+"["+.@m+"]"),getd(".mam_"+.map_post_b$[.@t]),strnpcinfo(0)+"::OnMobMultiKilled"; setd(".Mob_"+.map_post_b$[.@t]+"_Killed"),getd(".Mob_"+.map_post_b$[.@t]+"_Killed") + getd(".mam_"+.map_post_b$[.@t]); } announce .n$+": The town "+.map_b$[.@t]+" is being invaded by "+getd(".Mob_"+.map_post_b$[.@t]+"_Killed")+" monsters, please help use to defend it.",0; } sleep 500; for ( set .@t,0; .@t < getarraysize(.map_s$); set .@t,.@t + 1) { for ( set .@m,0; .@m < getarraysize(getd(".mob_"+.map_post_s$[.@t])); set .@m,.@m + 1) { monster .map_s$[.@t],0,0,""+getmonsterinfo(getd(".mob_"+.map_post_s$[.@t]+"["+.@m+"]"),0),getd(".mob_"+.map_post_s$[.@t]+"["+.@m+"]"),getd(".mam_"+.map_post_s$[.@t]),strnpcinfo(0)+"::OnMobMultiKilled"; setd(".Mob_"+.map_post_s$[.@t]+"_Killed"),getd(".Mob_"+.map_post_s$[.@t]+"_Killed") + getd(".mam_"+.map_post_s$[.@t]); } announce .n$+": The town "+.map_s$[.@t]+" is being invaded by "+getd(".Mob_"+.map_post_s$[.@t]+"_Killed")+" monsters, please help use to defend it.",0; } // * Spawn Option - Specific Maps } else if( .inva_spawn == 2) { set .@map_am,.inva_maps; // Copying Map Quantity if(.debug) debugmes .n$+": Map Quantity - .inva_maps: "+.inva_maps+" > .@map_am"; // * Map Size - Big Maps if( .inva_size == 1) { // - Checking if .map_am exceeds the size of the map array, or is 0 if( .@map_am > getarraysize(.map_b$) || .@map_am == 0) set .@map_am,getarraysize(.map_b$); if(.debug) debugmes .n$+": Map Quantity - Check: .@map_am: "+.@map_am; // * Map Randomness - Yes if( .inva_rand == 1) { if(.debug) debugmes .n$+": Map Randomness: Yes"; while ( .@c < .@map_am ) { if(.debug) debugmes .n$+": Big Maps - Counter: "+.@c+", Map Index: "+.@t; set .@t,rand(.@map_am); set .@f,0; for ( set .@e,0; .@e < getarraysize(.@t_c); set .@e,.@e + 1) if((.@t+1) == .@t_c[.@e]) { set .@f,1; break; } if(.@f == 1) continue; if(.debug) { debugmes .n$+": Big Maps - Map Index: "+.@t+", Map Name: "+.map_b$[.@t]; debugmes .n$+": Big Maps - Mob Array Size: "+getarraysize(getd(".mob_"+.map_post_b$[.@t])); } for ( set .@m,0; .@m < getarraysize(getd(".mob_"+.map_post_b$[.@t])); set .@m,.@m + 1) { monster .map_b$[.@t],0,0,""+getmonsterinfo(getd(".mob_"+.map_post_b$[.@t]+"["+.@m+"]"),0),getd(".mob_"+.map_post_b$[.@t]+"["+.@m+"]"),getd(".mam_"+.map_post_b$[.@t]),strnpcinfo(0)+"::OnMobMultiKilled"; setd(".Mob_"+.map_post_b$[.@t]+"_Killed"),getd(".Mob_"+.map_post_b$[.@t]+"_Killed") + getd(".mam_"+.map_post_b$[.@t]); if(.debug) { debugmes .n$+": Big Maps - Map Index: "+.@t+", Mob Index: "+.@m+", Map Name: "+.map_b$[.@t]+", Mob ID + Name: "+getd(".mob_"+.map_post_b$[.@t]+"["+.@m+"]")+"; "+getmonsterinfo(getd(".mob_"+.map_post_b$[.@t]+"["+.@m+"]"),0); debugmes .n$+": Total Mob Amount - Map Index: "+.@t+": "+getd(".Mob_"+.map_post_b$[.@t]+"_Killed")+", Spawn Amount per Mob: "+getd(".mam_"+.map_post_b$[.@t]); } } announce .n$+": The town "+.map_b$[.@t]+" is being invaded by "+getd(".Mob_"+.map_post_b$[.@t]+"_Killed")+" monsters, please help use to defend it.",0; setarray .@t_c[getarraysize(.@t_c)],(.@t+1); // Copying already use maps. set .@c,.@c + 1; } // * Map Randomness - No } else if( .inva_rand == 0) { if(.debug) debugmes .n$+": Map Randomness: No"; for ( set .@t,0; .@t < .@map_am; set .@t,.@t + 1) { if(.debug) { debugmes .n$+": Big Maps - Map Index: "+.@t+", Map Name: "+.map_b$[.@t]; debugmes .n$+": Big Maps - Mob Array Size: "+getarraysize(getd(".mob_"+.map_post_b$[.@t])); } for ( set .@m,0; .@m < getarraysize(getd(".mob_"+.map_post_b$[.@t])); set .@m,.@m + 1) { monster .map_b$[.@t],0,0,""+getmonsterinfo(getd(".mob_"+.map_post_b$[.@t]+"["+.@m+"]"),0),getd(".mob_"+.map_post_b$[.@t]+"["+.@m+"]"),getd(".mam_"+.map_post_b$[.@t]),strnpcinfo(0)+"::OnMobMultiKilled"; setd(".Mob_"+.map_post_b$[.@t]+"_Killed"),getd(".Mob_"+.map_post_b$[.@t]+"_Killed") + getd(".mam_"+.map_post_b$[.@t]); if(.debug) { debugmes .n$+": Big Maps - Map Index: "+.@t+", Mob Index: "+.@m+", Map Name: "+.map_b$[.@t]+", Mob ID + Name: "+getd(".mob_"+.map_post_b$[.@t]+"["+.@m+"]")+"; "+getmonsterinfo(getd(".mob_"+.map_post_b$[.@t]+"["+.@m+"]"),0); debugmes .n$+": Total Mob Amount - Map Index: "+.@t+": "+getd(".Mob_"+.map_post_b$[.@t]+"_Killed")+", Spawn Amount per Mob: "+getd(".mam_"+.map_post_b$[.@t]); } } announce .n$+": The town "+.map_b$[.@t]+" is being invaded by "+getd(".Mob_"+.map_post_b$[.@t]+"_Killed")+" monsters, please help use to defend it.",0; } } // * Map Size - Small Maps } else if( .inva_size == 2) { // - Checking if .map_am exceeds the size of the map array, or is 0 if( .@map_am > getarraysize(.map_s$) || .@map_am == 0) set .@map_am,getarraysize(.map_s$); if(.debug) debugmes .n$+": Map Quantity - Check: .@map_am: "+.@map_am; // * Map Randomness - Yes if( .inva_rand == 1) { while ( .@c < .@map_am ) { set .@t,rand(.@map_am); set .@f,0; for ( set .@e,0; .@e < getarraysize(.@t_c); set .@e,.@e + 1) if(.@t == .@t_c[.@e]) { set .@f,1; break; } if(.@f == 1) continue; if(.debug) { debugmes .n$+": Small Maps - Map Index: "+.@t+", Map Name: "+.map_s$[.@t]; debugmes .n$+": Small Maps - Mob Array Size: "+getarraysize(getd(".mob_"+.map_post_s$[.@t])); } for ( set .@m,0; .@m < getarraysize(getd(".mob_"+.map_post_s$[.@t])); set .@m,.@m + 1) { monster .map_s$[.@t],0,0,""+getmonsterinfo(getd(".mob_"+.map_post_s$[.@t]+"["+.@m+"]"),0),getd(".mob_"+.map_post_s$[.@t]+"["+.@m+"]"),getd(".mam_"+.map_post_s$),strnpcinfo(0)+"::OnMobMultiKilled"; setd(".Mob_"+.map_post_s$[.@t]+"_Killed"),getd(".Mob_"+.map_post_s$[.@t]+"_Killed") + getd(".mam_"+.map_post_s$[.@t]); if(.debug) { debugmes .n$+": Small Maps - Map Index: "+.@t+", Mob Index: "+.@m+", Map Name: "+.map_s$[.@t]+", Mob ID + Name: "+getd(".mob_"+.map_post_s$[.@t]+"["+.@m+"]")+"; "+getmonsterinfo(getd(".mob_"+.map_post_s$[.@t]+"["+.@m+"]"),0); debugmes .n$+": Total Mob Amount - Map Index: "+.@t+": "+getd(".Mob_"+.map_post_s$[.@t]+"_Killed")+", Spawn Amount per Mob: "+getd(".mam_"+.map_post_s$[.@t]); } } announce .n$+": The town "+.map_s$[.@t]+" is being invaded by "+getd(".Mob_"+.map_post_s$[.@t]+"_Killed")+" monsters, please help use to defend it.",0; setarray .@t_c[getarraysize(.@t_c)],.@t; // Copying already use maps. } // * Map Randomness - No } else if( .inva_rand == 0) { if(.debug) debugmes .n$+": Map Randomness: No"; for( set .@t,0; .@t < .map_am; set .@t,.@t + 1) { if(.debug) { debugmes .n$+": Small Maps - Map Index: "+.@t+", Map Name: "+.map_s$[.@t]; debugmes .n$+": Small Maps - Mob Array Size: "+getarraysize(getd(".mob_"+.map_post_s$[.@t])); } for ( set .@m,0; .@m < getarraysize(getd(".mob_"+.map_post_s$[.@t])); set .@m,.@m + 1) { monster .map_s$[.@t],0,0,""+getmonsterinfo(getd(".mob_"+.map_post_s$[.@t]+"["+.@m+"]"),0),getd(".mob_"+.map_post_s$[.@t]+"["+.@m+"]"),getd(".mam_"+.map_post_s$[.@t]),strnpcinfo(0)+"::OnMobMultiKilled"; setd(".Mob_"+.map_post_s$[.@t]+"_Killed"),getd(".Mob_"+.map_post_s$[.@t]+"_Killed") + getd(".mam_"+.map_post_s$[.@t]); if(.debug) { debugmes .n$+": Small Maps - Map Index: "+.@t+", Mob Index: "+.@m+", Map Name: "+.map_s$[.@t]+", Mob ID + Name: "+getd(".mob_"+.map_post_s$[.@t]+"["+.@m+"]")+"; "+getmonsterinfo(getd(".mob_"+.map_post_s$[.@t]+"["+.@m+"]"),0); debugmes .n$+": Total Mob Amount - Map Index: "+.@t+": "+getd(".Mob_"+.map_post_s$[.@t]+"_Killed")+", Spawn Amount per Mob: "+getd(".mam_"+.map_post_s$[.@t]); } } announce .n$+": The town "+.map_s$[.@t]+" is being invaded by "+getd(".Mob_"+.map_post_s$[.@t]+"_Killed")+" monsters, please help use to defend it.",0; } } } } break; } set .inva_status,1; end; OnMobSingleKilled: if(!.inva_status) end; // Shouldn't be possible if(getvariableofnpc(.rew_type,"Invasion Rewarder") > 0) set InvaKill,InvaKill + 1; // Kill Counter for Reward set .MobSKilled,.MobSKilled - 1; if(.MobSKilled == 0) { announce .n$+": Congratulation to ["+strcharinfo(0)+"] who delivered the final blow!",0; if(.inva_final) { announce .n$+": You also get an \"Final Kill Reward\", just take a look in the Chat Box.",bc_self; dispbottom .n$+": Warp on Prontera 112 158."; dispbottom .n$+": You have been rewarded with:"; if(.inva_f_id == 1) { set Zeny,Zeny + .inva_f_am; dispbottom .n$+": "+.inva_f_am+" Zeny."; } else if(.inva_f_id == 2) { set #INVASIONPOINTS,#INVASIONPOINTS + .inva_f_am; dispbottom .n$+": "+.inva_f_am+" Invasion Points. New Balance is "+#INVASIONPOINTS+"."; } else if(.inva_f_id >= 512) { getitem .inva_f_id,.inva_f_am; dispbottom .n$+": "+.inva_f_am+" x "+getitemname(.inva_f_id)+"."; } } sleep 10000; donpcevent strnpcinfo(0)+"::OnInvaEnd"; } else if(.MobSKilled == 1) mapannounce strcharinfo(3),.n$+": JUST 1 MONSTER is left. FINAL BLOW GO GO!!!",bc_yellow; else if(.MobSKilled == 5) mapannounce strcharinfo(3),.n$+": LAST ["+.MobSKilled+"] Monsters. We can do it!",bc_yellow; else mapannounce strcharinfo(3),.n$+": "+.MobSKilled+" Monsters are left!",bc_yellow; end; OnMobMultiKilled: if(!.inva_status) end; // Shouldn't be possible if(getvariableofnpc(.rew_type,"Invasion Rewarder") > 0) set InvaKill,InvaKill + 1; // Kill Counter for Reward set @loc,0; for ( set .@l,0; .@l < getarraysize(.map_b$); set .@l,.@l + 1) if(strcharinfo(3) == .map_b$[.@l]) { set @loc,1; set @map,.@l; break; } for ( set .@l,0; .@l < getarraysize(.map_s$); set .@l,.@l + 1) if(strcharinfo(3) == .map_s$[.@l]) { set @loc,2; set @map,.@l; break; } OnMMobKilled: if(.debug) debugmes .n$+": 2nd Loc Check: @Loc; "+@loc+", @map: "+@map; switch( @loc ) { case 1: setd(".Mob_"+.map_post_b$[@map]+"_Killed"),getd(".Mob_"+.map_post_b$[@map]+"_Killed") - 1; if(.debug) debugmes .n$+": Mobs: "+mobcount(.map_b$[@map],strnpcinfo(0)+"::OnMobMultiKilled")+", Variable: "+getd(".Mob_"+.map_post_b$[@map]+"_Killed"); if(getd(".Mob_"+.map_post_b$[@map]+"_Killed") > 0) mapannounce strcharinfo(3),.n$+": The player ["+strcharinfo(0)+"] has killed another monster, "+getd(".Mob_"+.map_post_b$[@map]+"_Killed")+" monsters are left!!!! Good work !!!",0; else { announce .n$+": Every Monster in "+.map_s$[@map]+" has been defeated, thank you guys!!!",0; donpcevent strnpcinfo(0)+"::OnOtherTown"; } break; case 2: setd(".Mob_"+.map_post_s$[@map]+"_Killed"),getd(".Mob_"+.map_post_s$[@map]+"_Killed") - 1; if(.debug) debugmes .n$+": Mobs: "+mobcount(.map_s$[@map],strnpcinfo(0)+"::OnMobMultiKilled")+", Variable: "+getd(".Mob_"+.map_post_s$[@map]+"_Killed"); if(getd(".Mob_"+.map_post_s$[@map]+"_Killed") > 0) mapannounce strcharinfo(3),.n$+": The player ["+strcharinfo(0)+"] has killed another monster, "+getd(".Mob_"+.map_post_s$[@map]+"_Killed")+" monsters are left!!!! Good work !!!",0; else { announce .n$+": Every Monster in "+.map_s$[@map]+" has been defeated, thank you guys!!!",0; donpcevent strnpcinfo(0)+"::OnOtherTown"; } break; } end; OnOtherTown: for ( set .@t,0; .@t < getarraysize(.map_b$); set .@t,.@t + 1) if(getd(".Mob_"+.map_post_b$[.@m]+"_Killed") > 0) set .@mapb_left$,.@mapb_left$ + .map_b$[.@m]+ ( (.map_b$[.@m+1] != "")?", ":""); for ( set .@t,0; .@t < getarraysize(.map_s$); set .@t,.@t + 1) if(getd(".Mob_"+.map_post_s$[.@m]+"_Killed") > 0) set .@maps_left$,.@maps_left$ + .map_s$[.@m]+ ( (.map_s$[.@m+1] != "")?", ":""); if(.@maps_left$ == "" && .@mapb_left$ == "") donpcevent strnpcinfo(0)+"::OnInvaEnd"; announce .n$+": In the "+ ( (.@mapb_left$ != "")?"big towns "+.@mapb_left$+ ( (.@maps_left$ != "")?" and small towns "+.@maps_left$:""):"small towns "+.@maps_left$)+" are still Monsters, please help use to defeat them!!!",0; end; OnInvaEnd: announce .n$+": Thank you guys for your help in defeating the invaders, we will counting on you for the next time as well.",0; donpcevent strnpcinfo(0)+"::OnInvaRestart"; end; OnInvaForceEnd: if(.delay == 1) set .s,0; // Reseting Delay Counter announce .n$+": NOOOOO!!! The monsters successfully invaded the towns, RETREAT GUARDS!!!",0; // Removing Mobs if(.inva_type == 1) // Single Town if(.map_use == 1) killmonster .map_b$[.t],strnpcinfo(0)+"::OnMobSingleKilled"; else killmonster .map_s$[.t],strnpcinfo(0)+"::OnMobSingleKilled"; else if(.inva_type == 2) { // Multi Town for ( set .@t,0; .@t < getarraysize(.map_b$); set .@t,.@t + 1) killmonster .map_b$[.@t],strnpcinfo(0)+"::OnMobMultiKilled"; for ( set .@t,0; .@t < getarraysize(.map_s$); set .@t,.@t + 1) killmonster .map_s$[.@t],strnpcinfo(0)+"::OnMobMultiKilled"; } set .inva_status,0; sleep 10000; announce .n$+": Brave Fighters, I thank you for your support, but we failed!",0; sleep 10000; announce .n$+": Let's regroup and let's try again. I will inform you when we are ready!",0; OnInvaRestart: DELAY(.delay_type,.delay_pos,2); if(getvariableofnpc(.rew_type,"Invasion Rewarder") > 0) { enablenpc "Invasion Rewarder"; announce .n$+": Visit the \"Invasion Rewarder\" to recieve rewards for your kills. But hurry! He will disappear in "+getvariableofnpc(.rew_dis,"Invasion Rewarder")+" minutes.",0; donpcevent strnpcinfo(0)+"::OnRewardDisable"; } end; // Auto Disable Reward NPC OnRewardDisable: set .m,getvariableofnpc(.rew_dis,"Invasion Rewarder"); while(.m != 0) { switch(.m) { case 4: case 3: case 2: announce .n$+": Invasion Reward Prontera 112 158",bc_all; break; announce .n$+": The \"Invasion Rewarder\" will disappear in "+.m+" minutes.",bc_all; break; case 1: announce .n$+": HURRY! the \"Invasion Rewarder\" will disappear in 1 minute.",bc_all; break; } set .m,.m - 1; sleep 60000; } set .m,0; disablenpc "Invasion Rewarder"; end; OnPCLoginEvent: if(.inva_status == 0) end; announce .n$+": The Monster Invasion Event is currently running. Please hurry and help us!",bc_self; sleep2 2000; if(.inva_type == 1) set .@map_left$,( (.map_use == 1) ? .map_b$[.t]:.map_s$[.t]); else if(.inva_type == 2) { for ( set .@m,0; .@m < getarraysize(.map_b$); set .@m,.@m + 1) if(getd(".Mob_"+.map_post_b$[.@m]+"_Killed") > 0) set .@map_left$,.@map_left$ + .map_b$[.@m]+ ( (.map_b$[.@m+1] != "")?", ":""); for ( set .@m,0; .@m < getarraysize(.map_s$); set .@m,.@m + 1) if(getd(".Mob_"+.map_post_s$[.@m]+"_Killed") > 0) set .@map_left$,.@map_left$ +" and "+ .map_s$[.@m]+ ( (.map_s$[.@m+1] != "")?", ":""); } announce .n$+": We are defending at "+ .@map_left$+".",bc_self; end; OnInit: set .n$,"[ Invasion Monster ] "; // Debug Mode - See Map Server Console for Debug messages set .debug,0; // ======= Invasion Type ======= // - 1: Single // - 2: Multiply set .inva_type,1; // ====== Single Invasion Settings ========= if(.inva_type == 1) { // * Specific Map Usage // - 0 = Random // - 1 = Big Maps // - 2 = Small Maps set .s_inva_spec,0; if(.s_inva_spec > 0) { // * Map Index // X = Array Index of the Map Array set .s_inva_pos,0; } // ======= Multiply Invasion Settings ======== } else if(.inva_type == 2) { // * Spawn Option // - 1: All Maps // - 2: Specific Maps set .inva_spawn,2; if(.inva_spawn == 2) { // * Map Usage: // - 1: Big Maps // - 2: Small Maps set .inva_size,1; // * Map Amount: // - 0: All Maps from .inva_size above // - 1+: ... // Note: If this value exceeds the size of the map array, // then it will use all maps of .inva_size. set .inva_maps,0; if(.inva_maps > 0 && .inva_maps < ( (.inva_size == 1)?getarraysize(.map_b$):getarraysize(.map_s$) ) ) // * Map Randoming: // - 0: No // - 1: Yes // Note: Map Randoming is only possible when not all maps are wanted // It would be ineffective to make map randoming when there are all maps active :I set .inva_rand,1; } } // * Invasion on Server Start // - 0: No // - 1: Yes set .inva_statusinit,0; // * Invasion Force End // - Default: 3600 seconds // 1 Hour // - 0: Not used // - 1+: ... // Note: The Event will automatically end after this value has passed (in seconds) set .inva_fend,3600; // =======*======= DELAY SETTINGS =======*======= // * Delay Usage // - 0: Off - OnClockXXXX will be used // - 1: On set .delay,0; // * Delay Type // - 1: Random (Default) // - 2: Fixed Delay // - 3: Ranged Delay set .delay_type,1; // ---- Fixed Delay ---- // Array Position in ".time" if(.delay_type == 2) set .delay_pos,0; // ---- Ranged Delay ---- // Array Position for start index if(.delay_type == 3) set .delay_pos,3; // * Delay Times setarray .time[0], // In Seconds - is equal to - Array Position 10800, // 3 Hours - 0 14400, // 4 Hours - 1 21600, // 6 Hours - 2 86400, // 1 Day - 3 172800, // 2 Days - 4 259200; // 3 Days - 5 // =======*======= MONSTER SETTINGS =======*======= // * Mob Quantity Limit depending on the map size // - Big Maps set .m_limit_b,100; // - Small Maps set .m_limit_s,30; // * Maps List // - Big Maps setarray .map_b$[0],"prontera","geffen","payon","morocc","aldebaran","alberta"; // For every map you have to add an postfix in the same order, // which has been put in the array for the Maps // After this, just set an array with the Mob IDs where the // array name contains the postfix you set-up, see the examples setarray .map_post_b$[0],"pron","gef","pay","mor","alde","alb"; // - Small Maps setarray .map_s$[0],"amatsu"; setarray .map_post_s$[0],"amat"; // ======= Monster ID's ======= // ------ Big Maps ------ // * Prontera - Mantis, Thief Bug Male, Argos, Side Winder setarray .mob_pron[0],1139,1054,1100,1037; // * Geffen - Poison Spore, Ghoul, Jakk, High Orc setarray .mob_gef[0],1855,1036,1130,1213; // * Payon - Zombie, Elder Willow, Munak, Nine Tail, Drainliar setarray .mob_pay[0],1015,1033,1026,1180,1111; // * Morocc - Requiem, Isis, Mummy, Minorous setarray .mob_mor[0],1164,1029,1041,1149; // * Aldebaran - Cramp, Penomena, Punk, Orc Archer, Bathory setarray .mob_alde[0],1209,1029,1199,1189,1102; // * Alberta - Pirate Skeleton, Penomena, Poison Spore, Whisper, Mimic setarray .mob_alb[0],1071,1029,1077,1179,1191; // ------ Small Maps ------ // * amatsu - Obeaune, Merman, Swordfish, Strouf, Mimic setarray .mob_amat[0],1044,1264,1069,1065,1191; // ------ Mob Amount Calculation for Big Maps ------ for ( set .@c,0; .@c < getarraysize(.map_post_b$); set .@c,.@c + 1) setd(".mam_"+.map_post_b$[.@c]),( .m_limit_b/getarraysize(getd(".mob_"+.map_post_b$)) ); // ------ Mob Amount Calculation for Small Maps ------ for ( set .@c,0; .@c < getarraysize(.map_post_s$); set .@c,.@c + 1) setd(".mam_"+.map_post_s$[.@c]),( .m_limit_s/getarraysize(getd(".mob_"+.map_post_s$)) ); // ======= Final Kill Settings ======= // * Will the player who gets the final kill be rewarded? // Only working during a Single Invasion // - 1: Yes // - 0: No set .inva_final,1; if(.inva_final == 1) { // * Reward Type: // - 1: Zeny // - 2: Invasion Points // - 512+: Item ID (the Value is already the Item ID) set .inva_f_id,1; // * Reward Amount: set .inva_f_am,10000; } // =======*======= END of SETTINGS =======*======= // Even if .delay is 0, its required to start the timer for force ending the event :I initnpctimer; if(.debug) { debugmes .n$+": .inva_delay: "+.inva_delay; debugmes .n$+": gettimetick(2): "+gettimetick(2); } if(.delay == 1 && DELAY(.delay_type,.delay_pos,1) < 1) // If the delay value is empty, set it!! DELAY(.delay_type,.delay_pos,2); if(.debug) debugmes .n$+": .inva_delay: "+.inva_delay; if(.inva_statusinit == 1) // Starting Invasion on Server Start donpcevent strnpcinfo(0)+"::OnInvaInit"; // Custom Commands for GM's bindatcmd "invasionstart",strnpcinfo(0)+"::OnInvaInit",1,99; bindatcmd "invasionend",strnpcinfo(0)+"::OnInvaForceEnd",1,99; end; function DELAY { // Format: DELAY(.delay_type,.delay_pos,1/2); // getarg(0) = Delay Type // * 1: Random // * 2: Fixed Delay // * 3: Ranged Delay // getarg(1) = Array Position if getarg(0) == 2 || 3 // getarg(2): Read/Write // * 1: Read // * 2: Write if(getarg(2) == 1) return (.inva_delay - gettimetick(2)); switch(getarg(0)) { case 1: set .@new_inva,.time[rand(getarraysize(.time))]; break; case 2: set .@new_inva,.time[getarg(1)]; break; case 3: set .@new_inva,.time[rand(getarg(1),getarraysize(.time) - 1)]; break; } set .inva_delay,gettimetick(2) + .@new_inva; return .@new_inva; } } prontera,113,161,4 script Invasion Rewarder 110,{ mes .n$; mes "Hello, "+strcharinfo(0)+"!"; mes "So you want to be rewarded from the Mob Invasion Event, huh?"; mes "Let me take a look at your battle record."; next; mes .n$; if(!InvaKill) { mes "It seems like you didn't participated at all or you got your reward already."; mes "So I can't give you any kind of reward."; mes "Try your best next time."; close; } mes "You haved killed "+InvaKill+" monsters, good job there."; next; mes .n$; set .@rew_am,InvaKill*.rew_am; set .@rew_bonus, ( (.rew_bonus > 0)?(InvaKill*.rew_bonus):.rew_bonus); set .@total,.@rew_am + .@rew_bonus; if(.rew_type == 1) { mes "You have recieved "+.@total+"x "+( (.rew_bonus == 1)?"(Bonus: +"+.@rew_bonus+") ":"") + getitemname(.rew_id)+"."; getitem .rew_id,.@total; } else if(.rew_type == 2) { mes "You have recieved "+.@total+"x "+( (.rew_bonus == 1)?"(Bonus: +"+.@rew_bonus+") ":"") + "Invasion Points."; set #INVASIONPOINTS,#INVASIONPOINTS + (.rew_am+.rew_bonus); } set InvaKill,0; close; OnInit: set .n$,"[ "+strnpcinfo(0)+" ]"; // =======*======= REWARD SETTINGS =======*======= // * Reward Type: // - 0: None // - 1: Item // - 2: Invasion Points set .rew_type,1; // * Reward Bonus // - 0: Off // - 1 and higher: On // = This bonus will be given to the kill additionally. set .rew_bonus,0; // ----- Item ----- if(.rew_type == 1) set .rew_id,7929; // Item ID // ----- Reward Quantity ----- set .rew_am,10; // Amount per Kill // ----- NPC Auto Disable ----- // After how many minutes will the NPC be disabled again: set .rew_dis,3; disablenpc strnpcinfo(0); end; } I want 4 waves because that's my script is a script I just want like dark ro like this video https://www.youtube.com/watch?v=N8JXo06djpU
  3. WHO HAS A MONSTER INVASION SIMILAR TO DARK RO THAT HAS 4 WAVE PER OPEN EVENT
  4. HOW TO SHOW IN GAME THIS TAG NPC THANK YOU
  5. how about this @part is error
  6. // ------------------------------------------------------------------------------- // Script Name : Headgear to Costume converter >> Costume to Headgear converter // ------------------------------------------------------------------------------- // Description : // - Allows a user to convert the equipped headgear (on Top, Mid or Low) into a // costume item. It will remove any card and refine of the Item. // - Allows a user to restore the equipped costume headgear (on Top, Mid or Low) // into its original form. It will not return any card or refine of the item. // ------------------------------------------------------------------------------- function script costume { .@npc_name$ = getarg(0); disable_items; mes "[ ^FF7700Costume Clown^000000 ]"; mes "Here you can convert your headgears into a Costume Headgear or restore to its Original form."; next; mes "[ ^FF7700Costume Clown^000000 ]"; mes "I cannot convert Rental or bounded items into costume."; next; mes "[ ^FF7700Costume Clown^000000 ]"; mes "I will require 1 Costume Ticket to transform an ordinary headgear into a costume."; mes ""; mes "Restoring a costume back to it's original form will cost ^9900002,000,000^000000 Zeny."; next; switch(select("I want to convert.:I want to restore.:No thanks.")) { case 1: setarray .@indices[1], EQI_HEAD_TOP, EQI_HEAD_MID, EQI_HEAD_LOW; for (.@i = 1; .@i<=3; ++.@i) { if (getequipisequiped(.@indices[.@i])) { .@menu$ = .@menu$ + F_getpositionname(.@indices[.@i]) + "-[" + getequipname(.@indices[.@i]) + "]"; .@equipped = 1; } .@menu$ = .@menu$ + ":"; } if (.@equipped == 0) { mes "[ ^FF7700Costume Clown^000000 ]"; mes "You need to wear headgears that I can costume..."; close; } if (countitem(60000) < 1){ mes "You do not have the Costume Ticket from your inventory."; close; } mes "[ ^FF7700Costume Clown^000000 ]"; mes "Please select what to convert."; mes "^FF0000 Take note: ^0000FF"; mes "^0B27F3 I cannot convert items that has a refine OR a card inserted. ^0000FF"; next; .@part = .@indices[ select(.@menu$) ]; if (!getequipisequiped(.@part)) { mes "[ ^FF7700Costume Clown^000000 ]"; mes "You're not wearing anything there..."; close; } getinventorylist; for (.@i = 0; .@i < @inventorylist_count; .@i++) { // mes "test " + getequipid(EQI_HEAD_TOP) + " test"; // if (@inventorylist_bound[.@i]) { // mes "you are wearing "+ @inventorylist_equip[.@i]; // mes "you are wearin1g "+ @inventorylist_id[.@i] ; // mes "wew" + getequipid(.@part); //close; // // } if (@inventorylist_expire[.@i]) { if (@inventorylist_equip[.@i] > 0 && @inventorylist_id[.@i] == getequipid(.@part)){ mes "Your item ( ^FF0000"+ getitemname(getequipid(.@part)) + "^0000FF ) is rental. I cannot convert this item."; mes ""; close; } } if (@inventorylist_bound[.@i] ) { if (@inventorylist_equip[.@i] > 0 && @inventorylist_id[.@i] == getequipid(.@part)){ mes "Your item ( ^FF0000"+ getitemname(getequipid(.@part)) + "^0000FF ) is bounded. I cannot convert this item"; mes""; close; } } } if ( getequiprefinerycnt(.@part) >= 1 ) { mes "[ ^FF7700Costume Clown^000000 ]"; mes "Your item (" + getitemname(getequipid(.@part)) + ") that you want to convert has a refine. I cannot convert this to costume."; close; } set .@cardcount,getequipcardcnt(.@part); if(.@cardcount > 0) { mes "[ ^FF7700Costume Clown^000000 ]"; mes "Young one... There are card/s compounded on this item (" + getitemname(getequipid(.@part)) + "). I can do nothing with it, I'm afraid."; close; } mes "[ ^FF7700Costume Clown^000000 ]"; mes "You want to Costume your " + getitemname(getequipid(.@part)) + "?"; next; if (select("Yes, proceed:No, sorry.") == 2) { mes "["+ .@npc_name$ + "]"; mes "Need some time to think about it, huh?"; mes "Alright, I can understand."; close; } costume .@part; // Convert the Headgear delitem 60000,1; mes "[ ^FF7700Costume Clown^000000 ]"; mes "Done, enjoy your costume headgear."; close; case 2: setarray .@indices[1], EQI_COSTUME_HEAD_TOP, EQI_COSTUME_HEAD_MID, EQI_COSTUME_HEAD_LOW; for (.@i = 1; .@i<=3; ++.@i) { if (getequipisequiped(.@indices[.@i])) { .@menu$ = .@menu$ + F_getpositionname(.@indices$[.@i]) + "-[" + getequipname(.@indices[.@i]) + "]"; .@equipped = 1; } .@menu$ = .@menu$ + ":"; } if (.@equipped == 0) { mes "[ ^FF7700Costume Clown^000000 ]"; mes "You need to wear costumed headgears that I can restore..."; close; } mes "[ ^FF7700Costume Clown^000000 ]"; mes "Please select what to restore."; mes "Remember, I will only restore it back without refine and cards."; mes "I also need 2,000,000 Zeny to restore."; next; .@part = .@indices[ select(.@menu$) ]; if (!getequipisequiped(.@part)) { mes "[ ^FF7700Costume Clown^000000 ]"; mes "You're not wearing anything there..."; close; } if (Zeny < 2000000) { mes " You do not have enough Zeny. I require 2,000,000 Zeny to use my service."; close; } if (isequippedcnt(getequipid(.@part)) > 1) { mes "[ ^FF7700Costume Clown^000000 ]"; mes "You're wearing too many of the same headgear!"; mes "How am I supposed to know which one to restore?"; mes "See me when you have one equipped."; close; } if (countitem(getequipid(.@part)) > 1) { mes "[ ^FF7700Costume Clown^000000 ]"; mes "You have another " + getitemname(getequipid(.@part)) + " with you."; mes "Put it away before restoring."; close; } mes "[" + .@npc_name$ + "]"; mes "You want to restore your " + getitemname(getequipid(.@part)) + "?"; next; if (select("Yes, proceed:No, sorry.") == 2) { mes "[ ^FF7700Costume Clown^000000 ]"; mes "Need some time to think about it, huh?"; mes "Alright, I can understand."; close; } // Restore headgear by recreating a = getequipid(.@part); delitem a,1; getitem a,1; set Zeny, Zeny-2000000; mes "[ ^FF7700Costume Clown^000000 ]"; mes "Done, enjoy your restored headgear."; close; case 3: mes "[ ^FF7700Costume Clown^000000 ]"; mes "Very well. Return at once if you seek my services."; close; } } // --------------------------------------------------------------------------- // Add more lines to put your npc on different cities (adjust name if desired) // --------------------------------------------------------------------------- prontera,155,177,5 script Costume Clown#1 715,{ callfunc "costume","Costume Clown",0; end; }
  7. I changed all the scripts to 99/70 to 255/120 but in game 181/50? no more exp any mobs YML Version instant job goods 255/120 but if manual leveling only 181/50 stop more lvl Please Help Me ! Thank You
  8. 1652,Dragon_Staff,Dragon Staff,5,20,,0,100,,1,4,0x000810200,7,2,2,4,80,1,10, THIS IS WEPON STAFF IF EQUIPS ASPD REDUCE -16 I WANT CHANGE IF EQUIP THIS WEPON -2 ONLY REDUCE ON ASPD ! PLEASE HELP ME THANK YOU
  9. /* create table gold_ranking ( char_id int(11) primary key, name varchar(23) default '', gold_points int(11) default 0, key (gold_points) ) engine = innodb; create table gold_ranking_today ( char_id int(11) primary key, name varchar(23) default '', gold_points_today int(11) default 0, key (gold_points_today) ) engine = innodb; */ prontera,165,195,5 script Gold Room 848,{ OnMenu: OnMain: mes "[ Gold Room ]"; mes "Welcome, ^ff0000" +strcharinfo(0)+ "!^000000"; mes "We rank players based on their performance on farming Gold."; mes " "; .@query$ = "SELECT `name`, IF(@d=t.`gold_points`, @r, @r:=@i), @d:=t.`gold_points`, @i:=@i+1 "; .@query$ += "FROM `gold_ranking` t, (SELECT @d:=0, @r:=0, @i:=1)q "; .@query$ += "ORDER BY `gold_points` DESC LIMIT 1"; .@nb = query_sql(.@query$, .@name$, .@rank, .@kills, .@dummy); query_sql "select gold_points from `gold_ranking` where char_id = "+ getcharid(0), .@killed; menu "Enter ^ff0000Gold Room^000000 ^3333cc(" + getmapusers("ordeal_1-2") + ")^000000",L_Enter,"",L_Total,"",L_Today,"Cancel",L_Cancel; L_Total: clear; mes "[ Gold Ladder ]"; mes "^73acde<Rank>^000000 ^40cc39<Name>^000000 ^cc4f39<Points>^000000"; .@query$ = "SELECT `name`, IF(@d=t.`gold_points`, @r, @r:=@i), @d:=t.`gold_points`, @i:=@i+1 "; .@query$ += "FROM `gold_ranking` t, (SELECT @d:=0, @r:=0, @i:=1)q "; .@query$ += "ORDER BY `gold_points` DESC LIMIT 10"; .@nb = query_sql(.@query$, .@name$, .@rank, .@kills, .@dummy); if ( !.@nb ) { mes " ^777777-- Ladder is currently empty.^000000"; close; } for ( .@i = 0; .@i < .@nb; ++.@i ) mes "^73acde"+ .@rank[.@i] +".^000000 ^40cc39"+ .@name$[.@i] +" : ^000000 ^cc4f39<"+ .@kills[.@i] +">^000000"; end; L_Today: clear; mes "[ Gold Ladder ]"; mes "^73acde<Rank>^000000 ^40cc39<Name>^000000 ^ffad33<Points>^000000"; .@query$ = "SELECT `name`, IF(@d=t.`gold_points_today`, @r, @r:=@i), @d:=t.`gold_points_today`, @i:=@i+1 "; .@query$ += "FROM `gold_ranking_today` t, (SELECT @d:=0, @r:=0, @i:=1)q "; .@query$ += "ORDER BY `gold_points_today` DESC LIMIT 10"; .@nb = query_sql(.@query$, .@name$, .@rank, .@kills, .@dummy); if ( !.@nb ) { mes " ^777777-- Ladder is currently empty.^000000"; close; } for ( .@i = 0; .@i < .@nb; ++.@i ) mes "^73acde"+ .@rank[.@i] +".^000000 ^40cc39"+ .@name$[.@i] +" : ^000000 ^ffad33<"+ .@kills[.@i] +">^000000"; end; L_Enter: specialeffect 253; showscript "'" + strcharinfo(0) + "' entered!",getnpcid(0),AREA; warp "ordeal_1-2",0,0; end; L_Cancel: end; OnNPCKillEvent: if (killedrid == 1369) { if(!$gold_hour) { .@i = 1; } else if($gold_hour) { .@i = rand(1,3); } getitem 969,.@i; if(.@i == 1){ query_sql "insert into gold_ranking values ( "+ getcharid(0) +", '"+ escape_sql( strcharinfo(0) ) +"', 1 ) on duplicate key update name = '"+ escape_sql( strcharinfo(0) )+"', gold_points = gold_points + 1"; query_sql "insert into gold_ranking_today values ( "+ getcharid(0) +", '"+ escape_sql( strcharinfo(0) ) +"', 1 ) on duplicate key update name = '"+ escape_sql( strcharinfo(0) )+"', gold_points_today = gold_points_today + 1"; } if(.@i == 2){ query_sql "insert into gold_ranking values ( "+ getcharid(0) +", '"+ escape_sql( strcharinfo(0) ) +"', 1 ) on duplicate key update name = '"+ escape_sql( strcharinfo(0) )+"', gold_points = gold_points + 2"; query_sql "insert into gold_ranking_today values ( "+ getcharid(0) +", '"+ escape_sql( strcharinfo(0) ) +"', 1 ) on duplicate key update name = '"+ escape_sql( strcharinfo(0) )+"', gold_points_today = gold_points_today + 2"; } query_sql "select gold_points from `gold_ranking` where char_id = "+ getcharid(0), .@killed; query_sql "select gold_points_today from `gold_ranking_today` where char_id = "+ getcharid(0), .@killed_today; end; } end; OnClock0000: npctalk "Daily ladder has been reset!"; query_sql "TRUNCATE TABLE `gold_ranking_today`"; end; } ordeal_1-2 mapflag pvp ordeal_1-2 mapflag nowarpto ordeal_1-2 mapflag nodrop ordeal_1-2 mapflag nobranch ordeal_1-2 mapflag nosave ordeal_1-2 mapflag nomemo ordeal_1-2 mapflag noloot ordeal_1-2 monster Golden Peco 1369,500 ordeal_1-2 monster Golden Peco 1369,500 ordeal_1-2 monster Golden Peco 1369,300
  10. how ser please help me - script Punching Bag4 -1,{ OnInit: OnDummyKill: monster "prontera",192,162,"Punching Balls",1905,1,"Punching Bag4::OnDummyKill"; end; } - script Punching Bag5 -1,{ OnInit: OnDummyKill: monster "prontera",197,162,"Punching Balls",1905,1,"Punching Bag5::OnDummyKill"; end; } ser ia have a quest about on goldroom how remove ranking to my gold room script /* create table gold_ranking ( char_id int(11) primary key, name varchar(23) default '', gold_points int(11) default 0, key (gold_points) ) engine = innodb; create table gold_ranking_today ( char_id int(11) primary key, name varchar(23) default '', gold_points_today int(11) default 0, key (gold_points_today) ) engine = innodb; */ prontera,165,195,5 script Gold Room 848,{ OnMenu: OnMain: mes "[ Gold Room ]"; mes "Welcome, ^ff0000" +strcharinfo(0)+ "!^000000"; mes "We rank players based on their performance on farming Gold."; mes " "; .@query$ = "SELECT `name`, IF(@d=t.`gold_points`, @r, @r:=@i), @d:=t.`gold_points`, @i:=@i+1 "; .@query$ += "FROM `gold_ranking` t, (SELECT @d:=0, @r:=0, @i:=1)q "; .@query$ += "ORDER BY `gold_points` DESC LIMIT 1"; .@nb = query_sql(.@query$, .@name$, .@rank, .@kills, .@dummy); query_sql "select gold_points from `gold_ranking` where char_id = "+ getcharid(0), .@killed; menu "Enter ^ff0000Gold Room^000000 ^3333cc(" + getmapusers("ordeal_1-2") + ")^000000",L_Enter,"",L_Total,"",L_Today,"Cancel",L_Cancel; L_Total: clear; mes "[ Gold Ladder ]"; mes "^73acde<Rank>^000000 ^40cc39<Name>^000000 ^cc4f39<Points>^000000"; .@query$ = "SELECT `name`, IF(@d=t.`gold_points`, @r, @r:=@i), @d:=t.`gold_points`, @i:=@i+1 "; .@query$ += "FROM `gold_ranking` t, (SELECT @d:=0, @r:=0, @i:=1)q "; .@query$ += "ORDER BY `gold_points` DESC LIMIT 10"; .@nb = query_sql(.@query$, .@name$, .@rank, .@kills, .@dummy); if ( !.@nb ) { mes " ^777777-- Ladder is currently empty.^000000"; close; } for ( .@i = 0; .@i < .@nb; ++.@i ) mes "^73acde"+ .@rank[.@i] +".^000000 ^40cc39"+ .@name$[.@i] +" : ^000000 ^cc4f39<"+ .@kills[.@i] +">^000000"; end; L_Today: clear; mes "[ Gold Ladder ]"; mes "^73acde<Rank>^000000 ^40cc39<Name>^000000 ^ffad33<Points>^000000"; .@query$ = "SELECT `name`, IF(@d=t.`gold_points_today`, @r, @r:=@i), @d:=t.`gold_points_today`, @i:=@i+1 "; .@query$ += "FROM `gold_ranking_today` t, (SELECT @d:=0, @r:=0, @i:=1)q "; .@query$ += "ORDER BY `gold_points_today` DESC LIMIT 10"; .@nb = query_sql(.@query$, .@name$, .@rank, .@kills, .@dummy); if ( !.@nb ) { mes " ^777777-- Ladder is currently empty.^000000"; close; } for ( .@i = 0; .@i < .@nb; ++.@i ) mes "^73acde"+ .@rank[.@i] +".^000000 ^40cc39"+ .@name$[.@i] +" : ^000000 ^ffad33<"+ .@kills[.@i] +">^000000"; end; L_Enter: specialeffect 253; showscript "'" + strcharinfo(0) + "' entered!",getnpcid(0),AREA; warp "ordeal_1-2",0,0; end; L_Cancel: end; OnNPCKillEvent: if (killedrid == 1369) { if(!$gold_hour) { .@i = 1; } else if($gold_hour) { .@i = rand(1,3); } getitem 969,.@i; if(.@i == 1){ query_sql "insert into gold_ranking values ( "+ getcharid(0) +", '"+ escape_sql( strcharinfo(0) ) +"', 1 ) on duplicate key update name = '"+ escape_sql( strcharinfo(0) )+"', gold_points = gold_points + 1"; query_sql "insert into gold_ranking_today values ( "+ getcharid(0) +", '"+ escape_sql( strcharinfo(0) ) +"', 1 ) on duplicate key update name = '"+ escape_sql( strcharinfo(0) )+"', gold_points_today = gold_points_today + 1"; } if(.@i == 2){ query_sql "insert into gold_ranking values ( "+ getcharid(0) +", '"+ escape_sql( strcharinfo(0) ) +"', 1 ) on duplicate key update name = '"+ escape_sql( strcharinfo(0) )+"', gold_points = gold_points + 2"; query_sql "insert into gold_ranking_today values ( "+ getcharid(0) +", '"+ escape_sql( strcharinfo(0) ) +"', 1 ) on duplicate key update name = '"+ escape_sql( strcharinfo(0) )+"', gold_points_today = gold_points_today + 2"; } query_sql "select gold_points from `gold_ranking` where char_id = "+ getcharid(0), .@killed; query_sql "select gold_points_today from `gold_ranking_today` where char_id = "+ getcharid(0), .@killed_today; end; } end; OnClock0000: npctalk "Daily ladder has been reset!"; query_sql "TRUNCATE TABLE `gold_ranking_today`"; end; } ordeal_1-2 mapflag pvp ordeal_1-2 mapflag nowarpto ordeal_1-2 mapflag nodrop ordeal_1-2 mapflag nobranch ordeal_1-2 mapflag nosave ordeal_1-2 mapflag nomemo ordeal_1-2 mapflag noloot ordeal_1-2 monster Golden Peco 1369,500 ordeal_1-2 monster Golden Peco 1369,500 ordeal_1-2 monster Golden Peco 1369,300
  11. Anyone can Help me about this ?I want to change mdef formulamy server is Frost Server .. but when anyone get to 99 mdef .. the players that 99 mdef wont freeze and the magic damage is only 1..i want to change the mdef to 99 mdef = 30% magic reduction only .. forget about the freeze ..Please Help mee Thx
  12. how ser bearnope mdef 99 = 30% only reduce damage on magic?
×
×
  • Create New...