Page 1 of 1

[JASS]Bind spell A### to patrol/attack/keys (arrows,ESC)

Posted: May 29th, 2014, 6:22 am
by eddydu555
Hi i got the idea from JJCP's -tele command but instead of binding blink to patrol it would be any spell to either attack or patrol or maybe keyboard keys.

The command to do it would be something like"-binatck ####" to bind spell #### to attack or "-bindptrl ####" to bind spell #### to patrol,and the same for keys and with the possiblity to set the skill level like in -add command

Is one of the things above possible to do ? and if yes can you help me with the script ?

thanks for reading :D

Re: [JASS]Bind spell A### to patrol/attack/keys (arrows,ESC)

Posted: May 29th, 2014, 7:02 am
by haxorico
It is possible... sort of.. I think..?
But you misunderstand the way the command works. When you press P it doesnt cast a blink spell. It changes the unit location by code. Yet I think that making it cast a spell is possible. I just never tried messing with spells.

Re: [JASS]Bind spell A### to patrol/attack/keys (arrows,ESC)

Posted: May 29th, 2014, 10:38 am
by KangTooJee
i dont think this is possible.. hax how do u make the unit cast the #### spells?

Re: [JASS]Bind spell A### to patrol/attack/keys (arrows,ESC)

Posted: May 29th, 2014, 2:01 pm
by haxorico
I said i never messed around with spells. But from a logical stand. It is possible. Ill see if i can make a basic prototype function for that when i get home.
Still it wont be a hotkey persay. As if the spell doesnt require a target, you will still need to click on the map. Also i dont think it can work for spells like chain lightning as i dont think you can grab from within the code, who you tried to attack (thw unit you clicked upon after hitting A)
Still in all it just seems useless. You can make custon hotkeys for any spell... why not use that instead?

Re: [JASS]Bind spell A### to patrol/attack/keys (arrows,ESC)

Posted: May 30th, 2014, 6:34 am
by eddydu555
It was to have more spells for my units than other players,if its impossible

what about something like a command "-add #### #### ####" (the #### are spell id) and after you type that only the first #### will be added and when you press a key like H or P you will switch between the three spells,is that possible ?