noitem plugin

I'm not sure though I think it had conflicts with the recent update that we're Pulled.

Code:
// Unequip the equipments that has disabled by map_zone_db.conf ?// 0 : disabled equipments and cards are nullify (official)// 1 : disabled equipments are unequip, disabled cards are nullify// 2 : disabled equipments are nullify, disabled cards will caused the equipment to unequip// 3 : disabled equipments are unequip, disabled cards will caused the equipment to unequip (1+2)unequip_restricted_equipment: 0 
 
yeah, the conflicts are from my own patch as well

anyway, just update 1st post, so try download again

 
im managed to revert all patch and re patch it again, but it still cause memory leak..

Memory manager: Memory leaks found at 2014/09/08 16h50m28s (SVN rev '14608M').0001 : npc.c line 4008 size 20 address 0x0xb4bf650c0002 : npc.c line 4008 size 20 address 0x0xb4bfbedc0003 : npc.c line 4008 size 20 address 0x0xb4bfd4fc0004 : npc.c line 4008 size 20 address 0x0xb4bfd70c0005 : npc.c line 4008 size 20 address 0x0xb4bff08c0006 : npc.c line 4008 size 20 address 0x0xb4bff71c0007 : npc.c line 4008 size 20 address 0x0xb4c5bdfc0008 : npc.c line 4008 size 20 address 0x0xb4c5cfcc0009 : npc.c line 4008 size 20 address 0x0xb4c5d71c0010 : npc.c line 4008 size 20 address 0x0xb4c5defc0011 : npc.c line 4008 size 20 address 0x0xb4c5e1cc0012 : npc.c line 4008 size 20 address 0x0xb4c61b8c0013 : npc.c line 4008 size 20 address 0x0xb4c6359c0014 : npc.c line 4008 size 20 address 0x0xb4e46c540015 : npc.c line 4008 size 20 address 0x0xb4e47e840016 : npc.c line 4008 size 20 address 0x0xb4e49e340017 : npc.c line 4008 size 20 address 0x0xb4e4aa340018 : npc.c line 4008 size 20 address 0x0xb4e4bba40019 : npc.c line 4008 size 20 address 0x0xb4e4d4c40020 : npc.c line 4008 size 20 address 0x0xb4e4d6d40021 : npc.c line 4008 size 20 address 0x0xb4e4e4e4[Warning]: Memory manager: Memory leaks found and fixed.

This is npc.c patch from my compiled svn

