• 🏆 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!

[Crash] Request/Need Help with JASS

Status
Not open for further replies.
Level 6
Joined
May 11, 2013
Messages
205
Hello everyone. I need help with JASS. I made all the variables by myself then copy JASS text but at the end result is always memory leaks. May i ask for help with TeamViewer? I cant write it here cause its 386k chars, so i put attachments. My goal is to make my current map init JASS trigger exact same as this, because mapper is inactive(look second Attach) Please help me, I be so much thankful to you if you help.Thirth is my edited map
 

Attachments

  • JASS.txt
    354.8 KB · Views: 76
  • Heroes & Armies 3.01c.w3x
    3 MB · Views: 74
  • Heroes And Armies Edit.w3x
    128.2 KB · Views: 37
Last edited:
Level 6
Joined
May 11, 2013
Messages
205
come one at least someone reply? This site looks dead to me 3-4 days no responding ...
 
Level 6
Joined
May 11, 2013
Messages
205
thanks for answering I've tried to post the code but its too large its like 380k letters allowed is 80k i think. Main problem is script errors. Even if i rewrite variables and paste JASS to a new trigger the JASS doens't pass validation and gives me script errors. I posted maps so you can check the triggers from the first map and second map is my current that i working on it. I havent done any objects and units do they effect trigger?
 
Level 29
Joined
Oct 24, 2012
Messages
6,543
post a small portion of the code so we can see it then. maybe we can point out some mistakes that u r making in ur whole trigger from a small piece of code.

also if ur making variable in the variable editor then in jass u need the udg_ prefix for them (not sure if u know this)

try looking at my tutorials the one is for GUI but should help u. the other is for converting GUI to JASS that should help u also.
 
Level 6
Joined
May 11, 2013
Messages
205
post a small portion of the code so we can see it then. maybe we can point out some mistakes that u r making in ur whole trigger from a small piece of code.

also if ur making variable in the variable editor then in jass u need the udg_ prefix for them (not sure if u know this)

try looking at my tutorials the one is for GUI but should help u. the other is for converting GUI to JASS that should help u also.

i don't know how to make this, i know only object editor. I hope to find kind soul who can help me with this. I won't ask if i know how to fix it. I'll look about tutorials. Thanks for reply.
 
Level 14
Joined
Dec 29, 2009
Messages
931
its easy to put a small piece of code.. >_>

just copy the code into a post and put it between JASS tags like this

JASS:
code
[code=jass]code[/code]

even if you cant put the whole thing just a small part could help us help you learn what you're doing wrong.
 
Level 6
Joined
May 11, 2013
Messages
205
okay when i return from work(19:00+2GMT) I'll try to paste it, but its a very big code. JASS is not mine, i've copy the code and remake variables.
 
Level 6
Joined
May 11, 2013
Messages
205
JASS:
function InitGlobals3 takes nothing returns nothing
	local integer i=0
	set i=0
	loop
		exitwhen(i>1)
		set udg_integers01[i]=0
		set udg_integers02[i]=0
		set udg_integers03[i]=0
		set udg_integers04[i]=0
		set udg_integers05[i]=0
		set udg_booleans01[i]=false
		set udg_booleans02[i]=false
		set udg_strings01[i]=""
		set udg_strings02[i]=""
		set udg_booleans03[i]=false
		set udg_booleans04[i]=false
		set udg_strings04[i]=""
		set udg_integers08[i]=0
		set udg_booleans05[i]=false
		set udg_booleans06[i]=false
		set udg_booleans07[i]=false
		set udg_booleans08[i]=false
		set udg_booleans09[i]=false
		set udg_integers09[i]=0
		set udg_integers10[i]=0
		set udg_integers11[i]=0
		set udg_strings05[i]=""
		set udg_strings06[i]=""
		set udg_integers12[i]=0
		set udg_integers13[i]=0
		set udg_integers14[i]=0
		set udg_booleans19[i]=false
		set i=i+1
	endloop
	set udg_integer13=1
	set udg_integer14=1
	set udg_force01=CreateForce()
	set i=0
	loop
		exitwhen(i>$B)
		set udg_strings03[i]=""
		set i=i+1
	endloop
	set udg_force02=CreateForce()
	set udg_force03=CreateForce()
	set udg_force04=CreateForce()
	set udg_force05=CreateForce()
	set udg_force06=CreateForce()
	set udg_force07=CreateForce()
	set udg_force08=CreateForce()
	set udg_group01=CreateGroup()
	set udg_group02=CreateGroup()
	set udg_dialog01=DialogCreate()
	set udg_force09=CreateForce()
	set udg_force10=CreateForce()
	set udg_force11=CreateForce()
	set udg_integer40=1
	set udg_integer41=1
	set i=0
	loop
		exitwhen(i>$A)
		set udg_integers15[i]=0
		set udg_booleans10[i]=false
		set udg_integers16[i]=0
		set udg_integers17[i]=0
		set udg_booleans11[i]=false
		set udg_integers18[i]=0
		set udg_integers19[i]=0
		set udg_integers20[i]=0
		set udg_booleans13[i]=false
		set udg_booleans15[i]=false
		set udg_booleans16[i]=false
		set udg_booleans17[i]=false
		set udg_booleans18[i]=false
		set i=i+1
	endloop
	set udg_integer43=1
	set udg_integer45=1
	set i=0
	loop
		exitwhen(i>3)
		set udg_booleans12[i]=false
		set udg_booleans14[i]=false
		set i=i+1
	endloop
	set udg_integer48=50
	set udg_integer49='x'
endfunction
 
