Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.

Due to spam on this forum, all posts now need moderator approval.

 Entire forum ➜ MUSHclient ➜ General ➜ Using a stringlist

Using a stringlist

It is now over 60 days since the last post. This thread is closed.     Refresh page


Pages: 1  2 

Posted by Deladan   (40 posts)  Bio
Date Reply #15 on Wed 08 Sep 2010 03:10 PM (UTC)
Message
and the @bag ones are my bags of stasis to reduce decay rate.
Top

Posted by Nick Gammon   Australia  (23,162 posts)  Bio   Forum Administrator
Date Reply #16 on Wed 08 Sep 2010 08:16 PM (UTC)
Message
What I'm asking here is for you to tell me what you would type into Achaea to equip one set, and then remove that set and equip another one.

Not using variables, not using aliases, just what you would actually type.

You can change the names a bit if you want to hide what you actually own.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Deladan   (40 posts)  Bio
Date Reply #17 on Wed 08 Sep 2010 09:46 PM (UTC)

Amended on Wed 08 Sep 2010 10:09 PM (UTC) by Deladan

Message
Something like this ?

mysets={
["speed"]={left="rapier 1",right="rapier 2"}, ["bow"]={left="bow 1",right=nil},
--etc.

}

mygear={
["rapier 1"]={
name="rapier110---",
damage=0,
container="bagXXXXX",
},
["rapier 2"]={
name="rapier3340---",
damage=0,
container="bagXXXXX",
},
["rapier 3"]={
name="rapier2492--",
damage=0,
container="bagXXXXX",
},
["rapier 4"]={
name="rapier289--",
damage=0,
container="bagXXXXX",
},
["scimitar 1"]={
name="scimitar30---",
damage=0,
container="bagXXXXX",
},
["scimitar 2"]={
name="scimitar360---",
damage=0,
container="bagXXXXX",
},
["flail 1"]={
name="flail106---",
damage=0,
container="bagXXXXX",
},
["broadsword 1"]={
name="broadsword142---",
damage=0,
container="bagXXXXX",
},
["bow 1"]={
name="bow410897",
damage=0,
container="bagXXXXX", },
}

pattern:
^wieldgear (\w+)$

script:

local set=matches[2]
if mysets[set]~=nil then

send("unwield left")
send("unwield right")

--put all the other gear away
for k,v in pairs(mygear) do
if k~=mysets[set].left and k~=mysets[set].right then
send("put "..v.name.." in "..v.container)
end
end

--take out the gear
local weaponone=mygear[mysets[set].left]
local weapontwo=mygear[mysets[set].right]
if weaponone~=nil then
send("take "..weaponone.name.." from "..weaponone.container)
send("wield "..weaponone.name.." left")
send("vconfig_weaponone "..weaponone.damage)
end
if weapontwo~=nil then
send("take "..weapontwo.name.." from "..weapontwo.container)
send("wield "..weapontwo.name.." right")
send("vconfig_weapontwo "..weapontwo.damage)
end

send("grip")

end
Top

Posted by Nick Gammon   Australia  (23,162 posts)  Bio   Forum Administrator
Date Reply #18 on Wed 08 Sep 2010 09:55 PM (UTC)

Amended on Wed 08 Sep 2010 09:56 PM (UTC) by Nick Gammon

Message
Deladan said:

Something like this ?



No.

Forget scripting. Forget aliases. Forget variables.

Just show me what you type to do stuff. Actually type into the MUD.

I can't help think this is getting more complicated than it needs to be, I want to see what problem we are solving, not the partial solution.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Deladan   (40 posts)  Bio
Date Reply #19 on Wed 08 Sep 2010 10:16 PM (UTC)
Message
relax grip
unwield left
unwield right
put broadsword12345 in bag2345
put broadsword23456 in bag2345
put scimitar12345 in bag2345
put scimitar23456 in bag2345
put rapier12345 in bag3456
put rapier23456 in bag3456
put totem12345 in bag1234
put rapier34567 in bag3456
put rapier45678 in bag3456
put rapier56789 in bag3456
put battleaxe12345 in loop1234
put battleaxe23456 in loop2345
put battleaxe34567 in loop3456
wear bow12345
get scimitar1 from bag2
get scimitar2 from bag2
wield right scimitar23456
wield left scimitar12345
grip
vconfig_weaponone 120
vconfig_weapontwo 132

Thats the exact commands with the weapon and bag numbers masked for my protection.....
Top

Posted by Nick Gammon   Australia  (23,162 posts)  Bio   Forum Administrator
Date Reply #20 on Thu 09 Sep 2010 12:54 AM (UTC)
Message
OK, good. Now can you clarify something?

You have this for removing the old stuff, right?


unwield left
unwield right
put broadsword12345 in bag2345
put broadsword23456 in bag2345
put scimitar12345 in bag2345
put scimitar23456 in bag2345
put rapier12345 in bag3456
put rapier23456 in bag3456
put totem12345 in bag1234
put rapier34567 in bag3456
put rapier45678 in bag3456
put rapier56789 in bag3456


But do you really remove all that? Or are you just putting every weapon away in the hope that one of them is there, and the others just give an error message?

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Deladan   (40 posts)  Bio
Date Reply #21 on Thu 09 Sep 2010 02:27 AM (UTC)
Message
Exactly. The thing with Achaea is that there are a great number of things that can cause you not to wield a weapon correctly. The same can be said for you not putting a weapon up as well. Basically I'm trying to make sure that everything is put away correctly ,and I have the weapons out that I want to have out at the time. And I also want to make sure that the ones I have out are wielded, so I do an alias like that to cover everything.
Top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


63,124 views.

This is page 2, subject is 2 pages long:  [Previous page]  1  2 

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.