Hell Bosses timing problem !!!need some help

08/31/2010 06:17 { Angelius }#1
dose anybody know how to do the timing thing for bosses or monsters like if i wanted Satan or Andrew or even Victoria to spawn 2 times in raw if someone killed any of them i saw it in one of the server like if you killed Satan he is gonna spawn 20 sec later and than it takes ages to find him again hod do i make the bosses or the monster spawn when i want them to spawn i did try to worked out but no hope well using the following code gives me 2 options

1= to add some silver or cps to the player that killed the boss
Code:
 if (Name.Contains("Satan"))
                    
                {
                    Char.CPs += 150;
                    Game.World.SendMsgToAll("Server", " Satan is Dead " + Char.Name + "'s Got 150 CPs For Killing Satan " + Char.Name + " is the hero of exampleCO  ", 2011, 0);
2= to send a sys message to tall all players that the boss was killed and the player name that killed him
but.. i need to add a time control for the bosses to so i did try the spawn speed and if i used it lets say that the boss showed up and none of the players killed him the boss is gonna stay there and when its time for the next boss to spawn nothing to stop him which mean we have 2 bosses and with time its gonna be 3 and 4 and 100 till some one clean it :P so i really need some help like a code to use or something cus i couldent make it :P

:handsdown::handsdown::handsdown::handsdown::hands down::handsdown::handsdown::handsdown:
PM.me at{ [Only registered and activated users can see links. Click Here To Register...] }
08/31/2010 10:58 dowhatuwant#2
search, have been discussed before.
08/31/2010 12:47 { Angelius }#3
kk thank you :D was my first post lol
08/31/2010 14:19 µ~Xero~µ#4
if (Name.Contains("Satan"))

{
Char.CPs += 150;
Game.World.SendMsgToAll("Server", " Satan is Dead " + Char.Name + "'s Got 150 CPs For Killing Satan " + Char.Name + " is the hero of exampleCO ", 2011, 0);
if(instantrespawn)
Respawn(this);
instantrespawn = false;
}
}

there u go define instantrespawn as bool somewhere
09/01/2010 02:49 pro4never#5
Quote:
Originally Posted by µ~Xero~µ View Post
if (Name.Contains("Satan"))

{
Char.CPs += 150;
Game.World.SendMsgToAll("Server", " Satan is Dead " + Char.Name + "'s Got 150 CPs For Killing Satan " + Char.Name + " is the hero of exampleCO ", 2011, 0);
if(instantrespawn)
Respawn(this);
instantrespawn = false;
}
}

there u go define instantrespawn as bool somewhere
To expand on this: you also need to setp your respawn code so

A: it only respawns based on mob respawn value (set for that spawn) and

B: it checks if the mob/spawn is already alive, if so sets it's instant respawn to true (i'd personaly set instant respawn in a value for monster struct)


Simple enough stuff. Just takes some work to fully sort out
09/01/2010 07:50 { Angelius }#6
Code:
   Originally Posted by µ~Xero~µ  
if (Name.Contains("Satan"))

{
Char.CPs += 150;
Game.World.SendMsgToAll("Server", " Satan is Dead " + Char.Name + "'s Got 150 CPs For Killing Satan " + Char.Name + " is the hero of exampleCO ", 2011, 0);
if(instantrespawn)
Respawn(this);
instantrespawn = false;
}
}