Level 6
Joined
May 11, 2013
Messages
205
JASS:
function InitSounds2 takes nothing returns nothing
	set udg_sound05=CreateSound("war3mapImported\\3_2_1_fight_16bit.mp3",false,false,false,$A,$A,"")
	call SetSoundDuration(udg_sound05,$EE6)
	call SetSoundChannel(udg_sound05,0)
	call SetSoundVolume(udg_sound05,$7F)
	call SetSoundPitch(udg_sound05,1.)
	set udg_sound06=CreateSound("war3mapImported\\-dominating.mp3",false,false,false,$A,$A,"")
	call SetSoundDuration(udg_sound06,$66E)
	call SetSoundChannel(udg_sound06,0)
	call SetSoundVolume(udg_sound06,$7F)
	call SetSoundPitch(udg_sound06,1.)
	set udg_sound04=CreateSound("war3mapImported\\-HolyShit_F.mp3",false,false,false,$A,$A,"")
	call SetSoundDuration(udg_sound04,$E7D)
	call SetSoundChannel(udg_sound04,0)
	call SetSoundVolume(udg_sound04,$7F)
	call SetSoundPitch(udg_sound04,1.)
	set udg_sound08=CreateSound("war3mapImported\\-killing_spree.mp3",false,false,false,$A,$A,"")
	call SetSoundDuration(udg_sound08,$78D)
	call SetSoundChannel(udg_sound08,0)
	call SetSoundVolume(udg_sound08,$7F)
	call SetSoundPitch(udg_sound08,1.)
	set udg_sound09=CreateSound("war3mapImported\\-rampage.mp3",false,false,false,$A,$A,"")
	call SetSoundDuration(udg_sound09,$725)
	call SetSoundChannel(udg_sound09,0)
	call SetSoundVolume(udg_sound09,$7F)
	call SetSoundPitch(udg_sound09,1.)
	set udg_sound10=CreateSound("war3mapImported\\-unstoppable.mp3",false,false,false,$A,$A,"")
	call SetSoundDuration(udg_sound10,$810)
	call SetSoundChannel(udg_sound10,0)
	call SetSoundVolume(udg_sound10,$7F)
	call SetSoundPitch(udg_sound10,1.)
	set udg_sound11=CreateSound("war3mapImported\\-WhickedSick.mp3",false,false,false,$A,$A,"")
	call SetSoundDuration(udg_sound11,$9B2)
	call SetSoundChannel(udg_sound11,0)
	call SetSoundVolume(udg_sound11,$7F)
	call SetSoundPitch(udg_sound11,1.)
	set udg_sound12=CreateSound("war3mapImported\\excellent.mp3",false,false,false,$A,$A,"")
	call SetSoundDuration(udg_sound12,$498)
	call SetSoundChannel(udg_sound12,0)
	call SetSoundVolume(udg_sound12,$7F)
	call SetSoundPitch(udg_sound12,1.)
	set udg_sound13=CreateSound("war3mapImported\\firstblood.mp3",false,false,false,$A,$A,"")
	call SetSoundChannel(udg_sound13,0)
	call SetSoundVolume(udg_sound13,$7F)
	call SetSoundPitch(udg_sound13,1.)
	set udg_sound14=CreateSound("war3mapImported\\ganja.mp3",false,false,false,$A,$A,"")
	call SetSoundDuration(udg_sound14,$AD1)
	call SetSoundChannel(udg_sound14,0)
	call SetSoundVolume(udg_sound14,$7F)
	call SetSoundPitch(udg_sound14,1.)
	set udg_sound15=CreateSound("war3mapImported\\godlike.mp3",false,false,false,$A,$A,"")
	call SetSoundDuration(udg_sound15,$605)
	call SetSoundChannel(udg_sound15,0)
	call SetSoundVolume(udg_sound15,$7F)
	call SetSoundPitch(udg_sound15,1.)
	set udg_sound16=CreateSound("war3mapImported\\herotinkeryes4.mp3",false,false,false,$A,$A,"")
	call SetSoundDuration(udg_sound16,$759)
	call SetSoundChannel(udg_sound16,0)
	call SetSoundVolume(udg_sound16,$7F)
	call SetSoundPitch(udg_sound16,1.)
	set udg_sound17=CreateSound("war3mapImported\\impressive.mp3",false,false,false,$A,$A,"")
	call SetSoundDuration(udg_sound17,$4B2)
	call SetSoundChannel(udg_sound17,0)
	call SetSoundVolume(udg_sound17,$7F)
	call SetSoundPitch(udg_sound17,1.)
	set udg_sound18=CreateSound("war3mapImported\\laugh3.mp3",false,false,false,$A,$A,"")
	call SetSoundDuration(udg_sound18,$CDB)
	call SetSoundChannel(udg_sound18,0)
	call SetSoundVolume(udg_sound18,$7F)
	call SetSoundPitch(udg_sound18,1.)
	set udg_sound19=CreateSound("Abilities\\Weapons\\PoisonArrow\\PoisonArrowHit1.wav",false,true,true,$A,$A,"MissilesEAX")
	call SetSoundParamsFromLabel(udg_sound19,"PoisonArrowHit")
	call SetSoundDuration(udg_sound19,836)
	set udg_sound20=CreateSound("war3mapImported\\prepare.mp3",false,false,false,$A,$A,"")
	call SetSoundDuration(udg_sound20,$70A)
	call SetSoundChannel(udg_sound20,0)
	call SetSoundVolume(udg_sound20,$7F)
	call SetSoundPitch(udg_sound20,1.)
	set udg_sound21=CreateSound("Sound\\Interface\\UpkeepRing.wav",false,false,false,$A,$A,"")
	call SetSoundParamsFromLabel(udg_sound21,"UpkeepLevel")
	call SetSoundDuration(udg_sound21,$62B)
	set udg_sound22=CreateSound("war3mapImported\\drugs1.mp3",false,false,false,$A,$A,"")
	call SetSoundDuration(udg_sound22,$A9D)
	call SetSoundChannel(udg_sound22,0)
	call SetSoundVolume(udg_sound22,$7F)
	call SetSoundPitch(udg_sound22,1.)
	set udg_sound23=CreateSound("war3mapImported\\alright2.mp3",false,false,false,$A,$A,"")
	call SetSoundDuration(udg_sound23,4754)
	call SetSoundChannel(udg_sound23,0)
	call SetSoundVolume(udg_sound23,$7F)
	call SetSoundPitch(udg_sound23,1.)
	set udg_sound24=CreateSound("war3mapImported\\yeahbaby.mp3",false,false,false,$A,$A,"")
	call SetSoundDuration(udg_sound24,$82A)
	call SetSoundChannel(udg_sound24,0)
	call SetSoundVolume(udg_sound24,$7F)
	call SetSoundPitch(udg_sound24,1.)
	set udg_sound25=CreateSound("war3mapImported\\alright.mp3",false,false,false,$A,$A,"DefaultEAXON")
	call SetSoundDuration(udg_sound25,$85E)
	call SetSoundChannel(udg_sound25,0)
	call SetSoundVolume(udg_sound25,$7F)
	call SetSoundPitch(udg_sound25,1.)
	set udg_sound26=CreateSound("war3mapImported\\18wrongbutton.wav",false,false,false,$A,$A,"")
	call SetSoundDuration(udg_sound26,$B4B)
	call SetSoundChannel(udg_sound26,0)
	call SetSoundVolume(udg_sound26,$7F)
	call SetSoundPitch(udg_sound26,1.)
	set udg_sound27=CreateSound("war3mapImported\\badboys.mp3",false,false,false,$A,$A,"")
	call SetSoundDuration(udg_sound27,5810)
	call SetSoundChannel(udg_sound27,0)
	call SetSoundVolume(udg_sound27,$7F)
	call SetSoundPitch(udg_sound27,1.)
	set udg_sound28=CreateSound("war3mapImported\\english.wav",false,false,false,$A,$A,"")
	call SetSoundChannel(udg_sound28,0)
	call SetSoundVolume(udg_sound28,$7F)
	call SetSoundPitch(udg_sound28,1.)
	set udg_sound29=CreateSound("war3mapImported\\headshot.mp3",false,false,false,$A,$A,"")
	call SetSoundDuration(udg_sound29,$C85)
	call SetSoundChannel(udg_sound29,0)
	call SetSoundVolume(udg_sound29,$7F)
	call SetSoundPitch(udg_sound29,1.)
endfunction

function CreateAllItems takes nothing returns nothing
	local integer itemID
	call CreateItem('dkfw',4695.,2413.9)
endfunction
 
Level 6
Joined
May 11, 2013
Messages
205
JASS:
function CreateRegions3 takes nothing returns nothing
	local weathereffect we
	set udg_rect25=Rect(-3680.,-576.,-3392.,-192.)
	set udg_rect26=Rect(3456.,-512.,3776.,-96.)
	set udg_rect27=Rect(-1600.,-640.,-736.,128.)
	set udg_rect28=Rect(896.,-512.,1632.,288.)
	set udg_rect29=Rect(4928.,1120.,5056.,1664.)
	set udg_rect30=Rect(4992.,-2400.,5120.,-1664.)
	set udg_rect31=Rect(-5120.,1120.,-5024.,1824.)
	set udg_rect32=Rect(-5088.,-2464.,-4992.,-1888.)
	set udg_rect33=Rect(-4544.,-1056.,-3904.,320.)
	set udg_rect34=Rect(3968.,-832.,4512.,256.)
endfunction

function GetHost takes nothing returns nothing
	local gamecache g=InitGameCache("Map.w3v")
	call StoreInteger(g,"Map","Host",GetPlayerId(GetLocalPlayer())+1)
	call TriggerSyncStart()
	call SyncStoredInteger(g,"Map","Host")
	call TriggerSyncReady()
	set udg_player01=Player(GetStoredInteger(g,"Map","Host")-1)
	call FlushGameCache(g)
	set g=null
endfunction

function Trig_AgilityTomesAgiHeroes_Func005C takes nothing returns boolean
	return(GetUnitTypeId(GetBuyingUnit())=='Emoo')or(GetUnitTypeId(GetBuyingUnit())=='Edem')or(GetUnitTypeId(GetBuyingUnit())=='Ewar')or(GetUnitTypeId(GetBuyingUnit())=='Obla')or(GetUnitTypeId(GetBuyingUnit())=='Nbrn')or(GetUnitTypeId(GetBuyingUnit())=='N00Q')or(GetUnitTypeId(GetBuyingUnit())=='N00P')or(GetUnitTypeId(GetBuyingUnit())=='O00R')or(GetUnitTypeId(GetBuyingUnit())=='E00B')or(GetUnitTypeId(GetBuyingUnit())=='Edmm')or(GetUnitTypeId(GetBuyingUnit())=='E00P')or(GetUnitTypeId(GetBuyingUnit())=='E00Q')
endfunction

function Trig_AgilityTomesAgiHeroes_Conditions takes nothing returns boolean
	return(GetItemTypeId(GetSoldItem())=='tdex')and(Trig_AgilityTomesAgiHeroes_Func005C())
endfunction

function Trig_AgilityTomesAgiHeroes_Actions takes nothing returns nothing
	set udg_force03=GetForceOfPlayer(GetOwningPlayer(GetBuyingUnit()))
	call ModifyHeroStat(1,GetBuyingUnit(),1,1)
	call AdjustPlayerStateBJ($AF,GetOwningPlayer(GetBuyingUnit()),PLAYER_STATE_RESOURCE_GOLD)
	call QuestMessageBJ(udg_force03,7,"|cffFF0000Your hero is Agility-type based, buy the correct tomes!|r")
	call DestroyForce(udg_force03)
endfunction

function InitTrig_AgilityTomesAgiHeroes takes nothing returns nothing
	set udg_trigger21=CreateTrigger()
	call TriggerRegisterAnyUnitEventBJ(udg_trigger21,EVENT_PLAYER_UNIT_SELL_ITEM)
	call TriggerAddCondition(udg_trigger21,Condition(function Trig_AgilityTomesAgiHeroes_Conditions))
	call TriggerAddAction(udg_trigger21,function Trig_AgilityTomesAgiHeroes_Actions)
endfunction

