EnglishGermanFrenchRussianPolishItalianSpanish
Log inRegister
 
[SCRIPT] UTProfit (v 1.0 28-04-09)
Post new topic Reply to topic Goto page 1, 2  Next
View previous topic :: View next topic
Author Message
euclid
Moderator (Script&Mod)
Moderator (Script&Mod)



Joined: 15 Feb 2004
Posts: 8932 on topic
Location: Gower, South Wales
Thank you for registering your game
modified
PostPosted: Fri, 24. Apr 09, 18:38    Post subject: [SCRIPT] UTProfit (v 1.0 28-04-09) Reply with quote Print

What it does:

A trader utility script for those of you who run lots of MK3 traders. Thanks
to the new menue features it's a bit more comfortable than the X3R version.

Just execute it from your ship to get a list of all your MK3 traders, then
click on any in the list to get the overall profit. Hit Esc to get back to the
list and select another of your traders or hit Esc again to quit the script.


Installation:

Copy the 7006-L044.xml into you t folder, copy the setup.UTProfit.xml and the
UTProfit.xml into your scripts folder.


Resources:

It uses trade command 41, t-file 7006 with pid 2010 (tid 441) and (also in
the 7006 file) pid 9900 (tids 01-03).


Where to get it?

Updated version 1.0: local trader added, info on current sector and status added.




(Big THANKS to all that helped to sort the URL out, in particular to Giskard
who finally solved the puzzle).


Example

Execute UTProfit from the trade menue of your ship to get


then select one MK3 trader and click to get further details like this



Feedback

Please don't hesitate to post any feedback. I'm currently improving the info and have added trader's current location (the sector he's in atm) and the trader's status (local, sector or universe trader). Any other useful info to be added?





Hope you will find it useful.


Cheers Euclid

Edit: images added.E.
Edit2: version 1.0 info added.E.
Edit3: tested with X3:TC and AP - works just fine; even no need to activate SE. Just install as instructed and use it. E.


_________________
"In any special doctrine of nature there can be only as much proper science as there is mathematics therein.” - Immanuel Kant (1724-1804), Metaphysical Foundations of the Science of Nature, 4:470, 1786


Last edited by euclid on Wed, 9. Jan 13, 20:06; edited 8 times in total
Back to top
View user's profile Send private message Send e-mail MSN Messenger
Scoob





Joined: 27 Feb 2003
Posts: 5426 on topic
Location: Oxford, UK
Thank you for registering your game
PostPosted: Fri, 24. Apr 09, 20:38    Post subject: Reply with quote Print

Hi,

Useful script!

Have downloaded and will try later...

Cheers,

Scoob.

Back to top
View user's profile Send private message
arcana75





Joined: 02 Dec 2003
Posts: 2158 on topic

Thank you for registering your game
PostPosted: Tue, 28. Apr 09, 14:23    Post subject: Reply with quote Print

Hi, need help with this install.

I have the 2 files in scripts folder and 1 file in t folder, and run the trade command Profit.

But the result is a blank window with an Info word on the top right. Hitting ESC gives me a new window saying:

Trader: Unknown Object
ship: null
profit: 0

Any suggestions?


_________________
Nanite Hull Repair, Resource-Free Factory, Collect Wares Mk 2, Remove Products from Docks, Hack Station
Back to top
View user's profile Send private message Visit poster's website
euclid
Moderator (Script&Mod)
Moderator (Script&Mod)



Joined: 15 Feb 2004
Posts: 8932 on topic
Location: Gower, South Wales
Thank you for registering your game
PostPosted: Tue, 28. Apr 09, 15:03    Post subject: Reply with quote Print

It should happen only if you don't have any MK3 trader. How many MK3 trader do you have?

Cheers Euclid


_________________
"In any special doctrine of nature there can be only as much proper science as there is mathematics therein.” - Immanuel Kant (1724-1804), Metaphysical Foundations of the Science of Nature, 4:470, 1786
Back to top
View user's profile Send private message Send e-mail MSN Messenger
arcana75





Joined: 02 Dec 2003
Posts: 2158 on topic

Thank you for registering your game
PostPosted: Tue, 28. Apr 09, 15:19    Post subject: Reply with quote Print

6, all ST traders but all >L8 and all are currently running ST when the command is fired.


