Secret Experience

Secret Experience (https://secretexperience.net/)
-   [L2OFF | Admin] Custom Server & Client (https://secretexperience.net/l2off-admin-custom-server-client/)
-   -   [Outros] AntiPvP NPC L2oFF (https://secretexperience.net/l2off-admin-custom-server-client/34182-antipvp-npc-l2off.html)

Setokaiba 18-09-2013 02:53 PM

AntiPvP NPC L2oFF
 
Muito útil para locais que você não deseja que haja PvP.
Como por exemplo na entrada de DVC.

NASC code:
Código:

EventHandler ATTACKED(attacker,damage)
  {
    if(myself::GetAbnormalLevel(attacker, myself::Skill_GetAbnormalType(@s_npc_kick))==-1)
    {
      myself::AddUseSkillDesire(attacker, @s_npc_kick, @ST_ATTACK, @AMT_STAND, 1000000);
      myself::RemoveAttackDesire(attacker.id);
    }
    return;
  }

Ai.obj:
Código:

handler 1 51    //  ATTACKED
    variable_begin
        "attacker"
        "damage"
        "myself"
        "_choiceN"
        "_code"
        "_from_choice"
    variable_end

    push_event    //  myself
    push_const 704
    add
    fetch_i
    push_event    //  attacker
    push_const 48
    add
    fetch_i
    push_event    //  myself
    push_const 704
    add
    fetch_i
    push_const 2870273
    func_call 184615131    //  func[Skill_GetAbnormalType]
    shift_sp -1
    func_call 184680557    //  func[GetAbnormalLevel]
    shift_sp -2
    push_const 1
    negate
    equal
    branch_false L91
L90
    push_event    //  myself
    push_const 704
    add
    fetch_i
    push_event    //  attacker
    push_const 48
    add
    fetch_i
    push_const 2870273
    push_const 0
    push_const 0
    push_const 1000000
    func_call 184877074    //  func[AddUseSkillDesire]
    shift_sp -6
    push_event    //  myself
    push_const 704
    add
    fetch_i
    push_event    //  attacker
    push_const 48
    add
    fetch_i    //  id
    push_const 36
    add
    fetch_i4
    func_call 184614938    //  func[RemoveAttackDesire]
    shift_sp -2
L91
    exit_handler
handler_end

Skilldata.txt:
Código:

skill_begin    skill_name=[s_npc_kick]    /* [ Secret Experience ] */    skill_id=11212    level=1    operate_type=A2    magic_level=95    effect={{i_fly_away};{p_block_act}}    is_magic=2    mp_consume2=0    cast_range=2500    effective_range=3000    skill_hit_time=0    skill_cool_time=0    skill_hit_cancel_time=0    reuse_delay=0    activate_rate=-1    lv_bonus_rate=0    basic_property=none    abnormal_time=120    abnormal_lv=99    abnormal_type=fly_away    attribute=attr_shock    effect_point=-100    target_type=target    affect_scope=single    affect_limit={0;0}    next_action=none    abnormal_visual_effect=ave_stun_dance    debuff=1    ride_state={@ride_none}    skill_end


Horários baseados na GMT -3. Agora são 05:12 AM.

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.0