![]() |
about #FORALL
Here I want to ask a question with a loop command.
When I make auto-quests robot, I have set a trigger to catch what quests can be bought in hockshop. such as: "$N对$n说道:正好正好,妾身占签得知$w现急需$o。\ "$N对$n点头说道:相公刚说了,让妾身征集什么", "$N想了一下,对$n说道:老夫听说军务处想要 blah blah I catched 3 variables : Q_give,Q_armor,Q_weapon and judged them as buyable with my DB. Then I use #ADDITEM to creat a variable @Q_buy={@Q_give|@Q_armor|@Q_weapon} such as {大板斧|金环锁子甲|青锋剑} Then I go to the hockshop to buy them. #FORALL @Q_buy {buy %i} #TRIGGER {你从当铺买到了一*} {#DELITEM @Q_buy %1} However, you know, buy something from hockshop make a little busy, that I can not buy 3 things in one time. How can I insert the #wa 2000 into the loop? or use other command, then what? Waiting for your kindly suggestion.Thank you all. |
饭要一口一口的吃,任务要一个一个的做。
young..
|
为什么搞得这么复杂呢?多用几个trigger不好吗?既简单,考虑的因素又少,还很容易debug。
nod fengyue |
#var Q 大板斧|金环锁子甲|青锋剑
#var step #var Qnum Qnum=%numitems(@Q) #if (@Qnum=0) {TODO} {step=1} buy %item(@Q,@step) #TRIGGER {你从当铺买到了一*} {#wa 2000 #ad step 1 #if (@step>@Qnum) {TODO} {buy %item(@Q,@step)}} 方法就是这样,不过就像sandman和fy说的一样要在quest robot中实现是不可能的 |
QUEUE啊..........
看到就^痛 |
You all are so warmheart!
Thanks you all! Thanks fengyue's suggestion, however I have made a trigger seem with Nirvana's idea like this: #if (@Qnum=0) {TODO} {step=1} buy %item(@Q,@step) #TRIGGER {你从当铺买到了一*} {#wa 2000 #ad step 1 #until (@step>@Qnum) {buy %item(@Q,@step)}} And here I want to ask another questions If the gold or silver is not enough when auto-quest How can I go back to withdraw gold and continue doing my task (How can I judge I'm doing weapon|armor|food...blah blah)? I have a idea with %trigger(), but it seems too many elements to consider Thanks! |
..............
goback withdraw->reset->buy @item from dp
身上多带点钱不就是了。。至于嘛。。 |
回复: about #forall
9494949494````````````````````
|
所有时间均为格林尼治时间 +9, 现在的时间是 05:07. |
Powered by SPLS
版权所有 2001-2023 水泊梁山
皖ICP备05012024号
站长 fengyue