{"action":"created","comment":{"url":"https://api.github.com/repos/HerculesWS/Hercules/pulls/comments/48445462","id":48445462,"diff_hunk":"@@ -9013,6 +9013,32 @@ BUILDIN(getgmlevel)\n \treturn true;\n }\n \n+/// set the group ID of the player.\n+/// setgroupid( <new group id>,{<account ID> or <Player Name>} )\n+/// return 1 on success, 0 if failed.\n+BUILDIN(setgroupid) {\n+\tTBL_PC* sd;\n+\tint new_group = 0;\n+\n+\tnew_group = script_getnum(st, 2);\n+\n+\tif (script_hasdata(st, 3)) {\n+\t\tif (script_isstringtype(st, 3))\n+\t\t\tsd = map->nick2sd(script_getstr(st, 3));\n+\t\telse\n+\t\t\tsd = map->id2sd(script_getnum(st, 3));\n+\t}\n+\telse\n+\t\tsd = script->rid2sd(st);\n+\n+\tif (sd == NULL)\n+\t\treturn false; // no player attached, report source","path":"src/map/script.c","position":23,"original_position":23,"commit_id":"81a801a55c6ccff155d4dc24a54595816c1b793c","original_commit_id":"81a801a55c6ccff155d4dc24a54595816c1b793c","user":{"login":"AnnieRuru","id":6211477,"avatar_url":"https://avatars.githubusercontent.com/u/6211477?v=3","gravatar_id":"","url":"https://api.github.com/users/AnnieRuru","html_url":"https://github.com/AnnieRuru","followers_url":"https://api.github.com/users/AnnieRuru/followers","following_url":"https://api.github.com/users/AnnieRuru/following{/other_user}","gists_url":"https://api.github.com/users/AnnieRuru/gists{/gist_id}","starred_url":"https://api.github.com/users/AnnieRuru/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AnnieRuru/subscriptions","organizations_url":"https://api.github.com/users/AnnieRuru/orgs","repos_url":"https://api.github.com/users/AnnieRuru/repos","events_url":"https://api.github.com/users/AnnieRuru/events{/privacy}","received_events_url":"https://api.github.com/users/AnnieRuru/received_events","type":"User","site_admin":false},"body":"`if (sd == NULL) return true;`\r\nsince the script->rid2sd already has `script->reportsrc(st);` function","created_at":"2015-12-26T07:20:52Z","updated_at":"2015-12-26T07:20:52Z","html_url":"https://github.com/HerculesWS/Hercules/pull/1022#discussion_r48445462","pull_request_url":"https://api.github.com/repos/HerculesWS/Hercules/pulls/1022","_links":{"self":{"href":"https://api.github.com/repos/HerculesWS/Hercules/pulls/comments/48445462"},"html":{"href":"https://github.com/HerculesWS/Hercules/pull/1022#discussion_r48445462"},"pull_request":{"href":"https://api.github.com/repos/HerculesWS/Hercules/pulls/1022"}}},"pull_request":{"url":"https://api.github.com/repos/HerculesWS/Hercules/pulls/1022","id":54598038,"html_url":"https://github.com/HerculesWS/Hercules/pull/1022","diff_url":"https://github.com/HerculesWS/Hercules/pull/1022.diff","patch_url":"https://github.com/HerculesWS/Hercules/pull/1022.patch","issue_url":"https://api.github.com/repos/HerculesWS/Hercules/issues/1022","number":1022,"state":"open","locked":false,"title":"Add *setgroupid script command.","user":{"login":"Emistry","id":1075099,"avatar_url":"https://avatars.githubusercontent.com/u/1075099?v=3","gravatar_id":"","url":"https://api.github.com/users/Emistry","html_url":"https://github.com/Emistry","followers_url":"https://api.github.com/users/Emistry/followers","following_url":"https://api.github.com/users/Emistry/following{/other_user}","gists_url":"https://api.github.com/users/Emistry/gists{/gist_id}","starred_url":"https://api.github.com/users/Emistry/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Emistry/subscriptions","organizations_url":"https://api.github.com/users/Emistry/orgs","repos_url":"https://api.github.com/users/Emistry/repos","events_url":"https://api.github.com/users/Emistry/events{/privacy}","received_events_url":"https://api.github.com/users/Emistry/received_events","type":"User","site_admin":false},"body":"Useful for scripts that temporary adjust the group id of players.\r\n\r\n## Example \r\n```\r\nprontera,155,181,5\tscript\tsetgroupid\t757,{\r\n\tmes \"Input new Group ID\";\r\n\tinput .@groupid,0,99;\r\n\r\n\tdispbottom \"Current Group ID : \"+getgroupid();\r\n\t.@ouput = setgroupid( .@groupid );\r\n\t// .@ouput = setgroupid( .@groupid,\"name\" );\r\n\t// .@ouput = setgroupid( .@groupid,2000000 );\r\n\t// .@ouput = setgroupid( .@groupid,strcharinfo(0) );\r\n\t// .@ouput = setgroupid( .@groupid,getcharid(3) );\r\n\tdispbottom \"> Update : \"+ ( .@ouput ? \"SUCCESS\":\"FAILED\" );\r\n\tdispbottom \"Latest Group ID : \"+getgroupid();\r\n\tclose;\r\n}\r\n```\r\n\r\n## Result\r\n![Image of Yaktocat](http://i.imgur.com/FgHx2Tn.png)","created_at":"2015-12-26T06:39:33Z","updated_at":"2015-12-26T07:20:52Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6d03a2f3535a6359bda7a1557fd3acc1d896662b","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/HerculesWS/Hercules/pulls/1022/commits","review_comments_url":"https://api.github.com/repos/HerculesWS/Hercules/pulls/1022/comments","review_comment_url":"https://api.github.com/repos/HerculesWS/Hercules/pulls/comments{/number}","comments_url":"https://api.github.com/repos/HerculesWS/Hercules/issues/1022/comments","statuses_url":"https://api.github.com/repos/HerculesWS/Hercules/statuses/81a801a55c6ccff155d4dc24a54595816c1b793c","head":{"label":"Emistry:scriptcommand_setgroupid","ref":"scriptcommand_setgroupid","sha":"81a801a55c6ccff155d4dc24a54595816c1b793c","user":{"login":"Emistry","id":1075099,"avatar_url":"https://avatars.githubusercontent.com/u/1075099?v=3","gravatar_id":"","url":"https://api.github.com/users/Emistry","html_url":"https://github.com/Emistry","followers_url":"https://api.github.com/users/Emistry/followers","following_url":"https://api.github.com/users/Emistry/following{/other_user}","gists_url":"https://api.github.com/users/Emistry/gists{/gist_id}","starred_url":"https://api.github.com/users/Emistry/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Emistry/subscriptions","organizations_url":"https://api.github.com/users/Emistry/orgs","repos_url":"https://api.github.com/users/Emistry/repos","events_url":"https://api.github.com/users/Emistry/events{/privacy}","received_events_url":"https://api.github.com/users/Emistry/received_events","type":"User","site_admin":false},"repo":{"id":43295819,"name":"Herc-master","full_name":"Emistry/Herc-master","owner":{"login":"Emistry","id":1075099,"avatar_url":"https://avatars.githubusercontent.com/u/1075099?v=3","gravatar_id":"","url":"https://api.github.com/users/Emistry","html_url":"https://github.com/Emistry","followers_url":"https://api.github.com/users/Emistry/followers","following_url":"https://api.github.com/users/Emistry/following{/other_user}","gists_url":"https://api.github.com/users/Emistry/gists{/gist_id}","starred_url":"https://api.github.com/users/Emistry/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Emistry/subscriptions","organizations_url":"https://api.github.com/users/Emistry/orgs","repos_url":"https://api.github.com/users/Emistry/repos","events_url":"https://api.github.com/users/Emistry/events{/privacy}","received_events_url":"https://api.github.com/users/Emistry/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Emistry/Herc-master","description":"Hercules is a collaborative software development project revolving around the creation of a robust massively multiplayer online role playing game (MMORPG) server package. Written in C, the program is very versatile and provides NPCs, warps and modifications. The project is jointly managed by a group of volunteers located around the world as well as a tremendous community providing QA and support. Hercules is a continuation of the original Athena project.","fork":true,"url":"https://api.github.com/repos/Emistry/Herc-master","forks_url":"https://api.github.com/repos/Emistry/Herc-master/forks","keys_url":"https://api.github.com/repos/Emistry/Herc-master/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Emistry/Herc-master/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Emistry/Herc-master/teams","hooks_url":"https://api.github.com/repos/Emistry/Herc-master/hooks","issue_events_url":"https://api.github.com/repos/Emistry/Herc-master/issues/events{/number}","events_url":"https://api.github.com/repos/Emistry/Herc-master/events","assignees_url":"https://api.github.com/repos/Emistry/Herc-master/assignees{/user}","branches_url":"https://api.github.com/repos/Emistry/Herc-master/branches{/branch}","tags_url":"https://api.github.com/repos/Emistry/Herc-master/tags","blobs_url":"https://api.github.com/repos/Emistry/Herc-master/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Emistry/Herc-master/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Emistry/Herc-master/git/refs{/sha}","trees_url":"https://api.github.com/repos/Emistry/Herc-master/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Emistry/Herc-master/statuses/{sha}","languages_url":"https://api.github.com/repos/Emistry/Herc-master/languages","stargazers_url":"https://api.github.com/repos/Emistry/Herc-master/stargazers","contributors_url":"https://api.github.com/repos/Emistry/Herc-master/contributors","subscribers_url":"https://api.github.com/repos/Emistry/Herc-master/subscribers","subscription_url":"https://api.github.com/repos/Emistry/Herc-master/subscription","commits_url":"https://api.github.com/repos/Emistry/Herc-master/commits{/sha}","git_commits_url":"https://api.github.com/repos/Emistry/Herc-master/git/commits{/sha}","comments_url":"https://api.github.com/repos/Emistry/Herc-master/comments{/number}","issue_comment_url":"https://api.github.com/repos/Emistry/Herc-master/issues/comments{/number}","contents_url":"https://api.github.com/repos/Emistry/Herc-master/contents/{+path}","compare_url":"https://api.github.com/repos/Emistry/Herc-master/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Emistry/Herc-master/merges","archive_url":"https://api.github.com/repos/Emistry/Herc-master/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Emistry/Herc-master/downloads","issues_url":"https://api.github.com/repos/Emistry/Herc-master/issues{/number}","pulls_url":"https://api.github.com/repos/Emistry/Herc-master/pulls{/number}","milestones_url":"https://api.github.com/repos/Emistry/Herc-master/milestones{/number}","notifications_url":"https://api.github.com/repos/Emistry/Herc-master/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Emistry/Herc-master/labels{/name}","releases_url":"https://api.github.com/repos/Emistry/Herc-master/releases{/id}","created_at":"2015-09-28T10:54:51Z","updated_at":"2015-09-28T10:56:07Z","pushed_at":"2015-12-26T07:04:32Z","git_url":"git://github.com/Emistry/Herc-master.git","ssh_url":"git@github.com:Emistry/Herc-master.git","clone_url":"https://github.com/Emistry/Herc-master.git","svn_url":"https://github.com/Emistry/Herc-master","homepage":"http://herc.ws","size":126879,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"HerculesWS:master","ref":"master","sha":"44832129713a048f27ad4ae464fb88fe5beecfe0","user":{"login":"HerculesWS","id":3220669,"avatar_url":"https://avatars.githubusercontent.com/u/3220669?v=3","gravatar_id":"","url":"https://api.github.com/users/HerculesWS","html_url":"https://github.com/HerculesWS","followers_url":"https://api.github.com/users/HerculesWS/followers","following_url":"https://api.github.com/users/HerculesWS/following{/other_user}","gists_url":"https://api.github.com/users/HerculesWS/gists{/gist_id}","starred_url":"https://api.github.com/users/HerculesWS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HerculesWS/subscriptions","organizations_url":"https://api.github.com/users/HerculesWS/orgs","repos_url":"https://api.github.com/users/HerculesWS/repos","events_url":"https://api.github.com/users/HerculesWS/events{/privacy}","received_events_url":"https://api.github.com/users/HerculesWS/received_events","type":"Organization","site_admin":false},"repo":{"id":7551429,"name":"Hercules","full_name":"HerculesWS/Hercules","owner":{"login":"HerculesWS","id":3220669,"avatar_url":"https://avatars.githubusercontent.com/u/3220669?v=3","gravatar_id":"","url":"https://api.github.com/users/HerculesWS","html_url":"https://github.com/HerculesWS","followers_url":"https://api.github.com/users/HerculesWS/followers","following_url":"https://api.github.com/users/HerculesWS/following{/other_user}","gists_url":"https://api.github.com/users/HerculesWS/gists{/gist_id}","starred_url":"https://api.github.com/users/HerculesWS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HerculesWS/subscriptions","organizations_url":"https://api.github.com/users/HerculesWS/orgs","repos_url":"https://api.github.com/users/HerculesWS/repos","events_url":"https://api.github.com/users/HerculesWS/events{/privacy}","received_events_url":"https://api.github.com/users/HerculesWS/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/HerculesWS/Hercules","description":"Hercules is a collaborative software development project revolving around the creation of a robust massively multiplayer online role playing game (MMORPG) server package. Written in C, the program is very versatile and provides NPCs, warps and modifications. The project is jointly managed by a group of volunteers located around the world as well as a tremendous community providing QA and support. Hercules is a continuation of the original Athena project.","fork":false,"url":"https://api.github.com/repos/HerculesWS/Hercules","forks_url":"https://api.github.com/repos/HerculesWS/Hercules/forks","keys_url":"https://api.github.com/repos/HerculesWS/Hercules/keys{/key_id}","collaborators_url":"https://api.github.com/repos/HerculesWS/Hercules/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/HerculesWS/Hercules/teams","hooks_url":"https://api.github.com/repos/HerculesWS/Hercules/hooks","issue_events_url":"https://api.github.com/repos/HerculesWS/Hercules/issues/events{/number}","events_url":"https://api.github.com/repos/HerculesWS/Hercules/events","assignees_url":"https://api.github.com/repos/HerculesWS/Hercules/assignees{/user}","branches_url":"https://api.github.com/repos/HerculesWS/Hercules/branches{/branch}","tags_url":"https://api.github.com/repos/HerculesWS/Hercules/tags","blobs_url":"https://api.github.com/repos/HerculesWS/Hercules/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/HerculesWS/Hercules/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/HerculesWS/Hercules/git/refs{/sha}","trees_url":"https://api.github.com/repos/HerculesWS/Hercules/git/trees{/sha}","statuses_url":"https://api.github.com/repos/HerculesWS/Hercules/statuses/{sha}","languages_url":"https://api.github.com/repos/HerculesWS/Hercules/languages","stargazers_url":"https://api.github.com/repos/HerculesWS/Hercules/stargazers","contributors_url":"https://api.github.com/repos/HerculesWS/Hercules/contributors","subscribers_url":"https://api.github.com/repos/HerculesWS/Hercules/subscribers","subscription_url":"https://api.github.com/repos/HerculesWS/Hercules/subscription","commits_url":"https://api.github.com/repos/HerculesWS/Hercules/commits{/sha}","git_commits_url":"https://api.github.com/repos/HerculesWS/Hercules/git/commits{/sha}","comments_url":"https://api.github.com/repos/HerculesWS/Hercules/comments{/number}","issue_comment_url":"https://api.github.com/repos/HerculesWS/Hercules/issues/comments{/number}","contents_url":"https://api.github.com/repos/HerculesWS/Hercules/contents/{+path}","compare_url":"https://api.github.com/repos/HerculesWS/Hercules/compare/{base}...{head}","merges_url":"https://api.github.com/repos/HerculesWS/Hercules/merges","archive_url":"https://api.github.com/repos/HerculesWS/Hercules/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/HerculesWS/Hercules/downloads","issues_url":"https://api.github.com/repos/HerculesWS/Hercules/issues{/number}","pulls_url":"https://api.github.com/repos/HerculesWS/Hercules/pulls{/number}","milestones_url":"https://api.github.com/repos/HerculesWS/Hercules/milestones{/number}","notifications_url":"https://api.github.com/repos/HerculesWS/Hercules/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/HerculesWS/Hercules/labels{/name}","releases_url":"https://api.github.com/repos/HerculesWS/Hercules/releases{/id}","created_at":"2013-01-11T00:29:38Z","updated_at":"2015-12-25T04:15:06Z","pushed_at":"2015-12-26T06:50:14Z","git_url":"git://github.com/HerculesWS/Hercules.git","ssh_url":"git@github.com:HerculesWS/Hercules.git","clone_url":"https://github.com/HerculesWS/Hercules.git","svn_url":"https://github.com/HerculesWS/Hercules","homepage":"http://herc.ws","size":140344,"stargazers_count":240,"watchers_count":240,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":367,"mirror_url":null,"open_issues_count":231,"forks":367,"open_issues":231,"watchers":240,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/HerculesWS/Hercules/pulls/1022"},"html":{"href":"https://github.com/HerculesWS/Hercules/pull/1022"},"issue":{"href":"https://api.github.com/repos/HerculesWS/Hercules/issues/1022"},"comments":{"href":"https://api.github.com/repos/HerculesWS/Hercules/issues/1022/comments"},"review_comments":{"href":"https://api.github.com/repos/HerculesWS/Hercules/pulls/1022/comments"},"review_comment":{"href":"https://api.github.com/repos/HerculesWS/Hercules/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/HerculesWS/Hercules/pulls/1022/commits"},"statuses":{"href":"https://api.github.com/repos/HerculesWS/Hercules/statuses/81a801a55c6ccff155d4dc24a54595816c1b793c"}}}}