|
darkar Newbie
Joined: 21 Jun 2010 Posts: 7
|
Posted: Mon Jun 21, 2010 10:17 pm
Dumping all commands to a string list |
#var list {smelt}
#var Todo {}
You are carrying:
<<<A peice of Gold used in Smelting>>>
<<<A peice of Gold used in Smelting>>>
<<<A peice of Gold used in Smelting>>>
<<<A peice of Gold used in Smelting>>>
oOoA Solid peice of Mercury used in SmeltingoOo
oOoA Solid peice of Mercury used in SmeltingoOo
oOoA Solid peice of Mercury used in SmeltingoOo
oOoA Solid peice of Mercury used in SmeltingoOo
=|A large peice of smelting Zinc|=
=|A large peice of smelting Zinc|=
=|A large peice of smelting Zinc|=
<<<Silver for Smelting>>>
<<<Silver for Smelting>>>
<<<Silver for Smelting>>>
<<<Silver for Smelting>>>
Basically, everytime it see's smelt it should add "smelt" to Todo{} for each of the items
#alias kk
@todo
then remove first from todo list
Ultimatly it will allow me to type kk for every command that I will send, for example:
currently keypad8 = {lastdir=north;north}
#alias door {unlock @lastdir;open @lastdir}
#trigger The door is closed. {todo=door}
#trigger The door is opened. {@lastdir}
that way a spell drops i hit kk.. a doors there i hit kk.... etc etc... I want to be able to use a stringed list into the same method.. Ore for smelting takes up alot of character weight and if i smelt on the fly I can simply streamline it. |
|
|
|
ralgith Sorcerer
Joined: 13 Jan 2006 Posts: 715
|
Posted: Tue Jun 22, 2010 4:33 am |
This is a fairly easy trigger...
Code: |
#TRIGGER {smelting} {#VAR todo %additem("smelt",@todo)}
#ALIAS kk {%pop(@smelt)}
|
Should do it. Assuming you don't need arguments. |
|
_________________ CrossOver: Windows Compatibility on Mac and Linux CMUD Advocate |
|
|
|
ralgith Sorcerer
Joined: 13 Jan 2006 Posts: 715
|
Posted: Tue Jun 22, 2010 4:35 am |
oops, I missed that you want other things added too, but you should be able to take the smelting trigger and modify it to suit the other uses.
|
|
_________________ CrossOver: Windows Compatibility on Mac and Linux CMUD Advocate |
|
|
|
darkar Newbie
Joined: 21 Jun 2010 Posts: 7
|
Posted: Tue Jun 22, 2010 5:52 am |
Ya I got that far, my problem is
#var list {smelt|brandish|whatever}
#TRIGGER {smelting} {#VAR todo %additem("smelt",@todo)}
to ->
#TRIGGER {smelting} {#VAR todo %additem("@list",@todo)}
then todo becomes
smelt
brandish
whatever
smelt
branish
whatever
per item it saw.. so its dumping the full string list per match into the new string
Am i doing something wrong
basically want to check a predefined string list and if something matches read that into the todo string list once per time its seen..... %pop works like a charm .. if i can just fix the other issue. |
|
|
|
ralgith Sorcerer
Joined: 13 Jan 2006 Posts: 715
|
Posted: Wed Jun 23, 2010 12:41 am |
Ok, if you're using a trigger for each individual keyword (like smelting) you don't need your "list" :)
There is a much more complicated single trigger that will work also, but I'm not gonna write it unless you have problems with the single triggers :) |
|
_________________ CrossOver: Windows Compatibility on Mac and Linux CMUD Advocate |
|
|
|
darkar Newbie
Joined: 21 Jun 2010 Posts: 7
|
Posted: Wed Jun 23, 2010 5:26 am |
reason for the list was so i could read everything into a list and use a master list based on keywords to pick them out so i wouldnt need a single trigger for everything.. i just showed a simple list but items are randomly named on this mud sometimes with the right keyword sometimes not.. so i was going to use this as a way to predefine and streamline :/
|
|
|
|
ralgith Sorcerer
Joined: 13 Jan 2006 Posts: 715
|
Posted: Wed Jun 23, 2010 2:34 pm |
Ah, ok. I'm pretty busy today, but I can help with this tomorrow probably.
|
|
_________________ CrossOver: Windows Compatibility on Mac and Linux CMUD Advocate |
|
|
|
darkar Newbie
Joined: 21 Jun 2010 Posts: 7
|
Posted: Thu Jun 24, 2010 11:20 am |
fresh day fresh mind, been playing with it a little bit more. and i kinda got it somewhat working but it only stores something once or ends up reading the whole string var per instance off the item so lets break it down, this way.
Data to be read: (affects/mobs/inventory whatever shouldnt matter if its set up right)
A peice of rope.
A peice of rope.
A peice of rope.
Db: @db (master file with everything defined as key - what to look for, and a %val what command to send)
%Key: %Val
A peice of rope | hold red
A lock of hair | get hair
String list: @Todo
everything added here using %additem so duplicates can be used
#trigger {*({%db(@db,%1) )})* {todo=%val} <---- 100% sure this is wrong but its the main part of the problem more than likely
#alias doit {%pop(@todo)} - or something
basically looking for something those lines..
i just keep running in circles so any help using this as a better more clear basis would be lovely, I generally can work the commands just fine within the trigger or alias part commands. but triggering off a key or a val in the @db keeps running me to ground |
|
|
|
|
|