Signup Now
Results 1 to 6 of 6
  1. #1
    Free User
    Join Date
    Dec 2013
    Posts
    54
    Reputation
    10
    Rep Power
    21

    Pvp safe area attacks

    How can I make this script pvp safe? is there anyone willing to help me please

    Code:
    init start
    	local uemonsters = {"Quara Mantassin Scout", "Quara Constrictor Scout", "Quara Predator Scout", "Quara Pincher Scout", "Rot Elemental", "Quara Hydromancer Scout", "Blood Beast", "Devourer"}
    
    	local monsters = {
    		["Quara Mantassin Scout"] = 	{ms = "vis", ed = "tera", gran = 100},
    		["Quara Constrictor Scout"] = 	{ms = "vis", ed = "tera", gran = 80},
    		["Quara Predator Scout"] =	 	{ms = "vis", ed = "tera", gran = 40, ue = true},
    		["Glooth Blob"] = 				{ms = "vis", ed = "frigo", gran = 40},
    		["Quara Pincher Scout"] = 		{ms = "vis", ed = "tera", gran = 46, ue = true},
    		["Rot Elemental"] = 			{ms = "vis", ed = "frigo", gran = 40},
    		["Quara Hydromancer Scout"] = 	{ms = "vis", ed = "tera", gran = 30, ue = true},
    		["Blood Beast"] = 				{ms = "vis", ed = "frigo", gran = 22, ue = true},
    		["Devourer"] = 					{ms = "vis", ed = "frigo", gran = 19, ue = true},
    	}
    	
    	local function killablemonsters(uespell, avgdmg)
    		local killablemonsters = 0
    		local maxhealth = getuseroption('HealthToUE')
    
    		foreach creature c "f" do
    			if isonspellarea(c, uespell, false) then
    				local m = monsters[c.name]
    				if m and m.ue and c.hppc <= maxhealth then	
    					killablemonsters = killablemonsters + 1
    				end
    			end
    		end
    		return killablemonsters
    	end
    init end
    
    auto(400)
    local uespell = spellinfo(getuseroption("UEName"))
    local UseUE = getuseroption("UseUE")
    local MonstersToUE = getuseroption("MonstersToUE")
    local MonstersToAreaRune = getuseroption("MonstersToAreaRune")
    local voc = getuseroption("Vocation") == "Druid" and "ed" or "ms"
    local UseStrongStrike = getuseroption("UseStrongStrike")
    local FinishableMonsters = getuseroption("FinishableMonsters")
    
    if cooleddown("attack") then
    	if $attacked.id > 0 then
    		local m = monsters[$attacked.name]
    		if m then
    			if maround(6, unpack(uemonsters)) >= 5 then
    				if UseUE and $targeting and cancastspell(uespell) and ((maroundspell(uespell, unpack(uemonsters)) >= MonstersToUE and maround(7, unpack(uemonsters)) <= maroundspell(uespell, unpack(uemonsters)) + 5) or killablemonsters(uespell) >= FinishableMonsters) then
    					cast(uespell.words)
    				else
    					local tile = getarearunetile(true, unpack(MONSTERS))
    					useitemon(itemid("thunderstorm rune"), topitem(tile.x,tile.y,tile.z), tile.tile)
    				end
    			else
    				local tile = getarearunetile(true, unpack(MONSTERS))
    				if UseUE and $targeting and cancastspell(uespell) and ((maroundspell(uespell, unpack(uemonsters)) >= MonstersToUE and maround(7, unpack(uemonsters)) <= maroundspell(uespell, unpack(uemonsters)) + 5) or killablemonsters(uespell) >= FinishableMonsters) then
    					cast(uespell.words)
    				elseif tile.amount >= MonstersToAreaRune then
    					useitemon(itemid("thunderstorm rune"), topitem(tile.x,tile.y,tile.z), tile.tile)
    				elseif $attacked.dist <= 3 then
    					if UseStrongStrike and $attacked.hppc >= m.gran and cancastspell("exori gran " .. m[voc]) then
    						cast("exori gran " .. m[voc])
    					else
    						cast("exori vis")
    					end
    				end
    			end
    		else
    			cast("exori vis")
    		end
    	elseif getuseroption("LureAreaRune") and $wptsection == "Hunt" and targetstate() ~= "none" then
    		local tile = getarearunetile(true, unpack(MONSTERS))
    		if tile.amount >= MonstersToAreaRune then
    			shootarearune(tile)
    		end
    	end
    end

  2. #2
    Free User
    Join Date
    Dec 2013
    Posts
    54
    Reputation
    10
    Rep Power
    21
    bumpp

  3. #3

  4. #4
    Free User
    Join Date
    Dec 2013
    Posts
    54
    Reputation
    10
    Rep Power
    21
    Quote Originally Posted by Cisco View Post
    Want this exact script cause it's working really good using all spells, the area runes and exori vis.

    Just thought if there was anyone good enough just to edit in a player check in the script.

  5. #5
    Free User
    Join Date
    Dec 2013
    Posts
    54
    Reputation
    10
    Rep Power
    21
    bumppp

  6. #6
    Free User Cisco's Avatar
    Join Date
    Aug 2014
    Location
    Brazil
    Posts
    1,424
    Reputation
    119
    Rep Power
    23
    Quote Originally Posted by Filleman View Post
    bumppp
    test, will only cast area spells if there is no player on the screen.

    init start
    local uemonsters = {"Quara Mantassin Scout", "Quara Constrictor Scout", "Quara Predator Scout", "Quara Pincher Scout", "Rot Elemental", "Quara Hydromancer Scout", "Blood Beast", "Devourer"}

    local monsters = {
    ["Quara Mantassin Scout"] = {ms = "vis", ed = "tera", gran = 100},
    ["Quara Constrictor Scout"] = {ms = "vis", ed = "tera", gran = 80},
    ["Quara Predator Scout"] = {ms = "vis", ed = "tera", gran = 40, ue = true},
    ["Glooth Blob"] = {ms = "vis", ed = "frigo", gran = 40},
    ["Quara Pincher Scout"] = {ms = "vis", ed = "tera", gran = 46, ue = true},
    ["Rot Elemental"] = {ms = "vis", ed = "frigo", gran = 40},
    ["Quara Hydromancer Scout"] = {ms = "vis", ed = "tera", gran = 30, ue = true},
    ["Blood Beast"] = {ms = "vis", ed = "frigo", gran = 22, ue = true},
    ["Devourer"] = {ms = "vis", ed = "frigo", gran = 19, ue = true},
    }

    local function killablemonsters(uespell, avgdmg)
    local killablemonsters = 0
    local maxhealth = getuseroption('HealthToUE')

    foreach creature c "f" do
    if isonspellarea(c, uespell, false) then
    local m = monsters[c.name]
    if m and m.ue and c.hppc <= maxhealth then
    killablemonsters = killablemonsters + 1
    end
    end
    end
    return killablemonsters
    end
    init end

    auto(400)
    local uespell = spellinfo(getuseroption("UEName"))
    local UseUE = getuseroption("UseUE")
    local MonstersToUE = getuseroption("MonstersToUE")
    local MonstersToAreaRune = getuseroption("MonstersToAreaRune")
    local voc = getuseroption("Vocation") == "Druid" and "ed" or "ms"
    local UseStrongStrike = getuseroption("UseStrongStrike")
    local FinishableMonsters = getuseroption("FinishableMonsters")
    local PvpSafe = true

    if cooleddown("attack") then
    if $attacked.id > 0 then
    local m = monsters[$attacked.name]
    if m then
    if maround(6, unpack(uemonsters)) >= 5 and (not PvpSafe or PvpSafe and paroundreachable(10) == 0) then
    if UseUE and $targeting and cancastspell(uespell) and ((maroundspell(uespell, unpack(uemonsters)) >= MonstersToUE and maround(7, unpack(uemonsters)) <= maroundspell(uespell, unpack(uemonsters)) + 5) or killablemonsters(uespell) >= FinishableMonsters) then
    cast(uespell.words)
    else
    local tile = getarearunetile(true, unpack(MONSTERS))
    useitemon(itemid("thunderstorm rune"), topitem(tile.x,tile.y,tile.z), tile.tile)
    end
    else
    local tile = getarearunetile(true, unpack(MONSTERS))
    if UseUE and $targeting and cancastspell(uespell) and ((maroundspell(uespell, unpack(uemonsters)) >= MonstersToUE and maround(7, unpack(uemonsters)) <= maroundspell(uespell, unpack(uemonsters)) + 5) or killablemonsters(uespell) >= FinishableMonsters) and (not PvpSafe or PvpSafe and paroundreachable(10) == 0) then
    cast(uespell.words)
    elseif tile.amount >= MonstersToAreaRune and (not PvpSafe or PvpSafe and paroundreachable(10) == 0) then
    useitemon(itemid("thunderstorm rune"), topitem(tile.x,tile.y,tile.z), tile.tile)
    elseif $attacked.dist <= 3 then
    if UseStrongStrike and $attacked.hppc >= m.gran and cancastspell("exori gran " .. m[voc]) then
    cast("exori gran " .. m[voc])
    else
    cast("exori vis")
    end
    end
    end
    else
    cast("exori vis")
    end
    elseif getuseroption("LureAreaRune") and $wptsection == "Hunt" and targetstate() ~= "none" then
    local tile = getarearunetile(true, unpack(MONSTERS))
    if tile.amount >= MonstersToAreaRune and (not PvpSafe or PvpSafe and paroundreachable(10) == 0) then
    shootarearune(tile)
    end
    end
    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
  •