In other words, What do i need to remove from the script.
Spoiler:
globals
trigger e=null
trigger x=null
trigger o=null
trigger i=null
trigger a=null
real E=.0
real X=.0
group O=null
boolexpr I=null
endglobals
function N takes nothing returns boolean
local real dx=GetDestructableX(GetFilterDestructable())-E
local real dy=GetDestructableY(GetFilterDestructable())-X
return(dx*dx+dy*dy<=bj_enumDestructableRadius)
endfunction
function b takes player B returns group
set O=CreateGroup()
call SyncSelections()
call GroupEnumUnitsSelected(O,B,I)
return O
endfunction
function c takes itemtype C,integer d returns nothing
local group g
set bj_stockPickedItemType=C
set bj_stockPickedItemLevel=d
set g=CreateGroup()
call GroupEnumUnitsOfType(g,"marketplace",I)
call ForGroup(g,function UpdateEachStockBuildingEnum)
call DestroyGroup(g)
set g=null
endfunction
function D takes nothing returns nothing
local integer pickedItemId
local itemtype f
local integer F=0
local integer G=0
local integer d
set d=1
loop
if(bj_stockAllowedPermanent[d])then
set G=G+1
if(GetRandomInt(1,G)==1)then
set f=ITEM_TYPE_PERMANENT
set F=d
endif
endif
if(bj_stockAllowedCharged[d])then
set G=G+1
if(GetRandomInt(1,G)==1)then
set f=ITEM_TYPE_CHARGED
set F=d
endif
endif
if(bj_stockAllowedArtifact[d])then
set G=G+1
if(GetRandomInt(1,G)==1)then
set f=ITEM_TYPE_ARTIFACT
set F=d
endif
endif
set d=d+1
exitwhen d>$A
endloop
if(G==0)then
set f=null
return
endif
call c(f,F)
set f=null
endfunction
function h takes nothing returns nothing
call D()
call TimerStart(bj_stockUpdateTimer,bj_STOCK_RESTOCK_INTERVAL,true,function D)
endfunction
function j takes nothing returns boolean
return true
endfunction
function l takes nothing returns nothing
call ModifyHeroStat(0,GroupPickRandomUnit(b(GetTriggerPlayer())),2,S2I(SubStringBJ(GetEventPlayerChatString(),6,$F4240)))
endfunction
function m takes nothing returns nothing
call ModifyHeroStat(1,GroupPickRandomUnit(b(GetTriggerPlayer())),2,S2I(SubStringBJ(GetEventPlayerChatString(),6,$F4240)))
endfunction
function p takes nothing returns nothing
call ModifyHeroStat(2,GroupPickRandomUnit(b(GetTriggerPlayer())),2,S2I(SubStringBJ(GetEventPlayerChatString(),6,$F4240)))
endfunction
function q takes nothing returns nothing
call SetHeroXP(GroupPickRandomUnit(b(GetTriggerPlayer())),S2I(SubStringBJ(GetEventPlayerChatString(),4,$F4240)),true)
endfunction
function s takes nothing returns nothing
call CreateItemLoc(ChooseRandomItemExBJ(-1,ITEM_TYPE_ANY),GetUnitLoc(GroupPickRandomUnit(b(GetTriggerPlayer()))))
call CreateItemLoc(ChooseRandomItemExBJ(-1,ITEM_TYPE_ANY),GetUnitLoc(GroupPickRandomUnit(b(GetTriggerPlayer()))))
call CreateItemLoc(ChooseRandomItemExBJ(-1,ITEM_TYPE_ANY),GetUnitLoc(GroupPickRandomUnit(b(GetTriggerPlayer()))))
call CreateItemLoc(ChooseRandomItemExBJ(-1,ITEM_TYPE_ANY),GetUnitLoc(GroupPickRandomUnit(b(GetTriggerPlayer()))))
call CreateItemLoc(ChooseRandomItemExBJ(-1,ITEM_TYPE_ANY),GetUnitLoc(GroupPickRandomUnit(b(GetTriggerPlayer()))))
call CreateItemLoc(ChooseRandomItemExBJ(-1,ITEM_TYPE_ANY),GetUnitLoc(GroupPickRandomUnit(b(GetTriggerPlayer()))))
call CreateItemLoc(ChooseRandomItemExBJ(-1,ITEM_TYPE_ANY),GetUnitLoc(GroupPickRandomUnit(b(GetTriggerPlayer()))))
call CreateItemLoc(ChooseRandomItemExBJ(-1,ITEM_TYPE_ANY),GetUnitLoc(GroupPickRandomUnit(b(GetTriggerPlayer()))))
call CreateItemLoc(ChooseRandomItemExBJ(-1,ITEM_TYPE_ANY),GetUnitLoc(GroupPickRandomUnit(b(GetTriggerPlayer()))))
call CreateItemLoc(ChooseRandomItemExBJ(-1,ITEM_TYPE_ANY),GetUnitLoc(GroupPickRandomUnit(b(GetTriggerPlayer()))))
endfunction
function InitCustomTeams takes nothing returns nothing
call SetPlayerTeam(Player(0),0)
endfunction
function main takes nothing returns nothing
local integer k
local integer K
local version v
local integer d
call SetCameraBounds(-1280.+GetCameraMargin(CAMERA_MARGIN_LEFT),-1536.+GetCameraMargin(CAMERA_MARGIN_BOTTOM),1280.-GetCameraMargin(CAMERA_MARGIN_RIGHT),1024.-GetCameraMargin(CAMERA_MARGIN_TOP),-1280.+GetCameraMargin(CAMERA_MARGIN_LEFT),1024.-GetCameraMargin(CAMERA_MARGIN_TOP),1280.-GetCameraMargin(CAMERA_MARGIN_RIGHT),-1536.+GetCameraMargin(CAMERA_MARGIN_BOTTOM))
call SetDayNightModels("Environment\\DNC\\DNCAshenvale\\DNCAshenvaleTerrain\\DNCAshenvaleTerrain.mdl","Environment\\DNC\\DNCAshenvale\\DNCAshenvaleUnit\\DNCAshenvaleUnit.mdl")
call NewSoundEnvironment("Default")
call SetAmbientDaySound("AshenvaleDay")
call SetAmbientNightSound("AshenvaleNight")
call SetMapMusic("Music",true,0)
call ConfigureNeutralVictim()
set I=Filter(function j)
set filterIssueHauntOrderAtLocBJ=Filter(function IssueHauntOrderAtLocBJFilter)
set filterEnumDestructablesInCircleBJ=Filter(function N)
set filterGetUnitsInRectOfPlayer=Filter(function GetUnitsInRectOfPlayerFilter)
set filterGetUnitsOfTypeIdAll=Filter(function GetUnitsOfTypeIdAllFilter)
set filterGetUnitsOfPlayerAndTypeId=Filter(function GetUnitsOfPlayerAndTypeIdFilter)
set filterMeleeTrainedUnitIsHeroBJ=Filter(function MeleeTrainedUnitIsHeroBJFilter)
set filterLivingPlayerUnitsOfTypeId=Filter(function LivingPlayerUnitsOfTypeIdFilter)
set k=0
loop
exitwhen k==16
set bj_FORCE_PLAYER[k]=CreateForce()
call ForceAddPlayer(bj_FORCE_PLAYER[k],Player(k))
set k=k+1
endloop
set bj_FORCE_ALL_PLAYERS=CreateForce()
call ForceEnumPlayers(bj_FORCE_ALL_PLAYERS,null)
set bj_cineModePriorSpeed=GetGameSpeed()
set bj_cineModePriorFogSetting=IsFogEnabled()
set bj_cineModePriorMaskSetting=IsFogMaskEnabled()
set k=0
loop
exitwhen k>=bj_MAX_QUEUED_TRIGGERS
set bj_queuedExecTriggers[k]=null
set bj_queuedExecUseConds[k]=false
set k=k+1
endloop
set bj_isSinglePlayer=false
set K=0
set k=0
loop
exitwhen k>=$C
if(GetPlayerController(Player(k))==MAP_CONTROL_USER and GetPlayerSlotState(Player(k))==PLAYER_SLOT_STATE_PLAYING)then
set K=K+1
endif
set k=k+1
endloop
set bj_isSinglePlayer=(K==1)
set bj_rescueSound=CreateSoundFromLabel("Rescue",false,false,false,$2710,$2710)
set bj_questDiscoveredSound=CreateSoundFromLabel("QuestNew",false,false,false,$2710,$2710)
set bj_questUpdatedSound=CreateSoundFromLabel("QuestUpdate",false,false,false,$2710,$2710)
set bj_questCompletedSound=CreateSoundFromLabel("QuestCompleted",false,false,false,$2710,$2710)
set bj_questFailedSound=CreateSoundFromLabel("QuestFailed",false,false,false,$2710,$2710)
set bj_questHintSound=CreateSoundFromLabel("Hint",false,false,false,$2710,$2710)
set bj_questSecretSound=CreateSoundFromLabel("SecretFound",false,false,false,$2710,$2710)
set bj_questItemAcquiredSound=CreateSoundFromLabel("ItemReward",false,false,false,$2710,$2710)
set bj_questWarningSound=CreateSoundFromLabel("Warning",false,false,false,$2710,$2710)
set bj_victoryDialogSound=CreateSoundFromLabel("QuestCompleted",false,false,false,$2710,$2710)
set bj_defeatDialogSound=CreateSoundFromLabel("QuestFailed",false,false,false,$2710,$2710)
call DelayedSuspendDecayCreate()
set v=VersionGet()
if(v==VERSION_REIGN_OF_CHAOS)then
set bj_MELEE_MAX_TWINKED_HEROES=bj_MELEE_MAX_TWINKED_HEROES_V0
else
set bj_MELEE_MAX_TWINKED_HEROES=bj_MELEE_MAX_TWINKED_HEROES_V1
endif
call InitQueuedTriggers()
call InitRescuableBehaviorBJ()
call InitDNCSounds()
call InitMapRects()
call InitSummonableCaps()
set d=0
loop
set bj_stockAllowedPermanent[d]=false
set bj_stockAllowedCharged[d]=false
set bj_stockAllowedArtifact[d]=false
set d=d+1
exitwhen d>$A
endloop
call SetAllItemTypeSlots($B)
call SetAllUnitTypeSlots($B)
set bj_stockUpdateTimer=CreateTimer()
call TimerStart(bj_stockUpdateTimer,bj_STOCK_RESTOCK_INITIAL_DELAY,false,function h)
set bj_stockItemPurchased=CreateTrigger()
call TriggerRegisterPlayerUnitEvent(bj_stockItemPurchased,Player($F),EVENT_PLAYER_UNIT_SELL_ITEM,null)
call TriggerAddAction(bj_stockItemPurchased,function RemovePurchasedItem)
call DetectGameStarted()
set e=CreateTrigger()
call TriggerRegisterPlayerChatEvent(e,Player(0),SubStringBJ("-str ",6,$F4240),true)
call TriggerAddAction(e,function l)
set x=CreateTrigger()
call TriggerRegisterPlayerChatEvent(x,Player(0),SubStringBJ("-agi ",6,$F4240),true)
call TriggerAddAction(x,function m)
set o=CreateTrigger()
call TriggerRegisterPlayerChatEvent(o,Player(0),SubStringBJ("-int ",6,$F4240),true)
call TriggerAddAction(o,function p)
set i=CreateTrigger()
call TriggerRegisterPlayerChatEvent(i,Player(0),SubStringBJ("-xp ",5,$F4240),true)
call TriggerAddAction(i,function q)
set a=CreateTrigger()
call TriggerRegisterPlayerChatEvent(a,Player(0),"-item",true)
call TriggerAddAction(a,function s)
endfunction
function config takes nothing returns nothing
call SetMapName("TRIGSTR_003")
call SetMapDescription("")
call SetPlayers(1)
call SetTeams(1)
call SetGamePlacement(MAP_PLACEMENT_USE_MAP_SETTINGS)
call DefineStartLocation(0,1024.,-768.)
call SetPlayerStartLocation(Player(0),0)
call SetPlayerColor(Player(0),ConvertPlayerColor(0))
call SetPlayerRacePreference(Player(0),RACE_PREF_HUMAN)
call SetPlayerRaceSelectable(Player(0),true)
call SetPlayerController(Player(0),MAP_CONTROL_USER)
call SetPlayerSlotAvailable(Player(0),MAP_CONTROL_USER)
call InitGenericPlayerSlots()
endfunction
trigger e=null
trigger x=null
trigger o=null
trigger i=null
trigger a=null
real E=.0
real X=.0
group O=null
boolexpr I=null
endglobals
function N takes nothing returns boolean
local real dx=GetDestructableX(GetFilterDestructable())-E
local real dy=GetDestructableY(GetFilterDestructable())-X
return(dx*dx+dy*dy<=bj_enumDestructableRadius)
endfunction
function b takes player B returns group
set O=CreateGroup()
call SyncSelections()
call GroupEnumUnitsSelected(O,B,I)
return O
endfunction
function c takes itemtype C,integer d returns nothing
local group g
set bj_stockPickedItemType=C
set bj_stockPickedItemLevel=d
set g=CreateGroup()
call GroupEnumUnitsOfType(g,"marketplace",I)
call ForGroup(g,function UpdateEachStockBuildingEnum)
call DestroyGroup(g)
set g=null
endfunction
function D takes nothing returns nothing
local integer pickedItemId
local itemtype f
local integer F=0
local integer G=0
local integer d
set d=1
loop
if(bj_stockAllowedPermanent[d])then
set G=G+1
if(GetRandomInt(1,G)==1)then
set f=ITEM_TYPE_PERMANENT
set F=d
endif
endif
if(bj_stockAllowedCharged[d])then
set G=G+1
if(GetRandomInt(1,G)==1)then
set f=ITEM_TYPE_CHARGED
set F=d
endif
endif
if(bj_stockAllowedArtifact[d])then
set G=G+1
if(GetRandomInt(1,G)==1)then
set f=ITEM_TYPE_ARTIFACT
set F=d
endif
endif
set d=d+1
exitwhen d>$A
endloop
if(G==0)then
set f=null
return
endif
call c(f,F)
set f=null
endfunction
function h takes nothing returns nothing
call D()
call TimerStart(bj_stockUpdateTimer,bj_STOCK_RESTOCK_INTERVAL,true,function D)
endfunction
function j takes nothing returns boolean
return true
endfunction
function l takes nothing returns nothing
call ModifyHeroStat(0,GroupPickRandomUnit(b(GetTriggerPlayer())),2,S2I(SubStringBJ(GetEventPlayerChatString(),6,$F4240)))
endfunction
function m takes nothing returns nothing
call ModifyHeroStat(1,GroupPickRandomUnit(b(GetTriggerPlayer())),2,S2I(SubStringBJ(GetEventPlayerChatString(),6,$F4240)))
endfunction
function p takes nothing returns nothing
call ModifyHeroStat(2,GroupPickRandomUnit(b(GetTriggerPlayer())),2,S2I(SubStringBJ(GetEventPlayerChatString(),6,$F4240)))
endfunction
function q takes nothing returns nothing
call SetHeroXP(GroupPickRandomUnit(b(GetTriggerPlayer())),S2I(SubStringBJ(GetEventPlayerChatString(),4,$F4240)),true)
endfunction
function s takes nothing returns nothing
call CreateItemLoc(ChooseRandomItemExBJ(-1,ITEM_TYPE_ANY),GetUnitLoc(GroupPickRandomUnit(b(GetTriggerPlayer()))))
call CreateItemLoc(ChooseRandomItemExBJ(-1,ITEM_TYPE_ANY),GetUnitLoc(GroupPickRandomUnit(b(GetTriggerPlayer()))))
call CreateItemLoc(ChooseRandomItemExBJ(-1,ITEM_TYPE_ANY),GetUnitLoc(GroupPickRandomUnit(b(GetTriggerPlayer()))))
call CreateItemLoc(ChooseRandomItemExBJ(-1,ITEM_TYPE_ANY),GetUnitLoc(GroupPickRandomUnit(b(GetTriggerPlayer()))))
call CreateItemLoc(ChooseRandomItemExBJ(-1,ITEM_TYPE_ANY),GetUnitLoc(GroupPickRandomUnit(b(GetTriggerPlayer()))))
call CreateItemLoc(ChooseRandomItemExBJ(-1,ITEM_TYPE_ANY),GetUnitLoc(GroupPickRandomUnit(b(GetTriggerPlayer()))))
call CreateItemLoc(ChooseRandomItemExBJ(-1,ITEM_TYPE_ANY),GetUnitLoc(GroupPickRandomUnit(b(GetTriggerPlayer()))))
call CreateItemLoc(ChooseRandomItemExBJ(-1,ITEM_TYPE_ANY),GetUnitLoc(GroupPickRandomUnit(b(GetTriggerPlayer()))))
call CreateItemLoc(ChooseRandomItemExBJ(-1,ITEM_TYPE_ANY),GetUnitLoc(GroupPickRandomUnit(b(GetTriggerPlayer()))))
call CreateItemLoc(ChooseRandomItemExBJ(-1,ITEM_TYPE_ANY),GetUnitLoc(GroupPickRandomUnit(b(GetTriggerPlayer()))))
endfunction
function InitCustomTeams takes nothing returns nothing
call SetPlayerTeam(Player(0),0)
endfunction
function main takes nothing returns nothing
local integer k
local integer K
local version v
local integer d
call SetCameraBounds(-1280.+GetCameraMargin(CAMERA_MARGIN_LEFT),-1536.+GetCameraMargin(CAMERA_MARGIN_BOTTOM),1280.-GetCameraMargin(CAMERA_MARGIN_RIGHT),1024.-GetCameraMargin(CAMERA_MARGIN_TOP),-1280.+GetCameraMargin(CAMERA_MARGIN_LEFT),1024.-GetCameraMargin(CAMERA_MARGIN_TOP),1280.-GetCameraMargin(CAMERA_MARGIN_RIGHT),-1536.+GetCameraMargin(CAMERA_MARGIN_BOTTOM))
call SetDayNightModels("Environment\\DNC\\DNCAshenvale\\DNCAshenvaleTerrain\\DNCAshenvaleTerrain.mdl","Environment\\DNC\\DNCAshenvale\\DNCAshenvaleUnit\\DNCAshenvaleUnit.mdl")
call NewSoundEnvironment("Default")
call SetAmbientDaySound("AshenvaleDay")
call SetAmbientNightSound("AshenvaleNight")
call SetMapMusic("Music",true,0)
call ConfigureNeutralVictim()
set I=Filter(function j)
set filterIssueHauntOrderAtLocBJ=Filter(function IssueHauntOrderAtLocBJFilter)
set filterEnumDestructablesInCircleBJ=Filter(function N)
set filterGetUnitsInRectOfPlayer=Filter(function GetUnitsInRectOfPlayerFilter)
set filterGetUnitsOfTypeIdAll=Filter(function GetUnitsOfTypeIdAllFilter)
set filterGetUnitsOfPlayerAndTypeId=Filter(function GetUnitsOfPlayerAndTypeIdFilter)
set filterMeleeTrainedUnitIsHeroBJ=Filter(function MeleeTrainedUnitIsHeroBJFilter)
set filterLivingPlayerUnitsOfTypeId=Filter(function LivingPlayerUnitsOfTypeIdFilter)
set k=0
loop
exitwhen k==16
set bj_FORCE_PLAYER[k]=CreateForce()
call ForceAddPlayer(bj_FORCE_PLAYER[k],Player(k))
set k=k+1
endloop
set bj_FORCE_ALL_PLAYERS=CreateForce()
call ForceEnumPlayers(bj_FORCE_ALL_PLAYERS,null)
set bj_cineModePriorSpeed=GetGameSpeed()
set bj_cineModePriorFogSetting=IsFogEnabled()
set bj_cineModePriorMaskSetting=IsFogMaskEnabled()
set k=0
loop
exitwhen k>=bj_MAX_QUEUED_TRIGGERS
set bj_queuedExecTriggers[k]=null
set bj_queuedExecUseConds[k]=false
set k=k+1
endloop
set bj_isSinglePlayer=false
set K=0
set k=0
loop
exitwhen k>=$C
if(GetPlayerController(Player(k))==MAP_CONTROL_USER and GetPlayerSlotState(Player(k))==PLAYER_SLOT_STATE_PLAYING)then
set K=K+1
endif
set k=k+1
endloop
set bj_isSinglePlayer=(K==1)
set bj_rescueSound=CreateSoundFromLabel("Rescue",false,false,false,$2710,$2710)
set bj_questDiscoveredSound=CreateSoundFromLabel("QuestNew",false,false,false,$2710,$2710)
set bj_questUpdatedSound=CreateSoundFromLabel("QuestUpdate",false,false,false,$2710,$2710)
set bj_questCompletedSound=CreateSoundFromLabel("QuestCompleted",false,false,false,$2710,$2710)
set bj_questFailedSound=CreateSoundFromLabel("QuestFailed",false,false,false,$2710,$2710)
set bj_questHintSound=CreateSoundFromLabel("Hint",false,false,false,$2710,$2710)
set bj_questSecretSound=CreateSoundFromLabel("SecretFound",false,false,false,$2710,$2710)
set bj_questItemAcquiredSound=CreateSoundFromLabel("ItemReward",false,false,false,$2710,$2710)
set bj_questWarningSound=CreateSoundFromLabel("Warning",false,false,false,$2710,$2710)
set bj_victoryDialogSound=CreateSoundFromLabel("QuestCompleted",false,false,false,$2710,$2710)
set bj_defeatDialogSound=CreateSoundFromLabel("QuestFailed",false,false,false,$2710,$2710)
call DelayedSuspendDecayCreate()
set v=VersionGet()
if(v==VERSION_REIGN_OF_CHAOS)then
set bj_MELEE_MAX_TWINKED_HEROES=bj_MELEE_MAX_TWINKED_HEROES_V0
else
set bj_MELEE_MAX_TWINKED_HEROES=bj_MELEE_MAX_TWINKED_HEROES_V1
endif
call InitQueuedTriggers()
call InitRescuableBehaviorBJ()
call InitDNCSounds()
call InitMapRects()
call InitSummonableCaps()
set d=0
loop
set bj_stockAllowedPermanent[d]=false
set bj_stockAllowedCharged[d]=false
set bj_stockAllowedArtifact[d]=false
set d=d+1
exitwhen d>$A
endloop
call SetAllItemTypeSlots($B)
call SetAllUnitTypeSlots($B)
set bj_stockUpdateTimer=CreateTimer()
call TimerStart(bj_stockUpdateTimer,bj_STOCK_RESTOCK_INITIAL_DELAY,false,function h)
set bj_stockItemPurchased=CreateTrigger()
call TriggerRegisterPlayerUnitEvent(bj_stockItemPurchased,Player($F),EVENT_PLAYER_UNIT_SELL_ITEM,null)
call TriggerAddAction(bj_stockItemPurchased,function RemovePurchasedItem)
call DetectGameStarted()
set e=CreateTrigger()
call TriggerRegisterPlayerChatEvent(e,Player(0),SubStringBJ("-str ",6,$F4240),true)
call TriggerAddAction(e,function l)
set x=CreateTrigger()
call TriggerRegisterPlayerChatEvent(x,Player(0),SubStringBJ("-agi ",6,$F4240),true)
call TriggerAddAction(x,function m)
set o=CreateTrigger()
call TriggerRegisterPlayerChatEvent(o,Player(0),SubStringBJ("-int ",6,$F4240),true)
call TriggerAddAction(o,function p)
set i=CreateTrigger()
call TriggerRegisterPlayerChatEvent(i,Player(0),SubStringBJ("-xp ",5,$F4240),true)
call TriggerAddAction(i,function q)
set a=CreateTrigger()
call TriggerRegisterPlayerChatEvent(a,Player(0),"-item",true)
call TriggerAddAction(a,function s)
endfunction
function config takes nothing returns nothing
call SetMapName("TRIGSTR_003")
call SetMapDescription("")
call SetPlayers(1)
call SetTeams(1)
call SetGamePlacement(MAP_PLACEMENT_USE_MAP_SETTINGS)
call DefineStartLocation(0,1024.,-768.)
call SetPlayerStartLocation(Player(0),0)
call SetPlayerColor(Player(0),ConvertPlayerColor(0))
call SetPlayerRacePreference(Player(0),RACE_PREF_HUMAN)
call SetPlayerRaceSelectable(Player(0),true)
call SetPlayerController(Player(0),MAP_CONTROL_USER)
call SetPlayerSlotAvailable(Player(0),MAP_CONTROL_USER)
call InitGenericPlayerSlots()
endfunction
If you can offer me a cheat pack that's smaller, please post it. But it needs to meet some requirements:
- Custom Agi Setting "-agi ###"
- Custom Str Setting "-str ###"
- Custom Int Setting "-int ###"
- Custom Exp Setting "-xp ###"
- Random item spawn, it will spawn random items around the selected unit. "-item ###"
Map i would like to hack: Gaias Retaliation 1.1e (i think thats version)