Xantara Posted December 19, 2011 Group: Members Topic Count: 20 Topics Per Day: 0.00 Content Count: 243 Reputation: 206 Joined: 11/28/11 Last Seen: February 13, 2023 Share Posted December 19, 2011 File Name: [Package] @itemmap & getitem_map() File Submitter: Xantara File Submitted: 18 Dec 2011 File Category: Source Modifications Content Author: Xantara Information This command will give a specific amount of specified items to all players on the map. I tried to make it a bit more challenging for myself so I have added the capability of giving the same party or guild members of that specific map as well. Makes it easier to script stuff such as events especially those including parties and guilds to participate. Atcommand version now available! Tested on rAthena Trunk 17062 Syntax Script *getitem_map <item id>,<amount>,"<mapname>"{,<type>,<ID for Type>}; Atcommand @itemmap <item id/name> {<amount>} @itemmap1 <item id/name> <amount>, <party name> @itemmap2 <item id/name> <amount>, <guild name> Documentation Script *getitem_map <item id>,<amount>,"<mapname>"{,<type>,<ID for Type>};This command will give a specific amount of specified items to the players on the specified map. Works similarly to getitem but for multiple players on certain map. Negative ID numbers also apply. However item name is currently not supported. Those parameters that are different from 'getitem' are: mapname - Map name of the players to give the item(s) too type - Optional. 0 = everyone on the map (default) 1 = specific party and their members on the map 2 = specific guild and their members on the map 3 = specific battleground team and their members on the map [*]ID for Type - Only needed if type is not 0 If type = 1, ID is Party ID If type = 2, ID is Guild ID If type = 3, ID is Battleground ID If type is given, party members who are offline or are not on the specific map do not get the item. Same for guild members. If BG ID is not found, it will not give to any players. This transaction is logged if the log script generated transactions option is enabled. Created by Xantara Example: Script Command (also found in doc/sample/npc_getitem_map.txt) // Sample NPC to test the custom getitem_map script command // Script and command created by Xantara prontera,156,170,3 script getitem_map test 120,{ mes "input item id"; next; input .@id; mes "input item amount"; next; input .@amt; mes "input type:"; mes "0=everyone, 1=party, 2=guild 3=bg"; next; input .@t; //getitem_map .@id,.@amt,strcharinfo(3),.@t,((.@t==1) ? getcharid(1) : (.@t==2) ? getcharid(2) : getcharid(4)); switch(.@t) { case 1: set .@type_id, getcharid(1); break; case 2: set .@type_id, getcharid(2); break; case 3: set .@type_id, getcharid(4); break; } getitem_map .@id,.@amt,strcharinfo(3),.@t,.@type_id; mes "done"; close; } Atcommand // Everyone one the same map as the who called this command will get 1 Jellopy (ID#607) @itemmap 607 // Everyone one the same map as the who called this command will get 5 Jellopy (ID#607) @itemmap 607 5 // Players who are in the party "myParty" and on the same map as the who called this command will get 2 Yggdrasil Berry (ID#608) @itemmap1 608 2, myParty // Players who are in the guild "hisGuild" and on the same map as the who called this command will get 3 Jellopy @itemmap2 "jellopy" 3, hisGuild Credits Created by Xantara BG Support Suggestion/Idea by Silvester Atcommand Suggestion/Idea by Mysterious Mirror http://downloads.artistic-coder.com/download.php?file=package_getitem_map_v2.0.1_%5BXantara%5D.patch This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License. Do not mirror without my consent. Click here to download this file 6 Quote Link to comment Share on other sites More sharing options...
Mystery Posted December 19, 2011 Group: Members Topic Count: 94 Topics Per Day: 0.02 Content Count: 2192 Reputation: 253 Joined: 11/11/11 Last Seen: June 24, 2020 Share Posted December 19, 2011 (edited) So basically, if you enter the party ID number, only players who are ON the map that are in a PARTY will only get the items? Also, is it possible to make it a command too? Edited December 19, 2011 by Mysterious Quote Link to comment Share on other sites More sharing options...
Xantara Posted December 19, 2011 Group: Members Topic Count: 20 Topics Per Day: 0.00 Content Count: 243 Reputation: 206 Joined: 11/28/11 Last Seen: February 13, 2023 Author Share Posted December 19, 2011 @download, there is a current bug with uploading new versions so currently the download for this is currently unavailable. The bug has been reported though. Yes, Mysterious, that is how it works. =) It is possible for it to be a command. However, I would assume that the extra functionality (the part where you can choose to give to a party, guild, or bg team) would hardly be used since finding the party/guild/bg id would be difficult in-game? Quote Link to comment Share on other sites More sharing options...
Mystery Posted December 19, 2011 Group: Members Topic Count: 94 Topics Per Day: 0.02 Content Count: 2192 Reputation: 253 Joined: 11/11/11 Last Seen: June 24, 2020 Share Posted December 19, 2011 Well yeah indeed it would be. However, if the GM is currently on the map where 20+ people currently are doing the event and the GM wants everyone to win, well, @itemmap (or something) Jellopy 5, etc. xD Quote Link to comment Share on other sites More sharing options...
Xantara Posted December 20, 2011 Group: Members Topic Count: 20 Topics Per Day: 0.00 Content Count: 243 Reputation: 206 Joined: 11/28/11 Last Seen: February 13, 2023 Author Share Posted December 20, 2011 I uploaded the source modification so it should now be available for download. As a note, the upload new versions function is still bugged. But being worked on. I'll probably be testing on this file so if it suddenly disappears, check again soon and it should be back~ @Mysterious, Ah yea, that'd be useful. I guess it still could have the party or guild in the command using their party/guild name =) Quote Link to comment Share on other sites More sharing options...
Mystery Posted December 20, 2011 Group: Members Topic Count: 94 Topics Per Day: 0.02 Content Count: 2192 Reputation: 253 Joined: 11/11/11 Last Seen: June 24, 2020 Share Posted December 20, 2011 I uploaded the source modification so it should now be available for download. As a note, the upload new versions function is still bugged. But being worked on. I'll probably be testing on this file so if it suddenly disappears, check again soon and it should be back~ @Mysterious, Ah yea, that'd be useful. I guess it still could have the party or guild in the command using their party/guild name =) Something to look forward for the future Hopefully you come up with something xD Quote Link to comment Share on other sites More sharing options...
brianj070707 Posted February 17, 2012 Group: Members Topic Count: 18 Topics Per Day: 0.00 Content Count: 48 Reputation: 0 Joined: 01/21/12 Last Seen: July 27, 2012 Share Posted February 17, 2012 good luck on this! I am waiting if there's a possible @command feature or whisper system. Quote Link to comment Share on other sites More sharing options...
Xantara Posted February 21, 2012 Group: Members Topic Count: 20 Topics Per Day: 0.00 Content Count: 243 Reputation: 206 Joined: 11/28/11 Last Seen: February 13, 2023 Author Share Posted February 21, 2012 Well, I forgot about the atcommand suggestion xD; Oppss.. Better late than never right? Anyways, I've updated this source modification to a package that includes both getitem_map script command and itemmap/1/2 atcommand. There were changes to the rAthena SVN that affected the previous versions so this update also provides a fix to make it work on the latest revision (r15625). The documentation might be a bit more confusing now so let me know if there is anything uncertain. 1 Quote Link to comment Share on other sites More sharing options...
brianj070707 Posted February 21, 2012 Group: Members Topic Count: 18 Topics Per Day: 0.00 Content Count: 48 Reputation: 0 Joined: 01/21/12 Last Seen: July 27, 2012 Share Posted February 21, 2012 (edited) So we will just add this at command function right? cause I have already added the get_item_map sources before. BTW. Thank you so much for this. EDIT: I added only the atcommand.c and got this atcommand.c: In function ‘atcommand_itemmap’: atcommand.c:9337: error: ‘LOG_TYPE_COMMAND’ undeclared (first use in this function) atcommand.c:9337: error: (Each undeclared identifier is reported only once atcommand.c:9337: error: for each function it appears in.) atcommand.c:9337: error: too many arguments to function ‘pc_getitem_map’ atcommand.c:9347: error: too many arguments to function ‘pc_getitem_map’ atcommand.c:9354: error: too many arguments to function ‘pc_getitem_map’ make[1]: *** [obj_sql/atcommand.o] Error 1 make[1]: Leaving directory `/opt/test1/src/map' using 3ceam661 Edited February 21, 2012 by brianj070707 Quote Link to comment Share on other sites More sharing options...
Xantara Posted February 21, 2012 Group: Members Topic Count: 20 Topics Per Day: 0.00 Content Count: 243 Reputation: 206 Joined: 11/28/11 Last Seen: February 13, 2023 Author Share Posted February 21, 2012 So we will just add this at command function right? cause I have already added the get_item_map sources before. BTW. Thank you so much for this. EDIT: I added only the atcommand.c and got this ... using 3ceam661 Hi, rAthena changed some parts of how it logs items so I changed some of the functions to make it work with it. Therefore, the patch will only work with rA SVNs and not with any other (eA, 3ceAm, etc). Regards, - Xantara Quote Link to comment Share on other sites More sharing options...
brianj070707 Posted February 22, 2012 Group: Members Topic Count: 18 Topics Per Day: 0.00 Content Count: 48 Reputation: 0 Joined: 01/21/12 Last Seen: July 27, 2012 Share Posted February 22, 2012 NOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO Maybe I should try the NPC version of your's, if didn't works it just says. The whole script is rA version. Quote Link to comment Share on other sites More sharing options...
java Posted February 24, 2012 Group: Members Topic Count: 25 Topics Per Day: 0.01 Content Count: 251 Reputation: 20 Joined: 12/22/11 Last Seen: July 23, 2023 Share Posted February 24, 2012 (edited) well done Tested on rAthena Trunk 15627 Edited February 24, 2012 by kurodikku 1 Quote Link to comment Share on other sites More sharing options...
sunzrxz Posted June 17, 2012 Group: Members Topic Count: 3 Topics Per Day: 0.00 Content Count: 10 Reputation: 3 Joined: 05/26/12 Last Seen: May 16, 2023 Share Posted June 17, 2012 thanks thanks very mnuch Quote Link to comment Share on other sites More sharing options...
Xantara Posted June 29, 2012 Group: Members Topic Count: 20 Topics Per Day: 0.00 Content Count: 243 Reputation: 206 Joined: 11/28/11 Last Seen: February 13, 2023 Author Share Posted June 29, 2012 So, I found out that someone was asking Zephyrus to add my work, this package in particular, to his eAmod. I was thinking of just removing this download but that would stop other members from using this. Instead, I'm asking the users to please stop. I did not make this, nor any of my other free downloads, just so that they can be added to someone else's work and get paid for it. Quote Link to comment Share on other sites More sharing options...
Cydh Posted September 7, 2012 Group: Developer Topic Count: 153 Topics Per Day: 0.03 Content Count: 2285 Reputation: 747 Joined: 06/16/12 Last Seen: February 21 Share Posted September 7, 2012 nice.. Quote Link to comment Share on other sites More sharing options...
Currently Posted December 26, 2012 Group: Members Topic Count: 162 Topics Per Day: 0.03 Content Count: 313 Reputation: 1 Joined: 01/22/12 Last Seen: November 17, 2023 Share Posted December 26, 2012 I tried to patch it.. is this the correct way? Right click -> SVN Checkout -> Apply Patch. then idk where or which folder.. i tried to select "src" but it kept saying working memory lol Quote Link to comment Share on other sites More sharing options...
Xantara Posted December 29, 2012 Group: Members Topic Count: 20 Topics Per Day: 0.00 Content Count: 243 Reputation: 206 Joined: 11/28/11 Last Seen: February 13, 2023 Author Share Posted December 29, 2012 I tried to patch it.. is this the correct way? Right click -> SVN Checkout -> Apply Patch. then idk where or which folder.. i tried to select "src" but it kept saying working memory lol It seems like I didn't "follow" this topic either...Yes, right-click your rAthena SVN folder, click Apply Patch. Then find the patch provided in the download. Then select "patch all files". Quote Link to comment Share on other sites More sharing options...
DeveloperNewbie Posted January 30, 2013 Group: Members Topic Count: 8 Topics Per Day: 0.00 Content Count: 20 Reputation: 2 Joined: 01/16/13 Last Seen: February 14, 2022 Share Posted January 30, 2013 what if it is not successful? what will i do? i'm nervous applying this patch. because i don't know what files should i back up for in case of emergency. can you test it in rA17098? Quote Link to comment Share on other sites More sharing options...
OrengJ Posted January 30, 2013 Group: Members Topic Count: 1 Topics Per Day: 0.00 Content Count: 17 Reputation: 1 Joined: 08/04/12 Last Seen: February 6 Share Posted January 30, 2013 Just backup your src folder in case of failure Quote Link to comment Share on other sites More sharing options...
DeveloperNewbie Posted January 30, 2013 Group: Members Topic Count: 8 Topics Per Day: 0.00 Content Count: 20 Reputation: 2 Joined: 01/16/13 Last Seen: February 14, 2022 Share Posted January 30, 2013 ow. Ok Quote Link to comment Share on other sites More sharing options...
Kringle Posted May 3, 2013 Group: Members Topic Count: 10 Topics Per Day: 0.00 Content Count: 34 Reputation: 1 Joined: 06/14/12 Last Seen: May 3, 2020 Share Posted May 3, 2013 Not working on r17235.Rejected Patch Hunks for script.c Rejected Patch Hunks for pc.h / pc.c Rejected Patch Hunks for script_commands.txt Rejected Patch Hunks for atcommand.c Quote Link to comment Share on other sites More sharing options...
Xantara Posted May 10, 2013 Group: Members Topic Count: 20 Topics Per Day: 0.00 Content Count: 243 Reputation: 206 Joined: 11/28/11 Last Seen: February 13, 2023 Author Share Posted May 10, 2013 Not working on r17235. Rejected Patch Hunks for script.c Rejected Patch Hunks for pc.h / pc.c Rejected Patch Hunks for script_commands.txt Rejected Patch Hunks for atcommand.c Thanks, I'll update it when I can. Quote Link to comment Share on other sites More sharing options...
Kringle Posted June 14, 2013 Group: Members Topic Count: 10 Topics Per Day: 0.00 Content Count: 34 Reputation: 1 Joined: 06/14/12 Last Seen: May 3, 2020 Share Posted June 14, 2013 Please update to r17362. Thanks in advance! Quote Link to comment Share on other sites More sharing options...
TwiztidSinX Posted June 23, 2013 Group: Members Topic Count: 2 Topics Per Day: 0.00 Content Count: 13 Reputation: 3 Joined: 06/11/13 Last Seen: August 21, 2015 Share Posted June 23, 2013 Not working on r17235. Rejected Patch Hunks for script.c Rejected Patch Hunks for pc.h / pc.c Rejected Patch Hunks for script_commands.txt Rejected Patch Hunks for atcommand.c Just add it manually, I just tested it on rAthena 17352 and the only issues it had were 1>..\src\map\atcommand.c(1347): warning C4003: not enough actual parameters for macro 'msg_txt' 1>..\src\map\atcommand.c(1347): warning C4047: 'function' : 'map_session_data *' differs in levels of indirection from 'int' 1>..\src\map\atcommand.c(1347): warning C4024: 'map_msg_txt' : different types for formal and actual parameter 1 1>..\src\map\atcommand.c(1347): error C2059: syntax error : ')' 1>..\src\map\atcommand.c(1357): warning C4003: not enough actual parameters for macro 'msg_txt' 1>..\src\map\atcommand.c(1357): warning C4047: 'function' : 'map_session_data *' differs in levels of indirection from 'int' 1>..\src\map\atcommand.c(1357): warning C4024: 'map_msg_txt' : different types for formal and actual parameter 1 1>..\src\map\atcommand.c(1357): error C2059: syntax error : ')' 1>..\src\map\atcommand.c(1375): warning C4003: not enough actual parameters for macro 'msg_txt' 1>..\src\map\atcommand.c(1375): warning C4047: 'function' : 'map_session_data *' differs in levels of indirection from 'int' 1>..\src\map\atcommand.c(1375): warning C4024: 'map_msg_txt' : different types for formal and actual parameter 1 1>..\src\map\atcommand.c(1375): error C2059: syntax error : ')' Which is actually a simple fix it just means take these three lines clif_displaymessage(fd, msg_txt(96)); // Incorrect name or ID, or no one from the party is online. clif_displaymessage(fd, msg_txt(94)); // Incorrect name/ID, or no one from the guild is online. clif_displaymessage(fd, msg_txt(18)); // Item created. And change them to clif_displaymessage(fd, msg_txt(sd,96)); // Incorrect name or ID, or no one from the party is online. clif_displaymessage(fd, msg_txt(sd,94)); // Incorrect name/ID, or no one from the guild is online. clif_displaymessage(fd, msg_txt(sd,18)); // Item created. And it will run without errors Quote Link to comment Share on other sites More sharing options...
ajaytrix Posted July 19, 2013 Group: Members Topic Count: 30 Topics Per Day: 0.01 Content Count: 84 Reputation: 0 Joined: 03/29/12 Last Seen: February 15, 2017 Share Posted July 19, 2013 @Xantara I really want to use this! How can you patch/apply this manually? Requesting for detailed instruction! Thanks in advance! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.