function Trig_AgilityTomesNonAgiHeroes_Func005C takes nothing returns boolean
	return(GetUnitTypeId(GetBuyingUnit())=='Ekee')or(GetUnitTypeId(GetBuyingUnit())=='Nfir')or(GetUnitTypeId(GetBuyingUnit())=='Hpal')or(GetUnitTypeId(GetBuyingUnit())=='Hamg')or(GetUnitTypeId(GetBuyingUnit())=='Hmkg')or(GetUnitTypeId(GetBuyingUnit())=='Hblm')or(GetUnitTypeId(GetBuyingUnit())=='Ofar')or(GetUnitTypeId(GetBuyingUnit())=='Otch')or(GetUnitTypeId(GetBuyingUnit())=='Oshd')or(GetUnitTypeId(GetBuyingUnit())=='Udea')or(GetUnitTypeId(GetBuyingUnit())=='Ulic')or(GetUnitTypeId(GetBuyingUnit())=='Ucrl')or(GetUnitTypeId(GetBuyingUnit())=='Udre')or(GetUnitTypeId(GetBuyingUnit())=='Nalc')or(GetUnitTypeId(GetBuyingUnit())=='Nngs')or(GetUnitTypeId(GetBuyingUnit())=='Ntin')or(GetUnitTypeId(GetBuyingUnit())=='Nbst')or(GetUnitTypeId(GetBuyingUnit())=='Npbm')or(GetUnitTypeId(GetBuyingUnit())=='Nplh')or(GetUnitTypeId(GetBuyingUnit())=='H00I')or(GetUnitTypeId(GetBuyingUnit())=='N012')or(GetUnitTypeId(GetBuyingUnit())=='E005')or(GetUnitTypeId(GetBuyingUnit())=='E00F')or(GetUnitTypeId(GetBuyingUnit())=='N00W')
endfunction

function Trig_AgilityTomesNonAgiHeroes_Conditions takes nothing returns boolean
	return(GetItemTypeId(GetSoldItem())=='I001')and(Trig_AgilityTomesNonAgiHeroes_Func005C())
endfunction

function Trig_AgilityTomesNonAgiHeroes_Actions takes nothing returns nothing
	set udg_force04=GetForceOfPlayer(GetOwningPlayer(GetBuyingUnit()))
	call ModifyHeroStat(1,GetBuyingUnit(),1,1)
	call AdjustPlayerStateBJ($C8,GetOwningPlayer(GetBuyingUnit()),PLAYER_STATE_RESOURCE_GOLD)
	call QuestMessageBJ(udg_force04,7,"|cffFF0000Your hero is not Agility-type based!|r")
	call DestroyForce(udg_force04)
endfunction

function InitTrig_AgilityTomesNonAgiHeroes takes nothing returns nothing
	set udg_trigger47=CreateTrigger()
	call TriggerRegisterAnyUnitEventBJ(udg_trigger47,EVENT_PLAYER_UNIT_SELL_ITEM)
	call TriggerAddCondition(udg_trigger47,Condition(function Trig_AgilityTomesNonAgiHeroes_Conditions))
	call TriggerAddAction(udg_trigger47,function Trig_AgilityTomesNonAgiHeroes_Actions)
endfunction

function Trig_AgilityTomesAgiHeroes5_Func005C takes nothing returns boolean
	return(GetUnitTypeId(GetBuyingUnit())=='Emoo')or(GetUnitTypeId(GetBuyingUnit())=='Edem')or(GetUnitTypeId(GetBuyingUnit())=='Ewar')or(GetUnitTypeId(GetBuyingUnit())=='Obla')or(GetUnitTypeId(GetBuyingUnit())=='Nbrn')or(GetUnitTypeId(GetBuyingUnit())=='N00Q')or(GetUnitTypeId(GetBuyingUnit())=='N00P')or(GetUnitTypeId(GetBuyingUnit())=='O00R')or(GetUnitTypeId(GetBuyingUnit())=='E00B')or(GetUnitTypeId(GetBuyingUnit())=='Edmm')or(GetUnitTypeId(GetBuyingUnit())=='E00Q')or(GetUnitTypeId(GetBuyingUnit())=='E00P')
endfunction

function Trig_AgilityTomesAgiHeroes5_Conditions takes nothing returns boolean
	return(GetItemTypeId(GetSoldItem())=='tdx2')and(Trig_AgilityTomesAgiHeroes5_Func005C())
endfunction

function Trig_AgilityTomesAgiHeroes5_Actions takes nothing returns nothing
	set udg_force02=GetForceOfPlayer(GetOwningPlayer(GetBuyingUnit()))
	call ModifyHeroStat(1,GetBuyingUnit(),1,5)
	call AdjustPlayerStateBJ(875,GetOwningPlayer(GetBuyingUnit()),PLAYER_STATE_RESOURCE_GOLD)
	call QuestMessageBJ(udg_force02,7,"|cffFF0000Your hero is Agility-type based, buy the correct tomes!|r")
	call DestroyForce(udg_force02)
endfunction

function InitTrig_AgilityTomesAgiHeroes5 takes nothing returns nothing
	set udg_trigger48=CreateTrigger()
	call TriggerRegisterAnyUnitEventBJ(udg_trigger48,EVENT_PLAYER_UNIT_SELL_ITEM)
	call TriggerAddCondition(udg_trigger48,Condition(function Trig_AgilityTomesAgiHeroes5_Conditions))
	call TriggerAddAction(udg_trigger48,function Trig_AgilityTomesAgiHeroes5_Actions)
endfunction

function Trig_AgilityTomesNonAgiHeroes5_Func005C takes nothing returns boolean
	return(GetUnitTypeId(GetBuyingUnit())=='Ekee')or(GetUnitTypeId(GetBuyingUnit())=='Nfir')or(GetUnitTypeId(GetBuyingUnit())=='Hpal')or(GetUnitTypeId(GetBuyingUnit())=='Hamg')or(GetUnitTypeId(GetBuyingUnit())=='Hmkg')or(GetUnitTypeId(GetBuyingUnit())=='Hblm')or(GetUnitTypeId(GetBuyingUnit())=='Ofar')or(GetUnitTypeId(GetBuyingUnit())=='Otch')or(GetUnitTypeId(GetBuyingUnit())=='Oshd')or(GetUnitTypeId(GetBuyingUnit())=='Udea')or(GetUnitTypeId(GetBuyingUnit())=='Ulic')or(GetUnitTypeId(GetBuyingUnit())=='Ucrl')or(GetUnitTypeId(GetBuyingUnit())=='Udre')or(GetUnitTypeId(GetBuyingUnit())=='Nalc')or(GetUnitTypeId(GetBuyingUnit())=='Nngs')or(GetUnitTypeId(GetBuyingUnit())=='Ntin')or(GetUnitTypeId(GetBuyingUnit())=='Nbst')or(GetUnitTypeId(GetBuyingUnit())=='Npbm')or(GetUnitTypeId(GetBuyingUnit())=='Nplh')or(GetUnitTypeId(GetBuyingUnit())=='H00I')or(GetUnitTypeId(GetBuyingUnit())=='N012')or(GetUnitTypeId(GetBuyingUnit())=='E005')or(GetUnitTypeId(GetBuyingUnit())=='E00F')or(GetUnitTypeId(GetBuyingUnit())=='N00W')
endfunction

function Trig_AgilityTomesNonAgiHeroes5_Conditions takes nothing returns boolean
	return(GetItemTypeId(GetSoldItem())=='I000')and(Trig_AgilityTomesNonAgiHeroes5_Func005C())
endfunction

function Trig_AgilityTomesNonAgiHeroes5_Actions takes nothing returns nothing
	set udg_force05=GetForceOfPlayer(GetOwningPlayer(GetBuyingUnit()))
	call ModifyHeroStat(1,GetBuyingUnit(),1,5)
	call AdjustPlayerStateBJ(950,GetOwningPlayer(GetBuyingUnit()),PLAYER_STATE_RESOURCE_GOLD)
	call QuestMessageBJ(udg_force05,7,"|cffFF0000Your hero is not Agility-type based!|r")
endfunction

function InitTrig_AgilityTomesNonAgiHeroes5 takes nothing returns nothing
	set udg_trigger24=CreateTrigger()
	call TriggerRegisterAnyUnitEventBJ(udg_trigger24,EVENT_PLAYER_UNIT_SELL_ITEM)
	call TriggerAddCondition(udg_trigger24,Condition(function Trig_AgilityTomesNonAgiHeroes5_Conditions))
	call TriggerAddAction(udg_trigger24,function Trig_AgilityTomesNonAgiHeroes5_Actions)
endfunction

function InitGlobals2 takes nothing returns nothing
	local integer i=0
	call SetUnitInvulnerable(udg_unit08,true)
	call SetUnitInvulnerable(udg_unit11,true)
	set i=0
	loop
		exitwhen(i>$B)
		set udg_integers01[i]=0
		set udg_integers02[i]=0
		set udg_booleans01[i]=false
		set udg_booleans02[i]=false
		set i=i+1
	endloop
	set i=0
	loop
		exitwhen(i>6)
		set udg_integers03[i]=0
		set i=i+1
	endloop
	set udg_integer03=4
	set udg_integer04=2
	set udg_integer05=1
	set udg_integer12=0
	set udg_integer11=0
	set udg_integer09=4
	set udg_integer08=2
	set udg_integer10=1
	set udg_integer07=0
	set udg_integer06=0
