OilCrate

Brings the pump jack back into the game

Total Downloads: 2,961 - First Release: Feb 20, 2017 - Last Update: Apr 19, 2018

5/5, 16 likes
  1. Wulf

    Wulf Community Admin

    Make sure you're using the latest version of the plugin.
     
  2. Hello! I tried to read some of your code to understand what it does. To enable players to deploy their pump jacks i have to grant them permission:
    `grant permission default oilcrate.allow`? otherwise they won't be able to place pumps jacks? because they also then get access to the chatcommands which should only be useable by admins?
     
  3. @Wulf I currently have the latest version of the plugin
     
  4. Wulf

    Wulf Community Admin

    There is no "IsAdmin" call in the latest version, so I'd recommend double-checking.
     
  5. @Wulf you were right, i was not running the current version of the plugin, thank you
     
  6. Please update to the latest version.
     
  7. Kaleidos updated OilCrate with a new update entry:

    0.6.2

     
  8. Thank you for the fast fix! @Kaleidos

    I also suggest a small function so a player can "craft" the pump jack. I tried to enqueue an `ItemCraftTask` but one needs an `ItemBlueprint` for this. I tried different version to get one but I always got null. If someone knows more than me here please give me your input. Otherwise I propose the following addition:
    Code:
            [ChatCommand("craftPJ")]
            private void craftPumpJack(BasePlayer player, string command, string[] args)
            {
                if(player.inventory.containerMain.IsFull())
                {
                    SendReply(player, "Your inventory is full");
                    return;
                }
                // 3655341   Wood             10000
                // 688032252   Metal Fragments   1750
                // 98228420   Gears               15
                int amount = player.inventory.GetAmount(3655341);
                int amount2 = player.inventory.GetAmount(688032252);
                int amount3 = player.inventory.GetAmount(98228420);            if (amount < 10000 || amount2 < 1750 || amount3 < 15)
                {
                    SendReply(player, "You don't have the necessary items to craft the PumpJack! You need:\n- 10000 Wood\n- 1750 Metall Fragments\n- 15 Gears");
                    return;
                }            var pumpJack = ItemManager.CreateByName("mining.pumpjack", 1);            if ( pumpJack == null )
                {
                    SendReply(player, "Can't create the pump jack! Please contact an admin!");
                    return;
                }
                player.inventory.Take(null, 3655341, 10000);
                player.inventory.Take(null, 688032252, 1750);
                player.inventory.Take(null, 98228420, 15);
                player.inventory.GiveItem(pumpJack, player.inventory.containerMain);
                SendReply(player, "Pump Jack is in your inventory!");        }
    P.S.: I always forget that this side doesn't support markdown...

    P.P.S.: It probably would also be good to have a seperate permission for this function( e.g. "cancraftpumpjack") & if the price of the PJ is adjustable via config. But atm I think this function would help a lot of servers.

    P.P.S.: Pump Jacks can't be repaired right now? I think this would be also a good think if it's possible but I think it isn't! Can someone proof me wrong please?
     
    Last edited by a moderator: Mar 14, 2017
  9. Wow! Thanks for your amazing support!
    I know about this possibility but i hate to use chat commands for something like this. (it just feels unnatural)
    I'll implement this anyways. But i'll also will create a possibility to craft a pump jack without using any command.
     
  10. I hate that too! How do you want to solve it?
     
  11. on my server we have put pumpjacks in the airdrops and also have the feature in the config file turned on so if you strike oil it pops a pumpjack out of the ground too.
     
  12. Kaleidos updated OilCrate with a new update entry:

    0.6.3

     
  13. is it using all the same permissions? or are those changed too?
     
  14. The permission usage is all the same.
     
  15. ok cool. Thanks
     
  16. Thanks for your fast updates! I still think that i will stick to my chat command to get a pump jack. You are completely right that using chat commands feels unnatural but hitting a puddle of oil with a stick, losing mats and getting a pump jack is only just a little bit better. If I can think of a better solution I will get in touch with you :)
     
  17. CHR

    CHR

    Wow that pickaxe thing is really smart ... BawsKaleidos
    [DOUBLEPOST=1489569386][/DOUBLEPOST]Maybe u should do it like that = Having an Quarry with 100Crued Oil in invetory and hitting it than changes this into a Pumpjack...
    And when a surveycharge finds cruedoil a message should be printed to the plaqyer like u Need quarry + 100oil to create a pumpjack... guess u know what i mean.
     
  18. This sounds really good in my opinion! Afaik the implementation (i just read the source yet) makes it possible to already change the cost of the pump jack via config! So only the message when you found oil would be needed for you.

    Maybe the simplest solution (for the user) would be to just use a normal quarry to automatically transform to a pump jack on deploy on a oil puddle???? Would somebody else also prefer this behaviour?
     
  19. I have pumpjacks in my BetterLoot Loot table, so players can find them at radtowns. Seems enough to me.
     
  20. Pode dar-me uma ajuda i tempo para colocar o petroleiro que fala que eu não estou autorizado a usá-lo tanto quanto os meus jogadores ..