darking123 Posted September 29, 2014 Group: Members Topic Count: 318 Topics Per Day: 0.07 Content Count: 931 Reputation: 13 Joined: 12/20/11 Last Seen: November 21, 2020 Share Posted September 29, 2014 when a player login. @dropoff is automatically initiated. functions of drop off and drop on drop off= any item cannot be drop but can be stored to the storage and can be sold. drop on= can drop the item and etc. AnnieRuru made a .diff for hercules only if someone can convert this to rathena i'll be glad. src/map/atcommand.c | 26 ++++++++++++++++++++++++++ src/map/pc.c | 5 +++++ src/map/pc.h | 2 ++ 3 files changed, 33 insertions(+) diff --git a/src/map/atcommand.c b/src/map/atcommand.c index b5e8fa7..af092eb 100644 --- a/src/map/atcommand.c +++ b/src/map/atcommand.c @@ -9374,6 +9374,31 @@ static inline void atcmd_channel_help(int fd, const char *command, bool can_crea clif->message(fd,atcmd_output); return true; } + +ACMD(drop) { + if ( stristr( message, "on" ) ) { + if ( sd->candrop ) + clif->message( fd, "You already turn on @drop." ); + else { + sd->candrop = 1; + clif->message( fd, "You are now turn ON @drop. You can drop items now." ); + } + } + else if ( stristr( message, "off" ) ) { + if ( !sd->candrop ) + clif->message( fd, "You already turn off @drop" ); + else { + sd->candrop = 0; + clif->message( fd, "You are now turn OFF @drop. You can't drop items now." ); + } + } + else { + clif->message( fd, "Syntax: @drop on|off." ); + return false; + } + return true; +} + /** * Fills the reference of available commands in atcommand DBMap **/ @@ -9384,6 +9409,7 @@ void atcommand_basecommands(void) { * Command reference list, place the base of your commands here **/ AtCommandInfo atcommand_base[] = { + ACMD_DEF(drop), ACMD_DEF2("warp", mapmove), ACMD_DEF(where), ACMD_DEF(jumpto), diff --git a/src/map/pc.c b/src/map/pc.c index 2372d31..1c0c934 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -4123,6 +4123,11 @@ int pc_dropitem(struct map_session_data *sd,int n,int amount) return 0; //Can't drop items in nodrop mapflag maps. } + if ( !sd->candrop ) { + clif->message( sd->fd, "You can't drop items. Type '@drop on' to allow drop items." ); + return 0; + } + if( !pc->candrop(sd,&sd->status.inventory[n]) ) { clif->message (sd->fd, msg_txt(263)); diff --git a/src/map/pc.h b/src/map/pc.h index bec4522..c84c9a3 100644 --- a/src/map/pc.h +++ b/src/map/pc.h @@ -547,6 +547,8 @@ struct map_session_data { const char* delunit_prevfile; int delunit_prevline; + bool candrop; + }; #define EQP_WEAPON EQP_HAND_R Quote Link to comment Share on other sites More sharing options...
Emistry Posted September 29, 2014 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10018 Reputation: 2370 Joined: 10/28/11 Last Seen: Sunday at 05:32 PM Share Posted September 29, 2014 For your information, if you're using newer client .ex 2013. You dont even need a source mod to enable this feature. Quote Link to comment Share on other sites More sharing options...
AnnieRuru Posted September 29, 2014 Group: Members Topic Count: 18 Topics Per Day: 0.00 Content Count: 2044 Reputation: 682 Joined: 10/09/12 Last Seen: December 20, 2020 Share Posted September 29, 2014 For your information, if you're using newer client .ex 2013. You dont even need a source mod to enable this feature. I'm using 20140115 and I don't see anywhere the client having this feature though Quote Link to comment Share on other sites More sharing options...
Emistry Posted September 29, 2014 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10018 Reputation: 2370 Joined: 10/28/11 Last Seen: Sunday at 05:32 PM Share Posted September 29, 2014 (edited) For your information, if you're using newer client .ex 2013. You dont even need a source mod to enable this feature. I'm using 20140115 and I don't see anywhere the client having this feature though your inventory window .... bottom left corner... "Lock Item Drop" Edited September 29, 2014 by Emistry added image 1 Quote Link to comment Share on other sites More sharing options...
brunoshp Posted September 29, 2014 Group: Members Topic Count: 64 Topics Per Day: 0.01 Content Count: 180 Reputation: 7 Joined: 12/19/12 Last Seen: November 21, 2024 Share Posted September 29, 2014 kkkkkkkk a good code but a old command, in alt+e have this func. Quote Link to comment Share on other sites More sharing options...
darking123 Posted September 30, 2014 Group: Members Topic Count: 318 Topics Per Day: 0.07 Content Count: 931 Reputation: 13 Joined: 12/20/11 Last Seen: November 21, 2020 Author Share Posted September 30, 2014 For your information, if you're using newer client .ex 2013. You dont even need a source mod to enable this feature. I'm using 20100730 sir Quote Link to comment Share on other sites More sharing options...
Question
darking123
when a player login. @dropoff is automatically initiated.
functions of drop off and drop on
drop off= any item cannot be drop but can be stored to the storage and can be sold.
drop on= can drop the item and etc.
AnnieRuru made a .diff for hercules only if someone can convert this to rathena i'll be glad.
Link to comment
Share on other sites
5 answers to this question
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.