endfunction

function CreateBuildingsForPlayer10 takes nothing returns nothing
	local player p=Player($A)
	local unit u
	local integer unitID
	local trigger t
	local real life
	set u=CreateUnit(p,'h00C',-5321.7,-326.6,270.)
	set udg_unit08=CreateUnit(p,'hcas',-4224.,-320.,270.)
	set udg_unit12=CreateUnit(p,'h00L',-3328.,1600.,270.)
	set udg_unit13=CreateUnit(p,'h00K',-3392.,-2048.,270.)
	set u=CreateUnit(p,'h006',-4608.,-1984.,270.)
	set u=CreateUnit(p,'h006',-4608.,1536.,270.)
	set u=CreateUnit(p,'h006',-4608.,-2240.,270.)
	set u=CreateUnit(p,'h006',-4608.,1280.,270.)
	set udg_units07[1]=CreateUnit(p,'h00M',-2784.1,-971.13,270.)
	set udg_units07[2]=CreateUnit(p,'h00M',-2784.1,73.6,270.)
	set udg_units07[3]=CreateUnit(p,'h00M',-2780.9,-351.13,270.)
	set udg_units07[4]=CreateUnit(p,'h00M',-4416.,.0,270.)
	set udg_units07[5]=CreateUnit(p,'h00M',-3840.,-320.,270.)
	set udg_units07[6]=CreateUnit(p,'h00M',-4416.,-640.,270.)
	set udg_units07[7]=CreateUnit(p,'h00M',-3456.,448.,270.)
	set udg_units07[8]=CreateUnit(p,'h00M',-3456.,-1088.,270.)
	set udg_units07[9]=CreateUnit(p,'h00N',-3968.,.0,270.)
	set udg_units07[$A]=CreateUnit(p,'h00N',-3968.,-640.,270.)
	set udg_units06[1]=CreateUnit(p,'hatw',-3264.,1216.,270.)
	set udg_units06[2]=CreateUnit(p,'hatw',-3328.,1984.,270.)
	set udg_units06[3]=CreateUnit(p,'hgtw',-3392.,1856.,270.)
	set udg_units06[4]=CreateUnit(p,'hgtw',-3328.,1344.,270.)
	set udg_units06[5]=CreateUnit(p,'hgtw',-3264.,2112.,270.)
	set udg_units06[6]=CreateUnit(p,'hgtw',-3200.,1088.,270.)
	set udg_units05[1]=CreateUnit(p,'hatw',-3264.,-2432.,270.)
	set udg_units05[2]=CreateUnit(p,'hatw',-3328.,-1664.,270.)
	set udg_units05[4]=CreateUnit(p,'hgtw',-3200.,-2560.,270.)
	set udg_units05[3]=CreateUnit(p,'hgtw',-3264.,-1536.,270.)
	set udg_units05[5]=CreateUnit(p,'hgtw',-3392.,-1792.,270.)
	set udg_units05[6]=CreateUnit(p,'hgtw',-3328.,-2304.,270.)
	set udg_unit30=CreateUnit(p,'hatw',-3648.,1600.,270.)
	set udg_unit29=CreateUnit(p,'hatw',-3712.,-2048.,270.)
	set udg_unit28=CreateUnit(p,'hgtw',-2816.,1600.,270.)
	set udg_unit27=CreateUnit(p,'hgtw',-2880.,-2048.,270.)
	set udg_units02[1]=CreateUnit(p,'hgtw',-1984.,2240.,270.)
	set udg_units02[2]=CreateUnit(p,'hgtw',-1984.,1088.,270.)
	set udg_units02[3]=CreateUnit(p,'hgtw',-1920.,1216.,270.)
	set udg_units02[4]=CreateUnit(p,'hgtw',-1920.,2112.,270.)
	set udg_units02[5]=CreateUnit(p,'hgtw',-1856.,1088.,270.)
	set udg_units02[6]=CreateUnit(p,'hgtw',-1856.,2240.,270.)
	set udg_units01[1]=CreateUnit(p,'hgtw',-1920.,-1728.,270.)
	set udg_units01[2]=CreateUnit(p,'hgtw',-1984.,-2752.,270.)
	set udg_units01[3]=CreateUnit(p,'hgtw',-1856.,-2752.,270.)
	set udg_units01[4]=CreateUnit(p,'hgtw',-1920.,-2624.,270.)
	set udg_units01[5]=CreateUnit(p,'hgtw',-1984.,-1600.,270.)
	set udg_units01[6]=CreateUnit(p,'hgtw',-1856.,-1600.,270.)
	set udg_unit24=CreateUnit(p,'hgtw',-1472.,1664.,270.)
	set udg_unit23=CreateUnit(p,'hgtw',-1472.,-2176.,270.)
endfunction

function CreateUnitsForPlayer10 takes nothing returns nothing
	local player p=Player($A)
	local unit u
	set u=CreateUnit(p,'Hpal',-4531.1,2634.8,60.273)
	set u=CreateUnit(p,'Hamg',-4455.4,2730.9,7.416)
	set u=CreateUnit(p,'Ntin',-4531.1,2634.8,60.273)
	set u=CreateUnit(p,'Nbst',-4531.1,2634.8,60.273)
	set u=CreateUnit(p,'Nfir',-4531.1,2634.8,60.273)
	set u=CreateUnit(p,'Halc',-4531.1,2634.8,60.273)
	set u=CreateUnit(p,'Hmkg',-4400.9,2842.5,177.105)
	set u=CreateUnit(p,'Hblm',-4513.,2957.2,190.915)
	set u=CreateUnit(p,'Obla',-4615.9,2951.,238.059)
	set u=CreateUnit(p,'Ogrh',-4695.9,2851.,208.059)
	set u=CreateUnit(p,'Ofar',-4537.2,2820.8,55.889)
	set u=CreateUnit(p,'Otch',-4700.8,2749.5,226.27)
	set u=CreateUnit(p,'Oshd',-4715.9,2951.,126.204)
	set u=CreateUnit(p,'Udea',-4824.9,2972.7,199.496)
	set u=CreateUnit(p,'N00P',-4824.9,2972.7,199.496)
	set u=CreateUnit(p,'N00Q',-4824.9,2972.7,199.496)
	set u=CreateUnit(p,'Ulic',-4834.,2848.7,157.966)
	set u=CreateUnit(p,'Udre',-4879.4,2737.1,286.367)
	set u=CreateUnit(p,'Ucrl',-4994.5,2978.9,124.171)
	set u=CreateUnit(p,'Ekee',-4967.3,2786.7,249.145)
	set u=CreateUnit(p,'Emoo',-5091.5,2743.3,249.265)
	set u=CreateUnit(p,'Nngs',-5270.2,2985.3,214.361)
	set u=CreateUnit(p,'Nbrn',-5286.3,2886.1,237.707)
	set u=CreateUnit(p,'Npbm',-5246.4,2750.1,268.305)
	set u=CreateUnit(p,'Nplh',-5082.9,2869.8,85.289)
	set u=CreateUnit(p,'E005',-4640.1,2876.7,135.71)
	set u=CreateUnit(p,'Edem',-5164.1,2947.9,66.272)
	set u=CreateUnit(p,'Ewar',-4825.5,2817.7,292.97)
	set u=CreateUnit(p,'E00B',-4825.5,2817.7,290.97)
	set u=CreateUnit(p,'N012',-4826.5,2817.7,291.97)
	set u=CreateUnit(p,'E00F',-4826.5,2817.7,294.97)
	set u=CreateUnit(p,'O00R',-4826.5,2817.7,295.97)
	set u=CreateUnit(p,'H00I',-4826.5,2817.7,290.97)
endfunction

