-
Notifications
You must be signed in to change notification settings - Fork 772
Adds buildin_getguildonline. #2290
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
Conversation
|
well, in other way, vending player does consider online too ... it kinda beat the purpose aren't? |
|
|
||
| --------------------------------------- | ||
|
|
||
| *getguildonline(<guild id>{, <type>}); |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
src/map/script.c
Outdated
| if (script_hasdata(st, 3)) | ||
| type = script_getnum(st, 3); | ||
|
|
||
| if (type == 1) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and here better use constants too
src/map/script.c
Outdated
| struct map_session_data *sd; | ||
| for (int i = 0; i < MAX_GUILD; i++) { | ||
| sd = g->member[i].sd; | ||
| if (sd != NULL && sd->state.vending == 0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
probably also better check g->member[i].online
cb1d089 to
a5b4c3d
Compare
|
not really sure about this, but this feels like open a Pandora box oh and .... event script included !! what else ? ok serious, If I actually want to write this for my private MVP room, OH AND ... if I have guild castle instance script, |
|
I do agree, some commands can be useful like: But I don't think we need instance based commands. Also all other things you mentioned can be done with getunits command |
why not ? this script command looks custom enough, and not use in any official script just the example I said, an instance guild base Detailshttps://raw.githubusercontent.com/AnnieRuru/customs/master/screenshots/screen2019Hercules005.jpg have fun shorten these lines into a single script command |
Signed-off-by: Haru <[email protected]>
a5b4c3d to
d9b7fa4
Compare
Pull Request Prelude
Changes Proposed
Adds BUILDIN(getguildonline) which returns the amount of players online in a guild.
Optional param for type, which will exclude vendor characters from the count.
Returns -1 if guild not found.
I know
getguildmember()can perform this functionality, but this is quicker and cleaner for scripters IMO.Affected Branches:
Issues addressed:
N/A
Known Issues and TODO List
N/A