|
teknozwizard Newbie
Joined: 28 Jun 2009 Posts: 7
|
Posted: Sun Jun 28, 2009 2:11 am
Star Wars: Legends of the Sith Cargo Running Script |
I've seen the script for LotJ from LightBulb about cargo running and I've tried to recreate his trigger script for LotS and I just can't seem to get it. I was hoping someone could help me figure out a way to modify his trigger script and make it usable in lots. Below, I've posted (thought it'll probably skew and not look right) the planets list, and a copy of Coruscant's import list. If more information is needed, please let me know, I'll do my best to get the information to help make this trigger.
Code: |
-<Hp:2975/2975>-<Cr:6346341>->planets
You access the Information Computer with your datapad...
[+----+----+----+----+----+----+----+----+----+----+----+----+----+----+-----+-----+]
[ Welcome to the Galactic Information Computer System ]
[ ]
[ Planet Starsystem Governed By Popular Support ]
[ --------------------------------------------------------------------------------- ]
[ Coruscant Sesswenna System The Senate ( -100.0 ) ]
[ Byss Deep Core The Empire ( 98.0 ) ]
[ Kashyyyk Kashyyyk System The Empire ( 100.0 ) ]
[ Dosha Kashyyyk System The Empire ( 100.0 ) ]
[ Mon Calamari Calamari System The New Republic ( 100.0 ) ]
[ Honoghr Honoghr System The New Republic ( 100.0 ) ]
[ Gamorr Centrallia Sector The New Republic ( 100.0 ) ]
[ Tatooine Arkanis Sector The Hunters Guild ( -100.0 ) ]
[ Endor Moddell Sector The New Republic ( 100.0 ) ]
[ Adari Danzas Sector The Empire ( 100.0 ) ]
[ Yavin IV Gordian Reach Jedi Council ( 86.0 ) ]
[ Trian Corperate Sector The Empire ( 100.0 ) ]
[ Corellia Corellian Sector Blacksun ( 88.0 ) ]
[ Roche Roche Asteroid Belt The New Republic ( 100.0 ) ]
[ Af'el Kar'Dedus The New Republic ( 100.0 ) ]
[ Bimmisaari Bimmisarri The New Republic ( 100.0 ) ]
[ Hoth Hoth The Empire ( 100.0 ) ]
[ Kuat Kuat System The Empire ( 95.0 ) ]
[ Chadra Chadian The Empire ( 100.0 ) ]
[ Nal Hutta Hutt Space The Empire ( 100.0 ) ]
[ Blimph 3 Blimph The Empire ( 100.0 ) ]
[ Kamino Outer Rim The Senate ( 0.0 ) ]
[ Ryloth Orus The New Republic ( 100.0 ) ]
[ Coyn Coyn System The Empire ( 100.0 ) ]
[ Bespin Bespin The New Republic ( 100.0 ) ]
[ Hapes Prime Hapes Cluster The Empire ( 100.0 ) ]
[+----+----+----+----+----+----+----+----+----+----+----+----+----+----+-----+-----+]
See also: Showplanet
-<Hp:2975/2975>-<Cr:6346341>->import coruscant
You access the Information Computer with your datapad...
[+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+]
[ ]
[ Import and Export data for: Coruscant ]
[ ]
[ Resource Import Export Produces Consumes Amount ]
[ ---------- ------- ------- -------- --------- ------ ]
[ bacta 0/ton 250/ton 50 tons 0 tons 1950 ]
[ durasteel 600/ton 0/ton 0 tons 100 tons 0 ]
[ water 400/ton 0/ton 0 tons 100 tons 0 ]
[ food 200/ton 0/ton 0 tons 100 tons 0 ]
[ news 0/ton 100/ton 50 tons 0 tons 1200 ]
[ samples 300/ton 0/ton 0 tons 100 tons 0 ]
[ alloys 900/ton 0/ton 0 tons 50 tons 0 ]
[ books 0/ton 200/ton 50 tons 0 tons 2900 ]
[ clothing 0/ton 150/ton 50 tons 0 tons 950 ]
[ plasteel 800/ton 0/ton 0 tons 50 tons 0 ]
[ oil 0/ton 450/ton 25 tons 0 tons 1800 ]
[ vehicles 0/ton 650/ton 25 tons 0 tons 1205 ]
[+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+]
|
I've even tried to create a database to hold all of this information and automatically update for me to see if I could trigger off of that for the bestroutes function in LightBulbs trigger and it didn't seem to work because I just don't seem to understand the database system either. Copying data into Excel and then porting it over didn't help either because then the database becomes static and doesn't update with the mud. Is there anyone out there that can help me please?!!?!? |
|
|
|
zzyzzyzzx Beginner
Joined: 24 Oct 2006 Posts: 13
|
Posted: Sun Jun 28, 2009 11:04 am Re: Star Wars: Legends of the Sith Cargo Running Script |
the below works ... it has all variables already in there(sorry did not feel like removing them) ... i added something new so sales is all your update stuff ... updateplanets(DONT use unless a new planet is installed), and showother which will show output to a channel of your chooing
Code: |
#CLASS {lowcosts}
#ALIAS lowprices {#FORALL @lowlist {showlow %{i}}}
#ALIAS showlow {@reportchannel lowest price for %1: %expanddb( @{%1low}, " on the ", ": ")}
#ALIAS bestprices {#forall @profitlist {showgood %i}}
#ALIAS showgood {@reportchannel Best price for %1: %expanddb( @{%1}, " on the ", ": ")}
#ALIAS sales {#t+ getlowprices;#t+ getprices;#FORALL @lowlist {#VAR temp1 %{i}low;#UNVAR @temp1};#UNVAR lowlist;#FORALL @profitlist {#VAR temp2 %{i};#UNVAR @temp2};#UNVAR profitlist;#forall @planets {import %i}}
#ALIAS bestroutes {#if (%1=%null) {#FORALL @lowlist {showbest %{i}}} {@reportchannel lowest price for %1: %expanddb( @{%1low}, " on the ", ": ");@reportchannel Best price for %1: %expanddb( @{%1}, " on the ", ": ")}}
#ALIAS showbest {@reportchannel lowest price for %1: %expanddb( @{%1low}, " on the ", ": ");@reportchannel Best price for %1: %expanddb( @{%1}, " on the ", ": ");#CR}
#ALIAS updateplanets {#t+ planetupdates;planets}
#ALIAS planetsdone {#t- planetupdates}
#ALIAS setchannel {#var reportchannel %prompt( @reportchannel, set channel to report to)}
#ALIAS showother {#forall {%pick( "p:Select what you would like to show", @profitlist2)} {#additem showotherlist %i};#forall @showotherlist {%if( %0, %0, @reportchannel) buy %i: %expanddb( @{%i@down}, " on the ", ": ") and sell %i: %expanddb( @{%i}, " on the ", ": ");#delitem showotherlist {%i}}}
#VAR planets {Coruscant|Byss|Kashyyyk|Dosha|Mon Calamari|Honoghr|Gamorr|Tatooine|Endor|Adari|Yavin IV|Trian|Corellia|Roche|Af'el|Bimmisaari|Hoth|Kuat|Chadra|Nal Hutta|Blimph 3|Kamino|Ryloth|Coyn|Bespin|Hapes Prime}
#VAR planetlow {Coruscant}
#VAR planet {Coruscant}
#VAR templow {25000}
#VAR lowlist {bacta|durasteel|water|food|news|samples|alloys|books|clothing|plasteel|oil|vehicles|slaves|weapons|droids|alumina|plasmas|trillium|wood|gems|fauna|minerals|ore|flora|salvage|salt|leather|computers}
#VAR bactalow {price250planetCoruscant}
#VAR temp {25000}
#VAR profitlist2 {bacta|durasteel|water|food|news|samples|alloys|books|clothing|plasteel|oil|vehicles|slaves|weapons|droids|alumina|plasmas|trillium|wood|gems|fauna|minerals|ore|flora|salvage|salt|leather|computers}
#VAR bacta {price85000planetBespin}
#VAR durasteellow {price350planetByss}
#VAR durasteel {price60000planetCoruscant}
#VAR waterlow {price250planetMon Calamari}
#VAR water {price40000planetCoruscant}
#VAR foodlow {price100planetKashyyyk}
#VAR food {price60000planetBespin}
#VAR newslow {price100planetCoruscant}
#VAR news {price15000planetKashyyyk}
#VAR sampleslow {price200planetDosha}
#VAR samples {price30000planetCoruscant}
#VAR alloyslow {price400planetBespin}
#VAR alloys {price90000planetCoruscant}
#VAR bookslow {price200planetCoruscant}
#VAR books {price200planetCoruscant}
#VAR clothinglow {price150planetCoruscant}
#VAR clothing {price25000planetBespin}
#VAR plasteellow {price450planetByss}
#VAR plasteel {price80000planetCoruscant}
#VAR oillow {price450planetCoruscant}
#VAR oil {price80000planetTatooine}
#VAR vehicleslow {price650planetCoruscant}
#VAR vehicles {price120000planetMon Calamari}
#VAR slaveslow {price650planetKashyyyk}
#VAR slaves {price120000planetByss}
#VAR weaponslow {price450planetBespin}
#VAR weapons {price90000planetKashyyyk}
#VAR droidslow {price600planetRoche}
#VAR droids {price110000planetByss}
#VAR aluminalow {price450planetGamorr}
#VAR alumina {price80000planetByss}
#VAR plasmaslow {price600planetByss}
#VAR plasmas {price110000planetRoche}
#VAR trilliumlow {price500planetAf'el}
#VAR trillium {price90000planetByss}
#VAR woodlow {price300planetByss}
#VAR wood {price300planetByss}
#VAR gemslow {price300planetKashyyyk}
#VAR gems {price50000planetGamorr}
#VAR faunalow {price250planetKashyyyk}
#VAR fauna {price40000planetKuat}
#VAR mineralslow {price150planetMon Calamari}
#VAR minerals {price25000planetDosha}
#VAR orelow {price250planetDosha}
#VAR ore {price40000planetCorellia}
#VAR floralow {price250planetDosha}
#VAR flora {price40000planetBlimph 3}
#VAR salvagelow {price250planetHonoghr}
#VAR salvage {price40000planetMon Calamari}
#VAR saltlow {price250planetMon Calamari}
#VAR salt {price250planetMon Calamari}
#VAR leatherlow {price200planetEndor}
#VAR leather {price30000planetGamorr}
#VAR computerslow {price400planetRoche}
#VAR computers {price70000planetAdari}
#VAR temp1 {computerslow}
#VAR temp2 {computers}
#VAR reportchannel {gtell}
#VAR profitlist {bacta|durasteel|water|food|news|samples|alloys|books|clothing|plasteel|oil|vehicles|slaves|weapons|droids|alumina|plasmas|trillium|wood|gems|fauna|minerals|ore|flora|salvage|salt|leather|computers}
#VAR showotherlist {}
#VAR down {low}
#CLASS 0
#CLASS {lowcosts|getlowprices}
#TRIGGER {~[%sImport and Export data for: (*)%s~]} {planetlow = {%1};#if (%1=Hapes Prime) {#t- getlowprices}}
#TRIGGER {(%w)%s(%d)/ton%s(%d)/ton%s(%d) tons%s(%d) tons%s(%d)} {#MATH templow ((%2 * 100) + %3);#IF (%ismember( %1, @lowlist)) {#IF (@templow < %db( @%1low, price)) {#VARIABLE %1low "";#ADDKEY %1low {price=@templow|planet=@planetlow}}} {#ADDITEM lowlist "%1";#VARIABLE %1low "";#ADDKEY %1low {price=@templow|planet=@planetlow}}}
#CLASS 0
#CLASS {lowcosts|getprices}
#TRIGGER {~[%sImport and Export data for: (*)%s~]} {planet = {%1};#if (%1=Hapes Prime) {#t- getprices}}
#TRIGGER {(%w)%s(%d)/ton%s(%d)/ton%s(%d) tons%s(%d) tons%s(%d)} {#MATH temp ((%2 * 100) + %3);#IF (%ismember( %1, @profitlist)) {#IF (@temp > %db( @%1, price)) {#VARIABLE %1 "";#ADDKEY %1 {price=@temp|planet=@planet}}} {#ADDITEM profitlist "%1";#VARIABLE %1 "";#ADDKEY %1 {price=@temp|planet=@planet}}}
#CLASS 0
#CLASS {lowcosts|planetupdates}
#TRIGGER {%s(*)%s*%s*%s~(%s*%s~)%s} {#additem planets {%1}} "" {disable}
#TRIGGER {See also~: Showplanet} {planetsdone}
#REGEX {\[ (.{1,12}).*\]} {#additem planets {%1}}
#CLASS 0
|
|
|
|
|
teknozwizard Newbie
Joined: 28 Jun 2009 Posts: 7
|
Posted: Sun Jun 28, 2009 9:05 pm |
OMG! This is so friggin awesome! Thanks so much for helping me with this! Some quick updates though. The command "lowprices" brings up this menu......
-<Hp:2975/2975>-<Cr:199980>->lowest price for :
lowest price for bacta: price250planetCoruscant
lowest price for durasteel: price350planetByss
lowest price for water: price250planetMon Calamari
lowest price for food: price100planetKashyyyk
lowest price for news: price100planetCoruscant
lowest price for samples: price200planetDosha
lowest price for alloys: price400planetBespin
lowest price for books: price200planetCoruscant
lowest price for clothing: price150planetCoruscant
lowest price for plasteel: price450planetByss
lowest price for oil: price450planetCoruscant
lowest price for vehicles: price650planetCoruscant
lowest price for slaves: price650planetKashyyyk
lowest price for weapons: price450planetBespin
lowest price for droids: price600planetRoche
lowest price for alumina: price450planetGamorr
lowest price for plasmas: price600planetByss
lowest price for trillium: price500planetAf'el
lowest price for wood: price300planetByss
lowest price for gems: price300planetKashyyyk
lowest price for fauna: price250planetKashyyyk
lowest price for minerals: price150planetMon Calamari
lowest price for ore: price250planetDosha
lowest price for flora: price250planetDosha
lowest price for salvage: price250planetHonoghr
lowest price for salt: price250planetMon Calamari
lowest price for leather: price200planetEndor
lowest price for computers: price400planetRoche
"Bestprices" brings up.....
Best price for bacta: price85000planetBespin
Best price for durasteel: price60000planetCoruscant
Best price for water: price40000planetCoruscant
Best price for food: price60000planetBespin
Best price for news: price15000planetKashyyyk
Best price for samples: price30000planetCoruscant
Best price for alloys: price90000planetCoruscant
Best price for books: price200planetCoruscant
Best price for clothing: price25000planetBespin
Best price for plasteel: price80000planetCoruscant
Best price for oil: price80000planetTatooine
Best price for vehicles: price120000planetMon Calamari
Best price for slaves: price120000planetByss
Best price for weapons: price90000planetKashyyyk
Best price for droids: price110000planetByss
Best price for alumina: price80000planetByss
Best price for plasmas: price110000planetRoche
Best price for trillium: price90000planetByss
Best price for wood: price300planetByss
Best price for gems: price50000planetGamorr
Best price for fauna: price40000planetKuat
Best price for minerals: price25000planetDosha
Best price for ore: price40000planetCorellia
Best price for flora: price40000planetBlimph 3
Best price for salvage: price40000planetMon Calamari
Best price for salt: price250planetMon Calamari
Best price for leather: price30000planetGamorr
Best price for computers: price70000planetAdari
"Sales" acutally brings up the wrong commands......
Showplanet Byss resources
Showplanet Coruscant resources
Showplanet Yavin resources
Showplanet Corellia resources
Showplanet Ryloth resources
Showplanet Gamorr resources
Showplanet Tatooine resources
Showplanet Kashyyyk resources
Showplanet Wroona resources
Showplanet Roche resources
Showplanet 'Nal hutta' resources
showplanet 'Nim Drovis' resources
Showplanet 'Ord Mantell' resources
LotS doesn't use the "showplanet <planet name> resources" command, it's "imports <planet>," if that was what this command was for...
Bestroutes shows great info....
lowest price for bacta: price250planetCoruscant
Best price for bacta: price85000planetBespin
lowest price for durasteel: price350planetByss
Best price for durasteel: price60000planetCoruscant
lowest price for water: price250planetMon Calamari
Best price for water: price40000planetCoruscant
lowest price for food: price100planetKashyyyk
Best price for food: price60000planetBespin
lowest price for news: price100planetCoruscant
Best price for news: price15000planetKashyyyk
lowest price for samples: price200planetDosha
Best price for samples: price30000planetCoruscant
lowest price for alloys: price400planetBespin
Best price for alloys: price90000planetCoruscant
lowest price for books: price200planetCoruscant
Best price for books: price200planetCoruscant
lowest price for clothing: price150planetCoruscant
Best price for clothing: price25000planetBespin
lowest price for plasteel: price450planetByss
Best price for plasteel: price80000planetCoruscant
lowest price for oil: price450planetCoruscant
Best price for oil: price80000planetTatooine
lowest price for vehicles: price650planetCoruscant
Best price for vehicles: price120000planetMon Calamari
lowest price for slaves: price650planetKashyyyk
Best price for slaves: price120000planetByss
lowest price for weapons: price450planetBespin
Best price for weapons: price90000planetKashyyyk
lowest price for droids: price600planetRoche
Best price for droids: price110000planetByss
lowest price for alumina: price450planetGamorr
Best price for alumina: price80000planetByss
lowest price for plasmas: price600planetByss
Best price for plasmas: price110000planetRoche
lowest price for trillium: price500planetAf'el
Best price for trillium: price90000planetByss
lowest price for wood: price300planetByss
Best price for wood: price300planetByss
lowest price for gems: price300planetKashyyyk
Best price for gems: price50000planetGamorr
lowest price for fauna: price250planetKashyyyk
Best price for fauna: price40000planetKuat
lowest price for minerals: price150planetMon Calamari
Best price for minerals: price25000planetDosha
lowest price for ore: price250planetDosha
Best price for ore: price40000planetCorellia
lowest price for flora: price250planetDosha
Best price for flora: price40000planetBlimph 3
lowest price for salvage: price250planetHonoghr
Best price for salvage: price40000planetMon Calamari
lowest price for salt: price250planetMon Calamari
Best price for salt: price250planetMon Calamari
lowest price for leather: price200planetEndor
Best price for leather: price30000planetGamorr
lowest price for computers: price400planetRoche
Best price for computers: price70000planetAdari
This is a really great code, I kid you not. It's really really great. I'm wondering though, is there a way to separate the "price<number>planet<planet name>" so that it's easier to read? Also, I was wondering, on the "best price" side, those numbers are all in the thousands, was that an accident or is that extra 0 a calculations of the trigger?
Thanks again for all your hard work! |
|
|
|
zzyzzyzzx Beginner
Joined: 24 Oct 2006 Posts: 13
|
Posted: Wed Jul 01, 2009 3:35 pm |
i know remove the previous version that you had installed then add mine :P that will fix it ... oh i also added a new command showother <channelname> if the channelname is left blank it will default to Grouptell
|
|
|
|
teknozwizard Newbie
Joined: 28 Jun 2009 Posts: 7
|
Posted: Tue Jul 07, 2009 6:30 am |
Again, I can't thank you enough for this awesome code. However, I've run into another problem. After removing the old triggers and just using yours, the numbers are coming out perfectly and correctly. And it even works in cMud Beta (which is what I upgraded to because I'm using Windows Vista), however.....any time that I run any of the alias' to get the data, I get disconnected. It's like, cMud can only handle 10 separate lines of commands going through it at once or it freaks and disconnects me, is there a way to fix that or disable that? I tend to write very long notes when I RP and it's a pain in the but to copy and paste ten or twenty different lines of text because cMud can only handle 10 different lines of code pushing through it at once.
|
|
|
|
|
|
|
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
|
|