Jump to content

Recommended Posts

Posted (edited)

Read First:

Lahat ng makiktia niyong "+" Sign aalisin niyo lng, nag lagay lng ako ng + sign para alam niyo kung ano ang idadagdag :)

Future: You might be disable @storage command or any item that can open storage.

this is helpful in woe session.

1st Step:

src/map/map.h

Find this line:

unsigned partylock :1;

unsigned guildlock :1;

Add to:

unsigned partylock :1;

unsigned guildlock :1;

+unsigned nostorage :1;

+unsigned noguildstorage :1;

------------------------------------------------------------

2nd Step:

src/map/npc.c

Find:

else if (!strcmpi(w3,"guildlock"))

map[m].flag.guildlock=state;

Add to:

else if (!strcmpi(w3,"guildlock"))

map[m].flag.guildlock=state;

+else if (!strcmpi(w3,"nostorage"))

+ map[m].flag.nostorage=state;

+else if (!strcmpi(w3,"noguildstorage"))

+ map[m].flag.noguildstorage=state;

[color=#ff0000][b]3rd Step:[/b][/color]

[b][u]src/map/script.c[/u][/b]

[b]Find:[/b] [b][u]src/map/script.c[/u][/b]

MF_GUILDLOCK,

[b]Add to:[/b]

MF_GUILDLOCK,

+MF_NOSTORAGE,

+MF_NOGUILDSTORAGE,

[color=#ff0000][b]Stay lng sa script.c[/b][/color]

[b]Find Again:[/b] [b][u]src/map/script.c[/u][/b]

case MF_GUILDLOCK: script_pushint(st,map[m].flag.guildlock); break;

[b]Add to:[/b]

case MF_GUILDLOCK: script_pushint(st,map[m].flag.guildlock); break;

+case MF_NOSTORAGE: script_pushint(st,map[m].flag.nostorage); break;

+case MF_NOGUILDSTORAGE: script_pushint(st,map[m].flag.noguildstorage); break;

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

[b]Find Again:[/b] [b][u]src/map/script.c[/u][/b]

case MF_GUILDLOCK: map[m].flag.guildlock=1; break;

[b]Add to:[/b]

case MF_GUILDLOCK: map[m].flag.guildlock=1; break;

+case MF_NOSTORAGE: map[m].flag.nostorage=1; break;

+case MF_NOGUILDSTORAGE: map[m].flag.noguildstorage=1; break;

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

[b]Find Again:[/b] [b][u]src/map/script.c[/u][/b]

case MF_GUILDLOCK: map[m].flag.guildlock=0; break;

[b]Add to:[/b]

case MF_GUILDLOCK: map[m].flag.guildlock=0; break;

+case MF_NOSTORAGE: map[m].flag.nostorage=0; break;

+case MF_NOGUILDSTORAGE: map[m].flag.noguildstorage=0; break;

[color=#ff0000][b]4th Step[/b][/color]

[b]In [u]src/map/storage.c[/u][/b]

[b]Find:[/b]

int storage_storageopen(struct map_session_data *sd)

{

nullpo_retr(0, sd);

if(sd->state.storage_flag)

return 1; //Already open?

if( !pc_can_give_items(pc_isGM(sd)) )

{ //check is this GM level is allowed to put items to storage

clif_displaymessage(sd->fd, msg_txt(246));

return 1;

}

sd->state.storage_flag = 1;

clif_storagelist(sd,&sd->status.storage);

clif_updatestorageamount(sd,sd->status.storage.storage_amount);

return 0;

}

[b]Add to this:[/b]

int storage_storageopen(struct map_session_data *sd)

{

+int m;

nullpo_retr(0, sd);

if(sd->state.storage_flag)

return 1; //Already open?

+m = sd->bl.m;

+if (map[m].flag.nostorage) {

+ clif_displaymessage(sd->fd,"You are not allowed to use that command on GVG maps.");

+ return 1;

+}

if( !pc_can_give_items(pc_isGM(sd)) )

{ //check is this GM level is allowed to put items to storage

clif_displaymessage(sd->fd, msg_txt(246));

return 1;

}

sd->state.storage_flag = 1;

clif_storagelist(sd,&sd->status.storage);

clif_updatestorageamount(sd,sd->status.storage.storage_amount);

return 0;

}

[b]Find again:[/b] [b][u]src/map/storage.c[/u][/b]

int storage_guild_storageopen(struct map_session_data* sd)

{

struct guild_storage *gstor;

nullpo_retr(0, sd);

if(sd->status.guild_id <= 0)

return 2;

if(sd->state.storage_flag)

return 1; //Can't open both storages at a time.

if( !pc_can_give_items(pc_isGM(sd)) ) { //check is this GM level can open guild storage and store items [Lupus]

clif_displaymessage(sd->fd,"You are not allowed to use that command on GVG maps.");

return 1;

}

if((gstor = guild2storage2(sd->status.guild_id)) == NULL) {

intif_request_guild_storage(sd->status.account_id,sd->status.guild_id);

return 0;

}

if(gstor->storage_status)

return 1;

gstor->storage_status = 1;

sd->state.storage_flag = 2;

clif_guildstoragelist(sd,gstor);

clif_updateguildstorageamount(sd,gstor->storage_amount);

return 0;

}

[b]Add this:[/b]

int storage_guild_storageopen(struct map_session_data* sd)

{

struct guild_storage *gstor;

+int m;

nullpo_retr(0, sd);

+m = sd->bl.m;

+if (map[m].flag.noguildstorage) {

+ clif_displaymessage(sd->fd, msg_txt(528));

+ return 1;

+}

if(sd->status.guild_id <= 0)

return 2;

if(sd->state.storage_flag)

return 1; //Can't open both storages at a time.

if( !pc_can_give_items(pc_isGM(sd)) ) { //check is this GM level can open guild storage and store items [Lupus]

clif_displaymessage(sd->fd, msg_txt(246));

return 1;

}

if((gstor = guild2storage2(sd->status.guild_id)) == NULL) {

intif_request_guild_storage(sd->status.account_id,sd->status.guild_id);

return 0;

}

if(gstor->storage_status)

return 1;

gstor->storage_status = 1;

sd->state.storage_flag = 2;

clif_guildstoragelist(sd,gstor);

clif_updateguildstorageamount(sd,gstor->storage_amount);

return 0;

}

[color=#ff0000][b]5th Step[/b][/color]

Server file '[u]conf/msg_athena.conf[/u]

[b]Find:[/b]

250: You have already opened your storage. Close it first.

[b]Change to:[/b]

250: ..

[color=#ff0000][b]Last Step[/b][/color]

[b]DataBase file '[u]db/const.txt[/u]'[/b]

[b]Find:[/b]

mf_guildlock 45

[b]Add to:[/b]

mf_guildlock 45

+mf_nostorage 46

+mf_noguildstorage 47

Edited by eJay
  • Upvote 1

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...