_________________
Nanite Hull Repair, Resource-Free Factory, Collect Wares Mk 2, Remove Products from Docks, Hack Station
Back to top
View user's profile Send private message Visit poster's website
euclid
Moderator (Script&Mod)
Moderator (Script&Mod)



Joined: 15 Feb 2004
Posts: 8932 on topic
Location: Gower, South Wales
Thank you for registering your game
PostPosted: Tue, 28. Apr 09, 15:23    Post subject: Reply with quote Print

Could you please check which script is running on any of them? To do that enable additional script info in the SE and then find one of your STs and get the ship's info, scroll down and you should see all scripts running on that ship.

Cheers Euclid


_________________
"In any special doctrine of nature there can be only as much proper science as there is mathematics therein.” - Immanuel Kant (1724-1804), Metaphysical Foundations of the Science of Nature, 4:470, 1786
Back to top
View user's profile Send private message Send e-mail MSN Messenger
arcana75





Joined: 02 Dec 2003
Posts: 2158 on topic

Thank you for registering your game
PostPosted: Tue, 28. Apr 09, 15:49    Post subject: Reply with quote Print

I wrote to my logbook the array size in your original script. Start was 25 ships. After scanning thru *.galaxy and *.sector the value is 0.

I did a hack job:
Code:
$ships =  get ship array: of race Player class/type=Moveable Ship
002   $nships =  size of array $ships
003   while $nships
004   |dec $nships =
005   |$ut = $ships[$nships]
006   |$gain = $ut -> get local variable: name='Gain'
007   |if $gain > 0
008   ||$sgain =  convert number $gain to string
009   ||$pilot = $ut -> get pilot name
010   ||write to player logbook: printf: pageid=9900 textid=4, $pilot, $ut, $sgain, null, null
011   |end
012   end
013   return null


It was able to print into my log showing all my STs' name, ship and profit.


_________________
Nanite Hull Repair, Resource-Free Factory, Collect Wares Mk 2, Remove Products from Docks, Hack Station
Back to top
View user's profile Send private message Visit poster's website
euclid
Moderator (Script&Mod)
Moderator (Script&Mod)



Joined: 15 Feb 2004
Posts: 8932 on topic
Location: Gower, South Wales
Thank you for registering your game
PostPosted: Tue, 28. Apr 09, 16:22    Post subject: Reply with quote Print

That's very odd. Every MK3 trader should have either plugin.autotrade.sector (sector trader) or plugin.autotrade.galaxy (universe trader) running.

Please check which scripts are running on any of your traders. Can you see either of the above?

Cheers Euclid


_________________
"In any special doctrine of nature there can be only as much proper science as there is mathematics therein.” - Immanuel Kant (1724-1804), Metaphysical Foundations of the Science of Nature, 4:470, 1786
Back to top
View user's profile Send private message Send e-mail MSN Messenger
arcana75





Joined: 02 Dec 2003
Posts: 2158 on topic

Thank you for registering your game
PostPosted: Tue, 28. Apr 09, 16:28    Post subject: Reply with quote Print

plugin.autotrade.local and plugin.autotrade.local.start

Cool


_________________
Nanite Hull Repair, Resource-Free Factory, Collect Wares Mk 2, Remove Products from Docks, Hack Station
Back to top
View user's profile Send private message Visit poster's website
euclid
Moderator (Script&Mod)
Moderator (Script&Mod)



Joined: 15 Feb 2004
Posts: 8932 on topic
Location: Gower, South Wales
Thank you for registering your game
PostPosted: Tue, 28. Apr 09, 16:50    Post subject: Reply with quote Print

Thanks Smile

Okey, there are 3 types of MK3 traders: local, sector and universe. Atm UTProfit covers only the last two. I will upload a new version that adds the local trader.

Any further info that I should add to the info screen (see first post)?


Cheers Euclid


_________________
"In any special doctrine of nature there can be only as much proper science as there is mathematics therein.” - Immanuel Kant (1724-1804), Metaphysical Foundations of the Science of Nature, 4:470, 1786
Back to top
View user's profile Send private message Send e-mail MSN Messenger
euclid
Moderator (Script&Mod)
Moderator (Script&Mod)



