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 4 414 12.07.2020, 10:15
Last Post: Sative
  [0.1.4.*] [client/server] Simple anty-cheat Profesores 8 4,941 20.03.2018, 18:16
Last Post: Patrix
  [0.1.3] [client/server] BotCreator HammelGammel 22 13,120 08.02.2018, 21:02
Last Post: HammelGammel
  [0.1.3] [client/server] Utility Scripts HammelGammel 1 2,783 27.01.2018, 13:03
Last Post: HammelGammel
  [G2O v.0.1.2][Server-Side] NPC Manager Quarchodron 16 9,047 21.01.2018, 18:59
Last Post: Quarchodron

Forum Jump:


Users browsing this thread: 2 Guest(s)