Results 1 to 4 of 4

Thread: Help with boolean values

  1. #1
    Premium User
    Join Date
    Sep 2013
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    10
    Rep Power
    4

    Lightbulb Help with boolean values

    So i have a tricky conflict...
    I want my script to use SD's when there are 2+ Ice witch or spiders.. But not use item on Ice golems.
    Here's what it looks like atm:

    Code:
    if (maround(7, "Ice Witch", "Crystal Spider")>= 2) then
        if (target.name != "Ice Golem") then
            useitemontarget("sudden death rune", target.id)
        end
    end
    Situation is:
    Me attacking Ice golem
    2 Ice witches present

    script is still blasting golems with SD's.. which are immune.. lol

    So which boolean setup should i run?

  2. #2
    iBot User
    Join Date
    May 2012
    Location
    Spain
    Posts
    213
    Mentioned
    12 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    15 Post(s)
    Reputation
    32
    Rep Power
    5
    try this probably it will works not tested

    local SDmonsters = {'Ice Witch', 'Crystal Spider'}
    local MinimumMonsters = 2

    if maround(7, unpack(SDmonsters)) >= MinimumMonsters and target.id ~= 'Ice Golem'
    then
    useitemontarget("sudden death rune", target.id)
    end
    Regards, NWA

  3. #3
    Premium User
    Join Date
    Sep 2013
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    10
    Rep Power
    4
    OK, so i tried what you said. but "target.id" is an integer.. and an integer is never = "ice golem" changed that to "target.name"
    guess the whole problem was to use "!=" instead of "~="
    ?
    It works now anyway, thanks. Only problem left, is that he stops redmark creatures!
    Thanks

  4. #4
    iBot User
    Join Date
    May 2012
    Location
    Spain
    Posts
    213
    Mentioned
    12 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    15 Post(s)
    Reputation
    32
    Rep Power
    5
    Quote Originally Posted by Chundermonger View Post
    OK, so i tried what you said. but "target.id" is an integer.. and an integer is never = "ice golem" changed that to "target.name"
    guess the whole problem was to use "!=" instead of "~="
    ?
    It works now anyway, thanks. Only problem left, is that he stops redmark creatures!
    Thanks
    yep sorry was misstake, I dont understand your problem now but may it solves it, anyway i dont know why u need this action is better a spellchanger..

    local SDmonsters = {'Ice Witch', 'Crystal Spider'}
    local MinimumMonsters = 2
    if target.id ~= 0
    then
    while maround(7, unpack(SDmonsters)) >= MinimumMonsters and target.name ~= 'ice golem' and target.hppc > 0
    do
    useitemontarget("sudden death rune", target.id)
    end
    end


    Regards,
    Last edited by NWA; 10-18-2013 at 05:47 PM.
    Regards, NWA

Tags for this Thread

Posting Permissions

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