there u go define instantrespawn as bool somewhere
a great thanks :xD
but the code never worked so i had to find something else .and what i wanted to do is to make a hell boss like Satan or BeastSatan spawn 2 times in raw in like 50 sec after you kill him the first time and than stop the boss spawn for like 3 to 4 hours and than let him spawn again but :(((((( i cant get it to work so i had to stick with a one random spawn after the boss is dead giving a spawn time form 7,000 sec to 9,000 sec
Ps. knowing that this code is a bit F**UP but at least it works for now
Code:
  
       }
      if (Name.Contains("Satan"))
       {
[COLOR="Red"]Char.CPs += 5000;[/COLOR]
[COLOR="MediumTurquoise"]Game.World.SendMsgToAll("Server", " Satan Is Dead " + Char.Name + "  is the hero of exampleCO " + Char.Name + " GOT THE 5,000 CPs For Killing The Beast", 2011, 0);[/COLOR]
                    [COLOR="Purple"]Loc = StartLoc;
                    World.Action(this, Packets.GeneralData(EntityID, 0, 0, 0, 135).Get);
                    Dissappeared = true;
                    RandomTime = (uint)(Rnd.Next(20000, 25000));[/COLOR]
                    [COLOR="Magenta"]DI2.Info.ID = 1088000;
                    DI2.Info.MaxDur = DI2.Info.DBInfo.Durability;
                    DI2.Info.CurDur = DI2.Info.MaxDur;[/COLOR]
Giveing the player 5k cps
brag about it posting a world message
adding the Random time for the boss spawn
Droping an item such a dragon ball or something else maybe a DragonBall scroll
09/01/2010 11:42 dowhatuwant#7
Why use contains??
Why not just Name == "Satan"
Because if he got another mob called ex. DemonSatan or BirdSatan.
Then they will call it also.
09/01/2010 13:30 µ~Xero~µ#8
Exactly what i thought. btw i tested my code haha it works.. at-least on my version of that crappy source
09/01/2010 13:39 { Angelius }#9
no no it has to be like this
}
if (Name.Contains("Satan"))
{
or
}
if (Name.Contains("BeastSatan"))
{
other ways it want call the right method for the boss lets take satan as an example in the mobsinfo.txt the spelling starts with a CAPs( S) and if i used a small letter ( s )it want call it and the cod faile again
it works fine though i tested it my self but any way i guess im getting closer lol its a matter of time :D
09/01/2010 13:44 ~Falcon#10
Would be better to check the monster ID/Mesh, than unnecessary string operations/comparisons
09/01/2010 13:56 { Angelius }#11
Code:
 
Originally Posted by Falcon

Would be better to check the monster ID/Mesh, than unnecessary string operations/comparisons
lol Id/Mech !! making the boss spawn a little bit late is not the point of all this and giving the mob a higher spawn speed using the mobsinfo.txt gives the mob the exact time to spawn every time the mob gets killed but giving em a random time is the point so if i wanted a mob to spawn when i want him to spawn without giving the players the exact time for that boss everyday and lol if you scroll up a little bit you'll read this .......>>>>>
Code:
but the code never worked so i had to find something else .and what i wanted to do is to make a hell boss like Satan or BeastSatan spawn 2 times in raw in like 50 sec after you kill him the first time and than stop the boss spawn for like 3 to 4 hours and than let him spawn again but ((((( i cant get it to work so i had to stick with a one random spawn after the boss is dead giving a spawn time form 7,000 sec to 9,000 sec

but i couldent make it so that was my best bet
09/01/2010 14:20 ~Falcon#12
What the f**k are you talking about?
09/01/2010 15:47 µ~Xero~µ#13
i dont get it either
09/01/2010 20:39 hadeset#14
He wants to make the mob spawn randomly from 7 to 9 seconds, but from MobInfos.txt you can only set a constant value for that.
09/02/2010 03:37 { Angelius }#15
ummm
ok as long as you dont get it her is the code and try to do it your way and let me know if its gonna work >>~Falcon
Code:
if (Name.Contains("Satan"))
                {
                    Char.CPs += 250;
                    Game.World.SendMsgToAll("Server", " Satan is Dead " + Char.Name + "'s Got 250 CPs For Killing Satan " + Char.Name + " is the hero of exampleCO ", 2011, 0);
                    Loc = StartLoc;
                    World.Action(this, Packets.GeneralData(EntityID, 0, 0, 0, 135).Get);
                    Dissappeared = true;
                    RandomTime = (uint)(Rnd.Next(12000, 14400));
                }
                    if (Name.Contains("BeastSatan"))
                {
                    Char.CPs += 250;
                    Game.World.SendMsgToAll("Server", " Satan is Dead " + Char.Name + "'s Got 250 CPs For Killing the Divel and Being A Hero", 2011, 0);
                    Loc = StartLoc;
                    World.Action(this, Packets.GeneralData(EntityID, 0, 0, 0, 135).Get);
                    Dissappeared = true;
                    RandomTime = (uint)(Rnd.Next(12000, 14400));
                }
                if (Name.Contains("FurySatan"))
                {
                    Char.CPs += 250;
                    Game.World.SendMsgToAll("Server", " Satan is Dead " + Char.Name + "'s Got 250 CPs For Killing the Divel and Being A Hero", 2011, 0);
                    Loc = StartLoc;
                    World.Action(this, Packets.GeneralData(EntityID, 0, 0, 0, 135).Get);
                    Dissappeared = true;
                    RandomTime = (uint)(Rnd.Next(12000, 14400));
                }
                if (Name.Contains("Andrew"))
                {
                    Char.CPs += 150;
                    Game.World.SendMsgToAll("Server", "" + Char.Name + "  Just Killd Boss Andrew   ", 2011, 0);
                    Loc = StartLoc;
                    World.Action(this, Packets.GeneralData(EntityID, 0, 0, 0, 135).Get);
                    Dissappeared = true;
                    RandomTime = (uint)(Rnd.Next(4000, 5400));
                }
                if (Name.Contains("Peter"))
                {
                    Char.CPs += 150;
                    Game.World.SendMsgToAll("Server", "" + Char.Name + "  Just Killd Boss Peter", 2011, 0);
                    Loc = StartLoc;
                    World.Action(this, Packets.GeneralData(EntityID, 0, 0, 0, 135).Get);
                    Dissappeared = true;
                    RandomTime = (uint)(Rnd.Next(4000, 5400));
                }
                if (Name.Contains("Philip"))
                {
                    Char.CPs += 150;
                    Game.World.SendMsgToAll("Server", "" + Char.Name + "  Just Killd Boss Philip", 2011, 0);
                    Loc = StartLoc;
                    World.Action(this, Packets.GeneralData(EntityID, 0, 0, 0, 135).Get);
                    Dissappeared = true;
                    RandomTime = (uint)(Rnd.Next(4000, 5400));
                }
                if (Name.Contains("Timothy"))
                {
                    Char.CPs += 150;
                    Game.World.SendMsgToAll("Server", "" + Char.Name + "  Just Killd Boss Timothy", 2011, 0);
                    Loc = StartLoc;
                    World.Action(this, Packets.GeneralData(EntityID, 0, 0, 0, 135).Get);
                    Dissappeared = true;
                    RandomTime = (uint)(Rnd.Next(4000, 5400));
                }
                if (Name.Contains("Victoria"))
                {
                    Char.CPs += 150;
                    Game.World.SendMsgToAll("Server", "" + Char.Name + "  Just Killd Boss Victoria", 2011, 0);
                    Loc = StartLoc;
                    World.Action(this, Packets.GeneralData(EntityID, 0, 0, 0, 135).Get);
                    Dissappeared = true;
                    RandomTime = (uint)(Rnd.Next(4000, 5400));
                }
                else if (Name.Contains("Victoria"))
                {
                    
                    Loc = StartLoc;
                    World.Action(this, Packets.GeneralData(EntityID, 0, 0, 0, 135).Get);
                    Dissappeared = true;
                    RandomTime = (uint)(Rnd.Next(4000, 5400));
                }
                if (Name.Contains("Theodore"))
                {
                    Char.CPs += 150;
                    Game.World.SendMsgToAll("Server", "" + Char.Name + "  Just Killd Boss Theodore", 2011, 0);
                    Loc = StartLoc;
                    World.Action(this, Packets.GeneralData(EntityID, 0, 0, 0, 135).Get);
                    Dissappeared = true;
                    RandomTime = (uint)(Rnd.Next(4000, 5400));
                    
                }
                if (Name.Contains("Daphne"))
                {
                    Char.CPs += 150;
                    Game.World.SendMsgToAll("Server", "" + Char.Name + "  Just Killd Boss Daphne", 2011, 0);
                    Loc = StartLoc;
                    World.Action(this, Packets.GeneralData(EntityID, 0, 0, 0, 135).Get);
                    Dissappeared = true;
                    RandomTime = (uint)(Rnd.Next(4000, 5400));
                }
                if (Name.Contains("Wayne"))
                {
                    Char.CPs += 150;
                    Game.World.SendMsgToAll("Server", "" + Char.Name + "  Just Killd Boss Wayne", 2011, 0);
                    Loc = StartLoc;
                    World.Action(this, Packets.GeneralData(EntityID, 0, 0, 0, 135).Get);
                    Dissappeared = true;
                    RandomTime = (uint)(Rnd.Next(4000, 5400));
                }
                if (Name.Contains("Banshee"))
                {
                    Char.CPs += 100;
                    Game.World.SendMsgToAll("Server", "" + Char.Name + " Got the reward is For Killing the Beast", 2011, 0);
                    Loc = StartLoc;
                    World.Action(this, Packets.GeneralData(EntityID, 0, 0, 0, 135).Get);
                    Dissappeared = true;
                    RandomTime = (uint)(Rnd.Next(3000, 5400));
                }
                if (Name.Contains("FearlessBeast"))
                {
                    Char.CPs += 100;
                    Game.World.SendMsgToAll("Server", " " + Char.Name + " Got the reward is For Killing the Beast", 2011, 0);
                    Loc = StartLoc;
                    World.Action(this, Packets.GeneralData(EntityID, 0, 0, 0, 135).Get);
                    Dissappeared = true;
                    RandomTime = (uint)(Rnd.Next(3000, 5400));
                }
                if (Name.Contains("PurpleDevil"))
                {
                    Char.CPs += 500;
                    Game.World.SendMsgToAll("Server", " PurpleDevil Is Dead " + Char.Name + "  is the hero of exampleCO " + Char.Name + " GOT THE 500 CPs For Killing The Beast", 2011, 0);
                    Loc = StartLoc;
                    World.Action(this, Packets.GeneralData(EntityID, 0, 0, 0, 135).Get);
                    Dissappeared = true;
                    RandomTime = (uint)(Rnd.Next(25000, 35000));
                    DI2.Info.ID = 1088000;
                    DI2.Info.MaxDur = DI2.Info.DBInfo.Durability;
                    DI2.Info.CurDur = DI2.Info.MaxDur;
the way☆★Zuper★☆
said it it must be like this

Code:
{
if Name == "Satan"
}
never works
and btw as long as YOU dont get it and you dont have any code to F##king make a monster spawn 2 times in raw and than stop spawning for like 2 or 3 hours with out going to the damn mobsinfo.txt plz DONT F***KING REPLAY