Page 1 of 1

Druid spell - Shield of Light. How to use?

Posted: Sun Jan 29, 2012 7:52 pm
by Edamh
I'd like the bot to be able to use the druid spell "Shield of Light" but I am unsure how to do so since the spell needs an area to be targeted.

Any ideas?

Re: Druid spell - Shield of Light. How to use?

Posted: Mon Jan 30, 2012 4:32 am
by rock5
No "target area" spells are supported by the bot. It could, theoretically, be done but because it will only be usable if the window is active, most people wont use them. So it's not worth the work to implement.

Re: Druid spell - Shield of Light. How to use?

Posted: Mon Jan 30, 2012 4:58 am
by lisa
I sometimes wonder if they did more arguments to useskill for coords of the target ground skills. There must be some way the game is told where to use the skill.

Re: Druid spell - Shield of Light. How to use?

Posted: Mon Jan 30, 2012 6:28 am
by rock5
I believe those skills are triggered my the mouse click action. It would calculate the position my the mouse and probably doesn't use "UseSkill" as such.

Re: Druid spell - Shield of Light. How to use?

Posted: Mon Jan 30, 2012 8:52 am
by silinky
hey mate, try this :)

Code: Select all

/script CastSpellByName("Shield of Light")
/wait 0.1
/script CastSpellByName("Shield of Light")
/script SpellTargetUnit()
i use it for my "Healing Arrows" spell as d/s
also usable for thunderstorm, and other area spells

i guess you can use SpellTargetUnit("raid1") too, if you want to use it on the tank+melee group around him, make sure tank is in raid1 position, never tried. just use your imagination, the possibilities are endless

Re: Druid spell - Shield of Light. How to use?

Posted: Mon Jan 30, 2012 9:14 am
by lisa
code works but casts skill where the mouse is located.

Re: Druid spell - Shield of Light. How to use?

Posted: Mon Jan 30, 2012 9:21 am
by silinky
hmm i never saw this, maybe because i use my d/s as a backup when i am multiboxing, and the window is in the background always. thanks for pointing it out, when i get home i will play around with it more and see how i can improve it.

Re: Druid spell - Shield of Light. How to use?

Posted: Mon Jan 30, 2012 2:18 pm
by rock5
I found the mouse pointers we could use to direct the cast.

Mouse X = Address 9CD2DC Offset 3B4
Mouse X = Address 9CD2DC Offset 3B8

If you cast the spell, lock those values where you want it to cast then run command SpellTargetUnit(), then it will cast at that location.

The next BIG hurdle is to calculate where to "click" or adjust the camera angle, zoom etc. to put the target where we want it so we know where to click. What we really need is some 3d experts. Hm.. we can set the camera to face directly to the target so we know we have to click the middle of the screen horizontally. Calculating where to click vertically is what we need to do. It needs to take into account the angle of the camera, the zoom, the player position and target possition.

Re: Druid spell - Shield of Light. How to use?

Posted: Mon Jan 30, 2012 7:31 pm
by lisa
*Blows the dust off an old userfunction.

Code: Select all


memoryWriteInt(getProc(), player.Address + addresses.pawnTargetPtr_offset, v.Address);

	--=== change camera to look at pot ===--
	local angle = math.atan2(v.Z - player.Z, v.X - player.X);
	local proc = getProc();
	camera:setRotation(angle);
	memoryWriteFloat(proc, camera.Address + addresses.camY_offset, 16.77);
	memoryWriteFloat(proc, camera.Address + addresses.camY_offset, 16.77);	
	memoryWriteFloat(proc, camera.Address + addresses.camY_offset, 16.77);
Obviously need to change the v.Address to be the targets address. This will make it face the target and then move camera to be looking at a downward angle.

Then need to tell mouse where to point on the screen.