Some Wired Coding For Uber

Results 1 to 9 of 9
  1. #1
    Member Sav. is offline
    MemberRank
    Feb 2011 Join Date
    England.Location
    96Posts

    Some Wired Coding For Uber

    Here is some of my wired coding with less mysql action so it won't make you server lagg much.

    PHP Code:
    RequestHandlers[3056] = new RequestHandler(InitializeWired);
    RequestHandlers[3050] = new RequestHandler(RequestAddWired);
    RequestHandlers[3051] = new RequestHandler(RequestAddTrigger);
    RequestHandlers[3058] = new RequestHandler(GetFurniStates);
    RequestHandlers[3052] = new RequestHandler(AddTriggerStatus);
    RequestHandlers[3057] = new RequestHandler(RefreshWired);
    RequestHandlers[3053] = new RequestHandler(DeleteWired);
    RequestHandlers[3054] = new RequestHandler(DeleteWiredTrigger);
    RequestHandlers[3055] = new RequestHandler(DeleteWiredAction); 
    PHP Code:
      private void SerializeWired()
            {
                
    GetResponse().Init(650);

                
                }          

                if (
    Data.Rows.Count == 0)
                {
                    
    GetResponse().AppendStringWithBreak("H");
                }
                else
                {
                    
    GetResponse().AppendInt32(Data.Rows.Count);
                    foreach (
    DataRow Row in Data.Rows)
                    {
                        
    GetResponse().AppendInt32(int.Parse(Row["slotid"].ToString()));

                        if (
    Row["triggertype"].ToString() == "say")
                        {
                            
    GetResponse().AppendStringWithBreak("HIH");
                            
    GetResponse().AppendStringWithBreak(Row["whattrigger"].ToString());

                            
    using (DatabaseClient dbClient UberEnvironment.GetDatabase().GetClient())
                            {
                               
                                    if (
    Action["typeaction"].ToString() == "status")
                                    {
                                        
    GetResponse().AppendString("HHHI");
                                        
                                        
    GetResponse().AppendInt32(int.Parse(Action["itemid"].ToString()));
                                        
    Room Room UberEnvironment.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);
                                        
    RoomItem Item Room.GetItem(uint.Parse(Action["itemid"].ToString()));
                                        
                                        
    GetResponse().AppendString(Item.GetBaseItem().PublicName);
                                        
    GetResponse().AppendStringWithBreak("");
                                        
                                        
    GetResponse().AppendStringWithBreak(Action["whataction"].ToString());
                                        
    GetResponse().AppendString("HHK");
                                    }
                                    else if (
    Action["typeaction"].ToString() == "kick")
                                    {
                                        
    GetResponse().AppendStringWithBreak("HHHIH");
                                        
    GetResponse().AppendStringWithBreak("");                                                               
                                        
    GetResponse().AppendString("HHJ");
                                    }
                                }
                                else 
                                {
                                    
    GetResponse().AppendString("HHHH");
                                }                           
                            }
                        }
                        else if (
    Row["triggertype"].ToString() == "walkon")
                        {
                            
    GetResponse().AppendString("HI");
                            
    GetResponse().AppendInt32(int.Parse(Row["whattrigger"].ToString()));

                            
    Room Room UberEnvironment.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);
                            
    RoomItem Item Room.GetItem(uint.Parse(Row["whattrigger"].ToString()));

                            
    GetResponse().AppendStringWithBreak(Item.GetBaseItem().PublicName);
                            
    GetResponse().AppendStringWithBreak("");

                            
    using (DatabaseClient dbClient UberEnvironment.GetDatabase().GetClient())
                            {
                                if (
    dbClient.findsResult("select * from wiredaction where slotid = '" Row["slotid"].ToString() + "'"))
                                {             
                                    
    DataRow Action null;
                                    
    Action dbClient.ReadDataRow("SELECT * from wiredaction where slotid = '" Row["slotid"].ToString() + "'");
                                    if (
    Action["typeaction"].ToString() == "status")
                                    {                 
                                        
    GetResponse().AppendString("HHII");
                                        
    GetResponse().AppendInt32(int.Parse(Action["itemid"].ToString()));
                                        
    Item Room.GetItem(uint.Parse(Action["itemid"].ToString()));
                                        
    GetResponse().AppendString(Item.GetBaseItem().PublicName);
                                        
    GetResponse().AppendStringWithBreak("");
                                        
                                        
    GetResponse().AppendStringWithBreak(Action["whataction"].ToString());
                                        
    GetResponse().AppendString("HHK");
                                    }
                                    else if (
    Action["typeaction"].ToString() == "kick")
                                    {
                                        
    GetResponse().AppendStringWithBreak("HHIIH");
                                        
    GetResponse().AppendStringWithBreak("");
                                        
    GetResponse().AppendString("HHJ");
                                    }
                                }
                                else
                                {
                                    
    GetResponse().AppendString("HHIH");
                                }
                            }
                        }
                        else
                            
    GetResponse().AppendString("HHH");
                    }
                    
    GetResponse().AppendStringWithBreak("");
                }
                
    SendResponse();
            }
            private 
    void InitializeWired()
            {           
                
    SerializeWired();
            }

            private 
    void RequestAddWired()
            {
                
    GetResponse().Init(650);

                
    int SlotID 0;           

                
    using (DatabaseClient dbClient UberEnvironment.GetDatabase().GetClient();
                {
                    
    using (DatabaseClient dbClient UberEnviroment.GetDatabase().GetClient();

    private 
    void RequestAddTrigger()
            {
                
    uint SlotID Request.PopWiredUInt();
                
    int Chose Request.PopWiredInt32();
                
    string ExtraData null;
                
    string Type "";

                }

                
    SerializeWired();
            }

            private 
    void RequestAddTrigger()
            {
                
    uint SlotID Request.PopWiredUInt();
                
    int Chose Request.PopWiredInt32();
                
    string ExtraData null;
                
    string Type "";

                if (
    Chose==0)
                {
                    
    Request.AdvancePointer(3);
                    
    Type "say"
                    
    ExtraData Request.PopFixedString();
                }   
                if (
    Chose==1)
                {
                    
    ExtraData Request.PopWiredInt32().ToString();
                    
    Request.AdvancePointer(3);
                    
    Type "walkon";                
                }   
                
                
    using (DatabaseClient dbClient UberEnvironment.GetDatabase().GetClient())
                {
                    
    dbClient.ExecuteQuery("update wiredtrigger set triggertype = '" Type "',whattrigger = '" ExtraData "' where slotid = '" SlotID "'");
                }

                
    SerializeWired();
            }

            private 
    void GetFurniStates()
            {
                
    GetResponse().Init(651);          
                
    GetResponse().AppendStringWithBreak("JHI");           
                
    SendResponse();         
            }

            private 
    void AddTriggerStatus()
            {
                
    int slotID Request.PopWiredInt32();
                
    int Type Request.PopWiredInt32();
                
    int ItemID 0;
                
    string ItemName "";          
                
    int status 0;

                if (
    Type == 3)
                {
                    
    ItemID Request.PopWiredInt32();
                    
    ItemName Request.PopFixedString();
                    
    status Request.PopFixedInt32();

                    
    using (DatabaseClient dbClient UberEnvironment.GetDatabase().GetClient())
                    {
                        
    dbClient.ExecuteQuery("INSERT INTO wiredaction values ('" slotID "','status','" status "','" ItemID "')");
                    }
                }        
                if (
    Type ==2)
                {
                    
    ItemID Request.PopWiredInt32();
                    
    ItemName Request.PopFixedString();
                    
    status Request.PopFixedInt32();

                    
    using (DatabaseClient dbClient UberEnvironment.GetDatabase().GetClient())
                    {
                        
    dbClient.ExecuteQuery("INSERT INTO wiredaction values ('" slotID "','kick','','')");
                    }
                }   

                
    SerializeWired();
            }

            private 
    void DeleteWired()
            {
                
    int slotID Request.PopWiredInt32();            

                
    using (DatabaseClient dbClient UberEnvironment.GetDatabase().GetClient())
                {
                    
    dbClient.ExecuteQuery("delete from wiredtrigger where slotid= '" slotID+"'");
                    
    dbClient.ExecuteQuery("delete from wiredaction where slotid= '" slotID "'");
                }


            private 
    void DeleteWiredTrigger()
            {
                
    int slotID Request.PopWiredInt32();

                
    using (DatabaseClient dbClient UberEnvironment.GetDatabase().GetClient())
                {
                    
    dbClient.ExecuteQuery("delete from wiredaction where slotid= '" slotID "'");
                    
    dbClient.ExecuteQuery("delete from wiredtrigger where slotid= '" slotID "'");            
                }
                
    SerializeWired();
            }

                     
                    
    dbClient.ExecuteQuery("delete from wiredaction where slotid= '" slotID "'");
                }
                
    SerializeWired();
            } 
    Last edited by Sav.; 21-03-11 at 12:32 AM.


  2. #2
    Proficient Member klaudio007 is offline
    MemberRank
    Dec 2007 Join Date
    ChileLocation
    190Posts

    Re: Some Wired Coding For Uber

    hummm is only for old wired?

  3. #3
    Account Upgraded | Title Enabled! FlyCoder is offline
    MemberRank
    Jan 2011 Join Date
    United KingdomLocation
    469Posts

    Re: Some Wired Coding For Uber

    I think this is the new Wired and this is a shit load better than the ones I released.

  4. #4
    C# | C++ Emerica is offline
    MemberRank
    Oct 2010 Join Date
    GermanyLocation
    437Posts

    Re: Some Wired Coding For Uber

    Looks nice

    But Sql Codes are missing ?
    Last edited by Emerica; 23-03-11 at 04:43 PM.

  5. #5
    Banned PEjump2 is offline
    BannedRank
    Jan 2010 Join Date
    The NetherlandsLocation
    2,838Posts

    Re: Some Wired Coding For Uber

    /facepalm
    Really hard to copy & paste from iJakey's last uberEmulator edit, huh?

  6. #6
    Minor Devolper ntl200 is offline
    MemberRank
    Dec 2007 Join Date
    EnglandLocation
    538Posts

    Re: Some Wired Coding For Uber

    bing ,

  7. #7
    Banned PEjump2 is offline
    BannedRank
    Jan 2010 Join Date
    The NetherlandsLocation
    2,838Posts

    Re: Some Wired Coding For Uber

    Quote Originally Posted by ntl200 View Post
    bing ,
    Google beats bing's ass..

  8. #8
    Live Ocottish Sverlord Joopie is online now
    LegendRank
    Jun 2010 Join Date
    The NetherlandsLocation
    2,773Posts

    Re: Some Wired Coding For Uber

    Quote Originally Posted by PEjump2 View Post
    Bing uses google, Without it, Bing is dead ;3

  9. #9
    Minor Devolper ntl200 is offline
    MemberRank
    Dec 2007 Join Date
    EnglandLocation
    538Posts

    Re: Some Wired Coding For Uber

    no it goes bing, bong! fucking ediotts must know this

    yours truly hitler junior xx



Advertisement