Results 1 to 7 of 7

Thread: if player on screen cast spell

  1. #1
    Normal User
    Join Date
    Jul 2012
    Posts
    10
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    10
    Rep Power
    5

    if player on screen cast spell

    i want an action that if player on screen cast spell on monster.
    thx.

  2. #2
    iScripter Eli's Avatar
    Join Date
    Mar 2012
    Posts
    3,764
    Mentioned
    492 Post(s)
    Tagged
    2 Thread(s)
    Quoted
    956 Post(s)
    Reputation
    586
    Rep Power
    10
    PHP Code:
    if (target.id ~= 0) and (target.isshootable) and (target.dist <= 4) and cancast('exori hur') and (paround(7) > 0then
         wait
    (90,150)
    cast("exori hur")
    end

    if (target.id ~= 0) and (target.isshootable) and (target.dist <= 2) and cancast('exori ico') and (paround(7) > 0then
         wait
    (90,150)
    cast("exori ico"

  3. #3
    Normal User
    Join Date
    Jul 2012
    Posts
    10
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    10
    Rep Power
    5
    thx you bro ;D

  4. #4
    Premium User
    Join Date
    Sep 2012
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    10
    Rep Power
    5
    in "target.id ~= 0" I need to change for the monster id? where i find this id?

  5. #5
    Normal User
    Join Date
    Jun 2012
    Location
    Sweden
    Posts
    1,671
    Mentioned
    18 Post(s)
    Tagged
    1 Thread(s)
    Quoted
    8 Post(s)
    Reputation
    132
    Rep Power
    9
    No you dont, target.id ~= 0 means if target.id equals anything but zero then, that means you've got a target.
    In this case, it will cast the spell on any monster.

  6. #6
    iScripter Eli's Avatar
    Join Date
    Mar 2012
    Posts
    3,764
    Mentioned
    492 Post(s)
    Tagged
    2 Thread(s)
    Quoted
    956 Post(s)
    Reputation
    586
    Rep Power
    10
    If you wanna attack specific group of monsters add variable target.name

  7. #7
    Premium User
    Join Date
    Sep 2012
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    10
    Rep Power
    5
    now is working, was missing an "end"

Posting Permissions

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