Tava dando uma passeada no C*H* , e encontrei esse topico que deve ser muito bom esse fix. Então vamos lá
Pra colocar é simples, vá em \Messages\Requests\Users.cs e procure por:
[/code]public void RegisterUsers()
{
//L`val11{{2}}JPASjJFIND_STUFF{{2}}bling_chair_c{{2}}QA1296543600000{{2}}EXTRA01{{2}}{{2}}PkHFIND_STUFF{{2}}val_table1{{2}}QA1296630000000{{2}}EXTRA02{{2}}{{2}}P]HFIND_STUFF{{2}}bling_bed{{2}}QA1296802800000{{2}}DAY02{{2}}{{2}}S\HFIND_STUFF{{2}}bath{{2}}QA1296716400000{{2}}DAY01{{2}}{{2}}
DataTable Data = null;
DataRow QuestCount = null;
using (DatabaseClient dbClient = UberEnvironment.GetDatabase().GetClient())
{
Data = dbClient.ReadDataTable("SELECT * FROM quests");
QuestCount = dbClient.ReadDataRow("SELECT COUNT(*) AS total FROM quests");
}
if (Data == null)
{
return;
}
string Count = QuestCount["total"].ToString();
int TotalQuestCount = int.Parse(Count);
ServerMessage OpenQuest = new ServerMessage(800);
OpenQuest.AppendStringWithBreak("val11"); // val11 / xmas10
OpenQuest.AppendInt32(2);
OpenQuest.AppendInt32(TotalQuestCount);
foreach (DataRow Row in Data.Rows)
{
int QuestProcess = 0;
DataTable Data2 = null;
using (DatabaseClient dbClient = UberEnvironment.GetDatabase().GetClient())
{
Data2 = dbClient.ReadDataTable("SELECT process FROM user_quests WHERE quest = '" + (int)Row["id"] + "' AND user = '" + Session.GetHabbo().Id + "'");
}
if (Data != null)
{
foreach (DataRow Row2 in Data2.Rows)
{
QuestProcess = (int)Row2["process"];
}
}
OpenQuest.AppendInt32((int)Row["id"]);
OpenQuest.AppendInt32(QuestProcess);
OpenQuest.AppendStringWithBreak("FIND_STUFF");
OpenQuest.AppendStringWithBreak((string)Row["item"]);
OpenQuest.AppendInt32((int)Row["hearts"]);
OpenQuest.AppendStringWithBreak((string)Row["time"]);
OpenQuest.AppendStringWithBreak((string)Row["data"]);
OpenQuest.AppendStringWithBreak("");
}
Session.SendMessage(OpenQuest);
}
private void AcceptQuest()
{
//Laval11{{2}}S\KFIND_STUFF{{2}}bath{{2}}QA1296716400000{{2}}DAY01{{2}}{{2}}{{1}}
DataTable Data = null;
using (DatabaseClient dbClient = UberEnvironment.GetDatabase().GetClient())
{
Data = dbClient.ReadDataTable("SELECT * FROM quests WHERE id = '" + Request.PopWiredInt32() + "' LIMIT 1");
}
if (Data == null)
{
return;
}
foreach (DataRow Row in Data.Rows)
{
ServerMessage AcceptQuest = new ServerMessage(801);
AcceptQuest.AppendStringWithBreak("val11");
AcceptQuest.AppendInt32((int)Row["id"]);
AcceptQuest.AppendInt32(3);
AcceptQuest.AppendStringWithBreak("FIND_STUFF");
AcceptQuest.AppendStringWithBreak((string)Row["item"]);
AcceptQuest.AppendInt32((int)Row["hearts"]);
AcceptQuest.AppendStringWithBreak((string)Row["time"]);
AcceptQuest.AppendStringWithBreak((string)Row["data"]);
AcceptQuest.AppendStringWithBreak("");
Session.SendMessage(AcceptQuest);
using (DatabaseClient dbClient = UberEnvironment.GetDatabase().GetClient())
{
dbClient.ExecuteQuery("INSERT INTO user_quests (`id`, `user`, `quest`, `process`) VALUES (NULL, '" + Session.GetHabbo().Id + "', '" + (int)Row["id"] + "', '3')");
}
}
}
RequestHandlers[3101] = new RequestHandler(AcceptQuest
DataTable Data = null;
using (DatabaseClient dbClient = UberEnvironment.GetDatabase().GetClient())
{
Data = dbClient.ReadDataTable("SELECT * FROM user_quests WHERE user = '" + Session.GetHabbo().Id + "'");
}
if (Data == null)
{
return;
}
foreach (DataRow Row in Data.Rows)
{
if ((int)Row["process"] == 3)
{
DataTable Data2 = null;
using (DatabaseClient dbClient = UberEnvironment.GetDatabase().GetClient())
{
Data2 = dbClient.ReadDataTable("SELECT * FROM quests WHERE id = '" + (int)Row["quest"] + "'");
}
if (Data2 == null)
{
return;
}
foreach (DataRow Row2 in Data2.Rows)
{
if ((string)Row2["item"] == Item.GetBaseItem().Name)
{
ServerMessage DoneQuest = new ServerMessage(802);
DoneQuest.AppendStringWithBreak("val11");
DoneQuest.AppendInt32((int)Row2["id"]);
DoneQuest.AppendInt32(1);
DoneQuest.AppendStringWithBreak("FIND_STUFF");
DoneQuest.AppendStringWithBreak((string)Row2["item"]);
DoneQuest.AppendInt32((int)Row2["hearts"]);
DoneQuest.AppendStringWithBreak((string)Row2["time"]);
DoneQuest.AppendStringWithBreak((string)Row2["data"]);
DoneQuest.AppendStringWithBreak("");
Session.SendMessage(DoneQuest);
using (DatabaseClient dbClient = UberEnvironment.GetDatabase().GetClient())
{
dbClient.ExecuteQuery("UPDATE user_quests SET process = '1' WHERE quest = '" + (int)Row2["id"] + "' AND user = '" + Session.GetHabbo().Id + "'");
dbClient.ExecuteQuery("UPDATE users SET hearts = hearts + " + (int)Row2["hearts"] + " WHERE id = '" + Session.GetHabbo().Id + "'");
}
return;
}
}
}
}[code]
*
*
* Responder com citação
*
*
*
* Enviar um alerta desta mensagem a um administrador ou moderador
* Bloquear os alertas deste post
[C#] Fixando Tarefas São valentin.
Mensagem por Renato Silva em Ter Fev 15, 2011 6:19 pm
+
----
-
Tava dando uma passeada no C*H* , e encontrei esse topico que deve ser muito bom esse fix. Então vamos lá
Pra colocar é simples, vá em \Messages\Requests\Users.cs e procure por:
Código: --------------------------------------------------------------------Selecionar conteúdo
public void RegisterUsers()
Adicione isso acima:
Código: --------------------------------------------------------------------Selecionar conteúdo
private void OpenQuests()
{
//L`val11{{2}}JPASjJFIND_STUFF{{2}}bling_chair_c{{2}}QA1296543600000{{2}}EXTRA01{{2}}{{2}}PkHFIND_STUFF{{2}}val_table1{{2}}QA1296630000000{{2}}EXTRA02{{2}}{{2}}P]HFIND_STUFF{{2}}bling_bed{{2}}QA1296802800000{{2}}DAY02{{2}}{{2}}S\HFIND_STUFF{{2}}bath{{2}}QA1296716400000{{2}}DAY01{{2}}{{2}}
DataTable Data = null;
DataRow QuestCount = null;
using (DatabaseClient dbClient = UberEnvironment.GetDatabase().GetClient())
{
Data = dbClient.ReadDataTable("SELECT * FROM quests");
QuestCount = dbClient.ReadDataRow("SELECT COUNT(*) AS total FROM quests");
}
if (Data == null)
{
return;
}
string Count = QuestCount["total"].ToString();
int TotalQuestCount = int.Parse(Count);
ServerMessage OpenQuest = new ServerMessage(800);
OpenQuest.AppendStringWithBreak("val11"); // val11 / xmas10
OpenQuest.AppendInt32(2);
OpenQuest.AppendInt32(TotalQuestCount);
foreach (DataRow Row in Data.Rows)
{
int QuestProcess = 0;
DataTable Data2 = null;
using (DatabaseClient dbClient = UberEnvironment.GetDatabase().GetClient())
{
Data2 = dbClient.ReadDataTable("SELECT process FROM user_quests WHERE quest = '" + (int)Row["id"] + "' AND user = '" + Session.GetHabbo().Id + "'");
}
if (Data != null)
{
foreach (DataRow Row2 in Data2.Rows)
{
QuestProcess = (int)Row2["process"];
}
}
OpenQuest.AppendInt32((int)Row["id"]);
OpenQuest.AppendInt32(QuestProcess);
OpenQuest.AppendStringWithBreak("FIND_STUFF");
OpenQuest.AppendStringWithBreak((string)Row["item"]);
OpenQuest.AppendInt32((int)Row["hearts"]);
OpenQuest.AppendStringWithBreak((string)Row["time"]);
OpenQuest.AppendStringWithBreak((string)Row["data"]);
OpenQuest.AppendStringWithBreak("");
}
Session.SendMessage(OpenQuest);
}
private void AcceptQuest()
{
//Laval11{{2}}S\KFIND_STUFF{{2}}bath{{2}}QA1296716400000{{2}}DAY01{{2}}{{2}}{{1}}
DataTable Data = null;
using (DatabaseClient dbClient = UberEnvironment.GetDatabase().GetClient())
{
Data = dbClient.ReadDataTable("SELECT * FROM quests WHERE id = '" + Request.PopWiredInt32() + "' LIMIT 1");
}
if (Data == null)
{
return;
}
foreach (DataRow Row in Data.Rows)
{
ServerMessage AcceptQuest = new ServerMessage(801);
AcceptQuest.AppendStringWithBreak("val11");
AcceptQuest.AppendInt32((int)Row["id"]);
AcceptQuest.AppendInt32(3);
AcceptQuest.AppendStringWithBreak("FIND_STUFF");
AcceptQuest.AppendStringWithBreak((string)Row["item"]);
AcceptQuest.AppendInt32((int)Row["hearts"]);
AcceptQuest.AppendStringWithBreak((string)Row["time"]);
AcceptQuest.AppendStringWithBreak((string)Row["data"]);
AcceptQuest.AppendStringWithBreak("");
Session.SendMessage(AcceptQuest);
using (DatabaseClient dbClient = UberEnvironment.GetDatabase().GetClient())
{
dbClient.ExecuteQuery("INSERT INTO user_quests (`id`, `user`, `quest`, `process`) VALUES (NULL, '" + Session.GetHabbo().Id + "', '" + (int)Row["id"] + "', '3')");
}
}
}
Procure por:
Código: --------------------------------------------------------------------Selecionar conteúdo
RequestHandlers[3000] = new RequestHandler(GetPetsInventory);
Adicione isso abaixo:
Código: --------------------------------------------------------------------Selecionar conteúdo
RequestHandlers[3102] = new RequestHandler(OpenQuests);
RequestHandlers[3101] = new RequestHandler(AcceptQuest);
Agora vá em \Messages\Requests\Rooms.cs e procure por:
Código: --------------------------------------------------------------------Selecionar conteúdo
Item.Interactor.OnTrigger(Session, Item, Request.PopWiredInt32(), hasRights);
Adicione isso acima:
Código: --------------------------------------------------------------------Selecionar conteúdo
//Lbval11{{2}}P]IFIND_STUFF{{2}}bling_bed{{2}}QA1296802800000{{2}}DAY02{{2}}{{2}}{{1}}
DataTable Data = null;
using (DatabaseClient dbClient = UberEnvironment.GetDatabase().GetClient())
{
Data = dbClient.ReadDataTable("SELECT * FROM user_quests WHERE user = '" + Session.GetHabbo().Id + "'");
}
if (Data == null)
{
return;
}
foreach (DataRow Row in Data.Rows)
{
if ((int)Row["process"] == 3)
{
DataTable Data2 = null;
using (DatabaseClient dbClient = UberEnvironment.GetDatabase().GetClient())
{
Data2 = dbClient.ReadDataTable("SELECT * FROM quests WHERE id = '" + (int)Row["quest"] + "'");
}
if (Data2 == null)
{
return;
}
foreach (DataRow Row2 in Data2.Rows)
{
if ((string)Row2["item"] == Item.GetBaseItem().Name)
{
ServerMessage DoneQuest = new ServerMessage(802);
DoneQuest.AppendStringWithBreak("val11");
DoneQuest.AppendInt32((int)Row2["id"]);
DoneQuest.AppendInt32(1);
DoneQuest.AppendStringWithBreak("FIND_STUFF");
DoneQuest.AppendStringWithBreak((string)Row2["item"]);
DoneQuest.AppendInt32((int)Row2["hearts"]);
DoneQuest.AppendStringWithBreak((string)Row2["time"]);
DoneQuest.AppendStringWithBreak((string)Row2["data"]);
DoneQuest.AppendStringWithBreak("");
Session.SendMessage(DoneQuest);
using (DatabaseClient dbClient = UberEnvironment.GetDatabase().GetClient())
{
dbClient.ExecuteQuery("UPDATE user_quests SET process = '1' WHERE quest = '" + (int)Row2["id"] + "' AND user = '" + Session.GetHabbo().Id + "'");
dbClient.ExecuteQuery("UPDATE users SET hearts = hearts + " + (int)Row2["hearts"] + " WHERE id = '" + Session.GetHabbo().Id + "'");
}
return;
}
}
}
}
MYSQL
Execute isso no seu banco de dados:
Código: --------------------------------------------------------------------Selecionar conteúdo
CREATE TABLE IF NOT EXISTS `quests` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`item` varchar(255) NOT NULL,
`time` varchar(255) NOT NULL,
`data` varchar(255) NOT NULL,
`hearts` int(11) NOT NULL DEFAULT '5',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=173 ;
INSERT INTO `quests` (`id`, `item`, `time`, `data`, `hearts`) VALUES
(115, 'bath', '1296716400000', 'DAY01', 5),
(116, 'bling_bed', '1296802800000', 'DAY02', 5),
(172, 'val_table1', '1296630000000', 'EXTRA02', 5),
(171, 'bling_chair_c', '1296543600000', 'EXTRA01', 5),
(117, 'bling_toilet', '1296889200000', 'DAY03', 5);
Código: --------------------------------------------------------------------Selecionar conteúdo
CREATE TABLE IF NOT EXISTS `user_quests` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`user` int(11) NOT NULL,
`quest` int(11) NOT NULL,
`process` int(11) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 ;
Código: --------------------------------------------------------------------Selecionar conteúdo
ALTER TABLE `users` ADD `hearts` INT( 11 ) NOT NULL DEFAULT '0';
conteúdo
[code] ALTER TABLE `users` ADD `quests_passed` INT( 11 ) NOT NULL[/code]
IMAGENS PARA COLOCAR NA SWF
Código: --------------------------------------------------------------------Selecionar conteúdo
[Tens de ter uma conta e sessão iniciada para poderes visualizar este link]
Coloque isso nas suas variables:
conteúdo
questing.defaultCampaign=val11
Pra funcionar, você precisa baixar a Habbo.swf:
[Tens de ter uma conta e sessão iniciada para poderes visualizar este link]
Prints:
[Tens de ter uma conta e sessão iniciada para poderes visualizar este link]
Créditos:
-> TopErwin (Criou o código)
-> anthony93260 (Crackeou a SWF)
-> DjInTrouble (Criou os Packets)
-> Meth0d (Criando o emulador)
-> Lts (Código nas variables)
-> =dj.matias= (Imagens)
-> jeanzinhuuh (c*h*)
Pra colocar é simples, vá em \Messages\Requests\Users.cs e procure por:
[/code]public void RegisterUsers()
- Código:
Adicione isso acima:
{
//L`val11{{2}}JPASjJFIND_STUFF{{2}}bling_chair_c{{2}}QA1296543600000{{2}}EXTRA01{{2}}{{2}}PkHFIND_STUFF{{2}}val_table1{{2}}QA1296630000000{{2}}EXTRA02{{2}}{{2}}P]HFIND_STUFF{{2}}bling_bed{{2}}QA1296802800000{{2}}DAY02{{2}}{{2}}S\HFIND_STUFF{{2}}bath{{2}}QA1296716400000{{2}}DAY01{{2}}{{2}}
DataTable Data = null;
DataRow QuestCount = null;
using (DatabaseClient dbClient = UberEnvironment.GetDatabase().GetClient())
{
Data = dbClient.ReadDataTable("SELECT * FROM quests");
QuestCount = dbClient.ReadDataRow("SELECT COUNT(*) AS total FROM quests");
}
if (Data == null)
{
return;
}
string Count = QuestCount["total"].ToString();
int TotalQuestCount = int.Parse(Count);
ServerMessage OpenQuest = new ServerMessage(800);
OpenQuest.AppendStringWithBreak("val11"); // val11 / xmas10
OpenQuest.AppendInt32(2);
OpenQuest.AppendInt32(TotalQuestCount);
foreach (DataRow Row in Data.Rows)
{
int QuestProcess = 0;
DataTable Data2 = null;
using (DatabaseClient dbClient = UberEnvironment.GetDatabase().GetClient())
{
Data2 = dbClient.ReadDataTable("SELECT process FROM user_quests WHERE quest = '" + (int)Row["id"] + "' AND user = '" + Session.GetHabbo().Id + "'");
}
if (Data != null)
{
foreach (DataRow Row2 in Data2.Rows)
{
QuestProcess = (int)Row2["process"];
}
}
OpenQuest.AppendInt32((int)Row["id"]);
OpenQuest.AppendInt32(QuestProcess);
OpenQuest.AppendStringWithBreak("FIND_STUFF");
OpenQuest.AppendStringWithBreak((string)Row["item"]);
OpenQuest.AppendInt32((int)Row["hearts"]);
OpenQuest.AppendStringWithBreak((string)Row["time"]);
OpenQuest.AppendStringWithBreak((string)Row["data"]);
OpenQuest.AppendStringWithBreak("");
}
Session.SendMessage(OpenQuest);
}
private void AcceptQuest()
{
//Laval11{{2}}S\KFIND_STUFF{{2}}bath{{2}}QA1296716400000{{2}}DAY01{{2}}{{2}}{{1}}
DataTable Data = null;
using (DatabaseClient dbClient = UberEnvironment.GetDatabase().GetClient())
{
Data = dbClient.ReadDataTable("SELECT * FROM quests WHERE id = '" + Request.PopWiredInt32() + "' LIMIT 1");
}
if (Data == null)
{
return;
}
foreach (DataRow Row in Data.Rows)
{
ServerMessage AcceptQuest = new ServerMessage(801);
AcceptQuest.AppendStringWithBreak("val11");
AcceptQuest.AppendInt32((int)Row["id"]);
AcceptQuest.AppendInt32(3);
AcceptQuest.AppendStringWithBreak("FIND_STUFF");
AcceptQuest.AppendStringWithBreak((string)Row["item"]);
AcceptQuest.AppendInt32((int)Row["hearts"]);
AcceptQuest.AppendStringWithBreak((string)Row["time"]);
AcceptQuest.AppendStringWithBreak((string)Row["data"]);
AcceptQuest.AppendStringWithBreak("");
Session.SendMessage(AcceptQuest);
using (DatabaseClient dbClient = UberEnvironment.GetDatabase().GetClient())
{
dbClient.ExecuteQuery("INSERT INTO user_quests (`id`, `user`, `quest`, `process`) VALUES (NULL, '" + Session.GetHabbo().Id + "', '" + (int)Row["id"] + "', '3')");
}
}
}
- Código:
Procure por:
- Código:
Adicione isso abaixo:
RequestHandlers[3101] = new RequestHandler(AcceptQuest
- Código:
Agora vá em \Messages\Requests\Rooms.cs e procure por:
- Código:
Adicione isso acima:
DataTable Data = null;
using (DatabaseClient dbClient = UberEnvironment.GetDatabase().GetClient())
{
Data = dbClient.ReadDataTable("SELECT * FROM user_quests WHERE user = '" + Session.GetHabbo().Id + "'");
}
if (Data == null)
{
return;
}
foreach (DataRow Row in Data.Rows)
{
if ((int)Row["process"] == 3)
{
DataTable Data2 = null;
using (DatabaseClient dbClient = UberEnvironment.GetDatabase().GetClient())
{
Data2 = dbClient.ReadDataTable("SELECT * FROM quests WHERE id = '" + (int)Row["quest"] + "'");
}
if (Data2 == null)
{
return;
}
foreach (DataRow Row2 in Data2.Rows)
{
if ((string)Row2["item"] == Item.GetBaseItem().Name)
{
ServerMessage DoneQuest = new ServerMessage(802);
DoneQuest.AppendStringWithBreak("val11");
DoneQuest.AppendInt32((int)Row2["id"]);
DoneQuest.AppendInt32(1);
DoneQuest.AppendStringWithBreak("FIND_STUFF");
DoneQuest.AppendStringWithBreak((string)Row2["item"]);
DoneQuest.AppendInt32((int)Row2["hearts"]);
DoneQuest.AppendStringWithBreak((string)Row2["time"]);
DoneQuest.AppendStringWithBreak((string)Row2["data"]);
DoneQuest.AppendStringWithBreak("");
Session.SendMessage(DoneQuest);
using (DatabaseClient dbClient = UberEnvironment.GetDatabase().GetClient())
{
dbClient.ExecuteQuery("UPDATE user_quests SET process = '1' WHERE quest = '" + (int)Row2["id"] + "' AND user = '" + Session.GetHabbo().Id + "'");
dbClient.ExecuteQuery("UPDATE users SET hearts = hearts + " + (int)Row2["hearts"] + " WHERE id = '" + Session.GetHabbo().Id + "'");
}
return;
}
}
}
}[code]
*
*
* Responder com citação
*
*
*
* Enviar um alerta desta mensagem a um administrador ou moderador
* Bloquear os alertas deste post
[C#] Fixando Tarefas São valentin.
Mensagem por Renato Silva em Ter Fev 15, 2011 6:19 pm
+
----
-
Tava dando uma passeada no C*H* , e encontrei esse topico que deve ser muito bom esse fix. Então vamos lá
Pra colocar é simples, vá em \Messages\Requests\Users.cs e procure por:
Código: --------------------------------------------------------------------Selecionar conteúdo
public void RegisterUsers()
Adicione isso acima:
Código: --------------------------------------------------------------------Selecionar conteúdo
private void OpenQuests()
{
//L`val11{{2}}JPASjJFIND_STUFF{{2}}bling_chair_c{{2}}QA1296543600000{{2}}EXTRA01{{2}}{{2}}PkHFIND_STUFF{{2}}val_table1{{2}}QA1296630000000{{2}}EXTRA02{{2}}{{2}}P]HFIND_STUFF{{2}}bling_bed{{2}}QA1296802800000{{2}}DAY02{{2}}{{2}}S\HFIND_STUFF{{2}}bath{{2}}QA1296716400000{{2}}DAY01{{2}}{{2}}
DataTable Data = null;
DataRow QuestCount = null;
using (DatabaseClient dbClient = UberEnvironment.GetDatabase().GetClient())
{
Data = dbClient.ReadDataTable("SELECT * FROM quests");
QuestCount = dbClient.ReadDataRow("SELECT COUNT(*) AS total FROM quests");
}
if (Data == null)
{
return;
}
string Count = QuestCount["total"].ToString();
int TotalQuestCount = int.Parse(Count);
ServerMessage OpenQuest = new ServerMessage(800);
OpenQuest.AppendStringWithBreak("val11"); // val11 / xmas10
OpenQuest.AppendInt32(2);
OpenQuest.AppendInt32(TotalQuestCount);
foreach (DataRow Row in Data.Rows)
{
int QuestProcess = 0;
DataTable Data2 = null;
using (DatabaseClient dbClient = UberEnvironment.GetDatabase().GetClient())
{
Data2 = dbClient.ReadDataTable("SELECT process FROM user_quests WHERE quest = '" + (int)Row["id"] + "' AND user = '" + Session.GetHabbo().Id + "'");
}
if (Data != null)
{
foreach (DataRow Row2 in Data2.Rows)
{
QuestProcess = (int)Row2["process"];
}
}
OpenQuest.AppendInt32((int)Row["id"]);
OpenQuest.AppendInt32(QuestProcess);
OpenQuest.AppendStringWithBreak("FIND_STUFF");
OpenQuest.AppendStringWithBreak((string)Row["item"]);
OpenQuest.AppendInt32((int)Row["hearts"]);
OpenQuest.AppendStringWithBreak((string)Row["time"]);
OpenQuest.AppendStringWithBreak((string)Row["data"]);
OpenQuest.AppendStringWithBreak("");
}
Session.SendMessage(OpenQuest);
}
private void AcceptQuest()
{
//Laval11{{2}}S\KFIND_STUFF{{2}}bath{{2}}QA1296716400000{{2}}DAY01{{2}}{{2}}{{1}}
DataTable Data = null;
using (DatabaseClient dbClient = UberEnvironment.GetDatabase().GetClient())
{
Data = dbClient.ReadDataTable("SELECT * FROM quests WHERE id = '" + Request.PopWiredInt32() + "' LIMIT 1");
}
if (Data == null)
{
return;
}
foreach (DataRow Row in Data.Rows)
{
ServerMessage AcceptQuest = new ServerMessage(801);
AcceptQuest.AppendStringWithBreak("val11");
AcceptQuest.AppendInt32((int)Row["id"]);
AcceptQuest.AppendInt32(3);
AcceptQuest.AppendStringWithBreak("FIND_STUFF");
AcceptQuest.AppendStringWithBreak((string)Row["item"]);
AcceptQuest.AppendInt32((int)Row["hearts"]);
AcceptQuest.AppendStringWithBreak((string)Row["time"]);
AcceptQuest.AppendStringWithBreak((string)Row["data"]);
AcceptQuest.AppendStringWithBreak("");
Session.SendMessage(AcceptQuest);
using (DatabaseClient dbClient = UberEnvironment.GetDatabase().GetClient())
{
dbClient.ExecuteQuery("INSERT INTO user_quests (`id`, `user`, `quest`, `process`) VALUES (NULL, '" + Session.GetHabbo().Id + "', '" + (int)Row["id"] + "', '3')");
}
}
}
Procure por:
Código: --------------------------------------------------------------------Selecionar conteúdo
RequestHandlers[3000] = new RequestHandler(GetPetsInventory);
Adicione isso abaixo:
Código: --------------------------------------------------------------------Selecionar conteúdo
RequestHandlers[3102] = new RequestHandler(OpenQuests);
RequestHandlers[3101] = new RequestHandler(AcceptQuest);
Agora vá em \Messages\Requests\Rooms.cs e procure por:
Código: --------------------------------------------------------------------Selecionar conteúdo
Item.Interactor.OnTrigger(Session, Item, Request.PopWiredInt32(), hasRights);
Adicione isso acima:
Código: --------------------------------------------------------------------Selecionar conteúdo
//Lbval11{{2}}P]IFIND_STUFF{{2}}bling_bed{{2}}QA1296802800000{{2}}DAY02{{2}}{{2}}{{1}}
DataTable Data = null;
using (DatabaseClient dbClient = UberEnvironment.GetDatabase().GetClient())
{
Data = dbClient.ReadDataTable("SELECT * FROM user_quests WHERE user = '" + Session.GetHabbo().Id + "'");
}
if (Data == null)
{
return;
}
foreach (DataRow Row in Data.Rows)
{
if ((int)Row["process"] == 3)
{
DataTable Data2 = null;
using (DatabaseClient dbClient = UberEnvironment.GetDatabase().GetClient())
{
Data2 = dbClient.ReadDataTable("SELECT * FROM quests WHERE id = '" + (int)Row["quest"] + "'");
}
if (Data2 == null)
{
return;
}
foreach (DataRow Row2 in Data2.Rows)
{
if ((string)Row2["item"] == Item.GetBaseItem().Name)
{
ServerMessage DoneQuest = new ServerMessage(802);
DoneQuest.AppendStringWithBreak("val11");
DoneQuest.AppendInt32((int)Row2["id"]);
DoneQuest.AppendInt32(1);
DoneQuest.AppendStringWithBreak("FIND_STUFF");
DoneQuest.AppendStringWithBreak((string)Row2["item"]);
DoneQuest.AppendInt32((int)Row2["hearts"]);
DoneQuest.AppendStringWithBreak((string)Row2["time"]);
DoneQuest.AppendStringWithBreak((string)Row2["data"]);
DoneQuest.AppendStringWithBreak("");
Session.SendMessage(DoneQuest);
using (DatabaseClient dbClient = UberEnvironment.GetDatabase().GetClient())
{
dbClient.ExecuteQuery("UPDATE user_quests SET process = '1' WHERE quest = '" + (int)Row2["id"] + "' AND user = '" + Session.GetHabbo().Id + "'");
dbClient.ExecuteQuery("UPDATE users SET hearts = hearts + " + (int)Row2["hearts"] + " WHERE id = '" + Session.GetHabbo().Id + "'");
}
return;
}
}
}
}
MYSQL
Execute isso no seu banco de dados:
Código: --------------------------------------------------------------------Selecionar conteúdo
CREATE TABLE IF NOT EXISTS `quests` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`item` varchar(255) NOT NULL,
`time` varchar(255) NOT NULL,
`data` varchar(255) NOT NULL,
`hearts` int(11) NOT NULL DEFAULT '5',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=173 ;
INSERT INTO `quests` (`id`, `item`, `time`, `data`, `hearts`) VALUES
(115, 'bath', '1296716400000', 'DAY01', 5),
(116, 'bling_bed', '1296802800000', 'DAY02', 5),
(172, 'val_table1', '1296630000000', 'EXTRA02', 5),
(171, 'bling_chair_c', '1296543600000', 'EXTRA01', 5),
(117, 'bling_toilet', '1296889200000', 'DAY03', 5);
Código: --------------------------------------------------------------------Selecionar conteúdo
CREATE TABLE IF NOT EXISTS `user_quests` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`user` int(11) NOT NULL,
`quest` int(11) NOT NULL,
`process` int(11) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 ;
Código: --------------------------------------------------------------------Selecionar conteúdo
ALTER TABLE `users` ADD `hearts` INT( 11 ) NOT NULL DEFAULT '0';
conteúdo
[code] ALTER TABLE `users` ADD `quests_passed` INT( 11 ) NOT NULL[/code]
IMAGENS PARA COLOCAR NA SWF
Código: --------------------------------------------------------------------Selecionar conteúdo
[Tens de ter uma conta e sessão iniciada para poderes visualizar este link]
Coloque isso nas suas variables:
conteúdo
questing.defaultCampaign=val11
Pra funcionar, você precisa baixar a Habbo.swf:
[Tens de ter uma conta e sessão iniciada para poderes visualizar este link]
Prints:
[Tens de ter uma conta e sessão iniciada para poderes visualizar este link]
Créditos:
-> TopErwin (Criou o código)
-> anthony93260 (Crackeou a SWF)
-> DjInTrouble (Criou os Packets)
-> Meth0d (Criando o emulador)
-> Lts (Código nas variables)
-> =dj.matias= (Imagens)
-> jeanzinhuuh (c*h*)