SphereCommunity
NPCRrestock doesnt fire - Printable Version

+- SphereCommunity (https://forum.spherecommunity.net)
+-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d)
+--- Forum: Script Help (/Forum-Script-Help)
+--- Thread: NPCRrestock doesnt fire (/Thread-NPCRrestock-doesnt-fire)

Pages: 1 2 3


RE: NPCRrestock doesnt fire - Extreme - 09-01-2014 03:01 PM

Try this:
PHP Code:
ON=@NPCRestock
TIMERF 1
,UPDATEVALUES

[FUNCTION UPDATEVALUES]
IF <
NPC> == brain_animal_trainer
IF <FINDLAYER.26>
REF1 = <FINDLAYER.26.UID>
FORCONT <REF1>
IF <
TYPE> == T_FIGURINE
REF2 
= <UID>
REF2.TAG.OVERRIDE.VALUE = <SERV.ITEMDEF.<REF2.BASEID>.VALUE>*8
ENDIF
ENDFOR
ENDIF
ENDIF 



RE: NPCRrestock doesnt fire - kn4tseb - 09-01-2014 03:26 PM

doesnt work... it only works if i write this in-game over the char

.set TIMERF 1,UPDATEVALUES

and when i manually restock: .set restock 1
over the char, values return to original ...
pretty annoying...

I have even tried with:

ON=@NpcRestock
serv.log hello

and no log message at all, char items are restocked but trigger never fires... :/


RE: NPCRrestock doesnt fire - Extreme - 09-01-2014 11:52 PM

(08-26-2014 06:33 AM)Extreme Wrote:  This one is fired to create initial items on npc.
You can see it on all npc scripts.
If you pay more attention, you should know that this trigger fires only one timer.


RE: NPCRrestock doesnt fire - kn4tseb - 09-02-2014 02:13 AM

indeed, but even when npc is spawned for the first time it doesnt update the values....
anyway.. for now i put the code before the NEW_BYE function at speakshopkeep... so animalvendor stocked items are updated when buying ... not the best idea but will do the job for now