Signup Now
Results 1 to 6 of 6
  1. #1
    Free User
    Join Date
    May 2014
    Posts
    25
    Reputation
    10
    Rep Power
    0

    If player on screen - stop strike

    Hello,
    I need a script that changes targeting when theres a player on screen.
    When nobody in screen - attack monster with spell 'fire strike'
    if sb appears on the screen - change spell into 'no spell'

    Regards

  2. #2
    Free User Garkstal's Avatar
    Join Date
    Dec 2013
    Location
    www.garkstalscripts.com
    Posts
    794
    Reputation
    124
    Rep Power
    24
    auto(100)
    if $attacked.id > 0 and $attacked.isshootable and $attacked.dist <= 3 and cancastspell("exori flam") and paround(10) == 0 then
    cast("exori flam")
    wait(100)
    end
    http://i.imgur.com/lkWkIMg.png
    ........................Script Name......................
    Profession
    Asura Palace ED + EK
    Characters for sale! | Like Our Facebook! | Sell Tibia Gold

  3. #3
    Moderator Raphael's Avatar
    Join Date
    Dec 2013
    Location
    raphseller.com
    Posts
    2,437
    Reputation
    309
    Rep Power
    29
    I think it would be more reliable to use targeting and simply enable/disable 'FirstSpell' setting when there is a player around.

    auto(100)

    local spell = tern(paround() == 0, 'Flame Strike', 'None')

    set('Targeting/Creatures/Earth Elementl/Setting1/FirstSpell', spell)
    set('Targeting/Creatures/Wolf/Setting1/FirstSpell', spell)


    Just make sure to get the path to all creatures and settings you want to change.

  4. #4
    Free User Garkstal's Avatar
    Join Date
    Dec 2013
    Location
    www.garkstalscripts.com
    Posts
    794
    Reputation
    124
    Rep Power
    24
    Quote Originally Posted by Raphael View Post
    I think it would be more reliable to use targeting and simply enable/disable 'FirstSpell' setting when there is a player around.

    auto(100)

    local spell = tern(paround() == 0, 'Flame Strike', 'None')

    set('Targeting/Creatures/Earth Elementl/Setting1/FirstSpell', spell)
    set('Targeting/Creatures/Wolf/Setting1/FirstSpell', spell)


    Just make sure to get the path to all creatures and settings you want to change.
    Probably ye but since im making eveyrthing in persistants then I involuntarily made it like that
    http://i.imgur.com/lkWkIMg.png
    ........................Script Name......................
    Profession
    Asura Palace ED + EK
    Characters for sale! | Like Our Facebook! | Sell Tibia Gold

  5. #5
    Moderator Raphael's Avatar
    Join Date
    Dec 2013
    Location
    raphseller.com
    Posts
    2,437
    Reputation
    309
    Rep Power
    29
    Quote Originally Posted by Garkstal View Post
    Probably ye but since im making eveyrthing in persistants then I involuntarily made it like that
    I know the feeling. Scripting is so powerful we feel tempted to do everything with it. =D

  6. #6
    Free User
    Join Date
    Feb 2015
    Posts
    6
    Reputation
    10
    Rep Power
    0
    Quote Originally Posted by Raphael View Post
    I think it would be more reliable to use targeting and simply enable/disable 'FirstSpell' setting when there is a player around.

    auto(100)

    local spell = tern(paround() == 0, 'Flame Strike', 'None')

    set('Targeting/Creatures/Earth Elementl/Setting1/FirstSpell', spell)
    set('Targeting/Creatures/Wolf/Setting1/FirstSpell', spell)


    Just make sure to get the path to all creatures and settings you want to change.
    I didn't understand very well...

    If I activate exactly like this, it will set the first spell attack against Earth Elemental if there is no players on screen, right?

    And if there is a player on screen, what spell it will use? I have to add a second spell then?

    Grateful since now.

    Dankk.

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •