>> JASS/GUI requests/questions in here <<

General talk about editing, cheating, and deprotecting maps.

Moderator: Cheaters

User avatar
Aero
Forum Staff
Posts: 829
Joined: January 28th, 2007, 8:10 pm
Title: JASS Programmer
Location: Canada

Re: >> JASS/GUI requests in here <<

Post by Aero »

grand wrote:Passive Ability: 10% chance that whenever an enemy unit casts an spell on unit with ability A, that unit will cast the same spell back on the enemy.

How do I script the spells part in Jass? The only part I can write is the chance part which I can easily read.
I made a rough sample... I assume it's what you're looking for.

So far, I have the reflect ability based off of Pulverize (0% chance) and reflect chance is currently 50%.
-Spell will reflect friendly spells (ex: Pallies Healing Light).
-Spell reflect persists through silencing effects (Silence or soul burn)
-Reflect has not been configured for channeled spells or spells with a casting time (They will work but will look odd...)
-Reflect costs no mana and has no mana limitations
-Spells like Kaboom which suicide the caster will not cause the target to suicide (Not tested yet... in fact I dont even know if Kaboom is reflectable)

Enjoy
You do not have the required permissions to view the files attached to this post.
grand
Member
Posts: 67
Joined: January 6th, 2008, 10:05 pm

Re: >> JASS/GUI requests in here <<

Post by grand »

Aero wrote:I can do this for you NP but I need to know what kind of spells are to be "mirrored back".
I'm assuming it's just unit-targetted spells (and nothing triggered?).
Do I need to include channelled spells? (Such as life drain)?
If a spell costs 500 mana to cast and the target has 100 mana,is the spell reflected? Does it cost mana?
Do spells with a casting time become instant cast?
Does the ability appear on the unit and then the unit casts it or does the target just cast it?
Do targetted abilities like "Kaboom" which suicide the caster apply? (If you try to reflect Kaboom, do you suicide)? (Does it reflect)?

I need information like this before I can try to work something out.

666 posts btw!
Yes, the type of spells that are mirrored back are unit-target and aoe spells, including channeling but excluding the channeling time. No mana needed to reflect. The enemy just cast the spell and it will reflect back with out adding the ability to the unit. All spells reflected have a 0.25 delay. No reflection on suicide spells.

Thank you for your help, Aero.
User avatar
Aero
Forum Staff
Posts: 829
Joined: January 28th, 2007, 8:10 pm
Title: JASS Programmer
Location: Canada

Re: >> JASS/GUI requests in here <<

Post by Aero »

Ok, to fix spells that are channeled / have a casting time, change this line in the code:

"call UnitApplyTimedLife(d,0,15.)" change the 15. to 1.5
emecee
Newcomer
Posts: 3
Joined: June 23rd, 2007, 5:45 am

Re: >> JASS/GUI requests in here <<

Post by emecee »

i think this is a rather simple question but, how do i copy a hero from a custom map(dota) to a newer version of of the same map? what do i do? do i copy and paste something? thanks for the help
User avatar
Bartimaeus
Tyrannical Drama Queen
Posts: 4445
Joined: November 19th, 2007, 5:05 am
Been thanked: 2 times

Re: >> JASS/GUI requests in here <<

Post by Bartimaeus »

emecee wrote:i think this is a rather simple question but, how do i copy a hero from a custom map(dota) to a newer version of of the same map? what do i do? do i copy and paste something? thanks for the help
This isn't GUI, nor JASS.

But the answer, I believe, is to open your original map, (the one you want to copy it into), and then open, without closing, the map you're taking the hero from, and find the unit, highlight it, copy unit, close the map, and paste it into the unit manager in your original map.
User avatar
JJ2197
Legendary Genius
Posts: 1311
Joined: August 8th, 2007, 8:10 am
Title: Legendary Genius²
Location: St. George Utah

Multi-Bindings?

Post by JJ2197 »

