Random Spawn

06/28/2014 09:09 arneljan#1
How to make This a Random Spawn Cord.


PHP Code:
#region SnowBanshe
            
if (Now64.Minute == 27 && Now64.Second == 00 && Kernel.Spawn == false)
            {
                if (
Kernel.Maps.ContainsKey(1762))
                {
                    
Kernel.Spawn true;
                    
Database.MonsterInformation mob;
                    
Database.MonsterInformation.MonsterInformations.TryGetValue(4171out mob);
                    
client.Map.Spawnthis(mobclient1762342363);
                    
Kernel.SendWorldMessage(new MessiProject.Network.GamePackets.Message("Warning SnowBanshee Appeared At Forzen Grotto 2nd Floor Hunt it Fast And Claim your Prize"Color.Red2012));
                }
            }
            
#endregion 
06/28/2014 10:42 OverKillasdwqe#2
at
client.Map.Spawnthis(mob, client, 1762, 342, 363);

instead of using 342/363
use an instance of system random class then call next(min/max) for both x,y

but you have to nerf that out, a nice method to get a valid coords within a radius around point

but the easiest solution would be creating a directory of points where to randomly (using system random instance) pick up one of them
06/28/2014 14:18 Wolfy.#3
Messi project. Wow. Such source...
06/28/2014 19:40 Spirited#4
Please google before you post.
[Only registered and activated users can see links. Click Here To Register...]
[Only registered and activated users can see links. Click Here To Register...]
06/29/2014 01:39 Aceking#5
Probably a better idea to point him towards thread safe randoms. Lord knows that source probably has some crazy thread issues underneath. Or of course its running off one thread period, that wouldn't surprise me.
06/29/2014 22:03 abdoumatrix#6
Quote:
Originally Posted by Wolfy. View Post
Messi project. Wow. Such source...
no , it is what we call bigshow
a little better


@TopicOwner
PHP Code:
var cord Map.RandomCoordinates();
client.Entity.Teleport(Map.IDcord.Item1cord.Item2); 
try something like this
06/29/2014 22:14 Spirited#7
Quote:
Originally Posted by abdoumatrix View Post
no , it is what we call bigshow
a little better


@TopicOwner
PHP Code:
var cord Map.RandomCoordinates();
client.Entity.Teleport(Map.IDcord.Item1cord.Item2); 
try something like this
I don't mean to be negative, but a little better than shoulder deep in shit is waste deep in shit. Neither of which seem very appealing. On topic: At least there's a method for it already.
06/29/2014 23:38 abdoumatrix#8
Quote:
Originally Posted by Spirited View Post
I don't mean to be negative, but a little better than shoulder deep in shit is waste deep in shit. Neither of which seem very appealing. On topic: At least there's a method for it already.
it is just a good source if u want to make server for u and ur friends
or if u want to try learning but as ur knowledge increase in programing u will know what is good and bad in it what will happen when u see some other good references and sources.

it just fit in specific time and specific knowladge.
07/01/2014 04:17 CptSky#9
Quote:
Originally Posted by Aceking View Post
Probably a better idea to point him towards thread safe randoms. Lord knows that source probably has some crazy thread issues underneath. Or of course its running off one thread period, that wouldn't surprise me.
No need to use a thread safe random with the overhead. Creating a Random object in few classes / methods is not a big task.