-
Some wired codes for uberemu
Find:
Code:
case "scoreboard":
return new InteractorScoreboard();
Add After:
Code:
case "wired_trg_say":
return new InteractorWiredSay();
case "wired_act_show_message":
return new InteractorWiredShowMessage();
Find:
FurniInteractor.cs
Code:
class InteractorStatic : FurniInteractor
{
public override void OnPlace(GameClient Session, RoomItem Item) { }
public override void OnRemove(GameClient Session, RoomItem Item) { }
public override void OnTrigger(GameClient Session, RoomItem Item, int Request, bool UserHasRights) { }
}
Add After:
Code:
class InteractorWiredShowMessage : FurniInteractor
{
public override void OnPlace(GameClient Session, RoomItem Item)
{
}
public override void OnRemove(GameClient Session, RoomItem Item)
{
}
public override void OnTrigger(GameClient Session, RoomItem Item, int Request, bool UserHasRights)
{
if (!UserHasRights)
{
return;
}
Item.ExtraData = "1";
Item.UpdateState(false, true);
string SayMessage;
using (DatabaseClient dbClient = UberEnvironment.GetDatabase().GetClient())
{
if (dbClient.ReadDataRow("SELECT message FROM wired_show_message WHERE item_id = '" + Item.Id + "' LIMIT 1") != null)
{
SayMessage = dbClient.ReadString("SELECT message FROM wired_show_message WHERE item_id = '" + Item.Id + "' LIMIT 1");
}
else
{
SayMessage = "";
}
}
ServerMessage Message = new ServerMessage(651);
Message.AppendInt32(0);
Message.AppendInt32(0);
Message.AppendInt32(Item.GetBaseItem().SpriteId);
Message.AppendInt32((int)Item.Id);
Message.AppendStringWithBreak(SayMessage);
Message.AppendString("HSAHH");
Session.SendMessage(Message);
}
}
Code:
class InteractorWiredSay : FurniInteractor
{
public override void OnPlace(GameClient Session, RoomItem Item)
{
}
public override void OnRemove(GameClient Session, RoomItem Item)
{
}
public override void OnTrigger(GameClient Session, RoomItem Item, int Request, bool UserHasRights)
{
if (!UserHasRights)
{
return;
}
Item.ExtraData = "1";
Item.UpdateState(false, true);
string SayMessage;
using (DatabaseClient dbClient = UberEnvironment.GetDatabase().GetClient())
{
if (dbClient.ReadDataRow("SELECT keyword FROM wired_keywords WHERE item_id = '" + Item.Id + "' LIMIT 1") != null)
{
SayMessage = dbClient.ReadString("SELECT keyword FROM wired_keywords WHERE item_id = '" + Item.Id + "' LIMIT 1");
}
else
{
SayMessage = "";
}
}
ServerMessage Message = new ServerMessage(650);
Message.AppendInt32(5);
Message.AppendInt32(0);
Message.AppendInt32(Item.GetBaseItem().SpriteId);
Message.AppendInt32((int)Item.Id);
Message.AppendStringWithBreak(SayMessage);
Message.AppendInt32(1);
Message.AppendInt32(0);
Message.AppendInt32(0);
Message.AppendInt32(0);
Session.SendMessage(Message);
}
}
Add Rooms:
Code:
Private void SaveWiredSettings()
{
int ItemId = Request.PopWiredInt32();
int Type = Request.PopWiredInt32();
int Item1 = Request.PopWiredInt32();
string Keyword = Request.PopFixedString();
int Item2 = Request.PopFixedInt32();
uint Item3 = Request.PopWiredUInt();
uint Item4 = Request.PopWiredUInt();
uint Item5 = Request.PopWiredUInt();
uint Item6 = Request.PopWiredUInt();
uint Item7 = Request.PopWiredUInt();
uint Item8 = Request.PopWiredUInt();
// Item Item = UberEnvironment.GetGame().GetItemManager().GetItem((uint)ItemId);
using (DatabaseClient dbClient = UberEnvironment.GetDatabase().GetClient())
{
dbClient.ExecuteQuery("DELETE FROM wired_keywords WHERE item_id = '" + ItemId + "'");
dbClient.ExecuteQuery("INSERT INTO wired_keywords (item_id, keyword) VALUES ('" + ItemId + "','" + Keyword + "')");
}
}
Code:
private void SaveWiredSettings2()
{
int ItemId = Request.PopWiredInt32();
int Some = Request.PopWiredInt32();
string msg = Request.PopFixedString();
int Some2 = Request.PopWiredInt32();
int Some3 = Request.PopWiredInt32();
using (DatabaseClient dbClient = UberEnvironment.GetDatabase().GetClient())
{
// Pois vanhat tavarat
dbClient.ExecuteQuery("DELETE FROM wired_show_message WHERE item_id = '" + ItemId + "'");
//Uutta tilalle
dbClient.ExecuteQuery("INSERT INTO wired_show_message (item_id, message) VALUES ('" + ItemId + "','" + msg + "')");
}
}
Find:
Code:
RequestHandlers[3005] = new RequestHandler(RespectPet);
Add After:
Code:
RequestHandlers[3050] = new RequestHandler(SaveWiredSettings);
RequestHandlers[3051] = new RequestHandler(SaveWiredSettings2);
Add interaction_type: wired_trg_say and wired_act_show_message
Run mysql query:
Code:
CREATE TABLE `wired_keywords` (
`item_id` int(5) DEFAULT NULL,
`keyword` varchar(255) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
Code:
CREATE TABLE `wired_show_message` (
`item_id` int(5) DEFAULT NULL,
`message` varchar(255) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-
Re: Some wired codes for uberemu
Nice try this though
PHP Code:
using Uber.HabboHotel.Pets;
using Uber.HabboHotel.Navigators;
using Uber.HabboHotel.Items;
using Uber.HabboHotel.GameClients;
using Uber.HabboHotel.Users.Badges;
using Uber.HabboHotel.Misc;
using Uber.HabboHotel.Pathfinding;
using Uber.HabboHotel.Advertisements;
using Uber.HabboHotel.Users.Messenger;
using Uber.HabboHotel.Rooms;
using Uber.HabboHotel.Catalogs;
using Uber.Storage;
}
Private void SaveWiredSettings()
{
int ItemId = Request.PopWiredInt32();
int ItemId = Request.MessageAppendInt0();
int Type = Request.PopWiredInt32();
// Item Item = UberEnvironment.GetGame().GetItemManager().GetItem((uint)ItemId);
using (DatabaseClient dbClient = UberEnvironment.GetWired().GetClient())
{
dbClient.ExecuteQuery("DELETE FROM wired_keywords WHERE item_id = '" + ItemId + "'");
dbClient.ExecuteQuery("INSERT INTO wired_keywords (item_id, keyword) VALUES ('" + ItemId + "','" + Keyword + "')");
}
}
-
Re: Some wired codes for uberemu
-
Re: Some wired codes for uberemu
-
Re: Some wired codes for uberemu
=dj.matias=, Thanks for releasing & reading my PM :)
-
Re: Some wired codes for uberemu
Correct me if I'm wrong, but won't this be laggy if quite alot of people are using?
(At the fact It's MySQL?)
-
Re: Some wired codes for uberemu
Quote:
Originally Posted by
Grant
Correct me if I'm wrong, but won't this be laggy if quite alot of people are using?
(At the fact It's MySQL?)
Yes it will lagg out the MySQL server for sure, that's why it needs to be cached like the AchievementManager.cs does ( LoadAchievements void ).
-
Re: Some wired codes for uberemu
I made my own doesn't use MYSQL it's cached
-
Re: Some wired codes for uberemu
Quote:
Originally Posted by
.ICE.
I made my own doesn't use MYSQL it's cached
/facepalm
Ofcourse you did, that's probably why you don't even know which CS file is used by the Interactions..
-
Re: Some wired codes for uberemu
Quote:
Originally Posted by
PEjump2
/facepalm
Ofcourse you did, that's probably why you don't even know which CS file is used by the Interactions..
When did I say I didn't
-
Re: Some wired codes for uberemu
Quote:
Originally Posted by
.ICE.
When did I say I didn't
You proofed it in this topic, by posting the wrong CS file.
-
Re: Some wired codes for uberemu
I dont get it.
It works,
But it doesnt actually do the effect?
-
Re: Some wired codes for uberemu
-
Re: Some wired codes for uberemu
-
Re: Some wired codes for uberemu
-
Re: Some wired codes for uberemu
-
Re: Some wired codes for uberemu
How have you all got it working?
I have it working about 75%
It just doesn't do the effect?
(I have out the trigger box BELOW the effect box like it should be...)
-
Re: Some wired codes for uberemu
Don't works here! help me! user don't say the word.
-
Re: Some wired codes for uberemu
Don't work for me Help? :o
-
Re: Some wired codes for uberemu
are you using his code or mines
-
Re: Some wired codes for uberemu
His. :P
(Tried yours.
doesnt work)
Also. this MAY contribute to it..
I noticed one of the "private voids" has a capital P, so I changed that to remove errors,
I also noticed that, "servermessage" came up with an error, so I gave that "uber.Messages.Servermessage"
AND DatabaseClient also gave me errors, so I gave it "Uber.Storage.DatabaseClient"
Could these be the problem?
-
Re: Some wired codes for uberemu
Quote:
Originally Posted by
Mikehunt
His. :P
(Tried yours.
doesnt work)
Also. this MAY contribute to it..
I noticed one of the "private voids" has a capital P, so I changed that to remove errors,
I also noticed that, "servermessage" came up with an error, so I gave that "uber.Messages.Servermessage"
AND DatabaseClient also gave me errors, so I gave it "Uber.Storage.DatabaseClient"
Could these be the problem?
Go on the Top, on Uber.Storage; etc
add: Uber.Messages; :thumbup:
-
Re: Some wired codes for uberemu
Quote:
Originally Posted by
GuikBretas
Go on the Top, on Uber.Storage; etc
add: Uber.Messages; :thumbup:
Done that...
:(
-
Re: Some wired codes for uberemu
-
Re: Some wired codes for uberemu
Quote:
Originally Posted by
Mikehunt
Done that...
:(
Try put this:
PHP Code:
using Uber.HabboHotel.Pets;
using Uber.HabboHotel.Navigators;
using Uber.HabboHotel.Items;
using Uber.HabboHotel.GameClients;
using Uber.HabboHotel.Users.Badges;
using Uber.HabboHotel.Misc;
using Uber.HabboHotel.Pathfinding;
using Uber.HabboHotel.Advertisements;
using Uber.HabboHotel.Users.Messenger;
using Uber.HabboHotel.Rooms;
using Uber.HabboHotel.Catalogs;
using Uber.Storage;
or this: @edit
PHP Code:
using XD.HabboHotel.GameClients;
using XD.HabboHotel.Pathfinding;
using XD.HabboHotel.Rooms;
using XD.HabboHotel.Pets;
using XD.HabboHotel.Navigators;
using XD.HabboHotel.Items;
using XD.HabboHotel.Users.Badges;
using XD.HabboHotel.Misc;
using XD.HabboHotel.Advertisements;
using XD.HabboHotel.Users.Messenger;
using XD.HabboHotel.Catalogs;
using XD.Storage;
using XD.Messages;