noitem plugin

@@AnnieRuru

noitem.c:23:27: error: common/memmgr.h: No such file or directorynoitem.c: In function ‘npc_parse_unknown_mapflag_pre’:noitem.c:52: warning: implicit declaration of function ‘aMalloc’noitem.c:57: warning: implicit declaration of function ‘CREATE’noitem.c:57: error: expected expression before ‘struct’noitem.c:106: warning: implicit declaration of function ‘aFree’make[1]: *** [../../plugins/noitem.so] Error 1

 
what is this error ? 

 
Last edited by a moderator:
#include "common/memmgr.h"when I comment this line, error like yours shown up
weird, I already included it when I made it yesterday

try change that line into

Code:
#include "common/malloc.h"
 
malloc.h got renamed into memmgr.h this is why the error appears

he was using and old herc rev what dont got the changes

 
then try the patch version 1.2 in my spoiler's archive

since its patch, there shouldn't be much a problem I think ?

 
1.4
plugin
-- fix a rare bug if the user put multiple noitem on the same map, it spam non-sensible error
---- although this will overwrite the previous one without warning this time

 
1.5 - plugin
- remove the 50 items restriction limit by utilizing vector

 
Last edited by a moderator:
1.6 - plugin
--- fix server crash on certain compiler

thanks to @Kuroe for reporting

 
Last edited by a moderator:
yes look like missing cleanup on server stop and on logout.

Because vector is not array but some kind of custom type with pointer, it should be cleaned manually

 
hahaha .... I think from now on I should close the program by "@mapexit" .... I'm so dump
 

1.7 - plugin
- fix memory leak caused by aStrdup and VECTOR_ENSURE

 
Last edited by a moderator:
1.8 - plugin
- fix duplicate entry by ShowWarning
- add missing IT_AMMO item type deny

 
Download: 1.8
plugin

tested with

prontera mapflag noitem 0,4,5

prontera mapflag noitem 0,4,5


prontera mapflag noitem IT_HEALING, IT_WEAPON, IT_ARMOR

prontera mapflag noitem IT_HEALING, IT_WEAPON, IT_ARMOR


disable player from using healing items, and preventing equip weapon and armor.

.

prontera mapflag noitem Poring_Card

prontera mapflag noitem Poring_Card


prontera mapflag noitem 4001

prontera mapflag noitem 4001


disable player from using Poring Card

1.0
noitem_20140310

1.1
-- fix a bug which messed up counter, should be [k] in npc.c
----- counter is for string size (w4), [k] counter is the index of the array map->list[m].noitemlist
noitem_20140828.
noitem_20140908

1.2
-- forgot to add aFree(temp), which cause memory leak
noitem_20140911.
noitem_20151030

1.3
plugin
-- remove MAX_RESTRICTED_LIST and hardcoded it as 50
-- and change noitem from state, into number of items restricted, to make it loop lesser

1.4
plugin
-- fix a rare bug if the user put multiple noitem on the same map, it spam non-sensible error
---- although this will overwrite the previous one without warning this time

1.5
plugin
--- remove the 50 items restriction limit by utilizing vector

1.6
plugin
--- fix server crash on certain compiler

1.7 - plugin
- fix memory leak cause by aStrdup and VECTOR_ENSURE

1.8 - plugin
- fix duplicate entry by ShowWarning
- add missing IT_AMMO item type deny
 
Mam @AnnieRuru please do one for rathena

 
Back
Top