• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Order unit to cast Item-based spell

Status
Not open for further replies.
Level 7
Joined
Dec 28, 2009
Messages
257
Heya folks.. Ive got small problem, ive got ability based on "Scroll of Protection" item ability, and i want spell where dummy will spawn in target area and cast that spell to that area. Ive got the main part, however, i cant seem to find order like
"Issue "Dummy" to "Special - Scroll of Protection"
or anything like that, actually i cant find any command to order unit to cast spell that is originally item ability...

I guess there might be JASS command to order unit to cast that ability, based on its ID but im lame at that, any help please? Thanks :D*

*if it can be solved by merely adding custom script to cast spell, thats all i need, ive got rest of the trigger :D

Thanks again.
 
Level 7
Joined
Dec 28, 2009
Messages
257
-Scroll of Protection is "no target" cast, so i tried
"call IssueImmediateOrderBJ(šalala )",
aaaand.. Didnt work!

Apparently Scroll of Protection has got no order string, its ID is AIdb (or Aldb), but i dont know how to use proper JASS custom script that wants AI and no target.*

*call IssueImmediateOrderBJ(šalala, "order") wants order of spell, like "flamestrike" or "stomp", scroll of protection has got none, i need order that uses ID

Help again, please? :D
 
Level 12
Joined
Mar 13, 2012
Messages
1,121
  • Custom script: call IssueImmediateOrderById( your_unit, 852269)
Of course you have to change your_unit with a fitting variable.
 
Level 17
Joined
Feb 11, 2011
Messages
1,860
Oh, Scroll of Protection. I somehow thought you were talking about the teleporting scroll.
You will need a custom script like Ezekiel12 mentioned above. 852269 is the order ID of the Scroll of Protection ability (I hope, didn't check). Note that it's different from the ability's raw ID (which is something like 'A000').
 
Level 7
Joined
Dec 28, 2009
Messages
257
Wot
I just copied that, changed "your_unit" into my variable
doesnt work!

  • Custom Script: call IssueImmediateOrderById( Vengeance_Target, 852269)
Error: Line 639: expected a name

Is that really ID of "scroll of protection" (the one which also regenerates mana and hp, but those 2 spells are identical, only values in healing differ), cause i dont know where you got that number from :D (ive seen it few hours ago in some other topic, ID as long number, but no idea how they get it :D)

Thanks.. :D
 
Level 21
Joined
Mar 27, 2012
Messages
3,232
Wot
I just copied that, changed "your_unit" into my variable
doesnt work!

  • Custom Script: call IssueImmediateOrderById( Vengeance_Target, 852269)
Error: Line 639: expected a name

Is that really ID of "scroll of protection" (the one which also regenerates mana and hp, but those 2 spells are identical, only values in healing differ), cause i dont know where you got that number from :D (ive seen it few hours ago in some other topic, ID as long number, but no idea how they get it :D)

Thanks.. :D
All GUI variables have the udg_ prefix in JASS, so Vengeance_Target becomes udg_Vengeance_Target
 
Level 8
Joined
Jul 8, 2013
Messages
249
i guess it should work now, thanks.. :D
So did it work?

I actually just came across a similar problem for one of my maps. I would like to make a dummy unit cast an ability based on the Healing Salve item which has an ability entitled 'Healing Salve'

So if I understood this thread, I would make a unit variable and set it to my newly created dummy caster. Then do something like this line:

Custom script: call IssueImmediateOrderById( your_unit, 852269)

But with '852269' replaced with some different number for healing salve? And presumably also with an additional part to indicate who the target of the ability should be? I guess that leaves me just wondering what the appropriate number is for healing salve and what exactly the syntax of this kind of custom script is for unit-targeted orders.
 
Level 7
Joined
Dec 28, 2009
Messages
257
...or you could create a unit with Hero Inventory and give it Rune of Protection... aaand it's done! OR you could use Roar ability with defense increase only for that dummy which is quite simplier imho...

Well, Roar doesnt give hitpoints (not instantly), while Scroll of Protection can also heal units, and i need that healing there too :3

/topic is closed anyway, i just replied to this one :D
 
Status
Not open for further replies.
Top