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 Timer related methods to Mobs in Perl/Lua #3133

Merged
merged 3 commits into from Mar 20, 2023

Conversation

Kinglykrab
Copy link
Contributor

@Kinglykrab Kinglykrab commented Mar 20, 2023

Perl

  • Add quest::ispausedtimer(timer_name).
  • Add quest::pausetimer(timer_name).
  • Add quest::resumetimer(timer_name).
  • Add $mob->GetRemainingTimeMS(timer_name).
  • Add $mob->GetTimerDurationMS(timer_name).
  • Add $mob->HasTimer(timer_name).
  • Add $mob->IsPausedTimer(timer_name).
  • Add $mob->PauseTimer(timer_name).
  • Add $mob->ResumeTimer(timer_name).
  • Add $mob->SetTimer(timer_name).
  • Add $mob->SetTimerMS(timer_name).
  • Add $mob->StopAllTimers().
  • Add $mob->StopTimer(timer_name).

Lua

  • Add mob:GetRemainingTimeMS(timer_name).
  • Add mob:GetTimerDurationMS(timer_name).
  • Add mob:HasTimer(timer_name).
  • Add mob:IsPausedTimer(timer_name).
  • Add mob:PauseTimer(timer_name).
  • Add mob:ResumeTimer(timer_name).
  • Add mob:SetTimer(timer_name).
  • Add mob:SetTimerMS(timer_name).
  • Add mob:StopAllTimers().
  • Add mob:StopTimer(timer_name).

Notes

  • The mob-based methods allow operators to loop entity list or whatever to set, stop, resume, pause, etc for timers.

# Perl
- Add `quest::ispausedtimer(timer_name)`.
- Add `quest::pausetimer(timer_name)`.
- Add `quest::resumetimer(timer_name)`.
- Add `$mob->GetRemainingTimeMS(timer_name)`.
- Add `$mob->GetTimerDurationMS(timer_name)`.
- Add `$mob->HasTimer(timer_name)`.
- Add `$mob->IsPausedTimer(timer_name)`.
- Add `$mob->PauseTimer(timer_name)`.
- Add `$mob->ResumeTimer(timer_name)`.
- Add `$mob->SetTimer(timer_name)`.
- Add `$mob->SetTimerMS(timer_name)`.
- Add `$mob->StopTimer(timer_name)`.

# Lua
- Add `mob:GetRemainingTimeMS(timer_name)`.
- Add `mob:GetTimerDurationMS(timer_name)`.
- Add `mob:HasTimer(timer_name)`.
- Add `mob:IsPausedTimer(timer_name)`.
- Add `mob:PauseTimer(timer_name)`.
- Add `mob:ResumeTimer(timer_name)`.
- Add `mob:SetTimer(timer_name)`.
- Add `mob:SetTimerMS(timer_name)`.
- Add `mob:StopTimer(timer_name)`.

# Notes
- The mob-based methods allow operators to loop entity list or whatever to set, stop, resume, pause, etc for timers.
@Kinglykrab Kinglykrab merged commit 4fe44f4 into master Mar 20, 2023
@Kinglykrab Kinglykrab deleted the quest_api/timer_methods_perl_lua branch March 20, 2023 20:18
nytmyr pushed a commit to nytmyr/Server that referenced this pull request Mar 23, 2023
* [Quest API] Add Timer related methods to Mobs in Perl/Lua

- Add `quest::ispausedtimer(timer_name)`.
- Add `quest::pausetimer(timer_name)`.
- Add `quest::resumetimer(timer_name)`.
- Add `$mob->GetRemainingTimeMS(timer_name)`.
- Add `$mob->GetTimerDurationMS(timer_name)`.
- Add `$mob->HasTimer(timer_name)`.
- Add `$mob->IsPausedTimer(timer_name)`.
- Add `$mob->PauseTimer(timer_name)`.
- Add `$mob->ResumeTimer(timer_name)`.
- Add `$mob->SetTimer(timer_name)`.
- Add `$mob->SetTimerMS(timer_name)`.
- Add `$mob->StopTimer(timer_name)`.

- Add `mob:GetRemainingTimeMS(timer_name)`.
- Add `mob:GetTimerDurationMS(timer_name)`.
- Add `mob:HasTimer(timer_name)`.
- Add `mob:IsPausedTimer(timer_name)`.
- Add `mob:PauseTimer(timer_name)`.
- Add `mob:ResumeTimer(timer_name)`.
- Add `mob:SetTimer(timer_name)`.
- Add `mob:SetTimerMS(timer_name)`.
- Add `mob:StopTimer(timer_name)`.

- The mob-based methods allow operators to loop entity list or whatever to set, stop, resume, pause, etc for timers.

* StopAllTimers()

* Update questmgr.cpp
@Aeadoin Aeadoin mentioned this pull request Mar 24, 2023
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