{"action":"created","issue":{"url":"https://api.github.com/repos/HerculesWS/Hercules/issues/1589","repository_url":"https://api.github.com/repos/HerculesWS/Hercules","labels_url":"https://api.github.com/repos/HerculesWS/Hercules/issues/1589/labels{/name}","comments_url":"https://api.github.com/repos/HerculesWS/Hercules/issues/1589/comments","events_url":"https://api.github.com/repos/HerculesWS/Hercules/issues/1589/events","html_url":"https://github.com/HerculesWS/Hercules/pull/1589","id":210253917,"number":1589,"title":"allow strcharinfo() and strnpcinfo() to take a GID","user":{"login":"mekolat","id":3507758,"avatar_url":"https://avatars.githubusercontent.com/u/3507758?v=3","gravatar_id":"","url":"https://api.github.com/users/mekolat","html_url":"https://github.com/mekolat","followers_url":"https://api.github.com/users/mekolat/followers","following_url":"https://api.github.com/users/mekolat/following{/other_user}","gists_url":"https://api.github.com/users/mekolat/gists{/gist_id}","starred_url":"https://api.github.com/users/mekolat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mekolat/subscriptions","organizations_url":"https://api.github.com/users/mekolat/orgs","repos_url":"https://api.github.com/users/mekolat/repos","events_url":"https://api.github.com/users/mekolat/events{/privacy}","received_events_url":"https://api.github.com/users/mekolat/received_events","type":"User","site_admin":false},"labels":[{"id":264336620,"url":"https://api.github.com/repos/HerculesWS/Hercules/labels/status:code-review","name":"status:code-review","color":"bfe5bf","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2017-02-25T18:54:32Z","updated_at":"2017-02-26T20:26:52Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/HerculesWS/Hercules/pulls/1589","html_url":"https://github.com/HerculesWS/Hercules/pull/1589","diff_url":"https://github.com/HerculesWS/Hercules/pull/1589.diff","patch_url":"https://github.com/HerculesWS/Hercules/pull/1589.patch"},"body":"`strcharinfo()` and `strnpcinfo()` can now work without an attached rid, and can get details from another GID than the attached pc/npc. It can also return a default value if the attached or target gid is not found.\r\n\r\n* `strcharinfo(0)` will return the name of the attached player, or an empty string if there is no attached player\r\n* `strcharinfo(0, \"foobar\")` will return the name of the attached player, or `foobar` if there is no attached player\r\n* `strcharinfo(0, \"foobar\", id)` will return the name of the player with account id `id`, or `foobar` if the player could not be found\r\n\r\n<!-- Reviewable:start -->\r\n---\r\nThis change is [<img src=\"https://reviewable.io/review_button.svg\" height=\"34\" align=\"absmiddle\" alt=\"Reviewable\"/>](https://reviewable.io/reviews/herculesws/hercules/1589)\r\n<!-- Reviewable:end -->\r\n"},"comment":{"url":"https://api.github.com/repos/HerculesWS/Hercules/issues/comments/282584563","html_url":"https://github.com/HerculesWS/Hercules/pull/1589#issuecomment-282584563","issue_url":"https://api.github.com/repos/HerculesWS/Hercules/issues/1589","id":282584563,"user":{"login":"mekolat","id":3507758,"avatar_url":"https://avatars.githubusercontent.com/u/3507758?v=3","gravatar_id":"","url":"https://api.github.com/users/mekolat","html_url":"https://github.com/mekolat","followers_url":"https://api.github.com/users/mekolat/followers","following_url":"https://api.github.com/users/mekolat/following{/other_user}","gists_url":"https://api.github.com/users/mekolat/gists{/gist_id}","starred_url":"https://api.github.com/users/mekolat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mekolat/subscriptions","organizations_url":"https://api.github.com/users/mekolat/orgs","repos_url":"https://api.github.com/users/mekolat/repos","events_url":"https://api.github.com/users/mekolat/events{/privacy}","received_events_url":"https://api.github.com/users/mekolat/received_events","type":"User","site_admin":false},"created_at":"2017-02-26T20:26:52Z","updated_at":"2017-02-26T20:26:52Z","body":"@MishimaHaruna in [TMWA](https://github.com/themanaworld/tmwa) we had commands that allowed to get/set pretty much anything from anything.\r\n- `get(BL_ID, \"player name\")`\r\n- `set Hp, value, \"player name\";`\r\n\r\nand also the params were all exposed so you were able to do things like\r\n- `if (Hp >= (MaxHp / 2))`\r\n- `Sex = 3;`\r\n\r\nit seems #1584 does something similar, and it could easily be extended to return strings too instead of just integers"}}
{"actor":{"display_login":"mekolat"}}