Ich Brauch mal Hilfe von nen Profi

Hier ist der ideale Ort um über Scripts und Mods für X²: Die Bedrohung zu diskutieren.

Moderators: Scripting / Modding Moderators, Moderatoren für Deutsches X-Forum

Rogher[AKC]
Posts: 58
Joined: Sat, 7. Feb 04, 13:48
x3

Ich Brauch mal Hilfe von nen Profi

Post by Rogher[AKC] »

Hi Leute

Könnte jemand mir da script ByWareLoop so modifizieren,das ich
noch die menge der zu beziehenden ware eingeben kann es sollte dann das tun:
Fliege von heimatbasis nach (Ziel Wählen) und kaufe dort (menge wählen (zb 50 kristalle))
und wieder ab nach hause

das skript funzt ja schon, aber ich kann halt die menge nicht eingeben

Wäre echt toll wenn das jemand für mich machen könnte...



Besten Dank

001 * Set debug to 1 for debugging
002 $debug = 0
003
004 if $debug == 1
005 @ $dummy = [THIS] -> call script '!init.ship.commandupgrade' :
006 @ $dummy = [THIS] -> call script '!init.ship.globalscriptmap' :
007 end
008
009 * Create Buyware loop command
010
011 $race = Player
012 $upgrade = Trade Command Software MK1
013 $command = COMMAND_TYPE_TRADE_30
014
015 global ship map: set: key=$command, class=Ship, race=$race, script='ext.upgrade.buy.loop', prio=0
016 global ship map: ignore: key=$command, class=Fight drone, race=$race
017 global ship map: ignore: key=$command, class=Big Ship, race=$race
018 set ship command upgrade: command=$command upgrade=$upgrade
019
020 * Sell-loop script not complete so this code does not execute
021 return null
022
023 * Create Sellware loop command
024
025 $race = Player
026 $upgrade = Trade Command Software MK2
027 $command = COMMAND_TYPE_TRADE_31
028
029 global ship map: set: key=$command, class=Ship, race=$race, script='!ship.cmd.sellware.pl', prio=0
030 global ship map: ignore: key=$command, class=Fight drone, race=$race
031 global ship map: ignore: key=$command, class=Big Ship, race=$race
032 set ship command upgrade: command=$command upgrade=$upgrade
033
034 return null

**********************************************************************************
001 $ware = $inputarr[0]
002 $station = $inputarr[1]
003
004 if not [HOMEBASE]
005 $msg = 'Ship does not have assigned home base!'
006 send incoming message $msg to player: display it=[FALSE]
007 return null
008 end
009
010 skip if $numloops > 0
011 $numloops = 99999
012
013 $count = 0
014
015 while $count < $numloops
016 @ = [THIS] -> call script '!ship.cmd.getware.std' : ware=$ware trade partner=$station amount=null max price=null stay if unable to buy=null
017 $count = $count + 1
018 @ = wait randomly from 100 to 200 ms
019 end
020
021 return null
User avatar
GothicK
Posts: 248
Joined: Fri, 6. Feb 04, 14:47
x3tc

Re: Ich Brauch mal Hilfe von nen Profi

Post by GothicK »

Rogher wrote: 001 $ware = $inputarr[0]
002 $station = $inputarr[1]
003
004 if not [HOMEBASE]
005 $msg = 'Ship does not have assigned home base!'
006 send incoming message $msg to player: display it=[FALSE]
007 return null
008 end
009
010 skip if $numloops > 0
011 $numloops = 99999
012
013 $count = 0
014
015 while $count < $numloops
016 @ = [THIS] -> call script '!ship.cmd.getware.std' : ware=$ware trade partner=$station amount=null max price=null stay if unable to buy=null
017 $count = $count + 1
018 @ = wait randomly from 100 to 200 ms
019 end
020
021 return null
Füg bei Argumente ein neues vom Typ "Nummer" ein. Nenns wie du willst.
Und ändere in der Zeile:

Code: Select all

016 @  = [THIS] -> call script '!ship.cmd.getware.std' :  ware=$ware  trade partner=$station  amount=null  max price=null  stay if unable to buy=null
amount=null auf amount="dein Name für das Arg."
Solong, GothicK

Return to “X²: Die Bedrohung - Scripts und Modding”