function CreateBuildingsForPlayer11 takes nothing returns nothing
	local player p=Player($B)
	local unit u
	local integer unitID
	local trigger t
	local real life
	set u=CreateUnit(p,'h00C',5221.7,-326.6,270.)
	set u=CreateUnit(p,'h006',4608.,-1792.,270.)
	set u=CreateUnit(p,'h006',4608.,-2048.,270.)
	set u=CreateUnit(p,'h006',4544.,1152.,270.)
	set u=CreateUnit(p,'h006',4544.,1408.,270.)
	set udg_unit11=CreateUnit(p,'ofrt',4224.,-256.,270.)
	set udg_unit16=CreateUnit(p,'o00O',3392.,-2112.,270.)
	set udg_unit15=CreateUnit(p,'o00P',3264.,1600.,270.)
	set udg_units08[1]=CreateUnit(p,'h00M',4416.,-576.,270.)
	set udg_units08[2]=CreateUnit(p,'h00M',4416.,64.,270.)
	set udg_units08[3]=CreateUnit(p,'h00M',2780.9,-351.13,270.)
	set udg_units08[4]=CreateUnit(p,'h00M',2967.7,-750.4,270.)
	set udg_units08[5]=CreateUnit(p,'h00M',3010.9,203.1,270.)
	set udg_units08[6]=CreateUnit(p,'h00M',3888.,-256.,270.)
	set udg_units08[7]=CreateUnit(p,'h00M',3456.,384.,270.)
	set udg_units08[8]=CreateUnit(p,'h00M',3520.,-896.,270.)
	set udg_units08[9]=CreateUnit(p,'o00Q',4032.,-576.,270.)
	set udg_units08[$A]=CreateUnit(p,'o00Q',3968.,64.,270.)
	set udg_units10[1]=CreateUnit(p,'hatw',3200.,1984.,270.)
	set udg_units10[2]=CreateUnit(p,'hatw',3200.,1216.,270.)
	set udg_units10[3]=CreateUnit(p,'owtw',3264.,1856.,270.)
	set udg_units10[4]=CreateUnit(p,'owtw',3264.,1344.,270.)
	set udg_units10[5]=CreateUnit(p,'owtw',3136.,2112.,270.)
	set udg_units10[6]=CreateUnit(p,'owtw',3136.,1088.,270.)
	set udg_units09[1]=CreateUnit(p,'hatw',3264.,-2496.,270.)
	set udg_units09[2]=CreateUnit(p,'hatw',3264.,-1728.,270.)
	set udg_units09[3]=CreateUnit(p,'owtw',3200.,-1600.,270.)
	set udg_units09[4]=CreateUnit(p,'owtw',3328.,-2368.,270.)
	set udg_units09[5]=CreateUnit(p,'owtw',3328.,-1856.,270.)
	set udg_units09[6]=CreateUnit(p,'owtw',3200.,-2624.,270.)
	set udg_unit32=CreateUnit(p,'hatw',3712.,-2112.,270.)
	set udg_unit34=CreateUnit(p,'hatw',3584.,1600.,270.)
	set udg_unit31=CreateUnit(p,'owtw',2880.,-2112.,270.)
	set udg_unit33=CreateUnit(p,'owtw',2752.,1600.,270.)
	set udg_units03[1]=CreateUnit(p,'owtw',1920.,1088.,270.)
	set udg_units03[2]=CreateUnit(p,'owtw',2048.,1088.,270.)
	set udg_units03[3]=CreateUnit(p,'owtw',1984.,1216.,270.)
	set udg_units03[4]=CreateUnit(p,'owtw',1920.,2240.,270.)
	set udg_units03[5]=CreateUnit(p,'owtw',2048.,2240.,270.)
	set udg_units03[6]=CreateUnit(p,'owtw',1984.,2048.,270.)
	set udg_units04[1]=CreateUnit(p,'owtw',1856.,-2752.,270.)
	set udg_units04[2]=CreateUnit(p,'owtw',1984.,-2752.,270.)
	set udg_units04[3]=CreateUnit(p,'owtw',1920.,-2624.,270.)
	set udg_units04[4]=CreateUnit(p,'owtw',1856.,-1600.,270.)
	set udg_units04[5]=CreateUnit(p,'owtw',1984.,-1600.,270.)
	set udg_units04[6]=CreateUnit(p,'owtw',1920.,-1728.,270.)
	set udg_unit26=CreateUnit(p,'owtw',1472.,-2112.,270.)
	set udg_unit25=CreateUnit(p,'owtw',1472.,1664.,270.)
endfunction
 
Level 6
Joined
May 11, 2013
Messages
205
JASS:
function CreateNeutralPassiveBuildings2 takes nothing returns nothing
	local player p=Player($F)
	local unit u
	local integer unitID
	local trigger t
	local real life
	set udg_unit05=CreateUnit(p,'o006',4940.,-65.,270.)
	set udg_unit05=CreateUnit(p,'o00W',4940.,-265.,270.)
	set udg_unit05=CreateUnit(p,'o00Y',4940.,-465.,270.)
	set udg_unit06=CreateUnit(p,'o005',-4940.,-65.,270.)
	set udg_unit06=CreateUnit(p,'o00X',-4940.,-265.,270.)
	set udg_unit06=CreateUnit(p,'o00Z',-4940.,-465.,270.)
	set udg_unit07=CreateUnit(p,'n005',-3264.,-320.,270.)
	call SetUnitColor(udg_unit07,ConvertPlayerColor(0))
	set u=CreateUnit(p,'ngme',-4928.,-2560.,270.)
	set u=CreateUnit(p,'ngme',4992.,-2368.,270.)
	set udg_unit14=CreateUnit(p,'nmoo',-5120.,-2176.,270.)
	set u=CreateUnit(p,'ngme',-4928.,1088.,270.)
	set u=CreateUnit(p,'ngme',4928.,960.,270.)
	set udg_unit20=CreateUnit(p,'nmoo',4992.,1408.,270.)
	set udg_unit19=CreateUnit(p,'nmoo',5056.,-1920.,270.)
	set u=CreateUnit(p,'n001',4608.,-2368.,270.)
	set u=CreateUnit(p,'n000',4928.,-1536.,270.)
	set u=CreateUnit(p,'n001',-4544.,-2496.,270.)
	set u=CreateUnit(p,'n000',-4928.,-1792.,270.)
	set udg_unit09=CreateUnit(p,'ntav',3264.,-320.,270.)
	call SetUnitColor(udg_unit09,ConvertPlayerColor(0))
	set u=CreateUnit(p,'n001',4480.,1728.,270.)
	set u=CreateUnit(p,'n000',4864.,1792.,270.)
	set u=CreateUnit(p,'n000',-4928.,1856.,270.)
	set u=CreateUnit(p,'n001',-4544.,1856.,270.)
	set udg_unit10=CreateUnit(p,'nmoo',-5120.,1472.,270.)
endfunction

function CreateRegions2 takes nothing returns nothing
	local weathereffect we
	set udg_rect01=Rect(2816.,-2592.,3296.,-1600.)
	set udg_rect02=Rect(2592.,1056.,3072.,2112.)
	set udg_rect03=Rect(-3200.,1088.,-2752.,2112.)
	set udg_rect04=Rect(-3136.,-2560.,-2656.,-1472.)
	set udg_rect05=Rect(-3808.,-544.,-3424.,-96.)
	set udg_rect06=Rect(3424.,-512.,3840.,-32.)
	set udg_rect07=Rect(3936.,-576.,4480.,32.)
	set udg_rect08=Rect(352.,-928.,1856.,288.)
	set udg_rect09=Rect(-1792.,-832.,-384.,384.)
	set udg_rect10=Rect(-4512.,-352.,-2880.,512.)
	set udg_rect11=Rect(2880.,-288.,4480.,512.)
	set udg_rect12=Rect(-4512.,-1216.,-2880.,-352.)
	set udg_rect13=Rect(2912.,-1088.,4480.,-288.)
	set udg_rect14=Rect(4640.,-576.,5184.,32.)
	set udg_rect15=Rect(-5248.,-544.,-4704.,64.)
	set udg_rect16=Rect(-1152.,544.,4160.,2368.)
	set udg_rect17=Rect(-1152.,-2976.,4224.,-1184.)
	set udg_rect18=Rect(-4160.,-2944.,1184.,-1184.)
	set udg_rect19=Rect(-4256.,544.,1152.,2368.)
	set udg_rect20=Rect(2592.,-1376.,4576.,800.)
	set udg_rect21=Rect(2240.,-2848.,3872.,-1376.)
	set udg_rect22=Rect(2112.,832.,3744.,2304.)
	set udg_rect23=Rect(-5472.,2400.,-4224.,3200.)
	set udg_rect24=Rect(-32.,-1568.,288.,-1280.)
endfunction

function Trig_botORC_Func001Func001Func003C takes nothing returns boolean
	return(GetUnitTypeId(GetEnumUnit())=='o000')or(GetUnitTypeId(GetEnumUnit())=='o010')or(GetUnitTypeId(GetEnumUnit())=='o011')or(GetUnitTypeId(GetEnumUnit())=='o012')or(GetUnitTypeId(GetEnumUnit())=='o002')or(GetUnitTypeId(GetEnumUnit())=='o003')or(GetUnitTypeId(GetEnumUnit())=='o004')or(GetUnitTypeId(GetEnumUnit())=='o001')
endfunction

function Trig_botORC_Func001Func001C takes nothing returns boolean
	return(Trig_botORC_Func001Func001Func003C())
endfunction

function Trig_botORC_Func001A takes nothing returns nothing
	if(Trig_botORC_Func001Func001C())then
		call IssuePointOrderByIdLoc(GetEnumUnit(),$D000F,GetUnitLoc(udg_unit14))
	endif
endfunction

