Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[0.1.3] [server] ItemGroundSpawner
#1
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:

  1. Install my utility scripts: download
  2. Extract G2O_Module_ItemGroundSpawner.7z
  3. Move resulting folder in the root folder of your server
  4. 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
Reply
#2
hello. Why doesn't it work?

ItemGroundSpawner.add(Items.id("ITMW_2H_AXE_L_01"), 1, -12751, -1124, -3200, "OLDWORLD\\OLDWORLD.ZEN", TIMESPAN_DEFAULT);

I want the weapon to spawn)
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  [Server] ORM Quarchodron 3 3,444 08.07.2020, 10:19
Last Post: Quarchodron
  [0.1.4.*] [client/server] Simple anty-cheat Profesores 8 10,250 20.03.2018, 19:16
Last Post: Patrix
  [0.1.3] [client/server] BotCreator HammelGammel 22 26,571 08.02.2018, 22:02
Last Post: HammelGammel
  [0.1.3] [client/server] Utility Scripts HammelGammel 1 5,255 27.01.2018, 14:03
Last Post: HammelGammel
  [G2O v.0.1.2][Server-Side] NPC Manager Quarchodron 16 17,491 21.01.2018, 19:59
Last Post: Quarchodron

Forum Jump:


Users browsing this thread: 1 Guest(s)