Placing a stockpile

Forum for alternative clients, mods & discussions on the same.
nixilus
Posts: 9
Joined: Fri Apr 08, 2016 1:21 am

Placing a stockpile

Post by nixilus »

Hi!
I'm trying to learn how to place a stockpile of items at the ground when something is placed in character's hand and his inventory is full.


So I've tried to do the next :

Code: Select all

if (inventory.isFull() && getItemInHand() != null)
gui.map.wdgmsg("place", Coord.z, coordsToPlace, 3, 0, 0);
also I've tried to imitate a RMB click at the coordsToPlace and then a combination of SHIFT+LMB, but it still doesn't work.
If somebody know how to do it properly, I'll be very grateful.
User avatar
Ysh
Posts: 5953
Joined: Sun Jan 31, 2010 4:43 am
Location: Chatting some friends on forum

Re: Placing a stockpile

Post by Ysh »

You must use some:

Code: Select all

m_gui.map.wdgmsg("itemact", Coord.z, c, 0);
While there is an item in the cursor to switch to stockpile ghost placings mode.
Then you can do as you have suggested with:

Code: Select all

m_gui.map.wdgmsg("place", c, 0, 1, m_ui.modflags());
Kaios wrote:Spice Girls are integral to understanding Ysh's thought process when communicating, duly noted.
I have become victory of very nice Jordan Coles Contest! Enjoy my winning submit here if it pleasures you.
nixilus
Posts: 9
Joined: Fri Apr 08, 2016 1:21 am

Re: Placing a stockpile

Post by nixilus »

Ysh wrote:You must use some:

Code: Select all

m_gui.map.wdgmsg("itemact", Coord.z, c, 0);
While there is an item in the cursor to switch to stockpile ghost placings mode.
Then you can do as you have suggested with:

Code: Select all

m_gui.map.wdgmsg("place", c, 0, 1, m_ui.modflags());
Thanks a lot

Return to “The Wizards' Tower”