Mars Hotel Official Forum!
Benvenuto sul Mars Hotel Forum!
Connettiti o registrati,ed entra subito a divertirti!
Dopodichè leggi il regolamento e presentati nell'area apposita!


Unisciti al forum, è facile e veloce

Mars Hotel Official Forum!
Benvenuto sul Mars Hotel Forum!
Connettiti o registrati,ed entra subito a divertirti!
Dopodichè leggi il regolamento e presentati nell'area apposita!
Mars Hotel Official Forum!
Vuoi reagire a questo messaggio? Crea un account in pochi click o accedi per continuare.
Argomenti simili
    Accedi

    Ho dimenticato la password

    Ultimi argomenti attivi
    » Regolamento Sezione CONTATTI
    Fixare Wired al 90% (per mars in caso non lo ha fatto) EmptySab 7 Mag 2011 - 21:05 Da Stone

    » Regole sezione CONTATTI
    Fixare Wired al 90% (per mars in caso non lo ha fatto) EmptySab 7 Mag 2011 - 21:03 Da Stone

    » Regolamento Sezione CONTATTI
    Fixare Wired al 90% (per mars in caso non lo ha fatto) EmptySab 7 Mag 2011 - 21:01 Da Stone

    » Sondaggio °-°
    Fixare Wired al 90% (per mars in caso non lo ha fatto) EmptySab 7 Mag 2011 - 20:53 Da Stone

    » trucchi li conoscete?
    Fixare Wired al 90% (per mars in caso non lo ha fatto) EmptyGio 21 Apr 2011 - 19:04 Da MOD-Lyx

    » Mi autocandido
    Fixare Wired al 90% (per mars in caso non lo ha fatto) EmptyLun 11 Apr 2011 - 20:26 Da Light

    » Reclutamento Reporter & Journalist
    Fixare Wired al 90% (per mars in caso non lo ha fatto) EmptyLun 11 Apr 2011 - 17:56 Da Stone

    » Cambio Totale!
    Fixare Wired al 90% (per mars in caso non lo ha fatto) EmptyDom 10 Apr 2011 - 12:08 Da Stone

    » Lo Staff al completo!
    Fixare Wired al 90% (per mars in caso non lo ha fatto) EmptyDom 10 Apr 2011 - 11:16 Da Stone

    » Suggerimento per MOD & Admin
    Fixare Wired al 90% (per mars in caso non lo ha fatto) EmptyDom 10 Apr 2011 - 11:12 Da Stone

    Migliori postatori
    JohnMars (135)
    Fixare Wired al 90% (per mars in caso non lo ha fatto) Vote_lcapFixare Wired al 90% (per mars in caso non lo ha fatto) Voting_barFixare Wired al 90% (per mars in caso non lo ha fatto) Vote_rcap 
    Adam (121)
    Fixare Wired al 90% (per mars in caso non lo ha fatto) Vote_lcapFixare Wired al 90% (per mars in caso non lo ha fatto) Voting_barFixare Wired al 90% (per mars in caso non lo ha fatto) Vote_rcap 
    sirpub (117)
    Fixare Wired al 90% (per mars in caso non lo ha fatto) Vote_lcapFixare Wired al 90% (per mars in caso non lo ha fatto) Voting_barFixare Wired al 90% (per mars in caso non lo ha fatto) Vote_rcap 
    BlackSun (97)
    Fixare Wired al 90% (per mars in caso non lo ha fatto) Vote_lcapFixare Wired al 90% (per mars in caso non lo ha fatto) Voting_barFixare Wired al 90% (per mars in caso non lo ha fatto) Vote_rcap 
    Jorge (96)
    Fixare Wired al 90% (per mars in caso non lo ha fatto) Vote_lcapFixare Wired al 90% (per mars in caso non lo ha fatto) Voting_barFixare Wired al 90% (per mars in caso non lo ha fatto) Vote_rcap 
    sandro0009 (88)
    Fixare Wired al 90% (per mars in caso non lo ha fatto) Vote_lcapFixare Wired al 90% (per mars in caso non lo ha fatto) Voting_barFixare Wired al 90% (per mars in caso non lo ha fatto) Vote_rcap 
    MOD-Lyx (88)
    Fixare Wired al 90% (per mars in caso non lo ha fatto) Vote_lcapFixare Wired al 90% (per mars in caso non lo ha fatto) Voting_barFixare Wired al 90% (per mars in caso non lo ha fatto) Vote_rcap 
    Marty19 (83)
    Fixare Wired al 90% (per mars in caso non lo ha fatto) Vote_lcapFixare Wired al 90% (per mars in caso non lo ha fatto) Voting_barFixare Wired al 90% (per mars in caso non lo ha fatto) Vote_rcap 
    Memories (63)
    Fixare Wired al 90% (per mars in caso non lo ha fatto) Vote_lcapFixare Wired al 90% (per mars in caso non lo ha fatto) Voting_barFixare Wired al 90% (per mars in caso non lo ha fatto) Vote_rcap 
    Baby.Daisy (62)
    Fixare Wired al 90% (per mars in caso non lo ha fatto) Vote_lcapFixare Wired al 90% (per mars in caso non lo ha fatto) Voting_barFixare Wired al 90% (per mars in caso non lo ha fatto) Vote_rcap 


    Fixare Wired al 90% (per mars in caso non lo ha fatto)

    3 partecipanti

    Andare in basso

    Fixare Wired al 90% (per mars in caso non lo ha fatto) Empty Fixare Wired al 90% (per mars in caso non lo ha fatto)

    Messaggio Da sirpub Mar 29 Mar 2011 - 23:22

    Ecco I Fix :

    RequestHandlers [3.056] = RequestHandler nuovo (InitializeWired); RequestHandlers [3.050] = RequestHandler nuovo (RequestAddWired); RequestHandlers [3.051] = new RequestHandler (RequestAddTrigger); RequestHandlers [3.058] = RequestHandler nuovo (GetFurniStates); RequestHandlers [3.052] = new RequestHandlers [3.057] = new RequestHandler (RefreshWired); RequestHandler (AddTriggerStatus) RequestHandlers [3.053] = RequestHandler nuovo (DeleteWired); RequestHandlers [3.054] = new RequestHandler (DeleteWiredTrigger); RequestHandlers [3.055] = RequestHandler nuovo (DeleteWiredAction);

    Inserite in ROOM.CS :
    private void SerializeWired()
    {
    GetResponse().Init(650);

    DataTable Data = null;

    using (DatabaseClient dbClient = UberEnvironment.GetDatabase().GetClient())
    {
    Data = dbClient.ReadDataTable("SELECT * FROM wiredtrigger WHERE roomid = '" + Session.GetHabbo().CurrentRoomId + "'");
    }

    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 (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("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().Publ icName);
    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.GetBaseIt em().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().Publ icName);
    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())
    {
    SlotID = dbClient.ReadInt32("select count(*) from wiredtrigger") + 1;
    dbClient.ExecuteQuery("INSERT INTO wiredtrigger values ('" + SlotID +"','" + Session.GetHabbo().CurrentRoomId + "','','')");
    }

    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 + "'");
    }

    SerializeWired();
    }

    private void RefreshWired()
    {
    SerializeWired();
    }

    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();
    }

    private void DeleteWiredAction()
    {
    int slotID = Request.PopWiredInt32();

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

    All'Interno Di ''foreach (RoomItem Item in ItemsOnSquare)
    {'' Aggiungi Questo CODICE:

    DataTable dati = null; utilizzando (. DbClient DatabaseClient = UberEnvironment.GetDatabase () GetClient ()) {dati = dbClient.ReadDataTable ("SELECT * FROM WHERE wiredtrigger roomid = '" + + RoomId "'");} if (dati! = null) {foreach (DataRow Row in Data.Rows) {if (row ["triggertype"]. ToString () == "WalkOn") {if (int.Parse (row ["whattrigger"]. ToString ()) == Item.Id) {using (DatabaseClient dbClient = UberEnvironment.GetDatabase (). GetClient ()) {if (dbClient.findsResult ("SELECT * FROM wiredaction dove slotid = '" + riga ["slotid"]. ToString () + "'")) {string type = dbClient.ReadString ("typeaction selezionare da dove wiredaction slotid = '" + riga ["slotid"] + "'"); if (tipo == "status") {RoomItem ItemToChange = GetItem (uint.Parse (dbClient.ReadString ("select Itemid da wiredaction dove slotid = '" + riga ["slotid"] = + "'"))); ItemToChange.ExtraData dbClient.ReadString ("whataction selezionare da dove wiredaction slotid = '"+ riga [" slotid "] + "'"); ItemToChange.UpdateState ();} else if (tipo ==" calcio ") {RemoveUserFromRoom (User.GetClient (), true, false);}}} }}}}

    Potrebbe essere necessario aggiungere questo codice in Database.cs

    public bool findsResult(string sQuery)
    {
    bool Found = false;
    try
    {
    mCommand.CommandText = sQuery;
    MySqlDataReader dReader = mCommand.ExecuteReader();
    Found = dReader.HasRows;
    dReader.Close();

    }
    catch (Exception ex) { UberEnvironment.GetLogging().WriteLine(ex.Message + "\n(^^" + sQuery + "^^)"); }
    return Found;
    }

    Cercate 'Public void Chat('

    Aggiungete questo :

    if (!IsBot)
    {
    DataTable Data = null;

    using (DatabaseClient dbClient = UberEnvironment.GetDatabase().GetClient())
    {
    Data = dbClient.ReadDataTable("SELECT * FROM wiredtrigger WHERE roomid = '" + Session.GetHabbo().CurrentRoomId + "'");
    }

    if (Data != null)
    {
    foreach (DataRow Row in Data.Rows)
    {
    if (Row["triggertype"].ToString() == "say")
    {
    if (Message.Contains(Row["whattrigger"].ToString()))
    {
    using (DatabaseClient dbClient = UberEnvironment.GetDatabase().GetClient())
    {
    if (dbClient.findsResult("select * from wiredaction where slotid = '" + Row["slotid"].ToString() + "'"))
    {
    string type = dbClient.ReadString("select typeaction from wiredaction where slotid = '" + Row["slotid"] + "'");
    if (type == "status")
    {
    Room Room = UberEnvironment.GetGame().GetRoomManager().GetRoom (Session.GetHabbo().CurrentRoomId);
    RoomItem Item = Room.GetItem(uint.Parse(dbClient.ReadString("selec t itemid from wiredaction where slotid = '" + Row["slotid"] + "'")));
    Item.ExtraData = dbClient.ReadString("select whataction from wiredaction where slotid = '" + Row["slotid"] + "'");
    Item.UpdateState();
    }
    else if (type == "kick")

    Wired W56

    Non so se funzionano ancora ... provate :-O
    sirpub
    sirpub
    Amante
    Amante

    Messaggi : 117
    Data d'iscrizione : 28.03.11
    Età : 33
    Località : Roma
    Hobby : Informatico
    Umore : Moriremo tutti !!!

    Torna in alto Andare in basso

    Fixare Wired al 90% (per mars in caso non lo ha fatto) Empty Re: Fixare Wired al 90% (per mars in caso non lo ha fatto)

    Messaggio Da BlackSun Mer 30 Mar 2011 - 16:03

    Sembra un bel lavoro, ma io di questa roba non ci capisco un accidente. Fallo vedere a John.
    BlackSun
    BlackSun
    Marsino
    Marsino

    Messaggi : 97
    Data d'iscrizione : 14.12.10
    Età : 29
    Località : Italia
    Umore : Ownatore

    http://www.lbpteam.net

    Torna in alto Andare in basso

    Fixare Wired al 90% (per mars in caso non lo ha fatto) Empty Re: Fixare Wired al 90% (per mars in caso non lo ha fatto)

    Messaggio Da Light Mer 30 Mar 2011 - 16:13

    Grazie mille, se ne avremo bisogno, useremo questi codici.

    Chiudo.

    Light
    Amministratore
    Amministratore

    Messaggi : 43
    Data d'iscrizione : 27.03.11
    Hobby : Competition Manager Mars Hotel

    Torna in alto Andare in basso

    Fixare Wired al 90% (per mars in caso non lo ha fatto) Empty Re: Fixare Wired al 90% (per mars in caso non lo ha fatto)

    Messaggio Da Contenuto sponsorizzato


    Contenuto sponsorizzato


    Torna in alto Andare in basso

    Torna in alto

    - Argomenti simili

     
    Permessi in questa sezione del forum:
    Non puoi rispondere agli argomenti in questo forum.