|
|
|
|
JASS Functions Approved JASS functions will be located here.
Remember to submit your own resources to the submission forum. |
 |
|
09-02-2009, 08:20 PM
|
#16 (permalink)
|
|
wuts dis?
Join Date: Apr 2007
Posts: 594
|
Updated. Now works nice and has an easy to understand API.
__________________
--YourNameHere
|
|
|
09-02-2009, 09:16 PM
|
#17 (permalink)
|
|
OOP freak.
Join Date: Feb 2006
Posts: 751
|
Yea, you're going to need to rename this before I can approve it.
ASM is one logical possibility.
|
|
|
09-02-2009, 09:30 PM
|
#18 (permalink)
|
|
wuts dis?
Join Date: Apr 2007
Posts: 594
|
meh, kind of liked the new name.
__________________
--YourNameHere
|
|
|
12-27-2009, 05:32 PM
|
#19 (permalink)
|
|
wuts dis?
Join Date: Apr 2007
Posts: 594
|
Bumpidy bump, updated!
__________________
--YourNameHere
|
|
|
12-31-2009, 12:54 AM
|
#20 (permalink)
|
|
User
Join Date: Jul 2007
Posts: 428
|
While the interface is pretty nice, this would be better suited as a module. The person creates a lane struct and implements your module thus adding all of the necessary stuff. This would also help you get away from hashtables and improve the overall performance. From here, as units are created for the lanes, they can have their waypoint counter incremented to determine which waypoint they are supposed to go to, so your only hashtable read is for associative purposes on the waypoint counts. Everything else will turn into array reads.
Furthermore, the struct wouldn't necessarily be created or destroyed as a lane would be a lane ; ), so you could move to static methods and what not. It'd be one region per lane (so that the correct struct is done), so you'd have a static var for that etc.
I think if you move towards that design your entire thing will be much better ^_^. Interface will still be clean and tight and the performance will improve.
I mean, honestly I don't see why you did a lot of the stuff you did (poor design).
Furthermore, BJDebugMsg should be changed to DisplayTextToPlayer(GetLocalPlayer(), ...)
That is all ^_^
|
|
|
12-31-2009, 10:48 AM
|
#21 (permalink)
|
|
wuts dis?
Join Date: Apr 2007
Posts: 594
|
Quote:
Originally Posted by Nestharus
While the interface is pretty nice, this would be better suited as a module. The person creates a lane struct and implements your module thus adding all of the necessary stuff. This would also help you get away from hashtables and improve the overall performance. From here, as units are created for the lanes, they can have their waypoint counter incremented to determine which waypoint they are supposed to go to, so your only hashtable read is for associative purposes on the waypoint counts. Everything else will turn into array reads.
|
If I didn't misunderstood what you said, implementing the spawn as a module would be a pretty bad idea. Mainly because you can't use one lane for multiple spawns then. And who cares if you use hashtables for this? They're fast enough and you're not creating spawns every 0.01 seconds.
Quote:
Furthermore, the struct wouldn't necessarily be created or destroyed as a lane would be a lane ; ), so you could move to static methods and what not. It'd be one region per lane (so that the correct struct is done), so you'd have a static var for that etc.
I think if you move towards that design your entire thing will be much better ^_^. Interface will still be clean and tight and the performance will improve.
|
^ Same as above.
Quote:
|
I mean, honestly I don't see why you did a lot of the stuff you did (poor design).
|
What do you mean?
Quote:
|
Furthermore, BJDebugMsg should be changed to DisplayTextToPlayer(GetLocalPlayer(), ...)
|
Since for debugging reasons only, who cares if you use BJDebugMsg or anything else? :/
Well, thanks for the feedback! :)
__________________
--YourNameHere
|
|
|
01-11-2010, 01:58 AM
|
#22 (permalink)
|
|
User
Join Date: Dec 2009
Posts: 4
|
2 Habilidades de Kunkka DotA
Codes Forced to put for the TidalErruption ability and TV the one of X that makes return to the hero
globalshashtable JY integer EJ= 0trigger array CJ timer E0= nullreal array DJ boolean O3= falseboolean M30= falseplayer array CO player array DO unit A8I player EO= nullinteger AJ boolean array IJ group array UY force I3= nullstring JJ real KJ real A3= 0unit OK integer OJ boolean BJ= falseinteger JW0= 1093682777integer array D10 integer DO0 integer array D20 integer D30 integer array D40 integer D50 integer array D60 integer D70 integer array D80 integer D90 unit array LY unit array MY unit array NY integer SY= 0integer MJ unit AM= nullunit BM= nullunit RM0 integer RN0 group RL0 integer LJ= 0gamecache LN player XO= nullinteger array I integer array O integer array A integer array B integer array C integer array D integer array E integer array F integer array G integer array H integer array Z integer array V integer array W integer array X integer array Y integer array J integer array K unit array K1 boolean LP0= falseinteger LQ0 player LU0 endglobalsfunction FunckAbilidadesPAraJUegar takes nothing returns nothingendfunctionfunction EMI takes destructable d returns booleanreturn GetDestructableTypeId (d )== 1314157667 or GetDestructableTypeId (d )== 1314157687 or GetDestructableTypeId (d )== 1096053874 or GetDestructableTypeId (d )== 1110454322 or GetDestructableTypeId (d )== 1110454323endfunctionfunction HQI takes unit u returns booleanreturn GetUnitTypeId (u )< 1 or IsUnitType (u,UNIT_TYPE_DEAD )== trueendfunctionfunction BCI takes nothing returns booleanreturn trueendfunctionfunction InitializeHashtable takes nothing returns nothingset JY=InitHashtable ()endfunctionfunction HDI takes nothing returns booleanreturn trueendfunctionfunction HZI takes nothing returns nothingif EMI (GetEnumDestructable ())thenset LJ=LJ+ 1call KillDestructable (GetEnumDestructable ())endifendfunctionfunction HEI takes trigger t, playerunitevent HFI returns nothinglocal integer B2I= 0loopcall TriggerRegisterPlayerUnitEvent (t,Player (B2I ),HFI,Condition (function HDI ))set B2I=B2I+ 1exitwhen B2I== 16endloopendfunctionfunction F1I takes unit FOI, unit F2I, integer F3I, real F4I returns nothingif F3I== 0 thenreturnendifif F3I== 1 thencall UnitDamageTarget (FOI,F2I,F4I, true, true,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_FIRE,WEAPON_TYPE_WHOKNOWS )elseif F3I== 2 thencall UnitDamageTarget (FOI,F2I,F4I, true, true,ATTACK_TYPE_HERO,DAMAGE_TYPE_NORMAL,WEAPON_TYPE_WHOKNOWS )elseif F3I== 3 thencall UnitDamageTarget (FOI,F2I,F4I, true, true,ATTACK_TYPE_HERO,DAMAGE_TYPE_MAGIC,WEAPON_TYPE_WHOKNOWS )elseif F3I== 4 thencall UnitDamageTarget (FOI,F2I,F4I, true, true,ATTACK_TYPE_PIERCE,DAMAGE_TYPE_NORMAL,WEAPON_TYPE_WHOKNOWS )endifendfunctionfunction D6I takes player D7I returns booleanif(D7I==CO [0])thenreturn trueendifif(D7I==CO [1])thenreturn trueendifif(D7I==CO [2])thenreturn trueendifif(D7I==CO [3])thenreturn trueendifif(D7I==CO [4])thenreturn trueendifif(D7I==CO [5])thenreturn trueendifreturn falseendfunctionfunction WU3 takes nothing returns nothingcall F1I (A8I,GetEnumUnit (), 1, (GetUnitAbilityLevel (A8I, 1093749069)* 75)/ 5)endfunctionfunction C8I takes nothing returns nothinglocal integer i= 0if O3== false and M30== false thenloopcall DisplayTimedTextToPlayer (Player (i ), 0, 0, 120, "|c00ff0303An internal checksum has failed|r")call DisplayTimedTextToPlayer (Player (i ), 0, 0, 120, "|c00ff0303This might not be a serious glitch, but it is important for me to get it|r")call DisplayTimedTextToPlayer (Player (i ), 0, 0, 120, "|c00ff0303Please send me the replay for this game to [email]IceFrog@gmail.com[/email]|r")set i=i+ 1exitwhen i== 12endloopendifendfunctionfunction C9I takes trigger t returns nothingcall DisableTrigger (t )set EJ=EJ+ 1set CJ [EJ ]=t set DJ [EJ ]= (TimerGetElapsed (E0 ))+ 60if EJ> 8000 thencall C8I ()endifendfunctionfunction WII takes nothing returns booleanlocal trigger t=GetTriggeringTrigger ()local integer CFI=GetHandleId (t )local unit F2I= (LoadUnitHandle (JY, (CFI ), (17)))local integer W1I= (LoadInteger (JY, (CFI ), (59)))if UnitRemoveAbility (F2I,W1I )== true or GetUnitAbilityLevel (F2I,W1I )== 0 thencall FlushChildHashtable (JY, (CFI ))call C9I (t )endifset t= nullset F2I= nullreturn falseendfunctionfunction WOI takes nothing returns booleanlocal trigger t=GetTriggeringTrigger ()local integer CFI=GetHandleId (t )local unit F2I= (LoadUnitHandle (JY, (CFI ), (17)))local integer W1I= (LoadInteger (JY, (CFI ), (59)))call FlushChildHashtable (JY, (CFI ))call C9I (t )if UnitRemoveAbility (F2I,W1I )== false thenset t=CreateTrigger ()set CFI=GetHandleId (t )call TriggerRegisterUnitEvent (t,F2I,EVENT_UNIT_DEATH )call TriggerRegisterTimerEvent (t, 1, true)call TriggerAddCondition (t,Condition (function WII ))call SaveUnitHandle (JY, (CFI ), (17), (F2I ))call SaveInteger (JY, (CFI ), (59), (W1I ))endifset t= nullset F2I= nullreturn falseendfunctionfunction W2I takes unit F2I, integer W1I, integer E9I, real AZI returns nothinglocal trigger t=CreateTrigger ()local integer CFI=GetHandleId (t )call UnitAddAbility (F2I,W1I )call SetUnitAbilityLevel (F2I,W1I,E9I )call TriggerRegisterUnitEvent (t,F2I,EVENT_UNIT_DEATH )call TriggerRegisterTimerEvent (t,AZI, false)call TriggerAddCondition (t,Condition (function WOI ))call SaveUnitHandle (JY, (CFI ), (17), (F2I ))call SaveInteger (JY, (CFI ), (59), (W1I ))set t= nullendfunctionfunction ZWI takes nothing returns booleanlocal trigger t=GetTriggeringTrigger ()local integer CFI=GetHandleId (t )local unit CLI= (LoadUnitHandle (JY, (CFI ), (14)))local integer ZXI= (LoadInteger (JY, (CFI ), (52)))if CLI!= null thencall UnitRemoveAbility (CLI,ZXI )endifcall FlushChildHashtable (JY, (CFI ))call C9I (t )set t= nullset CLI= nullreturn falseendfunctionfunction ZYI takes unit u, integer ZXI, real AZI returns nothinglocal trigger t=CreateTrigger ()local integer CFI=GetHandleId (t )call UnitAddAbility (u,ZXI )call TriggerRegisterTimerEvent (t,AZI, false)call TriggerAddCondition (t,Condition (function ZWI ))call SaveUnitHandle (JY, (CFI ), (14), (u ))call SaveInteger (JY, (CFI ), (52), (ZXI ))set t= nullendfunctionfunction C3I takes group g returns nothingcall GroupClear (g )endfunctionfunction WEI takes unit CTI returns booleanlocal integer WFI=GetUnitTypeId (CTI )return WFI== 1848651828 or WFI== 1848652103 or WFI== 1848652099 or WFI== 1848652088 or WFI== 1697656907 or WFI== 1697656905 or WFI== 1697656908 or WFI== 1697657162endfunctionfunction WWI takes nothing returns booleanreturn IsUnitEnemy (OK,GetOwningPlayer (GetFilterUnit ()))and(GetUnitAbilityLevel (GetFilterUnit (), 'A04R')== 0 and IsUnitType (GetFilterUnit (),UNIT_TYPE_STRUCTURE )== false and HQI (GetFilterUnit ())== false)and(IsUnitType (GetFilterUnit (),UNIT_TYPE_ANCIENT )== false or WEI (GetFilterUnit ()))endfunctionfunction B8I takes nothing returns nothingcall DisplayTimedTextToPlayer (GetEnumPlayer (), 0,A3,KJ,JJ )endfunctionfunction B9I takes force BAI, real AZI, string BBI returns nothingset JJ=BBI set KJ=AZI call ForForce (BAI, function B8I )endfunctionfunction C4I takes nothing returns groupreturn CreateGroup ()endfunctionfunction CKI takes unit CLI returns integerlocal integer x local integer id=GetUnitTypeId (CLI )set x= 1loopexitwhen x>DO0 if id==D10 [x ]thenreturn 2endifset x=x+ 1endloopset x= 1loopexitwhen x>D30 if id==D20 [x ]thenreturn 3endifset x=x+ 1endloopset x= 1loopexitwhen x>D50 if id==D40 [x ]thenreturn 1endifset x=x+ 1endloopreturn 0endfunctionfunction C0I takes integer i returns unitif i> 16000 thenreturn NY [i- 16000]elseif i> 8000 thenreturn MY [i- 8000]elsereturn LY [i ]endifendfunctionfunction BUI takes integer i returns nothingif i> 16000 thenset NY [i- 16000]= nullelseif i> 8000 thenset MY [i- 8000]= nullelseset LY [i ]= nullendifendfunctionfunction C1I takes unit u returns integerset SY=SY+ 1if SY> 16000 thenset NY [SY- 16000]=u elseif SY> 8000 thenset MY [SY- 8000]=u elseset LY [SY ]=u endifreturn SY endfunctionfunction CXI takes nothing returns booleanlocal trigger t=GetTriggeringTrigger ()local integer CFI=GetHandleId (t )call SaveInteger (JY, (GetHandleId (((LoadUnitHandle (JY, (CFI ), (14)))))), (((LoadInteger (JY, (CFI ), (33))))), (2))call FlushChildHashtable (JY, (CFI ))call C9I (t )set t= nullreturn falseendfunctionfunction CYI takes unit CJI, integer CHI, real AZI returns nothinglocal trigger t=CreateTrigger ()call TriggerAddCondition (t,Condition (function CXI ))call TriggerRegisterTimerEvent (t,AZI, false)call SaveInteger (JY, (GetHandleId ((CJI ))), ((CHI )), (1))call SaveUnitHandle (JY, (GetHandleId (t )), (14), (CJI ))call SaveInteger (JY, (GetHandleId (t )), (33), (CHI ))set t= nullendfunctionfunction ENI takes unit u returns booleanreturn GetUnitAbilityLevel (u, 'A0S6')> 0 or GetUnitAbilityLevel (u, 'A179')> 0 or GetUnitAbilityLevel (u, 'ACmi')> 0 or GetUnitAbilityLevel (u, 'A0SU')> 0 or GetUnitAbilityLevel (u, 'B014')> 0 or ((LoadInteger (JY, (GetHandleId (((u )))), ((4252))))== 1)endfunctionfunction ERI takes unit u returns booleanreturn GetUnitTypeId (u )== 1211117638 or GetUnitTypeId (u )== 1211117637 or GetUnitTypeId (u )== 1211117639 or GetUnitTypeId (u )== 1328558391endfunctionfunction WXI takes nothing returns booleanreturn ENI (GetFilterUnit ())== false and IsUnitEnemy (OK,GetOwningPlayer (GetFilterUnit ()))and(GetUnitAbilityLevel (GetFilterUnit (), 'A04R')== 0 and IsUnitType (GetFilterUnit (),UNIT_TYPE_STRUCTURE )== false and HQI (GetFilterUnit ())== false)and(IsUnitType (GetFilterUnit (),UNIT_TYPE_ANCIENT )== false or WEI (GetFilterUnit ()))endfunctionfunction HJI takes nothing returns booleanlocal trigger t=GetTriggeringTrigger ()local integer CFI=GetHandleId (t )local fogmodifier HKI= (LoadFogModifierHandle (JY, (CFI ), (42)))call FogModifierStop (HKI )call DestroyFogModifier (HKI )call FlushChildHashtable (JY, (CFI ))call C9I (t )set t= nullset HKI= nullreturn falseendfunctionfunction HLI takes player p, real AZI, real x, real y, real r returns nothinglocal trigger t=CreateTrigger ()local fogmodifier HKI=CreateFogModifierRadius (p,FOG_OF_WAR_VISIBLE,x,y,r, true, true)call FogModifierStart (HKI )call SaveFogModifierHandle (JY, (GetHandleId (t )), (42), (HKI ))call TriggerRegisterTimerEvent (t,AZI, false)call TriggerAddCondition (t,Condition (function HJI ))set HKI= nullset t= nullendfunctionfunction FGI takes unit FHI returns nothingcall PauseUnit (FHI, true)call IssueImmediateOrder (FHI, "stop")call PauseUnit (FHI, false)endfunctionfunction FBI takes player FCI, string BVI returns nothinglocal sound FDI=CreateSoundFromLabel ("InterfaceError", false, false, false, 10, 10)if(GetLocalPlayer ()==FCI )thenif(BVI!= "")and(BVI!= null)thencall ClearTextMessages ()call DisplayTimedTextToPlayer (FCI, 0.50,- 1.00, 2.00, "|cffffcc00"+BVI+ "|r")endifcall StartSound (FDI )endifcall KillSoundWhenDone (FDI )endfunctionfunction G2I takes real a, real b returns realif(a<b )thenreturn b elsereturn a endifendfunctionfunction FYI takes real x returns reallocal real FJI=GetRectMinX (bj_mapInitialPlayableArea )+ 50if(x<FJI )thenreturn FJI endifset FJI=GetRectMaxX (bj_mapInitialPlayableArea )- 50if(x>FJI )thenreturn FJI endifreturn x endfunctionfunction FKI takes real y returns reallocal real FJI=GetRectMinY (bj_mapInitialPlayableArea )+ 50if(y<FJI )thenreturn FJI endifset FJI=GetRectMaxY (bj_mapInitialPlayableArea )- 50if(y>FJI )thenreturn FJI endifreturn y endfunctionfunction FLI takes integer FMI returns nothinglocal unit u=CreateUnit (Player (15), 1211117657, 0, 0, 270)call UnitAddAbility (u,FMI )call UnitRemoveAbility (u,FMI )call RemoveUnit (u )set u= nullendfunctionfunction GGI takes real x1, real y1, real x2, real y2 returns realreturn SquareRoot (((x1-x2 )* (x1-x2 ))+ ((y1-y2 )* (y1-y2 )))endfunctionfunction HVI takes real x, real y, real d returns integerlocal rect r=Rect (x-d,y-d,x+d,y+d )set LJ= 0call EnumDestructablesInRect (r,Condition (function BCI ), function HZI )call RemoveRect (r )set r= nullreturn LJ endfunction
Codes to activate in the map the Hailidad
function DAI takes player DBI returns booleanif(GetPlayerSlotState (DBI )==PLAYER_SLOT_STATE_PLAYING )thenif(GetPlayerController (DBI )==MAP_CONTROL_USER )thenreturn trueendifendifreturn falseendfunctionfunction EQI takes nothing returns nothinglocal integer DYI= 1set XO=CO [1]loopexitwhen DAI (XO )or DYI> 5set DYI=DYI+ 1set XO=CO [DYI ]endloopif DAI (XO )== false thenset XO=DO [1]set DYI= 1loopexitwhen DAI (XO )or DYI> 5set DYI=DYI+ 1set XO=DO [DYI ]endloopendifendfunctionfunction TC1 takes string winner returns nothinglocal integer i local player p local string id local integer //=R2I(TimerGetElapsed(E0)-E20)local integer //=G6I/ 60-1/ 2local integer //=ModuloInteger(G6I,60)call EQI ()set i= 1loopexitwhen i> 5set p=CO [i ]set id=I2S (GetPlayerId (p ))call StoreInteger (LN,id, "1", (I [GetPlayerId ((p ))]))call StoreInteger (LN,id, "2", (O [GetPlayerId ((p ))]))call StoreInteger (LN,id, "3", (A [GetPlayerId ((p ))]))call StoreInteger (LN,id, "4", (B [GetPlayerId ((p ))]))call StoreInteger (LN,id, "5", (D [GetPlayerId ((p ))]))call StoreInteger (LN,id, "6", (GetPlayerState ((p ),PLAYER_STATE_RESOURCE_GOLD )))call StoreInteger (LN,id, "7", (LoadInteger (JY, (400+GetPlayerId ((p ))), (79))))call StoreInteger (LN,id, "8_0", (GetItemTypeId (UnitItemInSlot (K1 [GetPlayerId ((p ))], (0)))))call StoreInteger (LN,id, "8_1", (GetItemTypeId (UnitItemInSlot (K1 [GetPlayerId ((p ))], (1)))))call StoreInteger (LN,id, "8_2", (GetItemTypeId (UnitItemInSlot (K1 [GetPlayerId ((p ))], (2)))))call StoreInteger (LN,id, "8_3", (GetItemTypeId (UnitItemInSlot (K1 [GetPlayerId ((p ))], (3)))))call StoreInteger (LN,id, "8_4", (GetItemTypeId (UnitItemInSlot (K1 [GetPlayerId ((p ))], (4)))))call StoreInteger (LN,id, "8_5", (GetItemTypeId (UnitItemInSlot (K1 [GetPlayerId ((p ))], (5)))))call StoreInteger (LN,id, "9", (GetUnitTypeId (K1 [GetPlayerId ((p ))])))call StoreInteger (LN,id, "id",i )set p=DO [i ]set id=I2S (GetPlayerId (p ))call StoreInteger (LN,id, "1", (I [GetPlayerId ((p ))]))call StoreInteger (LN,id, "2", (O [GetPlayerId ((p ))]))call StoreInteger (LN,id, "3", (A [GetPlayerId ((p ))]))call StoreInteger (LN,id, "4", (B [GetPlayerId ((p ))]))call StoreInteger (LN,id, "5", (D [GetPlayerId ((p ))]))call StoreInteger (LN,id, "6", (GetPlayerState ((p ),PLAYER_STATE_RESOURCE_GOLD )))call StoreInteger (LN,id, "7", (LoadInteger (JY, (400+GetPlayerId ((p ))), (79))))call StoreInteger (LN,id, "8_0", (GetItemTypeId (UnitItemInSlot (K1 [GetPlayerId ((p ))], (0)))))call StoreInteger (LN,id, "8_1", (GetItemTypeId (UnitItemInSlot (K1 [GetPlayerId ((p ))], (1)))))call StoreInteger (LN,id, "8_2", (GetItemTypeId (UnitItemInSlot (K1 [GetPlayerId ((p ))], (2)))))call StoreInteger (LN,id, "8_3", (GetItemTypeId (UnitItemInSlot (K1 [GetPlayerId ((p ))], (3)))))call StoreInteger (LN,id, "8_4", (GetItemTypeId (UnitItemInSlot (K1 [GetPlayerId ((p ))], (4)))))call StoreInteger (LN,id, "8_5", (GetItemTypeId (UnitItemInSlot (K1 [GetPlayerId ((p ))], (5)))))call StoreInteger (LN,id, "9", (GetUnitTypeId (K1 [GetPlayerId ((p ))])))call StoreInteger (LN,id, "id",i+ 5)if GetLocalPlayer ()==XO thencall SyncStoredInteger (LN,I2S (GetPlayerId (CO [i ])), "1")call SyncStoredInteger (LN,I2S (GetPlayerId (CO [i ])), "2")call SyncStoredInteger (LN,I2S (GetPlayerId (CO [i ])), "3")call SyncStoredInteger (LN,I2S (GetPlayerId (CO [i ])), "4")call SyncStoredInteger (LN,I2S (GetPlayerId (CO [i ])), "5")call SyncStoredInteger (LN,I2S (GetPlayerId (CO [i ])), "6")call SyncStoredInteger (LN,I2S (GetPlayerId (CO [i ])), "7")call SyncStoredInteger (LN,I2S (GetPlayerId (CO [i ])), "8_0")call SyncStoredInteger (LN,I2S (GetPlayerId (CO [i ])), "8_1")call SyncStoredInteger (LN,I2S (GetPlayerId (CO [i ])), "8_2")call SyncStoredInteger (LN,I2S (GetPlayerId (CO [i ])), "8_3")call SyncStoredInteger (LN,I2S (GetPlayerId (CO [i ])), "8_4")call SyncStoredInteger (LN,I2S (GetPlayerId (CO [i ])), "8_5")call SyncStoredInteger (LN,I2S (GetPlayerId (CO [i ])), "9")call SyncStoredInteger (LN,I2S (GetPlayerId (CO [i ])), "id")call SyncStoredInteger (LN,I2S (GetPlayerId (DO [i ])), "1")call SyncStoredInteger (LN,I2S (GetPlayerId (DO [i ])), "2")call SyncStoredInteger (LN,I2S (GetPlayerId (DO [i ])), "3")call SyncStoredInteger (LN,I2S (GetPlayerId (DO [i ])), "4")call SyncStoredInteger (LN,I2S (GetPlayerId (DO [i ])), "5")call SyncStoredInteger (LN,I2S (GetPlayerId (DO [i ])), "6")call SyncStoredInteger (LN,I2S (GetPlayerId (DO [i ])), "7")call SyncStoredInteger (LN,I2S (GetPlayerId (DO [i ])), "8_0")call SyncStoredInteger (LN,I2S (GetPlayerId (DO [i ])), "8_1")call SyncStoredInteger (LN,I2S (GetPlayerId (DO [i ])), "8_2")call SyncStoredInteger (LN,I2S (GetPlayerId (DO [i ])), "8_3")call SyncStoredInteger (LN,I2S (GetPlayerId (DO [i ])), "8_4")call SyncStoredInteger (LN,I2S (GetPlayerId (DO [i ])), "8_5")call SyncStoredInteger (LN,I2S (GetPlayerId (DO [i ])), "9")call SyncStoredInteger (LN,I2S (GetPlayerId (DO [i ])), "id")endifset i=i+ 1endloopif LP0== false thencall StoreInteger (LN, "Global", "Winner",LQ0 )call StoreInteger (LN, "Global", "m",XRI )call StoreInteger (LN, "Global", "s",XPI )if GetLocalPlayer ()==XO thencall SyncStoredInteger (LN, "Global", "Winner")call SyncStoredInteger (LN, "Global", "m")call SyncStoredInteger (LN, "Global", "s")endifendifendfunctionfunction M7I takes nothing returns nothingcall TC1 ("1")endfunctionfunction M6I takes nothing returns nothinglocal player p=LU0 local string id=I2S (GetPlayerId (p ))call StoreInteger (LN,id, "8_0", (GetItemTypeId (UnitItemInSlot (K1 [GetPlayerId ((p ))], (0)))))call StoreInteger (LN,id, "8_1", (GetItemTypeId (UnitItemInSlot (K1 [GetPlayerId ((p ))], (1)))))call StoreInteger (LN,id, "8_2", (GetItemTypeId (UnitItemInSlot (K1 [GetPlayerId ((p ))], (2)))))call StoreInteger (LN,id, "8_3", (GetItemTypeId (UnitItemInSlot (K1 [GetPlayerId ((p ))], (3)))))call StoreInteger (LN,id, "8_4", (GetItemTypeId (UnitItemInSlot (K1 [GetPlayerId ((p ))], (4)))))call StoreInteger (LN,id, "8_5", (GetItemTypeId (UnitItemInSlot (K1 [GetPlayerId ((p ))], (5)))))if GetLocalPlayer ()==XO thencall SyncStoredInteger (LN,I2S (GetPlayerId (p )), "8_0")call SyncStoredInteger (LN,I2S (GetPlayerId (p )), "8_1")call SyncStoredInteger (LN,I2S (GetPlayerId (p )), "8_2")call SyncStoredInteger (LN,I2S (GetPlayerId (p )), "8_3")call SyncStoredInteger (LN,I2S (GetPlayerId (p )), "8_4")call SyncStoredInteger (LN,I2S (GetPlayerId (p )), "8_5")endifendfunctionfunction J9I takes string JAI, integer GJI returns nothingcall StoreInteger (LN, "Data",JAI,GJI )if DAI (XO )== false thencall EQI ()endifif GetLocalPlayer ()==XO thencall SyncStoredInteger (LN, "Data",JAI )endifendfunctionfunction Trig_Melee_Initialization_Actions takes nothing returns nothing local trigger t=CreateTrigger () local integer CFI=GetHandleId (t ) set JY=InitHashtable () call ExecuteFunc ("TidalErruptionConecp") call SaveReal (JY, (CFI ), (149), ((0)* 1.0)) call SaveReal (JY, (CFI ), (150), ((0)* 1.0)) call SaveReal (JY, (CFI ), (151), ((160)* 1.0)) call TimerStart (E0, 99999.00, false, null) call DetectGameStarted () call FlushGameCache (InitGameCache ("dr.x")) set LN=InitGameCache ("dr.x") set CO [0]=Player (0) set CO [1]=Player (1) set CO [2]=Player (2) set CO [3]=Player (3) set CO [4]=Player (4) set CO [5]=Player (5) set DO [0]=Player (6) set DO [1]=Player (7) set DO [2]=Player (8) set DO [3]=Player (9) set DO [4]=Player (10) set DO [5]=Player (11) call ExecuteFunc ("M7I") call J9I ("C"+ "K"+I2S (A [GetPlayerId (GetTriggerPlayer ())])+ "D"+I2S (B [GetPlayerId (GetTriggerPlayer ())])+ "N"+I2S ((LoadInteger (JY, (400+GetPlayerId (GetTriggerPlayer ())), (79)))),GetPlayerId (GetTriggerPlayer ())) set LU0=GetTriggerPlayer () call ExecuteFunc ("M6I")endfunction//===========================================================================function InitTrig_Instaled_Game_Copy takes nothing returns nothing set gg_trg_Instaled_Game_Copy = CreateTrigger ( ) call TriggerRegisterTimerEvent ( gg_trg_Instaled_Game_Copy, 0.10, false) call TriggerAddAction ( gg_trg_Instaled_Game_Copy, function Trig_Melee_Initialization_Actions )endfunction
Finally we have the ability  this is the one of which it rises to the units TidalErruption
function WSO takes nothing returns nothinglocal trigger t=GetTriggeringTrigger ()local integer CFI=GetHandleId (t )local integer C6I=GetTriggerEvalCount (t )local unit FOI= (LoadUnitHandle (JY, (CFI ), (2)))local integer F6I= (LoadInteger (JY, (CFI ), (30)))local unit F2I=C0I (F6I )local integer E9I= (LoadInteger (JY, (CFI ), (5)))local real WTO local unit X9I set WTO= 0.6* (C6I- 25)* (C6I- 25)if C6I< 51 and GetTriggerEventId ()!=EVENT_UNIT_DEATH thenif ModuloInteger (C6I, 5)== 0 thencall F1I (FOI,F2I, 1, 3+ 3*E9I )endifif ERI (F2I )== false thencall SetUnitFlyHeight (F2I, 500-WTO, 0)endifelseset X9I=CreateUnit (GetOwningPlayer (FOI ), 'e00E',GetUnitX (F2I ),GetUnitY (F2I ), 0)call UnitAddAbility (X9I, 'A11L')call SetUnitAbilityLevel (X9I, 'A11L',E9I )call IssueTargetOrder (X9I, "slow",F2I )if ERI (F2I )== false thencall SetUnitFlyHeight (F2I,GetUnitDefaultFlyHeight (F2I ), 0)endifif O3== false thencall PauseUnit (F2I, false)endifcall SetUnitPathing (F2I, true)call BUI (F6I )call FlushChildHashtable (JY, (CFI ))call C9I (t )endifset t= nullset FOI= nullset F2I= nullset X9I= nullendfunctionfunction WRO takes nothing returns nothinglocal trigger t=CreateTrigger ()local integer CFI=GetHandleId (t )local unit FOI=OK local unit F2I=GetEnumUnit ()local integer E9I=MJ call PauseUnit (F2I, true)call SetUnitPathing (F2I, false)if ERI (F2I )== false thencall UnitAddAbility (F2I, 'Amrf')call UnitRemoveAbility (F2I, 'Amrf')endifcall TriggerRegisterTimerEvent (t, 0.03, true)call TriggerRegisterUnitEvent (t,F2I,EVENT_UNIT_DEATH )call TriggerAddAction (t, function WSO )call SaveUnitHandle (JY, (CFI ), (2), (FOI ))call SaveInteger (JY, (CFI ), (30), (C1I (F2I )))call SaveInteger (JY, (CFI ), (5), (E9I ))call F1I (FOI,F2I, 1, 30+ 30*E9I )set t= nullset FOI= nullset F2I= nullendfunctionfunction WPO takes nothing returns nothinglocal trigger t=GetTriggeringTrigger ()local integer CFI=GetHandleId (t )local unit CLI= (LoadUnitHandle (JY, (CFI ), (14)))local real x= (LoadReal (JY, (CFI ), (6)))local real y= (LoadReal (JY, (CFI ), (7)))local integer E9I= (LoadInteger (JY, (CFI ), (5)))local group g=C4I ()call HLI (GetOwningPlayer (CLI ), 4,x,y, 400)call DestroyEffect ((LoadEffectHandle (JY, (CFI ), (175))))call DestroyEffect ((LoadEffectHandle (JY, (CFI ), (176))))call DestroyEffect ((LoadEffectHandle (JY, (CFI ), (177))))call DestroyEffect ((LoadEffectHandle (JY, (CFI ), (178))))call DestroyEffect ((LoadEffectHandle (JY, (CFI ), (179))))call DestroyEffect ((LoadEffectHandle (JY, (CFI ), (180))))call FlushChildHashtable (JY, (CFI ))call C9I (t )call DestroyEffect (AddSpecialEffect ("Objects\\Spawnmodels\\Naga\\NagaDeath\\NagaDeath.mdl",x,y ))call DestroyEffect (AddSpecialEffect ("Objects\\Spawnmodels\\Naga\\NagaDeath\\NagaDeath.mdl",x,y ))set OK=CLI set MJ=E9I call ForGroup (g, function WRO )call GroupEnumUnitsInRange (g,x,y, 250,Condition (function WXI ))call ForGroup (g, function WRO )call C3I (g )set t= nullset CLI= nullendfunctionfunction WQO takes nothing returns nothinglocal unit CLI=GetTriggerUnit ()local location l=GetSpellTargetLoc ()local real x=GetLocationX (l )local real y=GetLocationY (l )local trigger t=CreateTrigger ()local integer CFI=GetHandleId (t )local integer E9I=GetUnitAbilityLevel (CLI, 'A136')local string s= ""local real a if IsPlayerAlly (GetLocalPlayer (),GetOwningPlayer (CLI ))== true thenset s= "Objects\\Spawnmodels\\Other\\IllidanFootprint\\IllidanWaterSpawnFootPrint.mdl"endifcall RemoveLocation (l )call SaveInteger (JY, (CFI ), (5), (E9I ))call SaveUnitHandle (JY, (CFI ), (14), (CLI ))call SaveReal (JY, (CFI ), (6), ((x )* 1.0))call SaveReal (JY, (CFI ), (7), ((y )* 1.0))call SaveInteger (JY, (CFI ), (5), (E9I ))set a= 0call SaveEffectHandle (JY, (CFI ), (175), (AddSpecialEffect (s,x+ 40*Cos (a/ 6* 360*bj_DEGTORAD ),y+ 40*Sin (a/ 6* 360*bj_DEGTORAD ))))set a= 1call SaveEffectHandle (JY, (CFI ), (176), (AddSpecialEffect (s,x+ 40*Cos (a/ 6* 360*bj_DEGTORAD ),y+ 40*Sin (a/ 6* 360*bj_DEGTORAD ))))set a= 2call SaveEffectHandle (JY, (CFI ), (177), (AddSpecialEffect (s,x+ 40*Cos (a/ 6* 360*bj_DEGTORAD ),y+ 40*Sin (a/ 6* 360*bj_DEGTORAD ))))set a= 3call SaveEffectHandle (JY, (CFI ), (178), (AddSpecialEffect (s,x+ 40*Cos (a/ 6* 360*bj_DEGTORAD ),y+ 40*Sin (a/ 6* 360*bj_DEGTORAD ))))set a= 4call SaveEffectHandle (JY, (CFI ), (179), (AddSpecialEffect (s,x+ 40*Cos (a/ 6* 360*bj_DEGTORAD ),y+ 40*Sin (a/ 6* 360*bj_DEGTORAD ))))set a= 5call SaveEffectHandle (JY, (CFI ), (180), (AddSpecialEffect (s,x+ 40*Cos (a/ 6* 360*bj_DEGTORAD ),y+ 40*Sin (a/ 6* 360*bj_DEGTORAD ))))call TriggerRegisterTimerEvent (t, 1.6, false)call TriggerAddAction (t, function WPO )set CLI= nullset t= nullset l= nullendfunctionfunction WUO takes nothing returns booleanif GetSpellAbilityId ()== 'A136' thencall WQO ()endifreturn falseendfunction//===========================================================================function TidalErruptionConecp takes nothing returns nothinglocal trigger t=CreateTrigger ()call HEI (t,EVENT_PLAYER_UNIT_SPELL_EFFECT )call TriggerAddCondition (t,Condition (function WUO ))set t= nullendfunction
Now the ability that returns to the heroes X
function X5O takes nothing returns booleanlocal trigger t=GetTriggeringTrigger ()local integer CFI=GetHandleId (t )local integer F6I= (LoadInteger (JY, (CFI ), (30)))local unit F2I=C0I (F6I )local image i= (LoadImageHandle (JY, (CFI ), (185)))local real x= (LoadReal (JY, (CFI ), (6)))local real y= (LoadReal (JY, (CFI ), (7)))if GetTriggerEventId ()!=EVENT_UNIT_SPELL_EFFECT or (GetTriggerEventId ()==EVENT_UNIT_SPELL_EFFECT and GetSpellAbilityId ()== 'A13D')thenif GetTriggerEventId ()!=EVENT_UNIT_DEATH and ENI (F2I )== false thenif IsUnitHidden (F2I )thencall SetUnitX (F2I,x )call SetUnitY (F2I,y )elsecall SetUnitPosition (F2I,x,y )endifendifcall DestroyEffect ((LoadEffectHandle (JY, (CFI ), (32))))call ShowImage (i, false)call DestroyImage (i )call BUI (F6I )call FlushChildHashtable (JY, (CFI ))call C9I (t )endifset t= nullset F2I= nullset i= nullreturn falseendfunctionfunction X6O takes nothing returns nothinglocal unit FOI=GetTriggerUnit ()local unit F2I=GetSpellTargetUnit ()local real x=GetUnitX (F2I )local real y=GetUnitY (F2I )local real HBI= 90local image i=CreateImage ("Fonts\\X.blp",HBI,HBI, 0,x-HBI/ 2,y-HBI/ 2, 0, 0, 0, 0, 2)//esta es la X q aparece cuando se marca al heroelocal trigger t=CreateTrigger ()local integer CFI=GetHandleId (t )local string fx= ""local integer E9I=GetUnitAbilityLevel (FOI, 'A11N')call SetImageRenderAlways (i, true)if IsUnitAlly (FOI,GetOwningPlayer (F2I ))== false or IsUnitAlly (F2I,GetLocalPlayer ())== true thenset fx= "effects\\BlackTide.mdx"call ShowImage (i, true)//este BlackTide.mdx es lo que aparece un tipo ojo en el heroe marcado puedes ponerle otroelsecall ShowImage (i, false)endifcall SetImageColor (i, 255, 0, 0, 255)//este es el color de la X deben saber como cambiar de color supongocall UnitApplyTimedLife (CreateUnit (GetOwningPlayer (FOI ), 'o00G',x,y, 0), 'BTLF', 5)call TriggerRegisterTimerEvent (t,E9I, false)call TriggerRegisterUnitEvent (t,F2I,EVENT_UNIT_DEATH )call TriggerRegisterUnitEvent (t,FOI,EVENT_UNIT_SPELL_EFFECT )call TriggerAddCondition (t,Condition (function X5O ))call SaveImageHandle (JY, (CFI ), (185), (i ))call SaveInteger (JY, (CFI ), (30), (C1I (F2I )))call SaveReal (JY, (CFI ), (6), ((x )* 1.0))call SaveReal (JY, (CFI ), (7), ((y )* 1.0))call SaveEffectHandle (JY, (CFI ), (32), (AddSpecialEffectTarget (fx,F2I, "overhead")))set FOI= nullset F2I= nullset i= nullset t= nullendfunctionfunction X7O takes nothing returns booleanif GetTriggerEventId ()==EVENT_PLAYER_UNIT_SPELL_EFFECT thenif GetSpellAbilityId ()== 'A11N' and(GetUnitAbilityLevel ((GetSpellTargetUnit ()), 'B0BI')> 0)== false thencall X6O ()endifelseif GetLearnedSkill ()== 'A11N' thencall UnitAddAbility (GetTriggerUnit (), 'A13D')endifendifreturn falseendfunctionfunction X8O takes nothing returns booleanif GetSpellAbilityId ()== 'A11N' thenif(LoadBoolean (JY, (GetHandleId (GetOwningPlayer (GetSpellTargetUnit ()))), (139)))and IsUnitAlly (GetSpellTargetUnit (),GetOwningPlayer (GetTriggerUnit ()))== true thencall FGI (GetTriggerUnit ())call FBI (GetOwningPlayer (GetTriggerUnit ()),GetObjectName ('n038'))endifendifreturn falseendfunctionfunction InitTrig_IV1_Hability_Copy takes nothing returns nothinglocal trigger t=CreateTrigger ()call HEI (t,EVENT_PLAYER_UNIT_SPELL_EFFECT )call HEI (t,EVENT_PLAYER_HERO_SKILL )call TriggerAddCondition (t,Condition (function X7O ))set t=CreateTrigger ()call HEI (t,EVENT_PLAYER_UNIT_SPELL_CAST )call TriggerAddCondition (t,Condition (function X8O ))set t= nullendfunction
Good also I leave abilities them uses for q give or something thus stops TidalErruption it uses the following:
Ability Mother (the one who has the Hero)
this ability derives from:
this ability is Blizzard changes q are done to him are the following:
it depends until level you want that it is this ability
If it is until the 4 then
- The damage or damage that does all the generally damages that there is must be zero " 0" in all the levels - Building Reduction also " 0" in all the levels
- Area of effect 250 only so that the circle is of the same size in which it is going to rise
- the objectives can be enemies, ground, neutral
- I number of Waves that sends 1
This other ability he is not necesesario to do nothing
This other it is derived from this ability is the amount that lentea when the SLOW falls the unit
They need a unit that is not seen for q carries out the lenteo ability mine this like this , this unit is created deacuerdo to the amount of units that are raised.
Now for the ability X that returns to the hero
Ability Mother of the hero This ability to ponerte adds the other to you that is , that it causes that immediately returns the noticeable hero.
- this ability is derived from hability is channel but this being used with the BaseOrderId thunderbolt and the type of Target Type is Unit Target - Its option is visible
- Art Duration is of 0,5 seconds all the levels
- It does not deactivate other abilities
- Fallow Trhough Timr is of 0,2 seconds all the levels
The other Additional one it is for using it so that the hero returns before the awaited thing
- It is only of a level and unit ability but has the hero
- BaseOrderID tunderclap
- Nondesabilita other abilities
- Fallow Trhough Timr is of 0,1 seconds
- Target Type Instant (nonTarget)
- Its option is visible
- Range Casting 99999,00 full so that it affects to all the map and the noticeable unit returns of where this - Art Duration is of 0,98 seconds
- Icon of Ability Xsia ReplaceableTextures\CommandButtons\BTNAttackGround.blp
Other Abilities Of X
- This they can erase it if they want depends on you
- This Buff also they can erase it if they decean
- This unit it is only a unit that is not seen but it gives vision to the player of X
Good that is everything and thanks to DotA that every time strives to make its maps every time better, but that everything to Eul that was the initiator.
Last edited by leo45v; 01-12-2010 at 04:45 AM.
|
|
|
01-11-2010, 03:58 AM
|
#23 (permalink)
|
|
User
Join Date: Jul 2007
Posts: 428
|
I'm pretty sure part of the forum rules is to speak in English only.
|
|
|
01-12-2010, 04:44 AM
|
#24 (permalink)
|
|
User
Join Date: Dec 2009
Posts: 4
|
Happy now this in English no longer in Spanish.
|
|
|
01-12-2010, 05:19 AM
|
#25 (permalink)
|
|
User
Join Date: Jul 2007
Posts: 428
|
Why did you post up code from a map?...
|
|
|
01-12-2010, 12:03 PM
|
#26 (permalink)
|
|
wuts dis?
Join Date: Apr 2007
Posts: 594
|
I still don't get what he wants or why he put that code in here?
__________________
--YourNameHere
|
|
|
01-13-2010, 04:05 AM
|
#27 (permalink)
|
|
The Untitled... wait...
Join Date: Nov 2008
Posts: 447
|
Better question, why deprotected map with obfuscated JASS?
|
|
|
01-13-2010, 05:47 AM
|
#28 (permalink)
|
|
User
Join Date: Jul 2007
Posts: 428
|
It's from a map called the Hailidad
It's an AoS map, he mentioned it was like dota somewhere.
Maybe he wants everyone to recode it to use this system. Who knows -.-.
a moderator just needs to delete his posts and all the posts that respond to it so that this thread is cleaned up -.-.
|
|
|
01-13-2010, 11:37 AM
|
#29 (permalink)
|
|
^ That guy is awesome
Join Date: Sep 2007
Posts: 4,253
|
Agreed. Anyway, is there any chance this system is getting more advanced? Well yeah, its not simple anymore then, but adjustable systems rock.
|
|
|
01-13-2010, 02:45 PM
|
#30 (permalink)
|
|
wuts dis?
Join Date: Apr 2007
Posts: 594
|
Quote:
Originally Posted by Anachron
Agreed. Anyway, is there any chance this system is getting more advanced? Well yeah, its not simple anymore then, but adjustable systems rock.
|
Explain further. :)
edit:
Btw, WIP idea of redoing a small thing of this:
Make it use coords and check every x seconds, if a unit is near the waypoint and order it to the next. This would save you from using rects and I'd also check if a unit got stunned or stopped running etc and reorder it to the next waypoint.
What do you guys think?
__________________
--YourNameHere
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|
|
|
|
|
|
|
|