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!

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...