Page 5 of 6

Re: DoD First Boss spam solo and party, full DoD now too

Posted: Mon Nov 12, 2012 3:16 pm
by mrphil
Erm, may I know what to replace the 'Char1', 'Char2', 'Char3', and 'Char4'? What does it mean by 'player.Name' and 'joinname' ? I'm sorry, I'm new to this.

Code: Select all

	if DOD_SOLO then
		if player.Name == "Char1" then
			joinname = "Char2"
		elseif player.Name == "Char3" then
			joinname = "Char4"
		else
			error("No party match!",0)
Every time I tried to put my char name and my another char name, I got this error,

Code: Select all

scripts\rom\bot.lua:505: onLoad error: No party match!

Re: DoD First Boss spam solo and party, full DoD now too

Posted: Mon Nov 12, 2012 6:52 pm
by kuripot
mrphil wrote:Erm, may I know what to replace the 'Char1', 'Char2', 'Char3', and 'Char4'? What does it mean by 'player.Name' and 'joinname' ? I'm sorry, I'm new to this.

Code: Select all

	if DOD_SOLO then
		if player.Name == "Char1" then
			joinname = "Char2"
		elseif player.Name == "Char3" then
			joinname = "Char4"
		else
			error("No party match!",0)
Every time I tried to put my char name and my another char name, I got this error,

Code: Select all

scripts\rom\bot.lua:505: onLoad error: No party match!


only this for the follower

Code: Select all

