Argomenti simili
Accedi
Ultimi argomenti attivi
Migliori postatori
JohnMars (135) | ||||
Adam (121) | ||||
sirpub (117) | ||||
BlackSun (97) | ||||
Jorge (96) | ||||
sandro0009 (88) | ||||
MOD-Lyx (88) | ||||
Marty19 (83) | ||||
Memories (63) | ||||
Baby.Daisy (62) |
Fixare Wired al 90% (per mars in caso non lo ha fatto)
3 partecipanti
Pagina 1 di 1
Fixare Wired al 90% (per mars in caso non lo ha fatto)
Ecco I Fix :
Inserite in ROOM.CS :
All'Interno Di ''foreach (RoomItem Item in ItemsOnSquare)
{'' Aggiungi Questo CODICE:
Potrebbe essere necessario aggiungere questo codice in Database.cs
Cercate 'Public void Chat('
Aggiungete questo :
Wired W56
Non so se funzionano ancora ... provate :-O
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- Amante
- Messaggi : 117
Data d'iscrizione : 28.03.11
Età : 33
Località : Roma
Hobby : Informatico
Umore : Moriremo tutti !!!
Re: Fixare Wired al 90% (per mars in caso non lo ha fatto)
Sembra un bel lavoro, ma io di questa roba non ci capisco un accidente. Fallo vedere a John.
Re: Fixare Wired al 90% (per mars in caso non lo ha fatto)
Grazie mille, se ne avremo bisogno, useremo questi codici.
Chiudo.
Chiudo.
Light- Amministratore
- Messaggi : 43
Data d'iscrizione : 27.03.11
Hobby : Competition Manager Mars Hotel
Pagina 1 di 1
Permessi in questa sezione del forum:
Non puoi rispondere agli argomenti in questo forum.
Sab 7 Mag 2011 - 21:05 Da Stone
» Regole sezione CONTATTI
Sab 7 Mag 2011 - 21:03 Da Stone
» Regolamento Sezione CONTATTI
Sab 7 Mag 2011 - 21:01 Da Stone
» Sondaggio °-°
Sab 7 Mag 2011 - 20:53 Da Stone
» trucchi li conoscete?
Gio 21 Apr 2011 - 19:04 Da MOD-Lyx
» Mi autocandido
Lun 11 Apr 2011 - 20:26 Da Light
» Reclutamento Reporter & Journalist
Lun 11 Apr 2011 - 17:56 Da Stone
» Cambio Totale!
Dom 10 Apr 2011 - 12:08 Da Stone
» Lo Staff al completo!
Dom 10 Apr 2011 - 11:16 Da Stone
» Suggerimento per MOD & Admin
Dom 10 Apr 2011 - 11:12 Da Stone