Added AW, BO2, Ghosts, IW, MWR, WW2 Scripts

This commit is contained in:
InfinityLoader
2023-10-27 03:49:01 -04:00
parent d559c1d414
commit fbfff3c275
5072 changed files with 3221958 additions and 0 deletions

View File

@ -0,0 +1,32 @@
/*******************************************************************
* Decompiled By: Bog
* Decompiled File: codescripts\character_mp.gsc
* Game: Call of Duty: Black Ops 2
* Platform: Console
* Function Count: 3
* Decompile Time: 6 ms
* Timestamp: 10/27/2023 3:04:04 AM
*******************************************************************/
#include codescripts/character;
//Function Number: 1
setmodelfromarray(a)
{
self setmodel(a[randomint(a.size)]);
}
//Function Number: 2
precachemodelarray(a)
{
for(i = 0;i < a.size;i++)
{
precachemodel(a[i]);
}
}
//Function Number: 3
attachfromarray(a)
{
self attach(codescripts/character::randomelement(a),"",1);
}

View File

@ -0,0 +1,29 @@
/*******************************************************************
* Decompiled By: Bog
* Decompiled File: codescripts\delete.gsc
* Game: Call of Duty: Black Ops 2
* Platform: Console
* Function Count: 1
* Decompile Time: 4 ms
* Timestamp: 10/27/2023 3:04:04 AM
*******************************************************************/
//Function Number: 1
main()
{
/#
assert(IsDefined(self));
#/
wait(0);
if(IsDefined(self))
{
/#
println("");
println("*** trigger debug: delete.gsc is deleting trigger with ent#: " + self getentitynumber() + " at origin: " + self.origin);
println("");
self.classname == "trigger_once" || self.classname == "trigger_radius" || self.classname == "trigger_multiple"
IsDefined(self.classname)
#/
self delete();
}
}

View File

@ -0,0 +1,41 @@
/*******************************************************************
* Decompiled By: Bog
* Decompiled File: codescripts\struct.gsc
* Game: Call of Duty: Black Ops 2
* Platform: Console
* Function Count: 3
* Decompile Time: 8 ms
* Timestamp: 10/27/2023 3:04:05 AM
*******************************************************************/
//Function Number: 1
initstructs()
{
level.struct = [];
}
//Function Number: 2
createstruct()
{
struct = spawnstruct();
level.struct[level.struct.size] = struct;
return struct;
}
//Function Number: 3
findstruct(position)
{
foreach(key, _ in level.struct_class_names)
{
foreach(s_array in level.struct_class_names[key])
{
foreach(struct in s_array)
{
if(distancesquared(struct.origin,position) < 1)
{
return struct;
}
}
}
}
}