Red crossen after use rune

Discussion in 'Support' started by dunno321, Aug 12, 2017.

  1. dunno321

    dunno321 New Member

    Joined:
    Aug 2, 2017
    Messages:
    17
    Likes Received:
    3
    Best Answers:
    0
    Hey, how can i add red crossed (this - [​IMG]) after use rune?
    TFS 1.3
     
    Last edited: Aug 12, 2017
  2. WibbenZ

    WibbenZ Support Team Support Team Premium User

    Joined:
    Oct 16, 2008
    Messages:
    5,472
    Likes Received:
    916
    Best Answers:
    148
    Code (Lua):
    1. local condition = Condition(CONDITION_INFIGHT)
    2. condition:setParameter(CONDITION_PARAM_TICKS, time)
    3.  
    4. player:addCondition(condition)
    You can change time to how long it should stay.
    And this is the function to get the config value
    Code (Lua):
    1. configManager.getNumber(configKeys.PZ_LOCKED)
     
    dunno321 likes this.
  3. dunno321

    dunno321 New Member

    Joined:
    Aug 2, 2017
    Messages:
    17
    Likes Received:
    3
    Best Answers:
    0
    Sooo, i dont understand :/
    For example: for this rune (fire bomb) how to do this? Can you add this for this rune?
    Code (Text):
    1.  
    2. local combat = Combat()
    3. combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)
    4. combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_FIRE)
    5. combat:setParameter(COMBAT_PARAM_CREATEITEM, ITEM_FIREFIELD_PVP_FULL)
    6. combat:setArea(createCombatArea(AREA_SQUARE1X1))
    7.  
    8. function onCastSpell(creature, variant, isHotkey)
    9.    return combat:execute(creature, variant)
    10. end
     
  4. Thexamx

    Thexamx worst coder

    Joined:
    Sep 7, 2015
    Messages:
    1,179
    Likes Received:
    285
    Best Answers:
    21
    Code (Text):
    1.  
    2. local condition = Condition(CONDITION_INFIGHT)
    3. condition:setParameter(CONDITION_PARAM_TICKS, 25000)
    4.  
    5. local combat = Combat()
    6. combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)
    7. combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_FIRE)
    8. combat:setParameter(COMBAT_PARAM_CREATEITEM, ITEM_FIREFIELD_PVP_FULL)
    9. combat:setArea(createCombatArea(AREA_SQUARE1X1))
    10.  
    11. combat:setCondition(condition)
    12.  
    13. function onCastSpell(creature, variant, isHotkey)
    14.    return combat:execute(creature, variant)
    15. end
     
    dunno321 likes this.
  5. dunno321

    dunno321 New Member

    Joined:
    Aug 2, 2017
    Messages:
    17
    Likes Received:
    3
    Best Answers:
    0
    Works, but this give a white crosses([​IMG]), i need red :p
     
  6. WibbenZ

    WibbenZ Support Team Support Team Premium User

    Joined:
    Oct 16, 2008
    Messages:
    5,472
    Likes Received:
    916
    Best Answers:
    148
    Ups, give this a try;
    Code (Lua):
    1. local condition = Condition(CONDITION_INFIGHT, CONDITIONID_DEFAULT)
    2. condition:setParameter(CONDITION_PARAM_TICKS, 25000)
    3.  
    4. local combat = Combat()
    5. combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)
    6. combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_FIRE)
    7. combat:setParameter(COMBAT_PARAM_CREATEITEM, ITEM_FIREFIELD_PVP_FULL)
    8. combat:setArea(createCombatArea(AREA_SQUARE1X1))
    9.  
    10. combat:setCondition(condition)
    11.  
    12. function onCastSpell(creature, variant, isHotkey)
    13.     return combat:execute(creature, variant)
    14. end
     
    dunno321 likes this.
  7. Static_

    Static_ Premium User Premium User

    Joined:
    Feb 14, 2015
    Messages:
    2,955
    Likes Received:
    1,243
    Best Answers:
    170
    param agressive
    set to true
     
    dunno321 likes this.
  8. dunno321

    dunno321 New Member

    Joined:
    Aug 2, 2017
    Messages:
    17
    Likes Received:
    3
    Best Answers:
    0
    Still not working :/
     
  9. Static_

    Static_ Premium User Premium User

    Joined:
    Feb 14, 2015
    Messages:
    2,955
    Likes Received:
    1,243
    Best Answers:
    170
    can't see any way to do this without a source edit then, to set a player to be pz locked (without your rune actually hitting a player)
     
    dunno321 likes this.
  10. dunno321

    dunno321 New Member

    Joined:
    Aug 2, 2017
    Messages:
    17
    Likes Received:
    3
    Best Answers:
    0
    Where? ;p
     
  11. Sarah Wesker

    Sarah Wesker SRH Momentum

    Joined:
    Mar 16, 2017
    Messages:
    48
    Likes Received:
    18
    Best Answers:
    3
    Code (Lua):
    1. -- for example:
    2. local condition = Condition(CONDITION_INFIGHT, CONDITIONID_COMBAT)
     

Share This Page

Loading...