Skip to content

Olympiad

Featured Replies

At many servers i saw that if u want to register at oly u have to have 100+ Pvp

 

 

How can u do that?

Index: data/scripts/handlers/bypasshandlers/OlympiadManagerLink.java
===================================================================
--- data/scripts/handlers/bypasshandlers/OlympiadManagerLink.java	(revision 8230)
+++ data/scripts/handlers/bypasshandlers/OlympiadManagerLink.java	(working copy)
@@ -124,10 +124,16 @@
						activeChar.sendPacket(html);
						break;
					case 4:
-						OlympiadManager.getInstance().registerNoble(activeChar, CompetitionType.NON_CLASSED);
+						if(activeChar.getPvpKills() >= 100)
+							OlympiadManager.getInstance().registerNoble(activeChar, CompetitionType.NON_CLASSED);
+						else
+							activeChar.sendMessage("You need "+(100 - activeChar.getPvpKills())+" Pvp's to register in Olympiad");
						break;
					case 5:
-						OlympiadManager.getInstance().registerNoble(activeChar, CompetitionType.CLASSED);
+						if(activeChar.getPvpKills() >= 100)
+							OlympiadManager.getInstance().registerNoble(activeChar, CompetitionType.CLASSED);
+						else
+							activeChar.sendMessage("You need "+(100 - activeChar.getPvpKills())+" Pvp's to register in Olympiad");
						break;
					case 6:
						passes = Olympiad.getInstance().getNoblessePasses(activeChar, false);
@@ -174,7 +180,10 @@
						}
						break;
					case 11:
-						OlympiadManager.getInstance().registerNoble(activeChar, CompetitionType.TEAMS);
+						if(activeChar.getPvpKills() >= 100)
+							OlympiadManager.getInstance().registerNoble(activeChar, CompetitionType.TEAMS);
+						else
+							activeChar.sendMessage("You need "+(100 - activeChar.getPvpKills())+" Pvp's to register in Olympiad");
						break;
					default:
						_log.warning("Olympiad System: Couldnt send packet for request " + val);

  • Author

if(activeChar.getPvpKills() >= 100)

 

 

So i guess that is the secret for that.

 

If i want to do the same with shops i mean to have 1+ Pvp what i suppose to do?

 

+ if(activeChar.getPvpKills() >= 1)

 

And put it on gm shop's code?

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.