Charms

Charms run everything inside "Script" tag when item is in inventory

 
update to version 1.4, as this one also has nocharms mapflag, similar issue as noitem mapflag

https://github.com/AnnieRuru/Release/blob/master/plugins/Charms/charms_1.4.c

- fix memory leak when do multiple `@loadnpc`

Is it possible to add a status icon when a certain charm is present in your inventory?
well yes, actually you also can do it on any equipment, not just charms

however I don't want to add unnecessary feature on public release version,

this could be done if open a new topic on plugin request though

EDIT: Eddga_Card

{
Id: 4123
AegisName: "Eddga_Card"
Name: "Eddga Card"
Type: "IT_CARD"
Buy: 20
Weight: 10
Loc: "EQP_SHOES"
Script: <" bonus bMaxHPrate,-25; ">
OnEquipScript: <" sc_start4 SC_ENDURE,60000,10,0,0,1; ">
OnUnequipScript: <" sc_end SC_ENDURE; ">
},


hmm ..............................

 
Last edited by a moderator:
charm.c: In function 'npc_parse_unknown_mapflag_pre':
charm.c:173:31: warning: declaration of 'cidata' shadows a previous local [-Wshadow]
struct charm_item_data *cidata = getFromITEMDATA(idata, 0);
^
charm.c:131:26: warning: shadowed declaration is here [-Wshadow]
struct charm_item_data *cidata = NULL;
^
charm.c:131:26: warning: unused variable 'cidata' [-Wunused-variable]


Some minor warning :D

 
1.5 - plugin

- fix warning shown on linux compiler

- add OnEquipScript and OnUnequipScript support

see 1st post for more information

 
1.6 - plugin

- fix it run status_calc_pc on every charms pickup and drop

- fix OnEquipScript doesn't run when player login

- fix nullpo, it wasn't needed at all

in other words, fix everything, hopefully no more bug or run extra stuffs

and ... its better to loop player's inventory count rather than run whole status_calc_pc thingy, way more resource friendly

 
Back
Top