28.12.2017, 17:40
(This post was last modified: 10.03.2019, 01:59 by HammelGammel.)
Description:
Allows respawning grounditems after a while when picked up. For example: Sticks/rocks on the ground that, when picked up, respawn after 10 minutes.
Please report any problems you find here: Issue Tracker
Installation:
Usage:
Create your itemspawners in the event "onInitItemSpawners" like this.
examples:
Constants:
Download
Repository
Allows respawning grounditems after a while when picked up. For example: Sticks/rocks on the ground that, when picked up, respawn after 10 minutes.
Please report any problems you find here: Issue Tracker
Installation:
- Install my utility scripts: download
- Extract G2O_Module_ItemGroundSpawner.7z
- Move resulting folder in the root folder of your server
- Add the following to your config.xml:
Code:
<!-- Module ItemGroundSpawner -->
<import src="G2O_Module_ItemGroundSpawner/scripts.xml" />
Usage:
Create your itemspawners in the event "onInitItemSpawners" like this.
Code:
temGroundSpawner.add(itemId, amount, x, y, z, world, intervalInMS)
examples:
Code:
addEventHandler("onInitItemSpawners", function()
{
// -- Items in newworld harbor (0|0|0) -- //
ItemGroundSpawner.add(Items.id("ITFO_APPLE"), 1, 0, 0, 0, "NEWWORLD\\NEWWORLD.ZEN", TIMESPAN_SHORTEST);
ItemGroundSpawner.add(Items.id("ITFO_BREAD"), 2, 100, 0, 0, "NEWWORLD\\NEWWORLD.ZEN", TIMESPAN_SHORT);
ItemGroundSpawner.add(Items.id("ITFO_BEER"), 3, 200, 0, 0, "NEWWORLD\\NEWWORLD.ZEN", TIMESPAN_DEFAULT);
ItemGroundSpawner.add(Items.id("ITFO_HONEY"), 4, 300, 0, 0, "NEWWORLD\\NEWWORLD.ZEN", 10000);
});
Constants:
Code:
TIMESPAN_SHORTEST // -- 100ms
TIMESPAN_SHORTER // -- 1s
TIMESPAN_SHORT // -- 10s
TIMESPAN_DEFAULT // -- 1m
TIMESPAN_LONG // -- 10m
TIMESPAN_LONGER // -- 1h
TIMESPAN_LONGEST // -- 10h
Download
Repository