#region guildwar if ((now64.hour == 19 && now64.minute == 5 && now64.second == 0)) { kernel.sendworldmessage(new message("guild war now work will end at 21:00 server time have chance to get [500.000.000] !", color.white, message.broadcastmessage), program.values); foreach (var client in program.values) client.messagebox(" guild war now work will end at 21:00 server time?", p => { p.player.teleport(1002, 224, 237); }, null, 20); } #endregion #region guildwar if (guildwar.iswar) { if (time32.now > guildwar.scoresendstamp.addseconds(3)) { guildwar.scoresendstamp = time32.now; guildwar.sendscores(); } } if ((now64.hour >= 01 && now64.hour <= 20)) { if (!guildwar.iswar) { guildwar.start(); foreach (client.gamestate client in kernel.gamepool.values) { if (client.map.baseid != 6001 && client.map.baseid != 6000 && !client.player.dead) { eventalert alert = new eventalert { strresid = 10515, countdown = 60, uk12 = 1 }; client.player.strresid = 10515; client.send(alert); } } } } if (guildwar.iswar) { if (now64.hour == 21 && now64.second <= 00) { guildwar.flame10th = false; guildwar.end(); } } #endregion
#region guild war case 1038: { switch (client.activenpc) { #region pole case 810: { dialog.text("please, don't hurt me!."); dialog.option("sorry.", 255); dialog.send(); break; } #endregion #region prize seller case 200033: { switch (npcrequest.optionid) { case 0: { dialog.text("greetings! I'm a great seller, i have the most precious items in the entire "); dialog.text("world. What do you want to get?"); dialog.option("goldprize [5 lordtokens]", 2); dialog.option("just passing by.", 255); dialog.avatar(85); dialog.send(); break; } case 2: { if (client.inventory.contains(723467, 5)) { client.inventory.remove(723467, 5); client.inventory.add(2100075, 0, 0, 0, 0, 0, 0, 1, true); } else { dialog.text("you don't have enough 5 lordtokens "); dialog.option("i see.", 255); dialog.avatar(85); dialog.send(); } break; } } break; } #endregion #region*claimguildprize case 4482114: { switch (npcrequest.optionid) { case 0: { dialog.text("hello*there.*do*you*want*to*claim*guildwar*prize*you*can*only*claim*it*1*time*if*you*won*gw."); dialog.option("claim*topguildleader.", 1); dialog.option("claim*topdeputyleader 20 tops.", 7); dialog.option("claim*topmemberleader.", 100); dialog.option("just*passing*by!", 255); dialog.send(); break; } case 1: { if (client.guild != null) { if (client.guild.polekeeper && client.guild != null && client.asmember.rank == mr_panda.game.enums.guildmemberrank.guildleader) { dialog.text("are you sure you want to claim your prize?"); dialog.option("yes.", 2); dialog.option("ah, nevermind.", 255); dialog.send(); } else { dialog.text("sorry only guildleader of the winner guild can claim the prize after guildwar end."); dialog.option("ahh.", 255); dialog.send(); } } else { dialog.text("sorry you are not member in any guild yet"); dialog.option("ahh.", 255); dialog.send(); } break; } case 2: { if (!guildwar.iswar && guildwar.claim && client.player.guildid == guildwar.keeperid && client.player.guildrank == (ushort)game.enums.guildmemberrank.guildleader) { program.addwarlog("guildwar", "[500.000.000] conquerpoint", client.player.name); guildwar.claim = false; guildwar.keeperid = 0; client.player.conquerpoints += 500000000; classpk.addgl(); client.player.addtopstatus(update.flags.topguildleader, 1, datetime.now.adddays(1)); mr_panda.kernel.sendworldmessage(new message(" congratulations ! " + client.player.name + " leader of " + client.guild.polekeeper + " the winner guild has claimed guild war prize 500.000.000 cps", system.drawing.color.white, message.topleft), program.values); } else { dialog.text("sorry you dont have any prize to claim only gl of the winner guild can claim prize after gw"); dialog.option("ahh.", 255); dialog.send(); } break; } case 3: { if (client.guild != null) { if (client.guild.polekeeper && client.guild != null && client.asmember.rank == mr_panda.game.enums.guildmemberrank.deputyleader) { dialog.text("are*you*sure*you*want*to*claim*your*prize?"); dialog.option("yes.", 4); dialog.option("ah,*nevermind.", 255); dialog.send(); } else { dialog.text("sorry*only*deputyleader*of*the*winner*guild*can*claim*the*prize*after*guildwar*end."); dialog.option("ahh.", 255); dialog.send(); } } else { dialog.text("sorry*you*are*not*member*in*any*guild*yet"); dialog.option("ahh.", 255); dialog.send(); } break; } case 4: { { if (!guildwar.iswar && client.guild.polekeeper && client.guild != null && client.asmember.rank == game.enums.guildmemberrank.deputyleader && classpk.topdlclaim <= 8) { classpk.adddl(); client.player.addtopstatus(update.flags.topdeputyleader, 1, datetime.now.adddays(1)); kernel.sendworldmessage(new message(" congratulations !*" + client.player.name + "*from*" + client.guild.polekeeper + "*has*claimed*topdeputyleader*halo!", system.drawing.color.white, message.topleft), program.values); } else { dialog.text("sorry*you*dont*have*any*prize*to*claim*only*dl*of*the*winner*guild*can*claim*the*halo*after*gw*end."); dialog.option("ahh.", 255); dialog.send(); } } break; } case 6: { if (client.guild != null) { if (client.guild.polekeeper && client.guild != null && client.asmember.rank != mr_panda.game.enums.guildmemberrank.guildleader && client.asmember.rank != mr_panda.game.enums.guildmemberrank.deputyleader) { dialog.text("are*you*sure*you*want*to*claim*your*prize?"); dialog.option("yes.", 7); dialog.option("ah,*nevermind.", 255); dialog.send(); } else { dialog.text("sorry*only*memberleader*of*the*winner*guild*can*claim*the*prize*after*guildwar*end."); dialog.option("ahh.", 255); dialog.send(); } } else { dialog.text("sorry*you*are*not*member*in*any*guild*yet"); dialog.option("ahh.", 255); dialog.send(); } break; } case 7: { { if (!guildwar.iswar && client.guild.polekeeper && client.guild != null && client.asmember.rank == game.enums.guildmemberrank.deputyleader && classpk.topdlclaim <= 8) { client.player.addtopstatus(update.flags.topdeputyleader, 1, datetime.now.adddays(1)); kernel.sendworldmessage(new message(" congratulations !*" + client.player.name + "*from*" + client.guild.polekeeper + "*has*claimed*topdboutyleader*", system.drawing.color.white, message.topleft), program.values); } else { dialog.text("sorry*you*dont*have*any*prize*to*claim*only*member*of*the*winner*guild*can*claim*the*halo*after*gw*end."); dialog.option("ahh.", 255); dialog.send(); } } break; } } break; } #endregion #region gates case 516074: { if (client.guild != null) { if (client.guild.polekeeper) { switch (npcrequest.optionid) { case 0: Dialog.text("select the option you want to pursue."); if (client.asmember.rank == mr_panda.game.enums.guildmemberrank.guildleader || client.asmember.rank == mr_panda.game.enums.guildmemberrank.deputyleader) { dialog.option("open gate.", 1); if (game.guildwar.leftgate.hitpoints == 0) dialog.option("repair gate.", 22); else dialog.option("close gate.", 2); } dialog.option("get inside.", 3); dialog.option("nothing.", 255); dialog.send(); break; case 1: { mr_panda.game.guildwar.leftgate.mesh = (ushort)(250 + mr_panda.game.guildwar.leftgate.mesh % 10); update upd = new update(true); upd.uid = mr_panda.game.guildwar.leftgate.uid; upd.append(update.mesh, mr_panda.game.guildwar.leftgate.mesh); client.sendscreen(upd, true); break; } case 2: { if (game.guildwar.leftgate.hitpoints == 0) return; game.guildwar.leftgate.mesh = (ushort)(240 + game.guildwar.leftgate.mesh % 10); update upd = new update(true); upd.uid = mr_panda.game.guildwar.leftgate.uid; upd.append(update.mesh, mr_panda.game.guildwar.leftgate.mesh); upd.append(update.hitpoints, mr_panda.game.guildwar.leftgate.hitpoints); client.sendscreen(upd, true); break; } case 22: { game.guildwar.leftgate.mesh = (ushort)(240 + game.guildwar.leftgate.mesh % 10); if (game.guildwar.leftgate.hitpoints == 0) game.guildwar.leftgate.hitpoints = game.guildwar.leftgate.maxhitpoints; update upd = new update(true); upd.uid = mr_panda.game.guildwar.leftgate.uid; upd.append(update.mesh, mr_panda.game.guildwar.leftgate.mesh); upd.append(update.hitpoints, mr_panda.game.guildwar.leftgate.hitpoints); client.sendscreen(upd, true); break; } case 3: { client.player.teleport(1038, 162, 198); break; } } } } break; } case 516075: { if (client.guild != null) { if (client.guild.polekeeper) { switch (npcrequest.optionid) { case 0: Dialog.text("select the option you want to pursue."); if (client.asmember.rank == mr_panda.game.enums.guildmemberrank.guildleader || client.asmember.rank == mr_panda.game.enums.guildmemberrank.deputyleader) { dialog.option("open gate.", 1); if (game.guildwar.rightgate.hitpoints == 0) dialog.option("repair gate.", 22); else dialog.option("close gate.", 2); } dialog.option("get inside.", 3); dialog.option("nothing.", 255); dialog.send(); break; case 1: { mr_panda.game.guildwar.rightgate.mesh = (ushort)(280 + mr_panda.game.guildwar.rightgate.mesh % 10); update upd = new update(true); upd.uid = mr_panda.game.guildwar.rightgate.uid; upd.append(update.mesh, mr_panda.game.guildwar.rightgate.mesh); client.sendscreen(upd, true); break; } case 2: { if (game.guildwar.rightgate.hitpoints == 0) return; mr_panda.game.guildwar.rightgate.mesh = (ushort)(270 + mr_panda.game.guildwar.rightgate.mesh % 10); update upd = new update(true); upd.uid = mr_panda.game.guildwar.rightgate.uid; upd.append(update.mesh, mr_panda.game.guildwar.rightgate.mesh); upd.append(update.hitpoints, mr_panda.game.guildwar.rightgate.hitpoints); client.sendscreen(upd, true); break; } case 22: { mr_panda.game.guildwar.rightgate.mesh = (ushort)(270 + mr_panda.game.guildwar.rightgate.mesh % 10); if (game.guildwar.rightgate.hitpoints == 0) game.guildwar.rightgate.hitpoints = game.guildwar.rightgate.maxhitpoints; update upd = new update(true); upd.uid = mr_panda.game.guildwar.rightgate.uid; upd.append(update.mesh, mr_panda.game.guildwar.rightgate.mesh); upd.append(update.hitpoints, mr_panda.game.guildwar.rightgate.hitpoints); client.sendscreen(upd, true); break; } case 3: { client.player.teleport(1038, 210, 177); break; } } } } break; } #endregion #region guild conductresses #region exit guild arena case 7000: { switch (npcrequest.optionid) { case 0: { dialog.text("do you want to leave the guild arena?"); dialog.option("yes.", 1); dialog.option("no.", 255); dialog.send(); break; } case 1: { client.player.teleport(1002, 300, 278); break; } } break; } #endregion #endregion #region guild conductors #region in case 9884: Case 9885: Case 9886: Case 9887: { switch (npcrequest.optionid) { case 0: { dialog.text("in exchange of a fee of 1000gold, i will teleport you to a special place. If you don't have money, don't bother me."); dialog.option("teleport me.", 1); dialog.option("i'm too poor.", 255); dialog.send(); break; } case 2: { if (client.player.money >= 10000) { if (client.inventory.count < 40) { client.player.money -= 10000; switch (client.activenpc) { case 9884: { client.inventory.add(720021, 0, 1); break; } case 9885: { client.inventory.add(720022, 0, 1); break; } case 9886: { client.inventory.add(720023, 0, 1); break; } case 9887: { client.inventory.add(720024, 0, 1); break; } } } else { dialog.text("sorry, you inventory is full"); dialog.option("ah, ok", 255); dialog.send(); } } else { dialog.text("sorry, you not have 10.000 silver."); dialog.option("ah, ok", 255); dialog.send(); } break; } case 1: { if (client.player.money >= 1000) { client.player.money -= 1000; database.guildcondutors.conductor cond = null; if (database.guildcondutors.guildconductors.trygetvalue((uint)(client.activenpc + 110), out cond)) { client.player.teleport(cond.teleport_mapid, cond.teleport_x, cond.teleport_y); } break; } else { dialog.text("sorry, you not have 1.000 silver."); dialog.option("ah, ok", 255); dialog.send(); } break; } } break; } #endregion #endregion } break; } #endregion