PDA

View Full Version : confusing problem


killy
10-06-2006, 12:21 PM
hi there,

i have a problem making really confuse since i cannot locate its origin :(
to my mind, it should acutally work

function ShootWand()
z=0;

for i=1,16 do
t=UnitDebuff("target", i)
if (t and string.find(t,"Shadow_ShadowWordPain")) then
z=1;
break;
end
end

if ((z==0) and (UnitHealth("target") > 15) and (UnitMana("player") > 1000)) then
CastSpellByName("Schattenwort: Schmerz");
SpellStopCasting();
CastSpellByName("Schießen");
else
CastSpellByName("Schießen");
end

end

this one simply is an extended sw:p -shoot macro as you can obviously see ^^

therefore i only ripped the code from a posted macro under the priest-section and widened the decision process for when to cast sw:p and when only to shoot.

i tried it with sending msgs to a chatframe. the functions detects properly whether the debuff is on the target. it seems to porperly detect whether mana and hp-state is as it should be in order to cast sw:p since when the buff is detected it isn't cast again
but in no case it starts firing the wand :(

any idea ?
i'd appreciate help and improvement suggestions ^^

thx in advance

greetings, killy

include
11-06-2006, 12:01 PM
vermutlich liegts an diesem "ß" im Wort Schießen.

du hast nun zwei möglichkeiten: entweder du ersetzt dieses zeichen durch einen code (so wie ä, ö und ü, aber den code kenn ich nicht) oder du stellst das zeichenformat auf UTF-8 um. das sollte bei jedem besseren text-editor möglich sein. (zB bei speichern unter, dokumenteigenschaften oder woauchimmer)

ooooder: du hast schießen bestimmt in der ACTIONBAR. dann kannste schiessen auch mithilfe von UseAction aktivieren.
hier findest du mehr infos: http://www.wowwiki.com/World_of_Warcraft_API

killy
12-06-2006, 10:56 PM
hm, danke ^^

in der actionbar hab ich es nicht, dafür hab ich ja u.a. das macro gemacht - zum platz sparen. aber ich habe es nun über die ID im zauberbuch gelöst. zumindest für mich ausreichend ^^

ich werde aber mal versuchen das eleganter mit hilfe deiner hinweise zu probieren ^^