Jump to content

Klay

Members
  • Posts

    145
  • Joined

  • Last visited

  • Feedback

    0%

Everything posted by Klay

  1. Well yes you shouldn't because if you don't,your edits will affects more zones that you probably don't want. about large thingy,no its not a problem.
  2. log in skype..
  3. you can increase xp/sp rate when a character is in specific zone if (isinsidezone(type)) ..
  4. any fresh idea around?
  5. what kind of problem? when you click log in,nothing happens? be more specific,please.
  6. sure thing :) but why should I?client is supposed to search before he gives away his money for something.. right?
  7. hello, most of them are shared,but not as AIO(all in one).
  8. yes dude,you are right but when someone order me a specific code i'm not searching over the google to see its already shared.. I'm thinking,if its already shared,why someone order it? its the second time i'm creating something for someone and in the end,comes up as a shared code,lol >.>
  9. paste here the setteam method from l2pcinstance.
  10. May I ask you something? what about java side?
  11. i haven't seen this hitman system, but i guess,kind of. nope..not many changes though
  12. you really have no clue of what I said,do you?
  13. I can't understand, it doesn't seem fine to my eyes unless I don't see something. in case the player is null,how is possible to return enchant; ? since enchant = the enchant level of the player ?
  14. Hello guys, I decided to not sell anymore this system since no one is interested in buying it,so I decided it to share it instead :) Description: There's one npc,and there you can type the player you wants to die,then you(as requester) lose X item(ID,amount configurable).Also,server(through announcement) let the other player know that you(requestor name) wants X player(target name) die. whoever kills this the target name gains X item(ID,amount configurable). Player target status are saved into database so target won't lose his target status in case of server restart/shutdown. PS: Τhe first picture is captured when I was testing this in my private source,but I decided to code it for acis since almost everyone is using this.The next 4 pictures are captured in acis,but I forgot to capture the npc chat as well,but anyway is the same like the 1st one,no changes at all. coded on acis rev 330 datapack: ### Eclipse Workspace Patch 1.0 #P aCis_datapack Index: sql/characters.sql =================================================================== --- sql/characters.sql (revision 1) +++ sql/characters.sql (working copy) @@ -54,6 +54,7 @@ `clan_join_expiry_time` BIGINT UNSIGNED NOT NULL DEFAULT 0, `clan_create_expiry_time` BIGINT UNSIGNED NOT NULL DEFAULT 0, `death_penalty_level` SMALLINT UNSIGNED NOT NULL DEFAULT 0, + `publictarget` TINYINT UNSIGNED NOT NULL DEFAULT 0, PRIMARY KEY (obj_Id), KEY `clanid` (`clanid`) ); \ No newline at end of file Index: data/xml/npcs/50000-50999.xml =================================================================== --- data/xml/npcs/50000-50999.xml (revision 1) +++ data/xml/npcs/50000-50999.xml (working copy) @@ -72,4 +72,40 @@ <skill id="4416" level="18"/> </skills> </npc> + <npc id="50009" idTemplate="30519" name="Haras" title="Claim a target"> + <set name="level" val="70"/> + <set name="radius" val="7"/> + <set name="height" val="18"/> + <set name="rHand" val="0"/> + <set name="lHand" val="0"/> + <set name="type" val="L2KillTarget"/> + <set name="exp" val="0"/> + <set name="sp" val="0"/> + <set name="hp" val="2444.46819"/> + <set name="mp" val="1345.8"/> + <set name="hpRegen" val="7.5"/> + <set name="mpRegen" val="2.7"/> + <set name="pAtk" val="688.86373"/> + <set name="pDef" val="295.91597"/> + <set name="mAtk" val="470.40463"/> + <set name="mDef" val="216.53847"/> + <set name="crit" val="4"/> + <set name="atkSpd" val="253"/> + <set name="str" val="40"/> + <set name="int" val="21"/> + <set name="dex" val="30"/> + <set name="wit" val="20"/> + <set name="con" val="43"/> + <set name="men" val="20"/> + <set name="corpseTime" val="7"/> + <set name="walkSpd" val="50"/> + <set name="runSpd" val="120"/> + <set name="dropHerbGroup" val="0"/> + <set name="attackRange" val="40"/> + <ai type="default" ssCount="0" ssRate="0" spsCount="0" spsRate="0" aggro="0" canMove="true" seedable="false"/> + <skills> + <skill id="4045" level="1"/> + <skill id="4416" level="18"/> + </skills> + </npc> </list> \ No newline at end of file Index: data/html/killtarget/50009.htm =================================================================== --- data/html/killtarget/50009.htm (revision 0) +++ data/html/killtarget/50009.htm (working copy) @@ -0,0 +1,23 @@ +<html> +<body> + <center><font color="FF9900">Public Target Manager</font></center> + <table> + <tr> + <td>Hello,I'm here to let the others players know the name of player that you want to <font color="FF9900">die</font>.<br1> + <br></td> + </tr> + <tr> + <td>If someone else has already targeted a specific player <font color="FF9900">you can't</font> target the same player.<br1> + <br></td> + </tr> + <tr> + <td>After your mark your <font color="FF9900">target</font>,there will be an <font color="FF9900">announcement</font> so every will know<br1> + My services are <font color="FF9900">not</font> free of course.The <font color="FF9900">killer</font> of your targeted player will take the items you will spend.<br><br><br></td> + </tr> + <tr> + <td>Player:<edit var="pname" width=80 height=20> + <a action="bypass -h npc_%objectId%_killpl $pname">Claim a target</a></td> + </tr> + </table> +</body> +</html> \ No newline at end of file core ### Eclipse Workspace Patch 1.0 #P aCis_gameserver Index: config/players.properties =================================================================== --- config/players.properties (revision 1) +++ config/players.properties (working copy) @@ -288,4 +288,14 @@ MaxBuffsAmount = 20 # Store buffs/debuffs on user logout? -StoreSkillCooltime = True \ No newline at end of file +StoreSkillCooltime = True + +#============================================================= +# Public Target +#============================================================= +# player's who request someone else death (requestor) - settings +RequiredItemId = 57 +RequiredItemAmount = 10000 +# player's who kill the requested player rewards - settings +RewardKillerId = 57 +RewardKillerAmount = 2000000 Index: java/net/sf/l2j/gameserver/model/actor/instance/L2KillTargetInstance.java =================================================================== --- java/net/sf/l2j/gameserver/model/actor/instance/L2KillTargetInstance.java (revision 0) +++ java/net/sf/l2j/gameserver/model/actor/instance/L2KillTargetInstance.java (working copy) @@ -0,0 +1,84 @@ +package net.sf.l2j.gameserver.model.actor.instance; + +import java.util.StringTokenizer; + + + + +import net.sf.l2j.Config; +import net.sf.l2j.gameserver.model.L2World; +import net.sf.l2j.gameserver.model.actor.template.NpcTemplate; +import net.sf.l2j.gameserver.Announcements; + + + +public class L2KillTargetInstance extends L2NpcInstance{ + + int requestorItemId = Config.REQUESTOR_ITEM_ID; + int requestorItemAmount = Config.REQUESTOR_ITEM_AMOUNT; + + public L2KillTargetInstance(int objectId, NpcTemplate template) { + super(objectId, template); + } + + public void onBypassFeedback(L2PcInstance player, String command) + { + if (command.startsWith("killpl")) + { + StringTokenizer st = new StringTokenizer(command); + st.nextToken(); + + if (st.countTokens() != 1) + { + player.sendMessage("Fill the box with a name,please"); + return; + } + if(player.getInventory().getItemByItemId(requestorItemId).getCount() <= requestorItemAmount) + { + player.sendMessage("You need more items to claim a target"); + return; + } + + String val = String.valueOf(st.nextToken()); + L2PcInstance target = L2World.getInstance().getPlayer(val); + + if (target == null) + { + player.sendMessage("Such player doesn't exist or it isn't online"); + return; + } + else if (target.equals(player)) + { + player.sendMessage("You can't target yourself"); + return; + } + else if (target.isTargeted()) + { + player.sendMessage("This player is already targeted by someone else,choose another"); + return; + } + + target.setTargeted(true); + player.destroyItemByItemId("Mark Target", requestorItemId, requestorItemAmount, player.getTarget(), true); + Announcements.getInstance().announceToAll("Mission: Kill "+target.getName()+" for special reward"); + target.sendMessage("Player "+player.getName()+" targeted you and offers adena to whoever kill you"); + + } + + } + + public String getHtmlPath(int npcId, int val) + { + String pom = ""; + if (val == 0) + { + pom = "" + npcId; + } + else + { + pom = npcId + "-" + val; + } + + return "data/html/killtarget/" + pom + ".htm"; + } +} Index: java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java =================================================================== --- java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java (revision 1) +++ java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java (working copy) @@ -37,6 +37,7 @@ import net.sf.l2j.Config; import net.sf.l2j.L2DatabaseFactory; +import net.sf.l2j.gameserver.Announcements; import net.sf.l2j.gameserver.GameTimeController; import net.sf.l2j.gameserver.GeoData; import net.sf.l2j.gameserver.LoginServerThread; @@ -252,6 +253,10 @@ */ public final class L2PcInstance extends L2Playable { + + public int killerRewardItemId = Config.KILLER_REWARD_ITEM_ID; + public int killerRewardAmount = Config.KILLER_REWARD_AMOUNT; + private static final String RESTORE_SKILLS_FOR_CHAR = "SELECT skill_id,skill_level FROM character_skills WHERE char_obj_id=? AND class_index=?"; private static final String ADD_NEW_SKILL = "INSERT INTO character_skills (char_obj_id,skill_id,skill_level,class_index) VALUES (?,?,?,?)"; private static final String UPDATE_CHARACTER_SKILL_LEVEL = "UPDATE character_skills SET skill_level=? WHERE skill_id=? AND char_obj_id=? AND class_index=?"; @@ -262,9 +267,9 @@ private static final String RESTORE_SKILL_SAVE = "SELECT skill_id,skill_level,effect_count,effect_cur_time, reuse_delay, systime, restore_type FROM character_skills_save WHERE char_obj_id=? AND class_index=? ORDER BY buff_index ASC"; private static final String DELETE_SKILL_SAVE = "DELETE FROM character_skills_save WHERE char_obj_id=? AND class_index=?"; - private static final String INSERT_CHARACTER = "INSERT INTO characters (account_name,obj_Id,char_name,level,maxHp,curHp,maxCp,curCp,maxMp,curMp,face,hairStyle,hairColor,sex,exp,sp,karma,pvpkills,pkkills,clanid,race,classid,deletetime,cancraft,title,accesslevel,online,isin7sdungeon,clan_privs,wantspeace,base_class,nobless,power_grade,last_recom_date) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)"; - private static final String UPDATE_CHARACTER = "UPDATE characters SET level=?,maxHp=?,curHp=?,maxCp=?,curCp=?,maxMp=?,curMp=?,face=?,hairStyle=?,hairColor=?,sex=?,heading=?,x=?,y=?,z=?,exp=?,expBeforeDeath=?,sp=?,karma=?,pvpkills=?,pkkills=?,rec_have=?,rec_left=?,clanid=?,race=?,classid=?,deletetime=?,title=?,accesslevel=?,online=?,isin7sdungeon=?,clan_privs=?,wantspeace=?,base_class=?,onlinetime=?,punish_level=?,punish_timer=?,nobless=?,power_grade=?,subpledge=?,last_recom_date=?,lvl_joined_academy=?,apprentice=?,sponsor=?,varka_ketra_ally=?,clan_join_expiry_time=?,clan_create_expiry_time=?,char_name=?,death_penalty_level=? WHERE obj_id=?"; - private static final String RESTORE_CHARACTER = "SELECT account_name, obj_Id, char_name, level, maxHp, curHp, maxCp, curCp, maxMp, curMp, face, hairStyle, hairColor, sex, heading, x, y, z, exp, expBeforeDeath, sp, karma, pvpkills, pkkills, clanid, race, classid, deletetime, cancraft, title, rec_have, rec_left, accesslevel, online, char_slot, lastAccess, clan_privs, wantspeace, base_class, onlinetime, isin7sdungeon, punish_level, punish_timer, nobless, power_grade, subpledge, last_recom_date, lvl_joined_academy, apprentice, sponsor, varka_ketra_ally,clan_join_expiry_time,clan_create_expiry_time,death_penalty_level FROM characters WHERE obj_id=?"; + private static final String INSERT_CHARACTER = "INSERT INTO characters (account_name,obj_Id,char_name,level,maxHp,curHp,maxCp,curCp,maxMp,curMp,face,hairStyle,hairColor,sex,exp,sp,karma,pvpkills,pkkills,clanid,race,classid,deletetime,cancraft,title,accesslevel,online,isin7sdungeon,clan_privs,wantspeace,base_class,nobless,power_grade,last_recom_date,publictarget) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)"; + private static final String UPDATE_CHARACTER = "UPDATE characters SET level=?,maxHp=?,curHp=?,maxCp=?,curCp=?,maxMp=?,curMp=?,face=?,hairStyle=?,hairColor=?,sex=?,heading=?,x=?,y=?,z=?,exp=?,expBeforeDeath=?,sp=?,karma=?,pvpkills=?,pkkills=?,rec_have=?,rec_left=?,clanid=?,race=?,classid=?,deletetime=?,title=?,accesslevel=?,online=?,isin7sdungeon=?,clan_privs=?,wantspeace=?,base_class=?,onlinetime=?,punish_level=?,punish_timer=?,nobless=?,power_grade=?,subpledge=?,last_recom_date=?,lvl_joined_academy=?,apprentice=?,sponsor=?,varka_ketra_ally=?,clan_join_expiry_time=?,clan_create_expiry_time=?,char_name=?,death_penalty_level=?,publictarget=? WHERE obj_id=?"; + private static final String RESTORE_CHARACTER = "SELECT account_name, obj_Id, char_name, level, maxHp, curHp, maxCp, curCp, maxMp, curMp, face, hairStyle, hairColor, sex, heading, x, y, z, exp, expBeforeDeath, sp, karma, pvpkills, pkkills, clanid, race, classid, deletetime, cancraft, title, rec_have, rec_left, accesslevel, online, char_slot, lastAccess, clan_privs, wantspeace, base_class, onlinetime, isin7sdungeon, punish_level, punish_timer, nobless, power_grade, subpledge, last_recom_date, lvl_joined_academy, apprentice, sponsor, varka_ketra_ally,clan_join_expiry_time,clan_create_expiry_time,death_penalty_level,publictarget FROM characters WHERE obj_id=?"; private static final String RESTORE_CHAR_SUBCLASSES = "SELECT class_id,exp,sp,level,class_index FROM character_subclasses WHERE char_obj_id=? ORDER BY class_index ASC"; private static final String ADD_CHAR_SUBCLASS = "INSERT INTO character_subclasses (char_obj_id,class_id,exp,sp,level,class_index) VALUES (?,?,?,?,?,?)"; @@ -485,6 +490,7 @@ private boolean _noble = false; private boolean _hero = false; + public boolean _targeted = false; private L2Npc _currentFolkNpc = null; @@ -4026,6 +4032,19 @@ { L2PcInstance pk = killer.getActingPlayer(); + + if(killer instanceof L2PcInstance) + { + pk = (L2PcInstance) killer; + if(isTargeted()) + { + + Announcements.getInstance().announceToAll("Targeted player "+getName()+" was killed by "+pk.getName()+",the player who killed targeted player rewarded with special item"); + setTargeted(false); + sendMessage("Since you've been killed while you were public target,you are not public target anymore"); + pk.addItem("Public Target",killerRewardItemId,killerRewardAmount,pk,true); + } + } // Clear resurrect xp calculation setExpBeforeDeath(0); @@ -5453,6 +5472,7 @@ statement.setInt(32, isNoble() ? 1 : 0); statement.setLong(33, 0); statement.setLong(34, System.currentTimeMillis()); + statement.setInt(35, isTargeted() ? 1 : 0); statement.executeUpdate(); statement.close(); } @@ -5508,6 +5528,7 @@ player.setPkKills(rset.getInt("pkkills")); player.setOnlineTime(rset.getLong("onlinetime")); player.setNoble(rset.getInt("nobless") == 1, false); + player.setTargeted(rset.getInt("publictarget") == 1); player.setClanJoinExpiryTime(rset.getLong("clan_join_expiry_time")); if (player.getClanJoinExpiryTime() < System.currentTimeMillis()) @@ -5934,7 +5955,8 @@ statement.setLong(47, getClanCreateExpiryTime()); statement.setString(48, getName()); statement.setLong(49, getDeathPenaltyBuffLevel()); - statement.setInt(50, getObjectId()); + statement.setInt(50, isTargeted() ? 1 : 0); + statement.setInt(51, getObjectId()); statement.execute(); statement.close(); @@ -8052,6 +8074,17 @@ return _hero; } + public boolean isTargeted() + { + return _targeted; + } + + public void setTargeted(boolean val) + { + _targeted = val; + } + + public boolean isInOlympiadMode() { return _inOlympiadMode; Index: java/net/sf/l2j/Config.java =================================================================== --- java/net/sf/l2j/Config.java (revision 1) +++ java/net/sf/l2j/Config.java (working copy) @@ -376,7 +376,11 @@ // -------------------------------------------------- // Players // -------------------------------------------------- - + /** Target system */ + public static int REQUESTOR_ITEM_ID; + public static int REQUESTOR_ITEM_AMOUNT; + public static int KILLER_REWARD_ITEM_ID; + public static int KILLER_REWARD_AMOUNT; /** Misc */ public static int STARTING_ADENA; public static boolean EFFECT_CANCELING; @@ -995,6 +999,11 @@ // players ExProperties players = load(PLAYERS_FILE); + REQUESTOR_ITEM_ID = players.getProperty("RequiredItemId",57); + REQUESTOR_ITEM_AMOUNT = players.getProperty("RequiredItemAmount",10000); + KILLER_REWARD_ITEM_ID = players.getProperty("RewardKillerId",57); + KILLER_REWARD_AMOUNT = players.getProperty("RewardKillerAmount",100000); + STARTING_ADENA = players.getProperty("StartingAdena", 100); EFFECT_CANCELING = players.getProperty("CancelLesserEffect", true); HP_REGEN_MULTIPLIER = players.getProperty("HpRegenMultiplier", 1.); have fun :D
  15. your code is a mess.. first of all,at the 1st code it doesn't set any enchant,it just sends a message to player. in your second code,what exactly is enchant?I don't see any variable with that name in the last one,if player is null,how is possible to return his enchant?You will have an NPE over there. anyway,its pointless to turn any enchant to + X everytime someone is in olympiad.. an other way is just to disallow such items to be wear when someone is in olympiad.
  16. That appears probably due to exception. noone can help you,unless you post here the code you're using :)
  17. return RANDOM_LOCATIONS[Rnd.get(6)]; try this
  18. Well I don't know what is this system, I created this from 0..
  19. how is the progress revenger? I mean,development progress.
  20. how much did you paid for
  21. haha,that's pathetic
  22. assuming you got the proper knowledge to survive over there :D and of course I am not referring to custom features,I'm talking about the missing implementions,features,status and generally the real l2 gameplay that is required for such rates.
  23. I counted more than 10 members with 1 post here, wtf is this server? so much people are interested in this?I'm shocked,lol
×
×
  • 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