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

General talk about editing, cheating, and deprotecting maps.

Moderator: Cheaters

reaxion
Newcomer
Posts: 19
Joined: November 24th, 2007, 1:28 pm

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

Post by reaxion »

Aero wrote:Yo, I've been away a while and have probably missed quite a few questions, requests and PMs.
So, to save me time and to answer your questions, please post in this thread any problems, inquiries or requests (JASS or GUI) you might have.
Also, please refrain from linking to a pre-existing thread.

Just a note: I'm in the middle of moving so I probably wont be accessing my computer or the internet for most of Saturday (tomorrow) and perhaps tonight.
Anyway, shoot any questions you have - I'll check back when I can.
Okay. Could you have a look at my thread Aero?
It's named "Help me change a trigger".

They (moderators and admins) told me that I should ask you if I have any trouble with JASS stuff.

(edit by Bart, taken from the other thread to avoid inconvenience)

I added a cheatpack to a Korean FT map called "Chaos".
It's very much like Dota, except it's Korean.
The thing is, using a cheatpack (I forgot its name T_T), I was able to spawn hidden characters in the map.
(I did this by using the "-cunit" code)
But when I spawn hidden heroes this way, some of their skills don't work.
I suspect it's because there is a trigger in the map that limits a hero's skills when s/he is spawned in a "different" way.

Can someone help me with this?

I'm attaching the map. As I said, the cheatpack is already in it.

Below are a list of RAW codes of hidden heroes. I was able to get them by using the integer manager (I'm proud )
Use them like this: -cunit 01 1165451634 6600, -4400
where 01 is the player number, 1165451634 the rawcode, and 6600, -4400 the xy coordinates.

Oh also, u gotta type in "-cheated by wc3edit.net" to activate the cheats!

1214931305
1215723364
1164536941
1165451634
User avatar
Bartimaeus
Tyrannical Drama Queen
Posts: 4443
Joined: November 19th, 2007, 5:05 am
Been thanked: 2 times

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

Post by Bartimaeus »

reaxion wrote:
Aero wrote:Yo, I've been away a while and have probably missed quite a few questions, requests and PMs.
So, to save me time and to answer your questions, please post in this thread any problems, inquiries or requests (JASS or GUI) you might have.
Also, please refrain from linking to a pre-existing thread.

^^^^^^^^^^^^^^^^^^^^^^^^^Just a note: I'm in the middle of moving so I probably wont be accessing my computer or the internet for most of Saturday (tomorrow) and perhaps tonight.
Anyway, shoot any questions you have - I'll check back when I can.
Okay. Could you have a look at my thread Aero?
It's named "Help me change a trigger".

They (moderators and admins) told me that I should ask you if I have any trouble with JASS stuff.
Oh jeesh. Look at what you quoted. XD.

Anyways, edited your post, to fix that.
initialD
Some Honorary Title
Posts: 1713
Joined: June 8th, 2007, 5:08 am
Title: Angry Bird

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

Post by initialD »

just a question.
I have this codes on my head. Doesn't know if it works.
It saves some places if it works.
Does it work?

Code: Select all

call TriggerRegisterPlayerChatEvent(cp_ICHEAT,GetLocalplayer(),"-cheat",false)
User avatar
Aero
Forum Staff
Posts: 829
Joined: January 28th, 2007, 8:10 pm
Title: JASS Programmer
Location: Canada

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

Post by Aero »

initiald wrote:just a question.
I have this codes on my head. Doesn't know if it works.
It saves some places if it works.
Does it work?

Code: Select all

call TriggerRegisterPlayerChatEvent(cp_ICHEAT,GetLocalplayer(),"-cheat",false)
Outside of single player, I imagine it causes issues. Feel free to try it.
grand
Member
Posts: 67
Joined: January 6th, 2008, 10:05 pm

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

Post by grand »

I need help again. I am not sure what the error is but it does not work everytime I test it. I checked for syntax error to see if there is and nothing popped up.

Heres the trigger:
Spoiler:
function Trig_Phantom_Edge_Conditions takes nothing returns boolean
if(not(IsUnitEnemy(GetTriggerUnit(),GetOwningPlayer(GetAttacker()))))then
return false
endif
if(not(IsUnitType(GetTriggerUnit(),UNIT_TYPE_STRUCTURE)==false))then
return false
endif
if(not(UnitHasBuffBJ(GetAttacker(),'B00L')))then
return false

endif
return true
endfunction

function Juxtropose_Check takes nothing returns boolean
return GetUnitAbilityLevel(GetFilterUnit(),'A0BW')>0
endfunction

function Trig_Phantom_Edge_Actions takes nothing returns nothing
local unit lfo=GetAttacker()
local group lEw=CreateGroup()
local boolexpr lEW=Condition(function Juxtropose_Check)
local integer lPp=GetRandomInt(1,100)
local integer lPP=GetUnitAbilityLevel(lfo,'A0BW')
local integer lPq=GetUnitAbilityLevel(lfo,'A0BX')
call GroupEnumUnitsOfPlayer(lEw,GetOwningPlayer(lfo),lEW)
call DestroyBoolExpr(lEW)
if(CountUnitsInGroup(lEw)<100)then
if(IsUnitIllusion(lfo)==false and lPp<=(3*lPP+2*lPq))then
set bj_lastCreatedUnit=CreateUnit(GetOwningPlayer(lfo),'h01D',GetUnitX(lfo),GetUnitY(lfo),270)
set bj_lastCreatedItem=UnitAddItemById(bj_lastCreatedUnit,'I08O')
call UnitUseItemTarget(bj_lastCreatedUnit,bj_lastCreatedItem,lfo)
endif
if(IsUnitIllusion(lfo) and lPp<=(1+2*lPq))then
set bj_lastCreatedUnit=CreateUnit(GetOwningPlayer(lfo),'h01D',GetUnitX(lfo),GetUnitY(lfo),270)
set bj_lastCreatedItem=UnitAddItemById(bj_lastCreatedUnit,'I08O')
call UnitUseItemTarget(bj_lastCreatedUnit,bj_lastCreatedItem,lfo)
endif
endif
call DestroyGroup(lEw)
endfunction

function StartTrigger_Phantom_Edge takes nothing returns nothing
set gg_trg_Phantom_Edge=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Phantom_Edge,EVENT_PLAYER_UNIT_ATTACKED)
call TriggerAddCondition(gg_trg_Phantom_Edge,Condition(function Trig_Phantom_Edge_Conditions))
call TriggerAddAction(gg_trg_Phantom_Edge,function Trig_Phantom_Edge_Actions)
endfunction