Index: npc.c===================================================================--- npc.c (revision 14608)+++ npc.c (working copy)@@ -4003,6 +4003,58 @@ map->list[m].flag.src4instance = (state) ? 1 : 0; } else if ( !strcmpi(w3,"nocashshop") ) { map->list[m].flag.nocashshop = (state) ? 1 : 0;+ } else if (!strcmpi(w3,"noitem")) {+ int id = 0, i = 0, j = 0, k = 0, l = strlen(w4);+ char *temp = (char*)aMalloc( strlen(w4) +1 );+ struct item_data *i_data;+ if ( l ) {+ while ( i <= l && k < MAX_RESTRICTED_LIST ) {+ if ( w4 != ' ' && w4 != ' ' && w4 != ',' && w4 != '0' ) {+ temp[j++] = w4;+ }+ else if ( w4[i-1] != ' ' && w4[i-1] != ' ' && w4[i-1] != ',' ) {+ temp[j] = '0';+ if ( !strcmp( temp, "IT_HEALING" ) || !strcmp( temp, "0" ) )+ map->list[m].noitemlist[k] = 0;+ else if ( !strcmp( temp, "IT_USABLE" ) || !strcmp( temp, "2" ) )+ map->list[m].noitemlist[k] = 2;+ else if ( !strcmp( temp, "IT_WEAPON" ) || !strcmp( temp, "4" ) )+ map->list[m].noitemlist[k] = 4;+ else if ( !strcmp( temp, "IT_ARMOR" ) || !strcmp( temp, "5" ) )+ map->list[m].noitemlist[k] = 5;+ else if ( !strcmp( temp, "IT_CARD" ) || !strcmp( temp, "6" ) )+ map->list[m].noitemlist[k] = 6;+ else if ( !strcmp( temp, "IT_DELAYCONSUME" ) || !strcmp( temp, "11" ) )+ map->list[m].noitemlist[k] = 11;+ else if ( !strcmp( temp, "IT_CASH" ) || !strcmp( temp, "18" ) )+ map->list[m].noitemlist[k] = 18;+ else if ( atoi(temp) == 0 ) {+ i_data = itemdb->search_name( temp );+ if ( i_data )+ map->list[m].noitemlist[k] = i_data->nameid;+ else {+ ShowWarning("npc_parse_mapflag: Item name "%s" does not exist.n Mapflag noitem: At %s (file '%s', line '%d').n", temp, map->list[m].name, filepath, strline(buffer,start-buffer) );+ map->list[m].noitemlist[k] = -1;+ }+ }+ else {+ id = atoi(temp);+ if ( itemdb->exists(id) )+ map->list[m].noitemlist[k] = id;+ else {+ ShowWarning("npc_parse_mapflag: Item ID "%s" does not exist.n Mapflag noitem: At %s (file '%s', line '%d').n", temp, map->list[m].name, filepath, strline(buffer,start-buffer) );+ map->list[m].noitemlist[k] = -1;+ }+ }+ k++;+ j = 0;+ }+ i++;+ }+ map->list[m].flag.noitem = state;+ }+ else+ ShowWarning("npc_parse_mapflag: no Item ID/type input.n Mapflag noitem: At %s (file '%s', line '%d').n", map->list[m].name, filepath, strline(buffer,start-buffer)); } else { ShowError("npc_parse_mapflag: unrecognized mapflag '%s' in file '%s', line '%d'.n", w3, filepath, strline(buffer,start-buffer)); if (retval) *retval = EXIT_FAILURE;


npc.c line 4008 : char *temp = (char*)aMalloc( strlen(w4) +1 );  is anyone have face it too ?

 
i just tried the current patch and no errors from compiling it and also I tried doing @mapexit there we're no memory leak pointing to npc.c.

 
i just tried the current patch and no errors from compiling it and also I tried doing @mapexit there we're no memory leak pointing to npc.c.
try put the mapflag in your script, and do map exit or ctrl + c on the map console

Code:
guild_vs2	mapflag	noitem	IT_WEAPON, IT_ARMOR
 
Ayt confirmed it too it generates memory leak.

Memory manager: Memory leaks found at 2014/09/09 11h45m27s (Git rev '58875ccc2e4601499c465
329a597483c8d1f8770').
0001 : c:usersdelldesktopherc_localsrcmapnpc.c line 4008 size 32 address 0x067
E2B5C
[09 11:45][Warning]: Memory manager: Memory leaks found and fixed.
 
Map-Server has shutdown successfully.
Restarting in 15 seconds, press Ctrl+C to cancel.
[status]: Memory manager initialized: log/map-server.exe.leaks
dunno where to find the log lol.

 
Ayt confirmed it too it generates memory leak.

Memory manager: Memory leaks found at 2014/09/09 11h45m27s (Git rev '58875ccc2e4601499c465
329a597483c8d1f8770').
0001 : c:usersdelldesktopherc_localsrcmapnpc.c line 4008 size 32 address 0x067
E2B5C
[09 11:45][Warning]: Memory manager: Memory leaks found and fixed.
 
Map-Server has shutdown successfully.
Restarting in 15 seconds, press Ctrl+C to cancel.
[status]: Memory manager initialized: log/map-server.exe.leaks
dunno where to find the log lol.
Waiting for maam to reproduce its, i have small vps with 512 mb ram
default_laugh.png
, memory leak will cause lag

 
I was busy with writing maintenance mod ok ?

actually I just forgot to add aFree(temp)

 
I was busy with writing maintenance mod ok ?

actually I just forgot to add aFree(temp)
npc.c:4020:71: warning: character constant too long for its type
npc.c: In function 'npc_parse_mapflag':
npc.c:4020: warning: comparison is always true due to limited range of data type
 
?
help?
 
Last edited by a moderator:
How about Allowing Some item? Possible? Thanks
what? I did not understand but who determines the blocked items and yourself '-'
Sorry my message was not meant for you.
default_smile.png


What I'm trying to say is. This source mod unequipped the item of the user using this mapflag. So my question is, how to use this SOURCE MODE that I can still equipped some items I want to allow.

 
i tried this and list all the boss cards and gods. but it doesnt work.

pvp_y_1-1 mapflag noitem 4302
pvp_y_1-1 mapflag noitem 4263
pvp_y_1-1 mapflag noitem 4305
pvp_y_1-1 mapflag noitem 4407
pvp_y_1-1 mapflag noitem 4386
pvp_y_1-1 mapflag noitem 4276
pvp_y_1-1 mapflag noitem 4425
pvp_y_1-1 mapflag noitem 4236
pvp_y_1-1 mapflag noitem 4318
pvp_y_1-1 mapflag noitem 4372
pvp_y_1-1 mapflag noitem 4132
pvp_y_1-1 mapflag noitem 4121
pvp_y_1-1 mapflag noitem 4361
pvp_y_1-1 mapflag noitem 4168
pvp_y_1-1 mapflag noitem 4169
pvp_y_1-1 mapflag noitem 4174
pvp_y_1-1 mapflag noitem 4047
pvp_y_1-1 mapflag noitem 2586
pvp_y_1-1 mapflag noitem 2630
pvp_y_1-1 mapflag noitem 4047
 
i tried this and list all the boss cards and gods. but it doesnt work.

pvp_y_1-1 mapflag noitem 4302
pvp_y_1-1 mapflag noitem 4263
pvp_y_1-1 mapflag noitem 4305
pvp_y_1-1 mapflag noitem 4407
pvp_y_1-1 mapflag noitem 4386
pvp_y_1-1 mapflag noitem 4276
pvp_y_1-1 mapflag noitem 4425
pvp_y_1-1 mapflag noitem 4236
pvp_y_1-1 mapflag noitem 4318
pvp_y_1-1 mapflag noitem 4372
pvp_y_1-1 mapflag noitem 4132
pvp_y_1-1 mapflag noitem 4121
pvp_y_1-1 mapflag noitem 4361
pvp_y_1-1 mapflag noitem 4168
pvp_y_1-1 mapflag noitem 4169
pvp_y_1-1 mapflag noitem 4174
pvp_y_1-1 mapflag noitem 4047
pvp_y_1-1 mapflag noitem 2586
pvp_y_1-1 mapflag noitem 2630
pvp_y_1-1 mapflag noitem 4047
Hercules had already improved map zone to unequip the blocked item

so you dont need this patch now

https://github.com/HerculesWS/Hercules/commit/33a43ec41542e25ee180bda430a3de4654a46b10

 
i tried this and list all the boss cards and gods. but it doesnt work.

pvp_y_1-1 mapflag noitem 4302
pvp_y_1-1 mapflag noitem 4263
pvp_y_1-1 mapflag noitem 4305
pvp_y_1-1 mapflag noitem 4407
pvp_y_1-1 mapflag noitem 4386
pvp_y_1-1 mapflag noitem 4276
pvp_y_1-1 mapflag noitem 4425
pvp_y_1-1 mapflag noitem 4236
pvp_y_1-1 mapflag noitem 4318
pvp_y_1-1 mapflag noitem 4372
pvp_y_1-1 mapflag noitem 4132
pvp_y_1-1 mapflag noitem 4121
pvp_y_1-1 mapflag noitem 4361
pvp_y_1-1 mapflag noitem 4168
pvp_y_1-1 mapflag noitem 4169
pvp_y_1-1 mapflag noitem 4174
pvp_y_1-1 mapflag noitem 4047
pvp_y_1-1 mapflag noitem 2586
pvp_y_1-1 mapflag noitem 2630
pvp_y_1-1 mapflag noitem 4047
Hercules had already improved map zone to unequip the blocked item

so you dont need this patch now

https://github.com/HerculesWS/Hercules/commit/33a43ec41542e25ee180bda430a3de4654a46b10
thank you, ill try it!

 
Back
Top