grimm92

Member
Okay so all the stealbales work great, I just had a couple questions on the spawner script that came with the server. I was looking through stealablesartifactsspawner.cs and noticed there isnt time for each arty, are they all respawning after 15mins in the script? Also the lamp post does not change hues as intended in the script. Any insight on this would be great thank you!
 

Attachments

  • StealableArtifactsSpawner.cs
    26.4 KB · Views: 4
@grimm92
taken from StealableArtifactsSpawner.cs /scripts/items/decoration artifacts

Find spawn times:
public StealableEntry( Map map, Point3D location, int minDelay, int maxDelay, Type type, int hue )

// Doom - Artifact rarity 1
new StealableEntry( Map.Malas, new Point3D( 317, 56, -1 ), 72, 108, typeof( RockArtifact ) ),

// Doom - Artifact rarity 5
new StealableEntry( Map.Malas, new Point3D( 447, 9, 8 ), 1152, 1728, typeof( StuddedLeggingsArtifact ) ),

Lamp Post info:
// Doom - Artifact rarity 3
new StealableEntry( Map.Malas, new Point3D( 471, 96, -1 ), 288, 432, typeof( LampPostArtifact ), GetLampPostHue() ),

around Line 248 find this bit:

private static int GetLampPostHue()

{

if ( 0.9 > Utility.RandomDouble() )

return 0;


return Utility.RandomList( 0x455, 0x47E, 0x482, 0x486, 0x48F, 0x4F2, 0x58C, 0x66C );

}
 
@grimm92
taken from StealableArtifactsSpawner.cs /scripts/items/decoration artifacts

Find spawn times:
public StealableEntry( Map map, Point3D location, int minDelay, int maxDelay, Type type, int hue )

// Doom - Artifact rarity 1
new StealableEntry( Map.Malas, new Point3D( 317, 56, -1 ), 72, 108, typeof( RockArtifact ) ),

// Doom - Artifact rarity 5
new StealableEntry( Map.Malas, new Point3D( 447, 9, 8 ), 1152, 1728, typeof( StuddedLeggingsArtifact ) ),

Lamp Post info:
// Doom - Artifact rarity 3
new StealableEntry( Map.Malas, new Point3D( 471, 96, -1 ), 288, 432, typeof( LampPostArtifact ), GetLampPostHue() ),

around Line 248 find this bit:

private static int GetLampPostHue()

{

if ( 0.9 > Utility.RandomDouble() )

return 0;


return Utility.RandomList( 0x455, 0x47E, 0x482, 0x486, 0x48F, 0x4F2, 0x58C, 0x66C );

}
Ahh okay so times are on there longer thank you! but im still fairly new at scripting yet, how does the lamp hue work? its not working at all in the server does something need to be changed?
 
Try change the 0.9 to a lower number like 0.5 for a 50% chance to see it change, but what I noticed is the commands will only change the hue it picks after server is restarted and you use [removestealarties followed by [genstealarties
If you get a purple one it will always be purple until you restart server, doesnt matter how many times you remove & regenerate the stealables,
However, it does work. The 0.9 is only a 10% chance to be hued which is probably close to accurate since the lamp respawns quite often.
If you disagree or would like it to be more frequent lower the number, you can also add more hues to the list if you want.

if ( 0.9 > Utility.RandomDouble() ) // 0.9 is 10% chance to be hued 90% chance to not be hued

return 0; // hue is zero or no hue which defaults to items original hue in this case black.

return Utility.RandomList( 0x455, 0x47E, 0x482, 0x486, 0x48F, 0x4F2, 0x58C, 0x66C ); //random hues
 
Try change the 0.9 to a lower number like 0.5 for a 50% chance to see it change, but what I noticed is the commands will only change the hue it picks after server is restarted and you use [removestealarties followed by [genstealarties
If you get a purple one it will always be purple until you restart server, doesnt matter how many times you remove & regenerate the stealables,
However, it does work. The 0.9 is only a 10% chance to be hued which is probably close to accurate since the lamp respawns quite often.
If you disagree or would like it to be more frequent lower the number, you can also add more hues to the list if you want.

Ahh okay thank you very much for all this!
 

Active Shards

Donations

Total amount
$50.00
Goal
$1,000.00
Back