function InitTrig_Phantom_Edge takes nothing returns nothing
endfunction
initialD
Some Honorary Title
Posts: 1713
Joined: June 8th, 2007, 5:08 am
Title: Angry Bird

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

Post by initialD »

Code: Select all

function InitTrig_Phantom_Edge takes nothing returns nothing
endfunction 
isn't this suppose to be the function which starts the trigger?
yet there are nothing in this function.
there are suppose a few lines in there.
Since you didn't show your function main part, I could only guess what it should be in there.
Try the following: though I suggest you includes your function main's part and globals' part.

Code: Select all

function InitTrig_Phantom_Edge takes nothing returns nothing
call StartTrigger_Phantom_Edge()
endfunction
grand
Member
Posts: 67
Joined: January 6th, 2008, 10:05 pm

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

Post by grand »

It does not work.
initialD
Some Honorary Title
Posts: 1713
Joined: June 8th, 2007, 5:08 am
Title: Angry Bird

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

Post by initialD »

show the whole things please?
Included the globals and function main part.
I can't give you a right answer if I can't see the whole thingies.
grand
Member
Posts: 67
Joined: January 6th, 2008, 10:05 pm

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

Post by grand »

Ok, heres the 1st part
Spoiler:
trigger gg_trg_Phantom_Edge = null
Trigger
Spoiler:
function Trig_Phantom_Edge_Conditions takes nothing returns boolean
if(not(IsUnitEnemy(GetTriggerUnit(),GetOwningPlayer(GetAttacker()))))then
return false
endif
if(not(IsUnitType(GetTriggerUnit(),UNIT_TYPE_STRUCTURE)==false))then
return false
endif
if(not(UnitHasBuffBJ(GetAttacker(),'B00L')))then
return false

endif
return true
endfunction

function Juxtropose_Check takes nothing returns boolean
return GetUnitAbilityLevel(GetFilterUnit(),'A0BW')>0
endfunction

function Trig_Phantom_Edge_Actions takes nothing returns nothing
local unit lfo=GetAttacker()
local group lEw=CreateGroup()
local boolexpr lEW=Condition(function Juxtropose_Check)
local integer lPp=GetRandomInt(1,100)
local integer lPP=GetUnitAbilityLevel(lfo,'A0BW')
local integer lPq=GetUnitAbilityLevel(lfo,'A0BX')
call GroupEnumUnitsOfPlayer(lEw,GetOwningPlayer(lfo),lEW)
call DestroyBoolExpr(lEW)
if(CountUnitsInGroup(lEw)<100)then
if(IsUnitIllusion(lfo)==false and lPp<=(3*lPP+2*lPq))then
set bj_lastCreatedUnit=CreateUnit(GetOwningPlayer(lfo),'h01D',GetUnitX(lfo),GetUnitY(lfo),270)
set bj_lastCreatedItem=UnitAddItemById(bj_lastCreatedUnit,'I08O')
call UnitUseItemTarget(bj_lastCreatedUnit,bj_lastCreatedItem,lfo)
endif
if(IsUnitIllusion(lfo) and lPp<=(1+2*lPq))then
set bj_lastCreatedUnit=CreateUnit(GetOwningPlayer(lfo),'h01D',GetUnitX(lfo),GetUnitY(lfo),270)
set bj_lastCreatedItem=UnitAddItemById(bj_lastCreatedUnit,'I08O')
call UnitUseItemTarget(bj_lastCreatedUnit,bj_lastCreatedItem,lfo)
endif
endif
call DestroyGroup(lEw)
endfunction

function StartTrigger_Phantom_Edge takes nothing returns nothing
set gg_trg_Phantom_Edge=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Phantom_Edge,EVENT_PLAYER_UNIT_ATTACKED)
call TriggerAddCondition(gg_trg_Phantom_Edge,Condition(function Trig_Phantom_Edge_Conditions))
call TriggerAddAction(gg_trg_Phantom_Edge,function Trig_Phantom_Edge_Actions)
endfunction

function InitTrig_Phantom_Edge takes nothing returns nothing
call StartTrigger_Phantom_Edge()
endfunction
last part (function main)
Spoiler:
call InitCustomTriggers( )
initialD
Some Honorary Title
Posts: 1713
Joined: June 8th, 2007, 5:08 am
Title: Angry Bird

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

Post by initialD »

delete this

Code: Select all

function InitTrig_Phantom_Edge takes nothing returns nothing
call StartTrigger_Phantom_Edge()
endfunction 
delete this

Code: Select all

call InitCustomTriggers( ) 
add this in the function main part

Code: Select all

call StartTrigger_Phantom_Edge() 
This should run the triggers.
But if it doesn't work ,it means there is a problem in the trigger itslef, then you may want to ask Aero to rewrite the trigger.