Register for your free account! | Forgot your password?

You last visited: Today at 00:14

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



SRX Unique respawn

Discussion on SRX Unique respawn within the SRO Coding Corner forum part of the Silkroad Online category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Jan 2008
Posts: 22
Received Thanks: 3
SRX Unique respawn

Uniques not respawn

I need example ; a unique killed = again spawn 15 minutes later.

who know codes

I can edit cource.

Thank you.
kolehe is offline  
Old 08/23/2011, 20:26   #2
 
kevin_owner's Avatar
 
elite*gold: 0
Join Date: Jan 2010
Posts: 1,484
Received Thanks: 809
It's probably somewhere in the globalUnique.cs it has everything in it about the unique's probably some parameter which you need too change.

Edit: sorry misread I thought they respawned too fast well too respawn them is quite easy in the globalunique.cs there are a few functions like LORD ISY ect you need too call those with the correct object probably from the chardata file and it'll spawn.
kevin_owner is offline  
Old 08/23/2011, 20:35   #3
 
elite*gold: 0
Join Date: Jan 2008
Posts: 22
Received Thanks: 3
example

PHP Code:
///////////////////////////////////////////////////////////////////////////
// Srevolution 2010 / 2011
// Programmed by: Team Srevolution
// Website: www.xcoding.net
///////////////////////////////////////////////////////////////////////////
using System;
using Framework;
using System.Linq;
using System.Text;
using System.Threading;
using System.Collections.Generic;