Joined: 15 Feb 2004
Posts: 8932 on topic
Location: Gower, South Wales
Thank you for registering your game
PostPosted: Tue, 28. Apr 09, 17:21    Post subject: Reply with quote Print

New version uploaded. Please try this one arcana75 and thanks again for the feedback Thumb up

Cheers Euclid


_________________
"In any special doctrine of nature there can be only as much proper science as there is mathematics therein.” - Immanuel Kant (1724-1804), Metaphysical Foundations of the Science of Nature, 4:470, 1786
Back to top
View user's profile Send private message Send e-mail MSN Messenger
arcana75





Joined: 02 Dec 2003
Posts: 2158 on topic

Thank you for registering your game
PostPosted: Tue, 28. Apr 09, 17:44    Post subject: Reply with quote Print

Thanks for the fix! I'll try it out tomorrow as it's abit late here.

What's the diff between local and sector trader? FWIW my STs run Sector Trader with 3 Jumps.

As for info, I dunno if the data is available but the following would be nice to have:

- Total runtime (good for benchmarking)
- Current load (eg e-cells) or maybe current command (eg buy ware best price... e-cells)

A suggestion not sure if possible, maybe divide the MK3 Trader list in the menu to Universe, Sector and Local traders? Then in the individual trader display there is no need to display "trader status" and it's a quicker way to sort out a player's traders.


_________________
Nanite Hull Repair, Resource-Free Factory, Collect Wares Mk 2, Remove Products from Docks, Hack Station
Back to top
View user's profile Send private message Visit poster's website
ScRaT_GER





Joined: 08 Jan 2008
Posts: 1958 on topic

Thank you for registering your game
PostPosted: Tue, 28. Apr 09, 19:00    Post subject: Reply with quote Print

I would add the sector the trader is in and his id code to the main menu.
So entries like this would be generated:

Argon Prime: Mistral UT 13 (YRKS-23)

Would give a better overview, in my opinion.

It would also be interesting to see, how the numbers my script 'Trade Overview' gets, differ from the numbers your script gets directly from the merchants.
I think I'll have to check that. =)

Greets,
ScRaT


_________________

Skripts:
Teladi Informations Service, Fahrtenbuch, Handelsübersicht
Back to top
View user's profile Send private message
euclid
Moderator (Script&Mod)
Moderator (Script&Mod)



Joined: 15 Feb 2004
Posts: 8932 on topic
Location: Gower, South Wales
Thank you for registering your game
PostPosted: Wed, 6. May 09, 12:16    Post subject: Reply with quote Print

arcana75 wrote:

.........What's the diff between local and sector trader? FWIW my STs run Sector Trader with 3 Jumps.

I think if you restart a sector trader of level +8 it requires a max jump range and that makes him a local trader.
arcana75 wrote:

......As for info, I dunno if the data is available but the following would be nice to have:

- Total runtime (good for benchmarking)
- Current load (eg e-cells) or maybe current command (eg buy ware best price... e-cells)
.........

The script is very simple and accesses the already available local variable $Gain. The total runtime is not recorded and would require additional variables. It's also tricky because the player may decide to stop his trader for a while which is next to impossible to detect via scripting. However, the current load/command is easy to add.

Thanks for the feedback.


Cheers Euclid


_________________
"In any special doctrine of nature there can be only as much proper science as there is mathematics therein.” - Immanuel Kant (1724-1804), Metaphysical Foundations of the Science of Nature, 4:470, 1786
Back to top
View user's profile Send private message Send e-mail MSN Messenger
Ezuku





Joined: 21 Jan 2006
Posts: 140 on topic

Thank you for registering your game
PostPosted: Wed, 20. May 09, 06:32    Post subject: Reply with quote Print

Looks cool, haven't tried it out yet (no UTs in my current game), but I think you could improve it by having a profit / hour display, overall profit isn't nearly as important.

Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic Reply to topic Goto page 1, 2  Next
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum
Control Panel
Login Data
The time now is Fri, 20. Oct 17, 14:15

All times are GMT + 2 Hours


Board Security

Copyright © EGOSOFT 1989-2017
Powered by phpBB © 2001, 2005 phpBB Group
Template created by Avatar & BurnIt!
Debug: page generation = 0.45206 seconds, sql queries = 29