koreSnarl - Snarl notification support (Win32) (8/26/08)

Other plugins for extending OpenKore's functionality. This forum is only for posting new plugins and commenting on existing plugins. For support, use the Support forum.

Moderator: Moderators

Message
Author
sli
Perl Monk
Perl Monk
Posts: 810
Joined: 04 Apr 2008, 17:26
Noob?: No

Re: koreSnarl - Snarl notification support (Win32) (8/26/08)

#11 Post by sli »

Bump for bug fix.
cs : ee : realist

Engydoggy
Human
Human
Posts: 33
Joined: 12 Jul 2008, 06:14
Noob?: Yes

Re: koreSnarl - Snarl notification support (Win32) (8/26/08)

#12 Post by Engydoggy »

Sli, when you have a chance, take a look at the item notification section. Would be nifty.

sli
Perl Monk
Perl Monk
Posts: 810
Joined: 04 Apr 2008, 17:26
Noob?: No

Re: koreSnarl - Snarl notification support (Win32) (8/26/08)

#13 Post by sli »

Engydoggy wrote:Sli, when you have a chance, take a look at the item notification section. Would be nifty.
Why? Is it not working?

Image
cs : ee : realist

Engydoggy
Human
Human
Posts: 33
Joined: 12 Jul 2008, 06:14
Noob?: Yes

Re: koreSnarl - Snarl notification support (Win32) (8/26/08)

#14 Post by Engydoggy »

Hmm, it doesn't work for me, doesn't notify on item, but all other notifications do work. It should be properly installed I think, if all other types of notifications work :(

Is there a specific servertype for this to work? I already tried running kore from source, just in case, and it didn't work either :O

sli
Perl Monk
Perl Monk
Posts: 810
Joined: 04 Apr 2008, 17:26
Noob?: No

Re: koreSnarl - Snarl notification support (Win32) (8/26/08)

#15 Post by sli »

Nope. Nothing special required. In fact, it's completely independent of server types as the hook is called when the message is printed. Here's the hook code from Receive.pm (just Receive.pm, not a ServerType module):

Code: Select all

		my $disp = TF("Item added to inventory: %s (%d) x %d - %s",
			$item->{name}, $item->{invIndex}, $amount, $itemTypes_lut{$item->{type}});
		message "$disp\n", "drop";
		$disp .= " ($field{name})\n";
		itemLog($disp);

		Plugins::callHook('item_gathered',{item => $item->{name}});

		$args->{item} = $item;
You sure you're using THE ABSOLUTE most current version? It changes a lot.
cs : ee : realist

sli
Perl Monk
Perl Monk
Posts: 810
Joined: 04 Apr 2008, 17:26
Noob?: No

Re: koreSnarl - Snarl notification support (Win32) (8/26/08)

#16 Post by sli »

Whoops, death bug was even more broken. Fixed it for real this time.
cs : ee : realist

sli
Perl Monk
Perl Monk
Posts: 810
Joined: 04 Apr 2008, 17:26
Noob?: No

Re: koreSnarl - Snarl notification support (Win32) (8/26/08)

#17 Post by sli »

Bump for awesome new feature!
cs : ee : realist

kong
Noob
Noob
Posts: 4
Joined: 20 Aug 2008, 23:02
Noob?: No

Re: koreSnarl - Snarl notification support (Win32) (8/26/08)

#18 Post by kong »

sli wrote:UPDATE: One bug to fix: if another player near you gains a level or job level, a notification is displayed for your character.
One question: Are the hook calls in Network/Receive.pm intended to be used with koreSnarl only?

Code: Select all

if ($type == 0) {
	message TF("%s gained a level!\n", $name);
	Plugins::callHook('base_level', {name => $name});
} elsif ($type == 1) {
	message TF("%s gained a job level!\n", $name);
	Plugins::callHook('job_level', {name => $name});
} elsif ...
If so, it's quite simple to only call the hooks when they belong to our character -- something like this:

Code: Select all

if ($type == 0) {
	message TF("%s gained a level!\n", $name);
	if ($ID eq $accountID) {
		Plugins::callHook('base_level', {name => $name});
	}
} elsif ($type == 1) {
	message TF("%s gained a job level!\n", $name);
	if ($ID eq $accountID) {
		Plugins::callHook('job_level', {name => $name});
	}
} elsif ...
Or we could just pass an additional parameter to the hook call (e.g. $ID) and do the filter in the plugin.

Just another idea for this great plugin :mrgreen:

sli
Perl Monk
Perl Monk
Posts: 810
Joined: 04 Apr 2008, 17:26
Noob?: No

Re: koreSnarl - Snarl notification support (Win32) (8/26/08)

#19 Post by sli »

No, they're intended for any character. It already already checks character names (or is supposed to) but it's using the wrong variable at the moment. I've fixed it, but haven't been able to test because Kore-RO is down. I'd just run a server here locally, but there's a whole big runaround for that (ie, hacking the Kore-RO client to use sclientinfo since all other clients inexplicably crash after service selection).

Then again, if I remember correctly, there's a way to enable service selection in the sclientinfo. It's just been a really long time since I was THE clientinfo guru, so yeah.
cs : ee : realist

Technology
Super Moderators
Super Moderators
Posts: 801
Joined: 06 May 2008, 12:47
Noob?: No

Re: koreSnarl - Snarl notification support (Win32) (8/26/08)

#20 Post by Technology »

One ST0 to rule them all? One PE viewer to find them!
One ST_kRO to bring them all and in the darkness bind them...

Mount Doom awaits us, fellowship of OpenKore!

Post Reply