namespace 
Game
{
    public 
partial class GlobalUnique
    
{

        public static List<
objTigerGirl = new List<obj>();
        public static List<
objUrichi = new List<obj>();
        public static List<
objIsytaru = new List<obj>();
        public static List<
objLordYarkan = new List<obj>();
        public static List<
objDemonShaitan = new List<obj>();
        public static List<
objCerberus = new List<obj>();
        public static List<
objCapIvy = new List<obj>();
        public static List<
objMedusa = new List<obj>();
        public static List<
objRoc = new List<obj>();
        public static List<
objNeith = new List<obj>();
        public static List<
objIsis = new List<obj>();
        public static List<
objSphinx = new List<obj>();
        static 
bool TigerUriIsyLordDemonCerbIvyMedusa_sRoc_sNeith_sIsis_sSphinx_s;

        static 
Random rnd = new Random();

        public static 
Timer tiger1;
        public static 
Timer uri1;
        public static 
Timer isy1;
        public static 
Timer lord1;
        public static 
Timer demon1;
        public static 
Timer cerb1;
        public static 
Timer ivy1;
       
                             
        public static 
void StartTGUnique(int timeint per)
        {
            
tiger1 = new Timer(new TimerCallback(TG), 0timeper);
        }
        public static 
void StartUriUnique(int timeint per)
        {
            
uri1 = new Timer(new TimerCallback(URI), 0timeper);
        }
        public static 
void StartIsyUnique(int timeint per)
        {
            
isy1 = new Timer(new TimerCallback(ISY), 0timeper);
        }
        public static 
void StartLordUnique(int timeint per)
        {
            
lord1 = new Timer(new TimerCallback(LORD), 0timeper);
        }
        public static 
void StartDemonUnique(int timeint per)
        {
            
demon1 = new Timer(new TimerCallback(DEMON), 0timeper);
        }
        public static 
void StartCerbUnique(int timeint per)
        {
            
cerb1 = new Timer(new TimerCallback(CERB), 0timeper);
        }
        public static 
void StartIvyUnique(int timeint per)
        {
            
ivy1 = new Timer(new TimerCallback(IVY), 0timeper);
        }

        public static 
void SPHINX_CB(object e)
        {
            try
            {
                if (!
Sphinx_s)
                {
                    
obj o Sphinx[rnd.Next(0Sphinx.Count)];
                    
Systems.Objects.Add(o);
                    
o.SpawnMe();
                    
Systems.SendAll(Packet.Unique_Data(5, (int)o.IDnull));
                    
Sphinx_s true;
                    
Console.WriteLine("Sphinx spawn warp location : {0}{1}, {2}, {3}"o.xSeco.ySeco.xo.y);
                }
            }
            catch (
Exception ex)
            {
                
Console.WriteLine("Sphinx spawn error {0}"ex);
            }
        }
        public static 
void ISIS_CB(object e)
        {
            try
            {
                if (!
Isis_s)
                {
                    
obj o Isis[rnd.Next(0Isis.Count)];
                    
Systems.Objects.Add(o);
                    
o.SpawnMe();
                    
Systems.SendAll(Packet.Unique_Data(5, (int)o.IDnull));
                    
Isis_s true;
                    
Console.WriteLine("Isis spawn warp location : {0}{1}, {2}, {3}"o.xSeco.ySeco.xo.y);
                }
            }
            catch (
Exception ex)
            {
                
Console.WriteLine("Isis spawn error {0}"ex);
            }
        }
        
       
       
        public static 
void TG(object e)
        {
            try
            {
                if (!
Tiger)
                {
                    
obj o TigerGirl[rnd.Next(0TigerGirl.Count 1)];
                    
Systems.Objects.Add(o);
                    
o.SpawnMe();
                    
Systems.SendAll(Packet.Unique_Data(5, (int)o.IDnull));
                    
Tiger true;
                    
Console.WriteLine("Tiger girl spawn warp location : {0}{1}, {2}, {3}"o.xSeco.ySeco.xo.y);
                }
            }
            catch (
Exception ex)
            {
                
deBug.Write(ex);
            }
        }
        public static 
void URI(object e)
        {
            try
            {
                if (!
Uri)
                {
                    
obj o Urichi[rnd.Next(0Urichi.Count 1)];
                    
Systems.Objects.Add(o);
                    
o.SpawnMe();
                    
Systems.SendAll(Packet.Unique_Data(5, (int)o.IDnull));
                    
Uri true;
                    
Console.WriteLine("Urichi spawn warp location : {0}{1}, {2}, {3}"o.xSeco.ySeco.xo.y);
                }
            }
            catch (
Exception ex)
            {
                
deBug.Write(ex);
            }
        }
        public static 
void ISY(object e)
        {
            try
            {
                if (!
Isy)
                {
                    
obj o Isytaru[rnd.Next(0Isytaru.Count 1)];
                    
Systems.Objects.Add(o);
                    
o.SpawnMe();
                    
Systems.SendAll(Packet.Unique_Data(5, (int)o.IDnull));
                    
Isy true;
                    
Console.WriteLine("Isytaru spawn warp location : {0}{1}, {2}, {3}"o.xSeco.ySeco.xo.y);
                }
            }
            catch (
Exception ex)
            {
                
deBug.Write(ex);
            }
        }
        public static 
void LORD(object e)
        {
            try
            {
                if (!
Lord)
                {
                    
obj o LordYarkan[rnd.Next(0LordYarkan.Count 1)];
                    
Systems.Objects.Add(o);
                    
o.SpawnMe();
                    
Systems.SendAll(Packet.Unique_Data(5, (int)o.IDnull));
                    
Lord true;
                    
Console.WriteLine("Lord yarkan spawn warp location : {0}{1}, {2}, {3}"o.xSeco.ySeco.xo.y);
                }
            }
            catch (
Exception ex)
            {
                
deBug.Write(ex);
            }
        }
        public static 
void DEMON(object e)
        {
            try
            {
                if (!
Demon)
                {
                    
obj o DemonShaitan[rnd.Next(0DemonShaitan.Count 1)];
                    
Systems.Objects.Add(o);
                    
o.SpawnMe();
                    
Systems.SendAll(Packet.Unique_Data(5, (int)o.IDnull));
                    
Demon true;
                    
Console.WriteLine("Demon Shaitan spawn warp location : {0}{1}, {2}, {3}"o.xSeco.ySeco.xo.y);
                }
            }
            catch (
Exception ex)
            {
                
deBug.Write(ex);
            }
        }
        public static 
void CERB(object e)
        {
            try
            {
                if (!
Cerb)
                {
                    
obj o Cerberus[rnd.Next(0Cerberus.Count 1)];
                    
Systems.Objects.Add(o);
                    
o.SpawnMe();
                    
Systems.SendAll(Packet.Unique_Data(5, (int)o.IDnull));
                    
Cerb true;
                    
Console.WriteLine("Cerberus spawn warp location : {0}{1}, {2}, {3}"o.xSeco.ySeco.xo.y);
                }
            }
            catch (
Exception ex)
            {
                
deBug.Write(ex);
            }
        }
        public static 
void IVY(object e)
        {
            try
            {
                if (!
Ivy)
                {
                    
obj o CapIvy[rnd.Next(0CapIvy.Count)];
                    
Systems.Objects.Add(o);
                    
o.SpawnMe();
                    
Systems.SendAll(Packet.Unique_Data(5, (int)o.IDnull));
                    
Ivy true;
                    
Console.WriteLine("Captain ivy spawn warp location : {0}{1}, {2}, {3}"o.xSeco.ySeco.xo.y);
                }
            }
            catch (
Exception ex)
            {
                
deBug.Write(ex);
            }
        }

        public static 
void AddObject(obj o)
        {
            switch (
o.ID)
            {
                case 
1954:
                    
TigerGirl.Add(o);
                    break;
                case 
1982:
                    
Urichi.Add(o);
                    break;
                case 
2002:
                    
Isytaru.Add(o);
                    break;
                case 
3810:
                    
LordYarkan.Add(o);
                    break;
                case 
3875:
                    
DemonShaitan.Add(o);
                    break;
                case 
3877:
                    
Roc.Add(o);
                    break;
                case 
5871:
                    
Cerberus.Add(o);
                    break;
                case 
14778:
                    
CapIvy.Add(o);
                    break;
                case 
14839:
                    
Medusa.Add(o);
                    break;
                case 
32768:
                    
Neith.Add(o);
                    break;
                case 
32752:
                    
Sphinx.Add(o);
                    break;
                case 
32770:
                    
Isis.Add(o);
                    break;
            }
        }

        public static 
void ClearObject(obj o)
        {
            
character n = new character();
            try
            {
                switch (
o.ID)
                {
                    case 
1954:
                        
Systems.SendAll(Packet.Unique_Data(6, (int)1954n.Information.Name));
                        
Tiger false;
                        
Game.GlobalUnique.StartTGUnique(rnd.Next(1020) * 60000600);   //Random spawn tiger girl
                        
break;
                    case 
1982:
                        
Systems.SendAll(Packet.Unique_Data(6, (int)1982n.Information.Name));
                        
Uri false;
                        
Game.GlobalUnique.StartUriUnique(rnd.Next(1020) * 60000600);   //Random spawn urichi
                        
break;
                    case 
2002:
                        
Systems.SendAll(Packet.Unique_Data(6, (int)2002n.Information.Name));
                        
Isy false;
                        
Game.GlobalUnique.StartIsyUnique(rnd.Next(1020) * 60000600);   //Random spawn isy
                        
break;
                    case 
3810:
                        
Systems.SendAll(Packet.Unique_Data(6, (int)3810n.Information.Name));
                        
Lord false;
                        
Game.GlobalUnique.StartLordUnique(rnd.Next(1020) * 60000600);   //Random spawn lord yarkan
                        
break;
                    case 
3875:
                        
Systems.SendAll(Packet.Unique_Data(6, (int)3875n.Information.Name));
                        
Demon false;
                        
Game.GlobalUnique.StartDemonUnique(rnd.Next(1020) * 60000600);   //Random spawn demon shaitan
                        
break;
                    case 
5871:
                        
Systems.SendAll(Packet.Unique_Data(6, (int)5871n.Information.Name));
                        
Cerb false;
                        
Game.GlobalUnique.StartCerbUnique(rnd.Next(1020) * 60000600);   //Random spawn cerberus
                        
break;
                    case 
14778:
                        
Systems.SendAll(Packet.Unique_Data(6, (int)14538n.Information.Name));
                        
Ivy false;
                        
Game.GlobalUnique.StartIvyUnique(rnd.Next(1020) * 60000600);   //Random spawn captain ivy
                        
break;
                    
                }
            }
            catch (
Exception ex)
            {
                
deBug.Write(ex);
            }
        }
    }

maybe from here
PHP Code:
 if (aSocket == null)
                        {
                            
Console.ForegroundColor ConsoleColor.Cyan;
                            
Console.WriteLine("                     Ingame notice: Type 1 space then message.");
                            
Console.WriteLine("                     //clear");
                            
Console.WriteLine("                     //repairitems");
                            
Console.WriteLine("                     //respawn_unique");
                            
Console.WriteLine("                     //shutdown");
                            
Console.WriteLine("                     //manager");
                            
Console.ForegroundColor ConsoleColor.Yellow;
                        }
                        else
                        {
                            
sendSocket(aSocket"Ingame notice: Type 1 space then message." Environment.NewLine);
                            
sendSocket(aSocket"  //clear = cleanup unused memory" Environment.NewLine);
                            
sendSocket(aSocket"  //repairitems" Environment.NewLine);
                            
sendSocket(aSocket"  //respawn_unique" Environment.NewLine);
                            
sendSocket(aSocket"  //shutdown" Environment.NewLine);
                        } 
kolehe is offline  
Old 09/02/2011, 16:26   #4
 
evaldaskowka's Avatar
 
elite*gold: 0
Join Date: May 2010
Posts: 169
Received Thanks: 22
Leave uniques alone!
evaldaskowka is offline  
Old 09/03/2011, 14:36   #5
 
elite*gold: 0
Join Date: Jan 2007
Posts: 221
Received Thanks: 21
Quote:
Originally Posted by evaldaskowka View Post
Leave uniques alone!
troll.



Im wonderin how to change their time and maybe perhaps cancel some uniques.
TaNeL is offline  
Old 09/03/2011, 14:54   #6
 
kevin_owner's Avatar
 
elite*gold: 0
Join Date: Jan 2010
Posts: 1,484
Received Thanks: 809
Code:
 switch (o.ID)
                {
                    case 1954:
                        Systems.SendAll(Packet.Unique_Data(6, (int)1954, n.Information.Name));
                        Tiger = false;
                        Game.GlobalUnique.StartTGUnique(rnd.Next(10, 20) * 60000, 600);   //Random spawn tiger girl
                        break;
                    case 1982:
                        Systems.SendAll(Packet.Unique_Data(6, (int)1982, n.Information.Name));
                        Uri = false;
                        Game.GlobalUnique.StartUriUnique(rnd.Next(10, 20) * 60000, 600);   //Random spawn urichi
                        break;
                    case 2002:
                        Systems.SendAll(Packet.Unique_Data(6, (int)2002, n.Information.Name));
                        Isy = false;
                        Game.GlobalUnique.StartIsyUnique(rnd.Next(10, 20) * 60000, 600);   //Random spawn isy
                        break;
                    case 3810:
                        Systems.SendAll(Packet.Unique_Data(6, (int)3810, n.Information.Name));
                        Lord = false;
                        Game.GlobalUnique.StartLordUnique(rnd.Next(10, 20) * 60000, 600);   //Random spawn lord yarkan
                        break;
                    case 3875:
                        Systems.SendAll(Packet.Unique_Data(6, (int)3875, n.Information.Name));
                        Demon = false;
                        Game.GlobalUnique.StartDemonUnique(rnd.Next(10, 20) * 60000, 600);   //Random spawn demon shaitan
                        break;
                    case 5871:
                        Systems.SendAll(Packet.Unique_Data(6, (int)5871, n.Information.Name));
                        Cerb = false;
                        Game.GlobalUnique.StartCerbUnique(rnd.Next(10, 20) * 60000, 600);   //Random spawn cerberus
                        break;
                    case 14778:
                        Systems.SendAll(Packet.Unique_Data(6, (int)14538, n.Information.Name));
                        Ivy = false;
                        Game.GlobalUnique.StartIvyUnique(rnd.Next(10, 20) * 60000, 600);   //Random spawn captain ivy
                        break;
                    
                }
This part setup the timers if you chagne the timers here they'll respawn a lot faster and if you remove it the unique won't spawn.
kevin_owner is offline  
Reply




All times are GMT +2. The time now is 00:14.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.