Jump to content

quadrinka4

Member
  • Posts

    36
  • Joined

  • Last visited

Everything posted by quadrinka4

  1. Wow thank you both ^^ those codes sure did work very well
  2. getPlayer():getInventory():AddItem(InventoryItem(Cooked.Steak) ); isn't this the correct way to do ? or this? what have I done wrong? getPlayer():getInventory():AddItem(InventoryItem(Cooked) Base.Steak ); getPlayer():getInventory():AddItem("Base.Steak.Foods.Burnt"); Thank you for your help
  3. Hello, I have another question here ^^ my question is: how do I call a method that look up items that are laying or dropped near the player?? For example, I know getPlayer():getInventory():getNumItems("name"); looks up the number of item in a player inventory. However, I want a method that looks up the number of both 'main inventory' and 'ground ' items. Maybe GetWorldItem() does the trick? Thanks in advance.
  4. Hi, I have yet another question in modding. I am trying to use the Scanner class to read a text file from the computer and print it on the player's screen. For example, Scanner keyboard = new Scanner(new File("C:\\Users\\username\\Desktop\\test.txt")); and then system.out.print(""); is there a way to do this from Lua as well?
  5. Im really really.. dumb for not trying that... T-T Thank you T--T Now, how would I remove the multiple items?
  6. So, I am trying my butt off to remove items from a player's inventory once the command is run. Although I can't figure out this simple code why it wouldn't work. I've tried so far: getPlayer():getInventory():DoRemoveItem("Apple"); getPlayer():getInventory():Remove("Base.Apple"); getPlayer():getInventory():Remove(Apple); getPlayer():getInventory():Remove(Base.Apple); getPlayer():getInventory():Remove("Base.Apple"itemType(Food)); getPlayer():getInventory():RemoveOneOf("Base.Apple"); none of them is working... Remove("Base.Apple"); runs without error but it doesn't actually remove apple from the inventory.. Help please? Thanks in advance~
  7. Thank you ^^!! is there also a way to make the function to check not the exact that spot but within 3 blocks of that spot??
  8. local player = getPlayer(); local px = getPlayer():getX(); local py = getPlayer():getY(); if (px == 10994 && py == 9647) then player:Say("here i am"); end Hello everyone, in this code I am trying to make a player say "here i am" when its function is executed at certain location. however, the console keep giving me there's an error at line 5 saying " ')' expected to be near & " . Could anyone help me to fix this problem? Thank you in advance.
  9. So i introduced above code in Hydrocraft and I still get error.... function HCFloraGather(items, result, player) local room = getPlayer():getCurrentSquare():getRoom(); local roomName = room:getName(); if roomName =~ "grocery" then player:Say("There are no flora indoors."); end Sorry for being such a pain. But I am learning alot form you about LUA right now. Thank you
  10. Thank you so much ^^ so if i want to test if my player is in grocery room, putting if not roomName: ("grocery") then player:Say("You are in wrong room."); this cause error, I am new to the Lua so i guess i am still on the learning phase by looking at other's codes.... Could someone fix what I did wrong?
  11. Hello, I am trying to make a mod that allows a player to perform an action if the player is in a certain room definition (ex: church, grocery, livingroom, etc). I've got my idea from Hydrocraft and its' code : if not player:isOutside() then player:Say("There are no flora indoors."); My question is, is there a method that I can use to check if the player is in a certain room? maybe player:isRoom(grocery) type of thing? Thanks in advance.
  12. Thanks for your reply. Although when I mentioned restarting game, I meant of exiting to Main menu. I wanted to know if it is possible to reload the /scripts like reloading .lua (through F11 debug reloading). and not having to go back to the main menu. One more question, changing texture of an item require the game to be shut down completely to get updated. The texture .png files do not get reloaded each time I load the game from main menu?
  13. Is there a way to refresh or reload the .txt files in media/scripts folder while the game is still running? So I do not have to exit and restart the game each time I include/edit a new custom item? I know we have loading the game through debug option but it only reloads .lua files. Please help me. Thank you ^^
  14. I am trying to make an recipe which only accepts Cooked Steak, and prevent Uncooked Steak from being allowed. Is there a way to do this? I know that creating a new item called Cooked Steak could work, but I want to see if there's other way.
  15. how long do u have to wait till a baby pig to grow up to an adult?
  16. appearently ther's magazine for it
  17. I think rabbit hutch is fine as it is now Hydromancerx. Maybe doubling breeding "time" might prevent players from mass producing them. Also maybe limit breeding required "food" to only carrots. Again, I have no problem with the rabbit hutch, but the idea mentioned in the above may calm the angry public little down..
  18. Thanks ^^ Also any ETA on including German Shep. on Wardog criteria as well?
  19. Hydromancerx, Could you make "FOLDING SIGN" bit bigger? It's size of a post-it-note at the moment when its placed on the ground... Could you make it to size of a... wooden bucket or bit bigger maybe? Thanks ^^
  20. O.O!!!!! NNNNNNOOOOOOOOOOOOOOOOOOOOOOO XD well, still appreciate all your works ^^
  21. found it under "folder with number" xD thanks ^^ you were great help
  22. Hi, this could be a very newbie question but I can't seem to find Junkyardextra.lua in my Zomboid folder ... Could you give me the directory address for such file? When I looked into each folder, workshop folder in Users --> zomboid , all I saw was a example mods.. not hydrocraft...
×
×
  • Create New...