Jump to content
  • 0

Pws borw na balw //sethero/...


Question

Posted

Paidia apofashsa na kanw enan Faction Final Gracia server!

To 8ema einai pws 8elw...ta atoma pou einai apo thn omada pou nikaei...na pernei os brabio //sethero(dld na ginete hero mexrh na xasei se enan mia maxh) kai na pairnei ena coint!

 

Pou prepei na kanw allages kai poies gia na to kanw afto!

Please analhthka gt den exw idea gia to pws kaneis edit enan faction server!

TY!

3 answers to this question

Recommended Posts

  • 0
Posted

Des pos i methodos ayth einai , kai kane edit me ayto p esy zitas.

 

Pantos ayta p zitas gynontai meso l2pcinstance.java

 

+       else if (command.startsWith("admin_sethero"))
+       {
+			L2Object target = activeChar.getTarget();
+			L2PcInstance player = null;
+    	    SystemMessage sm = new SystemMessage(SystemMessageId.S1_S2);		
+			if (target instanceof L2PcInstance)
+				player = (L2PcInstance)target;
+			else
+     	      	player = activeChar;
+		
+			if (player.isHero())
+			{
+				player.setHero(false);
+				sm.addString("You are no longer a hero.");				
+			}
+			else
+			{
+                player.broadcastPacket(new SocialAction(player.getObjectId(), 16));
+				player.setHero(true);
+				sm.addString("You are now a hero, you will remain a hero until you log off your character.");
+			}
+		    sm.addString("Your Hero Status has been Changed.");
+		    player.sendPacket(sm);
+    	   	player.broadcastUserInfo();
+       }

  • 0
Posted

An Enois Sto +1 PvP -> Set Hero

L2PcInstance -> public void increasePvpKills()

 

setPvpKills(getPvpKills() + 1);
+ setHero(true);

 

Lose Hero Status on Die --> L2PcInstance - public boolean doDie(L2Character killer)

setExpBeforeDeath(0);
+ setHero(false);

 

  • 0
Posted

Des pos i methodos ayth einai , kai kane edit me ayto p esy zitas.

 

Pantos ayta p zitas gynontai meso l2pcinstance.java

 

+       else if (command.startsWith("admin_sethero"))
+       {
+			L2Object target = activeChar.getTarget();
+			L2PcInstance player = null;
+    	    SystemMessage sm = new SystemMessage(SystemMessageId.S1_S2);		
+			if (target instanceof L2PcInstance)
+				player = (L2PcInstance)target;
+			else
+     	      	player = activeChar;
+		
+			if (player.isHero())
+			{
+				player.setHero(false);
+				sm.addString("You are no longer a hero.");				
+			}
+			else
+			{
+                player.broadcastPacket(new SocialAction(player.getObjectId(), 16));
+				player.setHero(true);
+				sm.addString("You are now a hero, you will remain a hero until you log off your character.");
+			}
+		    sm.addString("Your Hero Status has been Changed.");
+		    player.sendPacket(sm);
+    	   	player.broadcastUserInfo();
+       }

Pou ta bazw afta...kait i einai to l2pcinstance.java...an einai apoio file den to exw sta config toulaxiston!

A

Xrhshmopiw l2jserver!

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock