Jump to content
  • 0

[REQUEST] Adapt /change this code


Question

Posted

Kalispera

 

Tha ithela na fix auton ton code wste na doulepsi swsta DLD

 

### Eclipse Workspace Patch 1.0
#P L2jFrozen_GameServer
Index: head-src/com/l2jfrozen/gameserver/datatables/PvPReward.java
===================================================================
--- head-src/com/l2jfrozen/gameserver/datatables/PvPReward.java	(revision 0)
+++ head-src/com/l2jfrozen/gameserver/datatables/PvPReward.java	(revision 0)
@@ -0,0 +1,95 @@
+/*
+ /*
+ * This program is free software: you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License as published by the Free Software
+ * Foundation, either version 3 of the License, or (at your option) any later
+ * version.
+ * 
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ * 
+ * You should have received a copy of the GNU General Public License along with
+ * this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+package com.l2jfrozen.gameserver.datatables;
+
+import com.l2jfrozen.gameserver.model.Inventory;
+import com.l2jfrozen.gameserver.model.actor.instance.L2ItemInstance;
+import com.l2jfrozen.gameserver.model.actor.instance.L2PcInstance;
+import com.l2jfrozen.util.random.Rnd;
+
+
+/**
+ * 
+ * @author Wyatt
+ * 
+ */
+
+public class PvPReward
+{
+	private static int [] Sgrade = {};//Add here
+	private static int [] Agrade = {};//the items
+	private static int [] Bgrade = {};//that will be
+	private static int [] Cgrade = {};//checked to know
+	private static int [] Dgrade = {};//the grade (chests)
+	
+	private static int [] Srew = {};//Add here
+	private static int [] Arew = {};//the items
+	private static int [] Brew = {};//that you want
+	private static int [] Crew = {};//specify as possible
+	private static int [] Drew = {};//rewards, by grade
+	private static String grade = "";
+	
+	public static void checkReward(L2PcInstance killer, L2PcInstance killed)
+	{
+		int id = 0;
+		L2ItemInstance armor = killed.getInventory().getPaperdollItem(Inventory.PAPERDOLL_CHEST);
+		if (armor != null)
+		{
+			id = armor.getItemId();
+		}
+		
+		for(int i : Sgrade)
+		{
+			if(i == id)
+				grade = "S";
+		}
+		
+		for(int i : Agrade)
+		{
+			if(i == id)
+				grade = "A";
+		}
+		
+		for(int i : Bgrade)
+		{
+			if(i == id)
+				grade = "B";
+		}
+		
+		for(int i : Cgrade)
+		{
+			if(i == id)
+				grade = "C";
+		}
+		
+		for(int i : Dgrade)
+		{
+			if(i == id)
+				grade = "D";
+		}
+		
+		if(grade.equals("S"))
+			killer.addItem("PvP Reward", Srew[Rnd.get(Srew.length)], 1, killer, true);
+		if(grade.equals("A"))
+			killer.addItem("PvP Reward", Arew[Rnd.get(Arew.length)], 1, killer, true);
+		if(grade.equals("B"))
+			killer.addItem("PvP Reward", Brew[Rnd.get(Brew.length)], 1, killer, true);
+		if(grade.equals("C"))
+			killer.addItem("PvP Reward", Crew[Rnd.get(Crew.length)], 1, killer, true);
+		if(grade.equals("D"))
+			killer.addItem("PvP Reward", Drew[Rnd.get(Drew.length)], 1, killer, true);
+	}	
+}
\ No newline at end of file
Index: head-src/com/l2jfrozen/gameserver/model/actor/instance/L2PcInstance.java
===================================================================
--- head-src/com/l2jfrozen/gameserver/model/actor/instance/L2PcInstance.java	(revision 948)
+++ head-src/com/l2jfrozen/gameserver/model/actor/instance/L2PcInstance.java	(working copy)
@@ -59,6 +59,7 @@
import com.l2jfrozen.gameserver.datatables.GmListTable;
import com.l2jfrozen.gameserver.datatables.HeroSkillTable;
import com.l2jfrozen.gameserver.datatables.NobleSkillTable;
+import com.l2jfrozen.gameserver.datatables.PvPReward;
import com.l2jfrozen.gameserver.datatables.SkillTable;
import com.l2jfrozen.gameserver.datatables.csv.FishTable;
import com.l2jfrozen.gameserver.datatables.csv.HennaTable;
@@ -7291,6 +7292,8 @@
					pk.kills.add(getName());
				}

+				PvPReward.checkReward(pk, this);
+				
				if(_inEventTvT && pk._inEventTvT)
				{
					if(TvT.is_teleport() || TvT.is_started())

 

Thelw an foraei S Grade armor k oxi apla na tin exei sto invetory na

kanei drop S Grade Armor Na drop S Grade PvP Reward

------------A -----------------------A----------------

------------B------------------------B----------------

------------C------------------------C---------------- 

episis den thelw na pernw pk k na m dini reward*

kati akoma mporo na elenksw kapou to chance tou reward*?

sto L2jfrozen Interude p exw  exei idi ena reward tha doulepsoun kai ta 2*?

 

Auto to code m edwsan sto English section k xreiazete kapoies alages*

to kanw edw share gt mporo na to eksigisw kalitera sta Ellinika*

kanw poles erwtisis gt tha einai vasiko feature auto*

 

An zitaw pola parakalw agnwiste to*

3 answers to this question

Recommended Posts

  • 0
Posted

kalo 8a htan an mporouses na kaneis copy/paste twn kwdika edw wste na s poume ti na allakseis.. ;)

 

Fixed*

 

lock it*

Guest
This topic is now closed to further replies.


×
×
  • Create New...