function Trig_botORC_Func003Func001Func001C takes nothing returns boolean
	return(GetUnitTypeId(GetEnumUnit())=='o000')or(GetUnitTypeId(GetEnumUnit())=='o010')or(GetUnitTypeId(GetEnumUnit())=='o011')or(GetUnitTypeId(GetEnumUnit())=='o012')or(GetUnitTypeId(GetEnumUnit())=='o002')or(GetUnitTypeId(GetEnumUnit())=='o003')or(GetUnitTypeId(GetEnumUnit())=='o004')or(GetUnitTypeId(GetEnumUnit())=='o001')
endfunction

function Trig_botORC_Func003Func001C takes nothing returns boolean
	return(Trig_botORC_Func003Func001Func001C())
endfunction

function Trig_botORC_Func003A takes nothing returns nothing
	if(Trig_botORC_Func003Func001C())then
		call IssuePointOrderByIdLoc(GetEnumUnit(),$D000F,GetUnitLoc(udg_unit10))
	endif
endfunction

function Trig_botORC_Func005Func001Func001C takes nothing returns boolean
	return(GetUnitTypeId(GetEnumUnit())=='h000')or(GetUnitTypeId(GetEnumUnit())=='h00Z')or(GetUnitTypeId(GetEnumUnit())=='h010')or(GetUnitTypeId(GetEnumUnit())=='h011')or(GetUnitTypeId(GetEnumUnit())=='h002')or(GetUnitTypeId(GetEnumUnit())=='h001')or(GetUnitTypeId(GetEnumUnit())=='h007')or(GetUnitTypeId(GetEnumUnit())=='h008')
endfunction

function Trig_botORC_Func005Func001C takes nothing returns boolean
	return(Trig_botORC_Func005Func001Func001C())
endfunction

function Trig_botORC_Func005A takes nothing returns nothing
	if(Trig_botORC_Func005Func001C())then
		call IssuePointOrderByIdLoc(GetEnumUnit(),$D000F,GetUnitLoc(udg_unit19))
	endif
endfunction

function Trig_botORC_Func007Func001Func001C takes nothing returns boolean
	return(GetUnitTypeId(GetEnumUnit())=='h000')or(GetUnitTypeId(GetEnumUnit())=='h00Z')or(GetUnitTypeId(GetEnumUnit())=='h010')or(GetUnitTypeId(GetEnumUnit())=='h011')or(GetUnitTypeId(GetEnumUnit())=='h002')or(GetUnitTypeId(GetEnumUnit())=='h001')or(GetUnitTypeId(GetEnumUnit())=='h007')or(GetUnitTypeId(GetEnumUnit())=='h008')
endfunction

function Trig_botORC_Func007Func001C takes nothing returns boolean
	return(Trig_botORC_Func007Func001Func001C())
endfunction

function Trig_botORC_Func007A takes nothing returns nothing
	if(Trig_botORC_Func007Func001C())then
		call IssuePointOrderByIdLoc(GetEnumUnit(),$D000F,GetUnitLoc(udg_unit20))
	endif
endfunction

function Trig_botORC_Actions takes nothing returns nothing
	call ForGroupBJ(GetUnitsInRectAll(udg_rect17),function Trig_botORC_Func001A)
	call TriggerSleepAction(2)
	call ForGroupBJ(GetUnitsInRectAll(udg_rect16),function Trig_botORC_Func003A)
	call TriggerSleepAction(2)
	call ForGroupBJ(GetUnitsInRectAll(udg_rect18),function Trig_botORC_Func005A)
	call TriggerSleepAction(2)
	call ForGroupBJ(GetUnitsInRectAll(udg_rect19),function Trig_botORC_Func007A)
endfunction

function Trig_antilag_Func001002 takes nothing returns nothing
	call RemoveUnit(GetEnumUnit())
endfunction

function Trig_antilag_Actions takes nothing returns nothing
	call ForGroupBJ(GetUnitsInRectAll(udg_rect23),function Trig_antilag_Func001002)
endfunction

function Trig_last_reserves_HU_Conditions takes nothing returns boolean
	return(udg_integer01==0)
endfunction

function Trig_last_reserves_HU_Func006A takes nothing returns nothing
	call IssuePointOrderByIdLoc(GetTriggerUnit(),$D000F,GetRectCenter(udg_rect34))
endfunction

function Trig_last_reserves_HU_Func009A takes nothing returns nothing
	call IssuePointOrderByIdLoc(GetTriggerUnit(),$D000F,GetRectCenter(udg_rect34))
endfunction

function Trig_last_reserves_HU_Actions takes nothing returns nothing
	call PlaySoundBJ(udg_sound03)
	call SetUnitInvulnerable(udg_unit08,true)
	set bj_forLoopAIndex=1
	set bj_forLoopAIndexEnd=udg_integer13
	loop
		exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
		call CreateNUnitsAtLocFacingLocBJ(2,udg_integers04[bj_forLoopAIndex],Player($A),GetRandomLocInRect(udg_rect10),GetRandomLocInRect(bj_mapInitialPlayableArea))
		set bj_forLoopAIndex=bj_forLoopAIndex+1
	endloop
	call TriggerSleepAction(2)
	call ForGroupBJ(GetUnitsInRectOfPlayer(udg_rect10,Player($A)),function Trig_last_reserves_HU_Func006A)
	set bj_forLoopAIndex=1
	set bj_forLoopAIndexEnd=udg_integer13
	loop
		exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
		call CreateNUnitsAtLocFacingLocBJ(2,udg_integers04[bj_forLoopAIndex],Player($A),GetRandomLocInRect(udg_rect12),GetRandomLocInRect(bj_mapInitialPlayableArea))
		set bj_forLoopAIndex=bj_forLoopAIndex+1
	endloop
	set udg_integer01=1
	call TriggerSleepAction(2)
	call ForGroupBJ(GetUnitsInRectOfPlayer(udg_rect12,Player($A)),function Trig_last_reserves_HU_Func009A)
	call UnitAddAbility(udg_unit08,'A000')
	call TriggerSleepAction(3.)
	call IssueImmediateOrderById(udg_unit08,$D00D7)
	call TriggerSleepAction(40.)
	call SetUnitLifePercentBJ(udg_unit08,'d')
	call UnitRemoveAbility(udg_unit08,'A000')
	call TriggerSleepAction(20.)
	call SetUnitInvulnerable(udg_unit08,false)
	call DisableTrigger(GetTriggeringTrigger())
endfunction

function Trig_last_reserves_ORC_Conditions takes nothing returns boolean
	return(udg_integer02==0)
endfunction

function Trig_last_reserves_ORC_Func006A takes nothing returns nothing
	call IssuePointOrderByIdLoc(GetTriggerUnit(),$D000F,GetRectCenter(udg_rect33))
endfunction

function Trig_last_reserves_ORC_Func009A takes nothing returns nothing
	call IssuePointOrderByIdLoc(GetTriggerUnit(),$D000F,GetRectCenter(udg_rect33))
endfunction

function Trig_last_reserves_ORC_Actions takes nothing returns nothing
	call PlaySoundBJ(udg_sound03)
	call SetUnitInvulnerable(udg_unit11,true)
	set bj_forLoopAIndex=1
	set bj_forLoopAIndexEnd=udg_integer14
	loop
		exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
		call CreateNUnitsAtLocFacingLocBJ(2,udg_integers05[bj_forLoopAIndex],Player($B),GetRandomLocInRect(udg_rect11),GetRandomLocInRect(bj_mapInitialPlayableArea))
		set bj_forLoopAIndex=bj_forLoopAIndex+1
	endloop
	call TriggerSleepAction(2)
	call ForGroupBJ(GetUnitsInRectOfPlayer(udg_rect11,Player($B)),function Trig_last_reserves_ORC_Func006A)
	set bj_forLoopAIndex=1
	set bj_forLoopAIndexEnd=udg_integer14
	loop
		exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
		call CreateNUnitsAtLocFacingLocBJ(2,udg_integers05[bj_forLoopAIndex],Player($B),GetRandomLocInRect(udg_rect13),GetRandomLocInRect(bj_mapInitialPlayableArea))
		set bj_forLoopAIndex=bj_forLoopAIndex+1
	endloop
	set udg_integer02=1
	call TriggerSleepAction(2)
	call ForGroupBJ(GetUnitsInRectOfPlayer(udg_rect13,Player($B)),function Trig_last_reserves_ORC_Func009A)
	call UnitAddAbility(udg_unit11,'A000')
	call TriggerSleepAction(3.)
	call IssueImmediateOrderById(udg_unit11,$D00D7)
	call TriggerSleepAction(40.)
	call UnitRemoveAbility(udg_unit11,'A000')
	call SetUnitLifePercentBJ(udg_unit11,'d')
	call TriggerSleepAction(20.)
	call SetUnitInvulnerable(udg_unit11,false)
	call DisableTrigger(GetTriggeringTrigger())
endfunction

