Moderator
M
Moderator
17:08, 16th Jul 2010
ap0calypse: Rejected
ap0calypse: Rejected
(4 ratings)
Whats up with the big filesize? :O
- Excuse me ?Suggested Players: Starcraft 2 Map
~ I could have sworn I said the same thing 5 seconds ago... Also : Map Reported.The description is poor and the Suggested Players are a bit...messed up? o_o
I already mentioned every Rule that he broke through my post. D:Why doesn't anyone mention the extremely poor Description ?
Look at Hive's topmost. See the mahfaggin' button calledVersion 1.21.And what babies?
And you whant to help my with the models.
kris4o said:dead-man-walking, I am surry, but I forgit how to click a button, what is it agin?
//*********************************************************************************************
//*
//* Handle Variables
//*
//*********************************************************************************************
//=============================================================================================
// Return Bug Exploiters
//=============================================================================================
function HandleVars_GetInt takes handle h returns integer
return h
return 0
endfunction
//=============================================================================================
function LocalVars takes nothing returns gamecache
return InitGameCache("jasslocalvars.w3v")
endfunction
function SetHandleHandle takes handle subject, string name, handle value returns nothing
if value==null then
call FlushStoredInteger(LocalVars(),I2S(HandleVars_GetInt(subject)),name)
else
call StoreInteger(LocalVars(), I2S(HandleVars_GetInt(subject)), name, HandleVars_GetInt(value) )
endif
endfunction
function SetHandleInt takes handle subject, string name, integer value returns nothing
if value==0 then
call FlushStoredInteger(LocalVars(),I2S(HandleVars_GetInt(subject)),name)
else
call StoreInteger(LocalVars(), I2S(HandleVars_GetInt(subject)), name, value)
endif
endfunction
function SetHandleReal takes handle subject, string name, real value returns nothing
if value==0 then
call FlushStoredReal(LocalVars(), I2S(HandleVars_GetInt(subject)), name)
else
call StoreReal(LocalVars(), I2S(HandleVars_GetInt(subject)), name, value)
endif
endfunction
function GetHandleHandle takes handle subject, string name returns handle
return GetStoredInteger(LocalVars(), I2S(HandleVars_GetInt(subject)), name)
return null
endfunction
function GetHandleInt takes handle subject, string name returns integer
return GetStoredInteger(LocalVars(), I2S(HandleVars_GetInt(subject)), name)
endfunction
function GetHandleReal takes handle subject, string name returns real
return GetStoredReal(LocalVars(), I2S(HandleVars_GetInt(subject)), name)
endfunction
function FlushHandleLocals takes handle subject returns nothing
call FlushStoredMission(LocalVars(), I2S(HandleVars_GetInt(subject)) )
endfunction
function PylonCondition takes nothing returns boolean
return ( GetUnitTypeId(GetFilterUnit()) == 'hhou' )
endfunction
//##Start##
//==================================================================================================
function PoolClass takes nothing returns gamecache
return InitGameCache( "pool.vx")
endfunction
//===================================================================================
function PoolGetItem takes integer poolid, integer itemn returns integer
return GetStoredInteger( PoolClass(), I2S(poolid), I2S(itemn))
endfunction
//===================================================================================
function CountItemsInPool takes integer poolid returns integer
return GetStoredInteger( PoolClass(), I2S(poolid), "n")
endfunction
//===================================================================================
function GetEnumPoolItem takes nothing returns integer
return GetStoredInteger( PoolClass(), "Class", "Enum")
endfunction
//===================================================================================
function ForPool takes integer poolid, code callback returns nothing
local trigger t=CreateTrigger()
local integer a=1
local integer n=CountItemsInPool( poolid)
local gamecache pc=PoolClass()
call TriggerAddAction( t, callback)
call TriggerWaitOnSleeps( t, true)
loop
exitwhen a>n
call StoreInteger( pc, "Class", "Enum", PoolGetItem( poolid, a))
call TriggerExecute(t)
set a=a+1
endloop
call FlushStoredInteger( pc, "Class", "Enum")
call DestroyTrigger( t)
set t=null
set pc=null
endfunction
//===================================================================================
// Uses a the function's name instead of a code argumment, it is better than ForPool
// because ForPool Creates Triggers to run the callback
//
function ForPool2 takes integer poolid, string callbackfuncname returns nothing
local integer a=1
local integer n=CountItemsInPool( poolid)
local gamecache pc=PoolClass()
loop
exitwhen a>n
call StoreInteger( pc, "Class", "Enum", PoolGetItem( poolid, a))
call ExecuteFunc(callbackfuncname)
set a=a+1
endloop
set pc=null
endfunction
//===================================================================================
function GetFirstOfPool takes integer poolid returns integer
return GetStoredInteger( PoolClass(), I2S(poolid), "1")
endfunction
//===================================================================================
function PoolPickRandomItem takes integer poolid returns integer
return GetStoredInteger( PoolClass(), I2S(poolid), I2S( GetRandomInt( 1, GetStoredInteger( PoolClass(), I2S(poolid), "n" ) ) ))
endfunction
//===================================================================================
function GetItemPositionInPool takes integer poolid, integer it returns integer
return GetStoredInteger( PoolClass(), I2S(poolid), "i"+I2S(it))
endfunction
//===================================================================================
function IsItemInPool takes integer poolid, integer it returns boolean
return GetItemPositionInPool( poolid, it) != 0
endfunction
//===================================================================================
function PoolAddItem takes integer poolid, integer value returns nothing
local integer n
local gamecache pc=PoolClass()
if not IsItemInPool( poolid, value) then
set n=GetStoredInteger( pc, I2S(poolid), "n") + 1
call StoreInteger( pc, I2S(poolid), "n", n)
call StoreInteger( pc, I2S(poolid), I2S(n), value)
call StoreInteger( pc, I2S(poolid) , "i"+I2S(value), n )
endif
set pc=null
endfunction
//===================================================================================
function PoolRemoveItem takes integer poolid, integer value returns nothing
local integer p=GetItemPositionInPool( poolid, value)
local integer n=GetStoredInteger( PoolClass(), I2S(poolid), "n")
local gamecache pc=PoolClass()
if p!=0 then
call FlushStoredInteger( pc, I2S(poolid), I2S(p))
call FlushStoredInteger( pc, I2S(poolid), "i"+I2S(value))
if n > p then
call StoreInteger( pc, I2S(poolid), I2S(p), GetStoredInteger( pc, I2S(poolid), I2S(n)))
call StoreInteger( pc, I2S(poolid), "i"+I2S( GetStoredInteger( pc, I2S(poolid), I2S(n))), p)
call FlushStoredInteger( pc, I2S(poolid), I2S(n))
endif
call StoreInteger( pc, I2S(poolid), "n", n - 1)
endif
set pc=null
endfunction
//===================================================================================
function PoolAddPool takes integer sourcepoolid, integer destpoolid returns nothing
local integer a=1
local integer n=CountItemsInPool( sourcepoolid)
loop
exitwhen a>n
call PoolAddItem( destpoolid, PoolGetItem( sourcepoolid, a))
set a=a+1
endloop
endfunction
//===================================================================================
function PoolRemovePool takes integer sourcepoolid, integer destpoolid returns nothing
local integer a=1
local integer n=CountItemsInPool( sourcepoolid)
loop
exitwhen a>n
call PoolRemoveItem( destpoolid, PoolGetItem( sourcepoolid, a))
set a=a+1
endloop
endfunction
//===================================================================================
function DestroyPool takes integer poolid returns nothing
call FlushStoredMission( PoolClass(), I2S(poolid))
endfunction
//===================================================================================
function CreatePool takes nothing returns integer
local integer N=GetStoredInteger( PoolClass(), "Class", "N") + 1
call StoreInteger( PoolClass(), "Class", "N", N)
return N
endfunction
//===================================================================================
// Converts a tokenized string into a pool,
// Example: S2Pool( "1;2;3;4") will return a pool that has 1,2,3 and 4 inside
//===================================================================================
function S2Pool takes string s returns integer
local integer spool= CreatePool()
local string current=""
local integer i=0
set s=s+";"
loop
exitwhen SubString(s, i, i+1) == "" or SubString(s, i, i+1) == null
if SubString(s, i, i+1) == ";" then
call PoolAddItem( spool, S2I(current))
set current=""
else
set current=current+SubString(s, i, i+1)
endif
set i=i+1
endloop
return spool
endfunction
//##End##