Signup Now
Results 1 to 9 of 9
  1. #1
    Free User
    Join Date
    Mar 2016
    Posts
    35
    Reputation
    10
    Rep Power
    0

    [Duplicate] Not using spell defined by scripter

    1. What OS you are at?

    Windows 10


    2. Real PC or VPS?

    Notebook


    3. Using WindAddons? Which version?

    No


    4. Which version of WindBot?

    beta.34


    5. Which version of Game Client?

    11.03.4221


    6. Do you have a Dedicated Graphics Card?

    No


    7. Detailed description of the problem.

    The Script set the spells to be used in the following code:

    Code:
    if $targeting and $attacked.id ~= 0 then
    	if  maround(10, unpack(monsters)) >= sdAmount and getuseroption('UseSD') and itemcount("sudden death rune") > 0 then
    		if $attacked.name == "Behemoth" then
    			useoncreature('sudden death rune', $attacked.id) 
    			wait(300)
    		end
    	elseif cooleddown('attack') then
    	    local besttile = getarearunetile(not pvp, unpack(monsters))
    	    
    	    if besttile.amount >= gfbAmount and getuseroption('UseAVA') and ((paround(10) == 0 and pvp and  $timems - $playerlastseen > 6000) or not pvp) and $hppc > 50 and itemcount("avalanche rune") > 0 then 
    			pausewalking(500)
    	        useitemon('avalanche rune', 0, besttile.tile)
    			wait(100,200)
    	    elseif cancastspell('exori gran '..strikeType, $attacked)  and getuseroption('usespells') and $attacked.name == "Behemoth" and $attacked.hppc > 15 then
    	        cast('exori gran '..strikeType) 
    			wait(100,200)
    	    elseif cancastspell('exori frigo', $attacked) and $attacked.name == "Behemoth" then
    	        cast('exori frigo')
    			wait(100,200)
    	    end
    	end
    end
    But when it has only 1 monster, it doesn't use the 'exori frigo' spell. It uses avalanches correctly on 2+ monsters though.


    8. If applicable, a GIF of the action hosted on imgur.com.

    9. Debug Log.

    10. Comments.

    Not using 'gran' strikes, only avalanche, SD, and exori frigo

  2. #2
    Wind Tester
    Join Date
    Dec 2013
    Location
    Warsaw, Poland
    Posts
    2,569
    Reputation
    149
    Rep Power
    27
    Thats because $attacked.name returns behemoth, not Behemoth. This is kind of bug (lucas knows about it), but script is also wrong. You should use
    if $attacked.name:lower() == "behemoth" then
    then it doesnt matter if $attacked.name is uppercase or lowercase.

  3. #3
    Free User
    Join Date
    Mar 2016
    Posts
    35
    Reputation
    10
    Rep Power
    0
    Actually, it seems that it is not using spells when is 1 monster only.
    The following code isn't attacking solo monsters also

    if (cooldown("exori gran") > 200 or $mp < 300) and cooldown("exori") > 0 and cooldown("exori min") < 1000 then
    local Direction = Min()
    if (Direction ~= nil) and $standtime > 400 and $self.dir ~= Direction then
    turn(Direction)
    wait(50)
    end
    end

    local ActualHp = ((creatureinfo($attacked.name).hp)*($attacked.hppc/100))

    if cooldown(SPELL_GROUP_ATTACK) == 0 then
    local GIcoMax = ((skill*attack2*0.14 + 34 + $level/5)*((creatureinfo($attacked.name).physicalmod)/100))
    if $attacked.dist <= 1 and table.find({"Deepling Guard", "Deepling Warrior", "Deepling Spellsinger", "Mooh'Tah Warrior", "Moohtant", "Worm Priestess"}, $attacked.name) and cancastspell("exori gran ico") and getuseroption("granico") and ((maround(3, "Deepling Guard", "Deepling Warrior", "Deepling Spellsinger", "Mooh'Tah Warrior", "Moohtant", "Worm Priestess") <= 2 and getuseroption("single")) or (maround(3, "Deepling Guard", "Deepling Warrior", "Deepling Spellsinger", "Mooh'Tah Warrior", "Moohtant", "Worm Priestess") <= 1 and (not getuseroption("single")))) and (ActualHp >= 330 and ActualHp <= GIcoMax) then
    cast("exori gran ico")
    wait(400)
    elseif ($targeting) or $standtime > 3400 then
    if $standtime > 400 and maroundspell("1x1", "any", unpack(MonstersToConsider)) >= getuseroption("exorigranamount") and getuseroption("ExoriGran") and cooldown("exori gran") == 0 and $mp >= 340 and ((paround(10, true) == 0) or not PvP_Server) then
    cast("exori gran")
    wait(300)
    end
    if $standtime > 400 and maroundspell("1x1", "any", unpack(MonstersToConsider)) >= getuseroption("exoriamount") and getuseroption("Exori") and cooldown("exori") == 0 and $mp >= 120 and cancast("exori") and ((paround(10, true) == 0) or not pvp) then
    cast("exori")
    wait(300)
    end
    if $standtime > 400 and getuseroption("exorimin") and maroundspell("front", $self.dir, "Deepling Guard", "Deepling Warrior", "Deepling Spellsinger") >= 2 and cooldown("exori min") == 0 and $mp >= 120 and cancast("exori min") and ((paround(10, true) == 0) or not pvp)then
    cast("exori min")
    wait(300)
    end
    if maround(1, unpack(MonstersToConsider)) >= getuseroption("exoriicoamount") and getuseroption("ExoriIco") and cooldown("exori ico") == 0 and $mp >= 20 and $attacked.id ~= 0 and $attacked.dist <= 1 and maround(1, unpack(MonstersToConsider)) < 3 then
    cast("exori ico")
    wait(300)
    end
    if maround(4, unpack(MonstersToConsider)) >= getuseroption("exorihuramount") and getuseroption("ExoriHur") and cooldown("exori hur") == 0 and $mp >= 40 and $attacked.id ~= 0 and (maround(1, unpack(MonstersToConsider)) < 3 or $attacked.dist > 1) then
    cast("exori hur")
    wait(300)
    end
    else
    if maround(1, unpack(MonstersToConsider)) >= getuseroption("exoriicoamount") and getuseroption("ExoriIco") and getuseroption("exoriicoamount") and cooldown("exori ico") == 0 and $mp >= 20 and $attacked.id ~= 0 and $attacked.dist <= 1 and maround(1, unpack(MonstersToConsider)) < 3 then
    cast("exori ico")
    wait(300)
    end
    if maround(4, unpack(MonstersToConsider)) >= getuseroption("exorihuramount") and getuseroption("ExoriHur") and getuseroption("exorihuramount") and cooldown("exori hur") == 0 and $mp >= 40 and $attacked.id ~= 0 and (maround(1, unpack(MonstersToConsider)) < 3 or $attacked.dist > 1) then
    cast("exori hur")
    wait(300)
    end
    end
    end


    Not using utito tempo also:

    auto(50)

    local amount = 0
    foreach creature m "ms" do
    if table.find(MonstersToUtito, m.name) and m.dist <= 2 and m.hppc >= 50 then
    amount = amount + 1
    end
    end

    if UseUtito and amount >= UAmount and $mppc >= 50 and cooldown("utito tempo") == 0 and $strenghtentime < 500 and ($targeting or $standtime > 1300) then
    cast("utito tempo")
    wait(500)
    end
    Last edited by Imba; 12-19-2016 at 01:38 AM. Reason: lua tags

  4. #4
    Free User
    Join Date
    Mar 2016
    Posts
    35
    Reputation
    10
    Rep Power
    0
    Quote Originally Posted by Imba View Post
    Thats because $attacked.name returns behemoth, not Behemoth. This is kind of bug (lucas knows about it), but script is also wrong. You should use
    if $attacked.name:lower() == "behemoth" then
    then it doesnt matter if $attacked.name is uppercase or lowercase.
    Even though it worked normally on tibia 10?

  5. #5
    Wind Tester
    Join Date
    Dec 2013
    Location
    Warsaw, Poland
    Posts
    2,569
    Reputation
    149
    Rep Power
    27
    Please use lua tags (check your post, i edited it).

    I think you didn't understand what i wrote. Your action doesn't work, because it sucks (garkstal's action, if i am not wrong). $attacked.name in tibia11 returns monster's names in lowercase, this means all letters are small (in Tibia 10 - Behemoth, in Tibia 11 - behemoth).

    You are comparing $attacked.name with Deepling Warrior.... Check monster's names to lowercase and i am pretty sure it will work. Its good practice to use $attacked.name:lower() instead of $attacked.name, as it always returns lowercase name, even if originally its DeePlinG WaRrIoR.

    if $attacked.name ==  'Deepling Warrior' then

    means that IF currently attacked monster names is SAME as Deepling Warrior, then ~ something ~, and in this case $attacked.name equals deepling warrior. As you can see, deepling warrior isnt Deepling Warrior.
    Last edited by Imba; 12-19-2016 at 01:50 AM.

  6. #6
    Free User
    Join Date
    Mar 2016
    Posts
    35
    Reputation
    10
    Rep Power
    0
    Quote Originally Posted by Imba View Post
    Please use lua tags (check your post, i edited it).
    I think you didn't understand what i wrote. Your action doesn't work, because it sucks (garkstal's action, if i am not wrong). $attacked.name in tibia11 returns monster's names in lowercase, this means all letters are small (in Tibia 10 - Behemoth, in Tibia 11 - behemoth).

    You are comparing $attacked.name with Deepling Warrior.... Check monster's names to lowercase and i am pretty sure it will work. Its good practice to use $attacked.name:lower() instead of $attacked.name, as it always returns lowercase name, even if originally its DeePlinG WaRrIoR.
    Gotcha, gonna reply here when I get to test it again later.

    For the lua tags, I was already searching how to do it, thanks again

  7. #7
    Moderator Raphael's Avatar
    Join Date
    Dec 2013
    Location
    raphseller.com
    Posts
    2,437
    Reputation
    309
    Rep Power
    28
    This is a duplicate of WindBot is returning monster names in lowercase. I'm closing it as such.

    Please move all the discussion to the referenced thread.

  8. #8
    Moderator Raphael's Avatar
    Join Date
    Dec 2013
    Location
    raphseller.com
    Posts
    2,437
    Reputation
    309
    Rep Power
    28
    Quote Originally Posted by Imba View Post
    Your action doesn't work, because it sucks (garkstal's action, if i am not wrong).
    It's funny you say that. I just found the same bug on your Terramite's script.

  9. #9
    Wind Tester
    Join Date
    Dec 2013
    Location
    Warsaw, Poland
    Posts
    2,569
    Reputation
    149
    Rep Power
    27
    Quote Originally Posted by Raphael View Post
    It's funny you say that. I just found the same bug on your Terramite's script.
    Huehuehue i know, i found that one yesterday

 

 

Posting Permissions

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