L2JMobius

Master Class Ch. 2 Custom PK Prison for every recent Chronicle

SavitarGodOfSpeed · 1 · 1824

Offline SavitarGodOfSpeed

  • Baron
  • *****
    • Posts: 211
  • Here to gain knowledge
I have created a custom "PK Prison" (similar to the cursed village pk prison from Mc3) that doesn't need any editing on Java or script files just a simple yet effective way that you can protect your server against Chaotic Players.

When you kill someone and you PK him you get normally this Debuff

https://ibb.co/x18t8zZ

Aka Einhasad Overseeing Aka Skill 60002

so I have created 3 custom skill each one with a different purpose!

This skill is the core of all this what it does is basically locking the player on the spot unable to Move, Teleport or die

Code: [Select]
<skill id="46933" toLevel="1" name="Chaotic Prison">
<operateType>A2</operateType>
<abnormalType>ENERVATION</abnormalType>
<abnormalVisualEffect>H_B_PARTY_UNITEB_AVE</abnormalVisualEffect>
<canBeDispelled>false</canBeDispelled>
<stayAfterDeath>true</stayAfterDeath>
<isMagic>1</isMagic> <!-- Magic Skill -->
<hitTime>1</hitTime>
<reuseDelay>1500</reuseDelay>
<effectPoint>1</effectPoint>
<mpConsume>100</mpConsume>
<magicLevel>85</magicLevel>
<abnormalLevel>1</abnormalLevel>
<abnormalTime>14400</abnormalTime>
<basicProperty>NONE</basicProperty>
<magicCriticalRate>5</magicCriticalRate>
<targetType>SELF</targetType>
<affectScope>SINGLE</affectScope>
<conditions>
<condition name="OpAlignment">
<affectType>CASTER</affectType>
<alignment>CHAOTIC</alignment>
</condition>
<condition name="OpNotCursed" />
</conditions>
<effects>
<effect name="DamageBlock">
<type>BLOCK_HP</type>
</effect>
<effect name="DamageBlock">
<type>BLOCK_MP</type>
</effect>
<effect name="DebuffBlock" />
<effect name="BlockEscape" />
<effect name="BlockActions">
<allowedSkills>46934</allowedSkills>
</effect>
</effects>
</skill>

Next is a way to teleport that player somewhere that he cannot harm OR be harmed from others

Code: [Select]
<skill id="46935" toLevel="1" name="Chaotic Teleport">
<hitTime>2</hitTime>
<isMagic>2</isMagic> <!-- Static Skill -->
<magicLevel>1</magicLevel>
<operateType>A1</operateType>
<magicCriticalRate>5</magicCriticalRate>
<targetType>SELF</targetType>
<affectScope>SINGLE</affectScope>
<conditions>
<condition name="OpCanEscape" />
</conditions>
<effects>
<effect name="Teleport">
<x>61410</x>
<y>-42633</y>
<z>-2994</z>
</effect>
</effects>
</skill>

Finally (and this is optional) i have created a skill to remove the prison effect and Karma for a fee of course.

Code: [Select]
<skill id="46934" toLevel="1" name="PK Prison Removal">
<itemConsumeId>36515</itemConsumeId>
<itemConsumeCount>10000</itemConsumeCount>
<operateType>A2</operateType>
<isMagic>1</isMagic> <!-- Magic Skill -->
<hitTime>4000</hitTime>
<reuseDelay>400000</reuseDelay>
<effectPoint>1</effectPoint>
<magicLevel>85</magicLevel>
<abnormalLevel>1</abnormalLevel>
<abnormalTime>1</abnormalTime>
<basicProperty>NONE</basicProperty>
<magicCriticalRate>5</magicCriticalRate>
<targetType>SELF</targetType>
<affectScope>SINGLE</affectScope>
<conditions>
<condition name="OpAlignment">
<affectType>CASTER</affectType>
<alignment>CHAOTIC</alignment>
</condition>
<condition name="OpNotCursed" />
</conditions>
<effects>
<effect name="DispelBySlot">
<dispel>ENERVATION,-1</dispel>
</effect>
<effect name="KarmaCount">
<mode>RESET</mode>
</effect>
</effects>
</skill>

Now the question is "How do i activate this effect without editing any script" The answer is quite easy. Remember i mentioned "Einhasad Overseer" before?

Code: [Select]
<skill id="60002" toLevel="10" name="Einhasad Overseeing">
<!-- If attacking a character with the Counterattack setting active, a counterattack is triggered. After death in PvP/ PK: The chance of dropping items is increased. Up to $s1 items can be dropped. -->
<icon>icon.karma</icon>
<operateType>A2</operateType>
<targetType>SELF</targetType>
<affectScope>SINGLE</affectScope>
<isMagic>4</isMagic>
<abnormalLevel>1</abnormalLevel>
<abnormalTime>-1</abnormalTime>
<isTriggeredSkill>true</isTriggeredSkill>
<irreplacableBuff>true</irreplacableBuff>
<canBeDispelled>false</canBeDispelled>
<stayAfterDeath>true</stayAfterDeath>
<effects>
<effect name="CallSkill">
<skillId>46935</skillId>
<skillLevel>1</skillLevel>
</effect>
<effect name="CallSkill">
<skillId>46933</skillId>
<skillLevel>1</skillLevel>
</effect>
</effects>
</skill>

Me personally i have added the "Prison Break" skill on a "Scheme Buffer" and is costing 500B Adena to use it otherwise you will have to wait for 4 hours there.

Feel free to make any changes!