[R63] Part of (valentine) quests.
02/02/2011 @ 16:15 : -> Updated toppic! now much more completer quest system!
03/02/2011 @ 07:45 : -> Updated toppic! fixed little bug!
Tutorial:
Search into \Messages\Requests\Users.cs:
PHP Code:
public void RegisterUsers()
Above it add:
PHP Code:
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')");
}
}
}
Search for:
PHP Code:
RequestHandlers[3000] = new RequestHandler(GetPetsInventory);
Under it add:
PHP Code:
RequestHandlers[3102] = new RequestHandler(OpenQuests);
RequestHandlers[3101] = new RequestHandler(AcceptQuest);
Search into \Messages\Requests\Rooms.cs:
PHP Code:
Item.Interactor.OnTrigger(Session, Item, Request.PopWiredInt32(), hasRights);
Above it add:
PHP Code:
//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
Run this into your SQL Database:
PHP Code:
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);
PHP Code:
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 ;
PHP Code:
ALTER TABLE `users` ADD `hearts` INT( 11 ) NOT NULL DEFAULT '0';
Screenshots:
http://img228.imageshack.us/img228/7181/questsb.png
http://img560.imageshack.us/img560/2620/quests2.png
Cracked Swf:
Quote:
Originally Posted by
anthony93260
Quote:
Originally Posted by
Lts
just you go and fill in the variables:
questing.defaultCampaign=val11
Credits:
-> TopErwin (making this codes)
-> anthony93260 (cracking newest R63 swf)
-> DjInTrouble (gave me packetlogger+packet decrypter long ago)
-> Meth0d (making uberemu ;p)
Re: [R63] Part of (valentine) quests.
Re: [R63] Part of (valentine) quests.
I think we need the new Habbo.swf or toperwin? :D Upload your's :) And awesome Release!!!
-Slaxxer
Re: [R63] Part of (valentine) quests.
Re: [R63] Part of (valentine) quests.
i Need the habbo.swf new :D
Re: [R63] Part of (valentine) quests.
don“t working I Need the new habbo.swf
Re: [R63] Part of (valentine) quests.
Do i need to (re)-make the snowflake quest dialog?
Re: [R63] Part of (valentine) quests.
^^ I think you only need to change val11 in xmas10
Re: [R63] Part of (valentine) quests.
Quote:
Originally Posted by
DjInTrouble
^^ I think you only need to change val11 in xmas10
and get complete sql for it ;p
and change the (4) to the count of new sql data u have ;)
Re: [R63] Part of (valentine) quests.
when i open the quest then i get an error
Re: [R63] Part of (valentine) quests.
Quote:
Originally Posted by
jordynegen11
when i open the quest then i get error
bcouse he can't find vall11, u will need the newest swf,
Re: [R63] Part of (valentine) quests.
Re: [R63] Part of (valentine) quests.
Great release, but its placed in the wrong class :P
And mind releasing that Habbo.swf file? I'm searching for a cracked one with the latest build :p
Re: [R63] Part of (valentine) quests.
were can I find the newest swf?
Re: [R63] Part of (valentine) quests.
Quote:
Originally Posted by
PEjump2
Great release, but its placed in the wrong class :P
And mind releasing that Habbo.swf file? I'm searching for a cracked one with the latest build :p
I used with editting my computer's host file and than play on localhost ;p
I will try to crack habbo.swf and i will release it ;)
EDIT:
doesn't have enouch time now ;S
will do tomorrow ;)