12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485 |
- setScriptVar("scheduler_list", list.new());
- list = scheduler.getList();
- msg.string("dev", "§bScheduler §rloaded.");
- @loop
- iter = iterator(list);
- while(hasNext(iter)) {
- a = next(iter);
- ticks = --a[1];
- if(ticks <= 0) {
- action = a[0];
-
- //Fly verändern
- if(action == 0) {
- player = a[2];
- bool = a[3];
- player.setFly(player, bool);
- }
- //Msg Prefix
- if(action == 1) {
- player = a[2];
- prefix = a[3];
- text_or_string = a[4];
- msg.prefix(player, prefix, text_or_string);
- }
- //Msg
- if(action == 2) {
- player = a[2];
- text_or_string = a[3];
- msg(player, getMessage(text_or_string));
- }
- //SetBlockMaterial
- if(action == 3) {
- block = a[2];
- material = a[3];
- block_update = a[4];
- block.setMaterial(block, material, block_update);
- }
- //QuestFinish
- if(action == 4) {
- script = a[2];
- player = a[3];
- quest.finish(script, player);
- }
- //setBurning
- if(action == 5) {
- entity = a[2];
- seconds = a[3];
- entity.setBurning(entity, seconds);
- }
- //spawnEntity
- if(action == 6) {
- type = a[2];
- location = a[3];
- entity.spawn(type, location);
- }
- //removeEntity
- if(action == 7) {
- entity = a[2];
- entity.remove(entity);
- }
- //giveItem
- if(action == 8) {
- player = a[2];
- item = a[3];
- player.safeGiveItem(player, item);
- }
- //giveSingleItem
- if(action == 9) {
- player = a[2];
- item = a[3];
- player.giveSingleItem(player, item);
- }
- //SetBlockData
- if(action == 10) {
- block = a[2];
- blockdata = a[3];
- block_update = a[4];
- block.setData(block, blockdata, block_update);
- }
- remove(iter);
- }
- }
- sgoto(2, "loop");
- wait();
|