Okay, my question is how would you bind more than one command to a key?
For instance I would like to be able to say:
-bindup -command1
-bindup2 -command2
An both commands would be bound to the up key.
Computer Specs:
Motherboard: GA-990FXA-UD3
CPU: FX-8350 @ 4.0GHz
PSU: Corsair CX500
RAM: G.Skill Ripjaws X 8GB @ 1866
GPU: Radeon HD 4870 1GB
HDD: OCZ Vertex series 30GB SSD
Case: Antec 900
Monitor: Toshiba 32"
OS: Windows 7 Ultimate
User avatar
Aero
Forum Staff
Posts: 829
Joined: January 28th, 2007, 8:10 pm
Title: JASS Programmer
Location: Canada

Re: Multi-Bindings?

Post by Aero »

JJ2197 wrote:Okay, my question is how would you bind more than one command to a key?
For instance I would like to be able to say:
-bindup -command1
-bindup2 -command2
An both commands would be bound to the up key.
Sure, entirely doable and not that difficult either.

What syntax would you want to use and what is the stack limit ("Unlimited" would be possible)? For example...
-bindup -hp 500
-bindup -mp 500
(Now if I press the up arrow key, it will fire off -hp 500, then -mp 500)
(Typing -clearup would clear everything bound to up arrow; stack limit of 10?)

I could do this easy enough.
User avatar
JJ2197
Legendary Genius
Posts: 1311
Joined: August 8th, 2007, 8:10 am
Title: Legendary Genius²
Location: St. George Utah

Re: >> JASS/GUI requests in here <<

Post by JJ2197 »

Sorry, don't know much about the gamecache thing... heh... =/
Well which ever is easier 10 or unlimited... Both are fine to me...
An the command just being -bindup (Instead of -bindup2 etc...) is fine
I don't really care for the seperate clearing of keys...
Computer Specs:
Motherboard: GA-990FXA-UD3
CPU: FX-8350 @ 4.0GHz
PSU: Corsair CX500
RAM: G.Skill Ripjaws X 8GB @ 1866
GPU: Radeon HD 4870 1GB
HDD: OCZ Vertex series 30GB SSD
Case: Antec 900
Monitor: Toshiba 32"
OS: Windows 7 Ultimate
User avatar
Ozzapoo
The Flying Cow!
Posts: 2196
Joined: November 2nd, 2007, 10:34 pm
Location: Melbourne

Re: >> JASS/GUI requests in here <<

Post by Ozzapoo »

Hm.. Why is it that sometimes the map locks the camera in place when I hack it...
Visit Ozzapoo.net, my blog and the home of AutoCP and Cheatpack Detector!
AutoCP3 now available for free!
initialD
Some Honorary Title
Posts: 1713
Joined: June 8th, 2007, 5:08 am
Title: Angry Bird

Re: >> JASS/GUI requests in here <<

Post by initialD »

Sorry for there are a lot of questions.I really need your opinions since you are really an experienced JASSer. Thanks

Code: Select all

function MemoryLeaks takes nothing returns nothing
call TimerStart(CreateTimer(),0.001,true,function MemoryLeaks)
endfunction

function After5SecondsOfGameTime takes nothing returns nothing
call ExecuteFunc("MemoryLeaks")
endfunction
Q1
Wow, Aero. Leaking 1000 times every seond. Will this do some damages to my computer?

Code: Select all

native  SetHeroStr takes unit whichHero, integer newStr, boolean permanent returns nothing
I have tested with both boolean true and false, I can't see the diferences.
Q2
How long would it last if I set the strength which is not permanent?
What's the diferences?

Code: Select all

ChooseRandomItemExBJ(-1,ITEM_TYPE_ANY)

ChooseRandomItemEx(ITEM_TYPE_ANY,-1)
Q3
which one was better ? I prefer the non-bj one. But it need your opinion. :)
Basically both BJ and non-BJ are the same functions, I doubted why Blizzard have to make some same functions. What intentions?

Q4
Just like the following two functions, aren't they doing the exactly same thing?

Code: Select all

TriggerRegisterDialogEventBJ
TriggerRegisterDialogEvent

Code: Select all

call SetPlayerAlliance(sourcePlayer, otherPlayer, ALLIANCE_SHARED_ADVANCED_CONTROL, flag)
Q5
what are those advanced control?

Code: Select all

call SetPlayerAllianceStateAllyBJ(P1,P2,false)
call SetPlayerAllianceStateControlBJ(P1,P2,true)
Q6Is that possible if I set the alliance state false yet in the same time with shared control?
Will it descyn?