<?xml version="1.0" encoding="utf-8"?><waypoints>
<onLoad><![CDATA[

	DOD_PARTY_LEADER = "Aaaaaa"
and for the leader

Code: Select all

<?xml version="1.0" encoding="utf-8"?><waypoints>
<onLoad><![CDATA[

	DOD_PARTY_MEMBERS = {"Bbbbb","Ccccc","Ddddd"}

Re: DoD First Boss spam solo and party, full DoD now too

Posted: Mon Nov 12, 2012 11:39 pm
by mrphil
What I meant is, I wanna do a solo run. But I don't know what to put in Char1,2,3,4. I'm not sure what is 'player.Name' and 'joinname'. Everytime I get this error,

Code: Select all

scripts\rom\bot.lua:505: onLoad error: No party match!

Re: DoD First Boss spam solo and party, full DoD now too

Posted: Mon Nov 19, 2012 5:03 pm
by AngelDrago
how can i use this script do do it solo only the first Boss for now... i tried some of the suggestion but with no luck...thx

Re: DoD First Boss spam solo and party, full DoD now too

Posted: Mon Nov 19, 2012 7:11 pm
by kuripot
did you try "dodsolotele" on 1st page

Re: DoD First Boss spam solo and party, full DoD now too

Posted: Sun Nov 25, 2012 4:59 am
by Cindy
So I tried this, and having some major issues (DOD_Full leader and follower):
Party: OP R/S, newbie Druid healer (63/58)


1. Gate at 3rd boss
druid went ahead, locked rogue out, and died at boss. I restarted the instance manually, same thing happened the second time. Follower gets ahead of leader, should not do that.

2. Upon resurrect, druid came in and stopped at first boss room, waiting for leader. Leader meanwhile killed 3rd boss, and was waiting for follower at 3rd. Classic circular lock. This one is tricky, they all need to be entering the room at the same time else they get locked out. IF this is not possible, at least leader has to have a chance to get in first.

3. Rat room near last boss. Gate goes up, won't come down until barrels/rats are killed. Neither leader or follower tried that, just banged heads against the gate until bot logged out due to 10 times being stuck.

4. Druid does not heal!!!. Tried to fight, and failed epicly with its limited arsenal. Need a way to give assignments to followers. "tank healer", "restoftheplayers healer" "dps" "sitthereanddonothingwhilethebigboysfight". Side note, I need a good example of druid skills setup, mine is rudimentary, and seemingly not efficient.

5. I also noticed that when I restarted, follower mounted up and rode back, leader tried to walk back the whole way.

6. A question, how can one set up priest/druid or anyone else who can remove the fear at second boss?

EDIT:
7. Getting a lot of "Clearing target." stuck situation on follower

Edit2:

8. Need some smart rolling logic .. ex, if level 55-60 then if gear is OD and applicable to any of the primary,secondary or tertiary classes then roll on it, otherwise pass. I could do the logic probably, just dont know how to programatically click the roll/pass buttons.

Re: DoD First Boss spam solo and party, full DoD now too

Posted: Sun Nov 25, 2012 5:22 am
by Ego95
Is there a way to target the party leader? Or the member which has got aggro? For dod solo mode i've got a code to leave group if the second boss fears you. At the moment I level up a healer for the dod party bot. What I want is to do a Cleanse on my main Char is he gets feared.

An other question: Which level do my chars need to not get aggro of the trash mobs? If I run with my lvl 58 rogue I use hide between the bosses :D

Re: DoD First Boss spam solo and party, full DoD now too

Posted: Sun Nov 25, 2012 7:07 am
by lisa
AlterEgo95 wrote:Is there a way to target the party leader? Or the member which has got aggro?
For healer or DPS?

if DPS easy as, just get it to do a target of target check.

If healer then you are probably better off just checking party for the specific buff/debuff as opposed to checking what the hostile mob is targeting.

Re: DoD First Boss spam solo and party, full DoD now too

Posted: Sun Nov 25, 2012 4:15 pm
by Ego95
lisa wrote:
AlterEgo95 wrote:Is there a way to target the party leader? Or the member which has got aggro?
For healer or DPS?

if DPS easy as, just get it to do a target of target check.

If healer then you are probably better off just checking party for the specific buff/debuff as opposed to checking what the hostile mob is targeting.
For my little healer. My little dwarf should heal the party and if my main char gets a specific debuff he should use a "cleanse" on him.

Re: DoD First Boss spam solo and party, full DoD now too

Posted: Sun Nov 25, 2012 6:50 pm
by lisa
I don't recall there being any code in the bot to deal with cleansing so you will probably need to add in some code for it.

Probably something in the onpreskillcast, if you know the id or name of the curse then it should be easy enough, you could probably just make up a specific function for the instance as party healer and do a check in the loop for the curse/debuff and cleanse it as needed.

Re: DoD First Boss spam solo and party, full DoD now too

Posted: Mon Nov 26, 2012 8:31 pm
by Cindy
How do you make one of followers act as party healer? (ie they are running the DOD_(Full_)Follower script)

Re: DoD First Boss spam solo and party, full DoD now too

Posted: Wed Nov 28, 2012 5:46 am
by kuripot
i try this.. self heal in my alt..

Code: Select all

	<waypoint x="2204" z="2510" y="401" tag="okander">
		__WPL:setForcedWaypointType("NORMAL")
		changeProfileOption("LOOT_PAUSE_AFTER", 2)
		changeProfileOption("LOOT_ALL",true)
		changeProfileOption("LOOT",true)
		if CountObjectsNearPoint("Okander") > 0 then
			if not player.Battling then
				yrest(250)
			end
			__WPL:setWaypointIndex(__WPL:findWaypointTag("okander"))
		else
			__WPL:setWaypointIndex(__WPL:findWaypointTag("out"))
			repeat
				yrest(500*math.random(4))
				local okander = player:findNearestNameOrId("Okander")
				if not okander then break end
				keyboardPress( key.VK_F1 );
				yrest(500)
				keyboardPress( key.VK_0 );
				player:target(okander)
				player:update()
				player:loot()
			until inventory:itemTotalCount("Ancient Memento") > mentos
		end
	</waypoint>
which urgent heal place in action bar 0

Re: DoD First Boss spam solo and party, full DoD now too

Posted: Thu Nov 29, 2012 5:43 am
by Ego95
lisa wrote:I don't recall there being any code in the bot to deal with cleansing so you will probably need to add in some code for it.

Probably something in the onpreskillcast, if you know the id or name of the curse then it should be easy enough, you could probably just make up a specific function for the instance as party healer and do a check in the loop for the curse/debuff and cleanse it as needed.
This is what I tried a few weeks ago

Code: Select all

	function MainCharFear()
		if player.name = "Myhealer" then -- only use this code with my healer
			if player:findNearestNameOrId(103170); -- second boss in dod
				local target = RoMScript(TargetUnit("party1"))
				target:updateBuffs()
				if target:hasDebuff("Gedankenkontrolle") then
					player:cast("PRIEST_CLEANSE")
				end
			end
		end
	end
and to start the function I used

Code: Select all

	function settings.profile.events.onSkillCast()
		MainCharFear()
	end
But the first error seems to be in the

Code: Select all

if player.name = "Myhealer" then
.

What's wrong here? And would the other stuff work?

Re: DoD First Boss spam solo and party, full DoD now too

Posted: Thu Nov 29, 2012 5:52 am
by lisa
AlterEgo95 wrote:if player.name = "Myhealer" then
should be Name

Code: Select all

player.Name
As always things need to be exact or they won't work.

Re: DoD First Boss spam solo and party, full DoD now too

Posted: Thu Nov 29, 2012 8:35 am
by rock5
AlterEgo95 wrote:if player.name = "Myhealer" then
And of course it needs to be a double equals "==". 1 equal means 'assign a value'. 2 equals means 'is equal to'.

Code: Select all

if player.Name == "Myhealer" then

Re: DoD First Boss spam solo and party, full DoD now too

Posted: Thu Jan 10, 2013 11:22 am
by Ego95
Hi
I was not able to bot dod for some time so now I started again. The code I tried should work normally, but it doesn't. Everything seems so be ok but now he gets a problem with targeting my main char:

Code: Select all

5:14pm - ...ns Rom Bot/micromacro/scripts/rc3/classes/player.lua:965: onSkillCas
t error: [string "..."]:106: attempt to call global 'TargetUnit' (a nil value)

Code: Select all

	function settings.profile.events.onSkillCast()
		if player.Name == "MyHealer" then
			if player:findNearestNameOrId(103170) then
				local target = RoMScript(TargetUnit("party1"))
				target:updateBuffs()
				if target:hasDebuff("Gedankenkontrolle") then
					player:cast("PRIEST_CLEANSE")
				end
			end
		end
	end
/script TargetUnit("party1") in the ingame chat works fine

The other solution I thought about was

Code: Select all

				local target = player:findNearestNameOrId("MainCharName")
				player:target(target.Address)
				target:updateBuffs()
but it seems like my healer doesn't target my main and then gets

Code: Select all

attempt to call method 'updateBuffs' (a nil value)
because he doesn't has a target.

Anything else I can do?


P.S.: While compared this code with other RoMScript codes I saw, that there have to be two brackets

Code: Select all

RoMScript("TargetUnit("party1")")
With my function posted above the healer will do the run until he reaches the second boss and then gets the error message, but if I use the version with the extra brackets it errors when loading the waypoint.


AlterEgo95

Re: DoD First Boss spam solo and party, full DoD now too

Posted: Thu Jan 10, 2013 2:33 pm
by rock5
AlterEgo95 wrote: attempt to call global 'TargetUnit' (a nil value)
The RoMScript should be

Code: Select all

local target = RoMScript("TargetUnit(\"party1\")")
That's the way I like to deal with double sets of quotes. Another, and probably easier, way is

Code: Select all

local target = RoMScript('TargetUnit("party1")')
AlterEgo95 wrote:attempt to call method 'updateBuffs' (a nil value)
findNearestNameOrId returns a object not a pawn. So you would have to change it to a pawn first before checking it's buffs. eg.

Code: Select all

            local target = player:findNearestNameOrId("MainCharName")
            if target then
                target = CPawn(target.Address)
                player:target(target.Address)
                target:updateBuffs()
                -- etc.
            end

Re: DoD First Boss spam solo and party, full DoD now too

Posted: Fri Jan 11, 2013 9:24 am
by Ego95
Thanks.

Code: Select all

local target = RoMScript("TargetUnit(\"party1\")")
the ordner of the \ and the " looked a bit strange. But with this code he runs to the second boss and error with

Code: Select all

attempt to index local 'target' (a nil value)
After that I tried the same with an other order because I was not sure if you made a spell mistake:

Code: Select all

RoMScript("TargetUnit(\"party1"\)")
and

Code: Select all

RoMScript("TargetUnit("\party1\")")
Those two get the normal onLoad error.

Also tried

Code: Select all

local target = RoMScript('TargetUnit("party1")')
but this errors with the error message postet at top.

I don't have any further ideas how to get this working :(
Anyway thanks.

AlterEgo95

Re: DoD First Boss spam solo and party, full DoD now too

Posted: Fri Jan 11, 2013 9:49 am
by rock5
What '\' does is escape a special character. If you just do double quotes it get interpreted as
local target = RoMScript("TargetUnit(" party1 ")")
where the bold bits are seen as a string and party1 is seen as a variable. This is a syntax error. To send just 1 big string, you have to escape the inner quotes. You do this by putting a \ before it.
local target = RoMScript("TargetUnit(\"party1\")")
What this means is the inner quotes have their special meaning removed and are just sent as a string character ". So this is what is received in the game

Code: Select all

TargetUnit("party1")
AlterEgo95 wrote:attempt to index local 'target' (a nil value)
What this means is you tried to treat 'target' as a table by indexing it, eg. target.somevariable, but it was in fact nil. It would be nil if a target wasn't found. That is why I added that check to see in target exists first before continuing with targeting. eg.

Code: Select all

local target = RoMScript("TargetUnit(\"party1\")")
if target then
    etc.

Re: DoD First Boss spam solo and party, full DoD now too

Posted: Fri Jan 11, 2013 10:15 am
by Ego95
Lol thanks, this works so far I think

Code: Select all

	function settings.profile.events.onSkillCast()
		if player.Name == "MyHealer" then
			if player:findNearestNameOrId(103170) then
				local target = RoMScript("TargetUnit(\"party1\")")
				if target then 
					target:updateBuffs()
					if target:hasDebuff("Gedankenkontrolle") then
						player:cast("PRIEST_CLEANSE")
					end
				end
			end
		end
	end
I'm going to test it a few runs this evening :)

AlterEgo95