function Trig_ORCspawnInit_Actions takes nothing returns nothing
	set udg_integers05[udg_integer14]='o010'
	set udg_integer14=(udg_integer14+1)
	set udg_integers05[udg_integer14]='o010'
	set udg_integer14=(udg_integer14+1)
	set udg_integers05[udg_integer14]='o010'
	set udg_integer14=(udg_integer14+1)
	set udg_integers05[udg_integer14]='o010'
	set udg_integer14=(udg_integer14+1)
	set udg_integers05[udg_integer14]='o012'
	set udg_integer14=(udg_integer14+1)
	set udg_integers05[udg_integer14]='o012'
	set udg_integer14=(udg_integer14+1)
	set udg_integers05[udg_integer14]='o011'
endfunction

function Trig_HUspawnInit_Actions takes nothing returns nothing
	set udg_integers04[udg_integer13]='h00Z'
	set udg_integer13=(udg_integer13+1)
	set udg_integers04[udg_integer13]='h00Z'
	set udg_integer13=(udg_integer13+1)
	set udg_integers04[udg_integer13]='h00Z'
	set udg_integer13=(udg_integer13+1)
	set udg_integers04[udg_integer13]='h00Z'
	set udg_integer13=(udg_integer13+1)
	set udg_integers04[udg_integer13]='h011'
	set udg_integer13=(udg_integer13+1)
	set udg_integers04[udg_integer13]='h011'
	set udg_integer13=(udg_integer13+1)
	set udg_integers04[udg_integer13]='h010'
endfunction

function Trig_firstspawn_Actions takes nothing returns nothing
	call CreateTimerDialogBJ(CreateTimerBJ(false,44.),"TRIGSTR_218")
	call TimerDialogSetTitle(bj_lastCreatedTimerDialog,"Prepare to Fight!")
	call TriggerSleepAction(41.)
	call PlaySoundBJ(udg_sound05)
	call TriggerSleepAction(3.)
	call DestroyTimerDialog(bj_lastCreatedTimerDialog)
endfunction

function Trig_bounty_Func001002 takes nothing returns nothing
	call SetPlayerFlagBJ(PLAYER_STATE_GIVES_BOUNTY,true,GetEnumPlayer())
endfunction

function Trig_bounty_Actions takes nothing returns nothing
	call ForForce(bj_FORCE_ALL_PLAYERS,function Trig_bounty_Func001002)
endfunction

function Trig_HU_rax_1_Actions takes nothing returns nothing
	call PlaySoundBJ(udg_sound04)
	call DestroyTrigger(udg_trigger29)
endfunction

function Trig_ORC_rax_1_Actions takes nothing returns nothing
	call PlaySoundBJ(udg_sound04)
	call DestroyTrigger(udg_trigger27)
endfunction

function Trig_ORC_rax_2_Actions takes nothing returns nothing
	call PlaySoundBJ(udg_sound04)
	call DestroyTrigger(udg_trigger28)
endfunction

function Trig_HU_rax_2_Actions takes nothing returns nothing
	call PlaySoundBJ(udg_sound04)
	call DestroyTrigger(udg_trigger30)
endfunction

function Trig_Recuit_ORC_Conditions takes nothing returns boolean
	return(GetUnitTypeId(GetSoldUnit())=='o000')
endfunction

function Trig_Recuit_ORC_Actions takes nothing returns nothing
	call RemoveUnit(GetSoldUnit())
	set udg_integer14=(udg_integer14+1)
	set udg_integers05[udg_integer14]='o000'
	call DisplayTextToForce(udg_force08,("The |cffFFFF80Orc Army|r recruited an additional |cffFFFF80"+GetUnitName(GetSoldUnit())))
	call PlaySoundBJ(udg_sound01)
	set udg_integer09=(udg_integer09+1)
	set udg_integers01[(1+GetPlayerId(GetOwningPlayer(GetBuyingUnit())))]=(udg_integers01[(1+GetPlayerId(GetOwningPlayer(GetBuyingUnit())))]-3)
	call SetPlayerStateBJ(GetOwningPlayer(GetBuyingUnit()),PLAYER_STATE_RESOURCE_FOOD_USED,(GetPlayerState(GetOwningPlayer(GetBuyingUnit()),PLAYER_STATE_RESOURCE_FOOD_USED)+3))
endfunction

function Trig_Recuit_ORC_Copy_Conditions takes nothing returns boolean
	return(GetUnitTypeId(GetSoldUnit())=='o003')
endfunction

function Trig_Recuit_ORC_Copy_Actions takes nothing returns nothing
	call RemoveUnit(GetSoldUnit())
	set udg_integer14=(udg_integer14+1)
	set udg_integers05[udg_integer14]='o003'
	call DisplayTextToForce(udg_force08,("The |cffFFFF80Orc Army|r recruited an additional |cffFFFF80"+GetUnitName(GetSoldUnit())))
	call PlaySoundBJ(udg_sound01)
	set udg_integer08=(udg_integer08+1)
	set udg_integers01[(1+GetPlayerId(GetOwningPlayer(GetBuyingUnit())))]=(udg_integers01[(1+GetPlayerId(GetOwningPlayer(GetBuyingUnit())))]-3)
	call SetPlayerStateBJ(GetOwningPlayer(GetBuyingUnit()),PLAYER_STATE_RESOURCE_FOOD_USED,(GetPlayerState(GetOwningPlayer(GetBuyingUnit()),PLAYER_STATE_RESOURCE_FOOD_USED)+3))
endfunction

function Trig_Recuit_ORC_Copy_2_Conditions takes nothing returns boolean
	return(GetUnitTypeId(GetSoldUnit())=='o002')
endfunction

function Trig_Recuit_ORC_Copy_2_Actions takes nothing returns nothing
	call RemoveUnit(GetSoldUnit())
	set udg_integer14=(udg_integer14+1)
	set udg_integers05[udg_integer14]='o002'
	call DisplayTextToForce(udg_force08,("The |cffFFFF80Orc Army|r recruited an additional |cffFFFF80"+GetUnitName(GetSoldUnit())))
	call PlaySoundBJ(udg_sound01)
	set udg_integer10=(udg_integer10+1)
	set udg_integers01[(1+GetPlayerId(GetOwningPlayer(GetBuyingUnit())))]=(udg_integers01[(1+GetPlayerId(GetOwningPlayer(GetBuyingUnit())))]-5)
	call SetPlayerStateBJ(GetOwningPlayer(GetBuyingUnit()),PLAYER_STATE_RESOURCE_FOOD_USED,(GetPlayerState(GetOwningPlayer(GetBuyingUnit()),PLAYER_STATE_RESOURCE_FOOD_USED)+5))
endfunction

function Trig_Recuit_ORC_Copy_3_Conditions takes nothing returns boolean
	return(GetUnitTypeId(GetSoldUnit())=='o001')
endfunction

function Trig_Recuit_ORC_Copy_3_Actions takes nothing returns nothing
	call RemoveUnit(GetSoldUnit())
	set udg_integer14=(udg_integer14+1)
	set udg_integers05[udg_integer14]='o001'
	call DisplayTextToForce(udg_force08,("The |cffFFFF80Orc Army|r recruited an additional |cffFFFF80"+GetUnitName(GetSoldUnit())))
	call PlaySoundBJ(udg_sound01)
	set udg_integer07=(udg_integer07+1)
	set udg_integers01[(1+GetPlayerId(GetOwningPlayer(GetBuyingUnit())))]=(udg_integers01[(1+GetPlayerId(GetOwningPlayer(GetBuyingUnit())))]-4)
	call SetPlayerStateBJ(GetOwningPlayer(GetBuyingUnit()),PLAYER_STATE_RESOURCE_FOOD_USED,(GetPlayerState(GetOwningPlayer(GetBuyingUnit()),PLAYER_STATE_RESOURCE_FOOD_USED)+4))
endfunction

function Trig_Recuit_ORC_Copy_4_Conditions takes nothing returns boolean
	return(GetUnitTypeId(GetSoldUnit())=='o004')
endfunction

function Trig_Recuit_ORC_Copy_4_Actions takes nothing returns nothing
	call RemoveUnit(GetSoldUnit())
	set udg_integer14=(udg_integer14+1)
	set udg_integers05[udg_integer14]='o004'
	call DisplayTextToForce(udg_force08,("The |cffFFFF80Orc Army|r recruited an additional |cffFFFF80"+GetUnitName(GetSoldUnit())))
	call PlaySoundBJ(udg_sound01)
	set udg_integer06=(udg_integer06+1)
	set udg_integers01[(1+GetPlayerId(GetOwningPlayer(GetBuyingUnit())))]=(udg_integers01[(1+GetPlayerId(GetOwningPlayer(GetBuyingUnit())))]-6)
	call SetPlayerStateBJ(GetOwningPlayer(GetBuyingUnit()),PLAYER_STATE_RESOURCE_FOOD_USED,(GetPlayerState(GetOwningPlayer(GetBuyingUnit()),PLAYER_STATE_RESOURCE_FOOD_USED)+6))
endfunction

function Trig_Recuit_ORC_Copy_5_Conditions takes nothing returns boolean
	return(GetUnitTypeId(GetSoldUnit())=='o007')
endfunction

