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
Atcommand
Documentation
Script
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