Hello There, Guest! Login Register


[feature] PROShine | InputDialog | Dynamic Parameters
#1
[Problem]
Usage of same script with different parameters. Either need to rewrite on every usage or generate multiple files containing same code.

[Example | Bot repositioning]
Necessary for trading, quest triggering (gold quest script), ...
Exemplarily here my move folder after some simple script runs.

[Image: move.png]
CeruleanBikeShop.lua as representative of all those scripts looks like:
local Map = require "libs.routing.enum.maps"
location = Map.CERULEAN_CITY_BIKE_SHOP

require "manager.Universal_Travel"

[Feature | InputDialog]
See this GitHubBranch for a possible implementation. Usage of an implemented version of a feature to choose from a selection could look something like this:
local Map = require "libs.routing.enum.maps"
location = getInputDialog(Maps.Values)

require "manager.Universal_Travel"

When executed getInputDialog() prompts a DropBoxDialog with all elements in list given as param - here Maps.Values. This could be looking like that:
[Image: 2017-08-07.png]
 
Reply
#2
im confused about the usage problem. doess that make it error or fail to run ?

so i have to save and resatrt script everytime?
 
Reply
#3
(2017-08-18, 09:50:06)Ivo im confused about the usage problem. doess that make it error or fail to run ?
Sry, I don't get what it is you're asking Rolleyes The InputDialog's task could basically be labeled as: dynamic parameter input.
What I ment in the example (guess that is your usage problem) was this:

[use case]
- repositioning of bots
- destination map changes often
[originally requires]
- creating multiple move files or
- constant rewriting of existing ones
[with feature]
- write single move script
- handle destination dynamically
- retrieve destination from input dialog

(2017-08-18, 09:50:06)Ivo so i have to save and resatrt script everytime?
  • While the script is running and kept in memory, no additional actions have to be taken.
  • Stopping and restarting the script would require you to input the parameter(s) again.
The later can be annoying. On the other hand, we want to automate things, so a constant restarting of scripts is unlikely (Exceptions confirm the rule: blissey's broken relogging should probably not be used in conjunction Angel Wink )
 
Reply
  


Forum Jump:


Browsing: 1 Guest(s)