function Trig_Recuit_ORC_Copy_5_Actions takes nothing returns nothing
	call RemoveUnit(GetSoldUnit())
	call CreateNUnitsAtLoc(1,'o007',Player($B),GetRectCenter(udg_rect01),bj_UNIT_FACING)
	call CreateNUnitsAtLoc(1,'o007',Player($B),GetRectCenter(udg_rect02),bj_UNIT_FACING)
	call DisplayTextToForce(udg_force08,("The |cff8B4513Orc Army|r called a |cff8B4513"+GetUnitName(GetSoldUnit())))
	call PlaySoundBJ(udg_sound01)
endfunction

function Trig_Recuit_HU_Conditions takes nothing returns boolean
	return(GetUnitTypeId(GetSoldUnit())=='h000')
endfunction

function Trig_Recuit_HU_Actions takes nothing returns nothing
	call RemoveUnit(GetSoldUnit())
	set udg_integer13=(udg_integer13+1)
	set udg_integers04[udg_integer13]=GetUnitTypeId(GetSoldUnit())
	call DisplayTextToForce(udg_force08,("The |cffFFFF80Human Army|r recruited an additional |cffFFFF80"+GetUnitName(GetSoldUnit())))
	call PlaySoundBJ(udg_sound01)
	set udg_integer03=(udg_integer03+1)
	set udg_integers01[(1+GetPlayerId(GetOwningPlayer(GetBuyingUnit())))]=(udg_integers01[(1+GetPlayerId(GetOwningPlayer(GetBuyingUnit())))]-3)
	call SetPlayerStateBJ(GetOwningPlayer(GetBuyingUnit()),PLAYER_STATE_RESOURCE_FOOD_USED,(GetPlayerState(GetOwningPlayer(GetBuyingUnit()),PLAYER_STATE_RESOURCE_FOOD_USED)+3))
endfunction

function Trig_Recuit_HU_Copy_Conditions takes nothing returns boolean
	return(GetUnitTypeId(GetSoldUnit())=='h001')
endfunction

function Trig_Recuit_HU_Copy_Actions takes nothing returns nothing
	call RemoveUnit(GetSoldUnit())
	set udg_integer13=(udg_integer13+1)
	set udg_integers04[udg_integer13]=GetUnitTypeId(GetSoldUnit())
	call DisplayTextToForce(udg_force08,("The |cffFFFF80Human Army|r recruited an additional |cffFFFF80"+GetUnitName(GetSoldUnit())))
	call PlaySoundBJ(udg_sound01)
	set udg_integer04=(udg_integer04+1)
	set udg_integers01[(1+GetPlayerId(GetOwningPlayer(GetBuyingUnit())))]=(udg_integers01[(1+GetPlayerId(GetOwningPlayer(GetBuyingUnit())))]-3)
	call SetPlayerStateBJ(GetOwningPlayer(GetBuyingUnit()),PLAYER_STATE_RESOURCE_FOOD_USED,(GetPlayerState(GetOwningPlayer(GetBuyingUnit()),PLAYER_STATE_RESOURCE_FOOD_USED)+3))
endfunction

function Trig_Recuit_HU_Copy_2_Conditions takes nothing returns boolean
	return(GetUnitTypeId(GetSoldUnit())=='h002')
endfunction

function Trig_Recuit_HU_Copy_2_Actions takes nothing returns nothing
	call RemoveUnit(GetSoldUnit())
	set udg_integer13=(udg_integer13+1)
	set udg_integers04[udg_integer13]=GetUnitTypeId(GetSoldUnit())
	call DisplayTextToForce(udg_force08,("The |cffFFFF80Human Army|r recruited an additional |cffFFFF80"+GetUnitName(GetSoldUnit())))
	call PlaySoundBJ(udg_sound01)
	set udg_integer05=(udg_integer05+1)
	set udg_integers01[(1+GetPlayerId(GetOwningPlayer(GetBuyingUnit())))]=(udg_integers01[(1+GetPlayerId(GetOwningPlayer(GetBuyingUnit())))]-5)
	call SetPlayerStateBJ(GetOwningPlayer(GetBuyingUnit()),PLAYER_STATE_RESOURCE_FOOD_USED,(GetPlayerState(GetOwningPlayer(GetBuyingUnit()),PLAYER_STATE_RESOURCE_FOOD_USED)+5))
endfunction

function Trig_Recuit_HU_Copy_3_Conditions takes nothing returns boolean
	return(GetUnitTypeId(GetSoldUnit())=='h008')
endfunction

function Trig_Recuit_HU_Copy_3_Actions takes nothing returns nothing
	call RemoveUnit(GetSoldUnit())
	set udg_integer13=(udg_integer13+1)
	set udg_integers04[udg_integer13]=GetUnitTypeId(GetSoldUnit())
	call DisplayTextToForce(udg_force08,("The |cffFFFF80Human Army|r recruited an additional |cffFFFF80"+GetUnitName(GetSoldUnit())))
	call PlaySoundBJ(udg_sound01)
	set udg_integer12=(udg_integer12+1)
	set udg_integers01[(1+GetPlayerId(GetOwningPlayer(GetBuyingUnit())))]=(udg_integers01[(1+GetPlayerId(GetOwningPlayer(GetBuyingUnit())))]-4)
	call SetPlayerStateBJ(GetOwningPlayer(GetBuyingUnit()),PLAYER_STATE_RESOURCE_FOOD_USED,(GetPlayerState(GetOwningPlayer(GetBuyingUnit()),PLAYER_STATE_RESOURCE_FOOD_USED)+4))
endfunction

function Trig_Recuit_HU_Copy_4_Conditions takes nothing returns boolean
	return(GetUnitTypeId(GetSoldUnit())=='h007')
endfunction

function Trig_Recuit_HU_Copy_4_Actions takes nothing returns nothing
	call RemoveUnit(GetSoldUnit())
	set udg_integer13=(udg_integer13+1)
	set udg_integers04[udg_integer13]=GetUnitTypeId(GetSoldUnit())
	call DisplayTextToForce(udg_force08,("The |cffFFFF80Human Army|r recruited an additional |cffFFFF80"+GetUnitName(GetSoldUnit())))
	call PlaySoundBJ(udg_sound01)
	set udg_integer11=(udg_integer11+1)
	set udg_integers01[(1+GetPlayerId(GetOwningPlayer(GetBuyingUnit())))]=(udg_integers01[(1+GetPlayerId(GetOwningPlayer(GetBuyingUnit())))]-6)
	call SetPlayerStateBJ(GetOwningPlayer(GetBuyingUnit()),PLAYER_STATE_RESOURCE_FOOD_USED,(GetPlayerState(GetOwningPlayer(GetBuyingUnit()),PLAYER_STATE_RESOURCE_FOOD_USED)+6))
endfunction

function Trig_Recuit_HU_Copy_5_Conditions takes nothing returns boolean
	return(GetUnitTypeId(GetSoldUnit())=='o008')
endfunction

function Trig_Recuit_HU_Copy_5_Actions takes nothing returns nothing
	call RemoveUnit(GetSoldUnit())
	call CreateNUnitsAtLoc(1,'o008',Player($A),GetRectCenter(udg_rect03),bj_UNIT_FACING)
	call CreateNUnitsAtLoc(1,'o008',Player($A),GetRectCenter(udg_rect04),bj_UNIT_FACING)
	call DisplayTextToForce(udg_force08,("The |cff006400Human Army|r called a |cff006400"+GetUnitName(GetSoldUnit())))
	call PlaySoundBJ(udg_sound01)
endfunction

function Trig_New_ORC_1_Func002001001002001 takes nothing returns boolean
	return(IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false)!=null
endfunction

function Trig_New_ORC_1_Func002001001002002 takes nothing returns boolean
	return(GetOwningPlayer(GetFilterUnit())==Player($A))
endfunction

function Trig_New_ORC_1_Func002001001002 takes nothing returns boolean
	return GetBooleanAnd(Trig_New_ORC_1_Func002001001002001(),Trig_New_ORC_1_Func002001001002002())
endfunction

function Trig_New_ORC_1_Func003001001002001 takes nothing returns boolean
	return(IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false)!=null
endfunction

function Trig_New_ORC_1_Func003001001002002 takes nothing returns boolean
	return(GetOwningPlayer(GetFilterUnit())==Player($B))
endfunction
 
Level 6
Joined
May 11, 2013
Messages
205
sorry about spamming but i can't copy & paste whole code its like 380k characters. This is not the full code, there is a lot more. I've uploaded code as text document also u can download the first map which is deprotected and normaly should work, but the second i've tried and i get errors.
 
Level 6
Joined
May 11, 2013
Messages
205
Yes i have with the second i've only using base terrain with some changes, about triggers, Mapper is inactive to wc3 and didn't give the map to fix some bugs, but the active community of this map wants some fixes about the game.
 

sentrywiz

S

sentrywiz

Are the admins dead on THW? This is completely in the wrong section.

There is a JASS section for users to post code in, not here.
 
Status
Not open for further replies.
Top