chris-74269 Magician
Joined: 23 Nov 2004 Posts: 364
|
Posted: Sat Aug 26, 2006 5:26 pm
item pickup |
i have a trigger,
Code: |
^&nnn{@items} ~(*~)~ ~{&inum~}~. |
that will match an item that looks like (o)A case (glowing) {2}
i have a list of items in @items that i want to pickup, i do this so i can have just a long variable listing of items instead of 30 triggers, upon this executes
Code: |
#if (%numitems( @item) = 1) {#var item %additem( %lower( %word( %param, %eval( %numwords( %param)-1))), @item)} {#var item %lower( %word( %param, %eval( %numwords( %param)-1)))};getitem |
the problem is this, it works fine with only one copy of the item, but the number of items is indicated inside {}, so i want to pick it up twice. the alias getitem looks like,
Code: |
#alarm +.01 {
#if ((@playercheck = 0) & (@picker = 1)) {
get %item( @item, 1)
#if (@bags = 1) {put %item( @item, 1) in bag @buse}
#delnitem item 1
}
}
|
this is to prevent stealing items from other players. so what happens if there are two items is it picks up the first properly, but then does a 'get' and 'put in bag 2' because the var is empty, any suggestions on how to fix this? |
|