Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Quest API] Add Hatelist Count Methods to Perl/Lua #4106

Merged
merged 1 commit into from Feb 21, 2024

Conversation

Kinglykrab
Copy link
Contributor

Perl

  • Add $mob->GetHateListCount().
  • Add $mob->GetHateListBotCount().
  • Add $mob->GetHateListClientCount().
  • Add $mob->GetHateListNPCCount().

Lua

  • Add mob:GetHateListCount().
  • Add mob:GetHateListBotCount().
  • Add mob:GetHateListClientCount().
  • Add mob:GetHateListNPCCount().

Perl Example Script

sub EVENT_SAY {
	if ($text=~/#a/i) {
		my $h = $client->GetTarget() ? $client->GetTarget()->GetHateListCount() : 0;
		my $b = $client->GetTarget() ? $client->GetTarget()->GetHateListBotCount() : 0;
		my $c = $client->GetTarget() ? $client->GetTarget()->GetHateListClientCount() : 0;
		my $n = $client->GetTarget() ? $client->GetTarget()->GetHateListNPCCount() : 0;
		quest::message(315, "H: $h B: $b C: $c N: $n");
	}
}

Image

image

Notes

  • Allows operators to more easily get a total entity count of a Mob's hate list, can do an overall count, or specifically bots, clients, or NPCs.

# Perl
- Add `$mob->GetHateListCount()`.# Perl
- Add `$mob->GetHateListCount()`.
- Add `$mob->GetHateListBotCount()`.
- Add `$mob->GetHateListClientCount()`.
- Add `$mob->GetHateListNPCCount()`.

# Lua
- Add `mob:GetHateListCount()`.
- Add `mob:GetHateListBotCount()`.
- Add `mob:GetHateListClientCount()`.
- Add `mob:GetHateListNPCCount()`.

# Notes
- Allows operators to more easily get a total entity count of a Mob's hate list, can do an overall count, or specifically bots, clients, or NPCs.
@Akkadius Akkadius merged commit 67d8250 into master Feb 21, 2024
2 checks passed
@Akkadius Akkadius deleted the quest_api/hatelist_count branch February 21, 2024 04:39
@Akkadius Akkadius mentioned this pull request Feb 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants