Space Engineers

Space Engineers

[EEM] Barter trade (Script)
21 条留言
Dots 2024 年 10 月 27 日 上午 3:45 
script is ancient and DOES NOT WORK ANYMORE!
Alexis(Mssun21) 2024 年 3 月 16 日 上午 10:37 
Can we get a Update?
Dorimanx 2021 年 9 月 14 日 上午 9:48 
I have fixed the script, it's not working as is, things changed.
here it's is:
https://pastebin.com/kWGQacyU
DogwaterGaming69 2019 年 1 月 21 日 上午 5:01 
its still working?
mahtrok  [作者] 2017 年 12 月 10 日 上午 3:42 
Thanks, nice to know, but... this script does not require any faction settings...
Genbu Tetsukame 2017 年 12 月 9 日 下午 8:23 
Hate to break it to ya, but they implemented factions, in case you already didn't know.
RookieGuide 2017 年 7 月 30 日 下午 5:36 
Ok then
mahtrok  [作者] 2017 年 7 月 30 日 下午 5:26 
No, it's integrated inside the ships that are using it.
RookieGuide 2017 年 7 月 20 日 上午 11:53 
Do I need this for the Exploration Enhancement Mod?
mahtrok  [作者] 2016 年 8 月 30 日 上午 1:22 
Nope. I never checked it again After creating it. Might take a look
Wolf 2016 年 8 月 29 日 下午 9:56 
i hav update my game and server. and hav fails :( display notfound and more. the script ist not update :/ ore?
mahtrok  [作者] 2015 年 11 月 9 日 上午 5:36 
To give you a hint, i would set it up with a small container of a specific name connected to a collector, check this container every run for the amount of the item you want as payment, a timer block, toggleing the connector On/Off, which has to be set to "share with all". And that's it.
Ah if you don't want to use scripted item transfer you could again build a conveyor sorter from your check container to the storage, turned off and set to drain all.
Once the amount of payment is reached, start the timer block, which then activates the connector and the conveyor sorter and shuts off the program block. If the player should be able to recharge completely, instead of a defined seconds count, just build a sensor, when the ship is leaving its range, trigger a reset timer shutting all down and turning on the program block again. If you want to have a certain time defined the ship is recharged, the activation timer should start the reset timer running the time defined.
Nutlesscats 2015 年 11 月 9 日 上午 4:53 
o ok that makes a lot more sense :) my bad :P

as for the connector i will take that under advisement and give it a go (probally end badly lol sub-basic scripting knowledge)

Thakyou for your reply was really helpfull
mahtrok  [作者] 2015 年 11 月 9 日 上午 4:26 
About the Connector thing, it IS possible as long as the trading / refueling station is owned by a player. You can then check for the uranium and just turn it ON by a timer for example, while it is set to "share with all" the player could then dock and recharge.
The moment the connector belongs to an NPC faction all the "Share" settings are set to "no share" and it will no longer work. You therefor can't dock with this port even if turned on as long as keen doesn't implement custom factions.

But this would require a new Script (about 5 minutes scripting time).
mahtrok  [作者] 2015 年 11 月 9 日 上午 4:25 
At first, yes it is possible to restart the script, but the barter trade script should be manually restarted by the owner of the terminal, the option is allready there.
The reason, why the restart is not automated, is that in difference to the trading script, the barter script uses Conveyor Sorters to transfer the goods and they don't have a counter, they only transfer everything that is in from A to B, as long as it passes the filter. The Owner has to restart the program, for he has to put in the items required in the correct amount back into the correct container before the trade can happen again.
The purpose of this script is more like a "quest trade" then a real trading setup. You get there, check the offer, provide what it says and get what it says in charge. Then thank you and good bye.
An automated trading setup is achieved with the Exodus Trading script, but this is much more complicated to set up.
Nutlesscats 2015 年 11 月 9 日 上午 3:08 
sorry to bother you again but i was working on the trade ship competition and i was wondering is it possible to make a script that wont allow a vessel to lock connector until say 10 uranium ingots are placed into a certain container therefore forcing people to pay to have there ship refuelled by trade ship?
Nutlesscats 2015 年 11 月 9 日 上午 2:38 
after transaction* sry my brother spilt shit on keyboard yesterday
Nutlesscats 2015 年 11 月 9 日 上午 2:37 
by ay chance can you add a function to check shop output after transation and if empty restart the script?
ContrastX 2015 年 10 月 7 日 下午 1:54 
Will do.
mahtrok  [作者] 2015 年 10 月 7 日 上午 12:36 
Thank you very much :) If you run into any problems just ask, i will answer as soon as possible.
ContrastX 2015 年 10 月 6 日 下午 3:59 
Very nice script sir. I played with your demo map and it may be what I need for my server. Thankyou for your hard work and well done on the way you wrote it for us non-code people. I was actually able to understand how it works.