UOS a simple food macro.

If you make a Client-side script you can publish it here for other players to use
Post Reply
User avatar
Turnabout
Elder Scribe
Posts: 117
Joined: Fri Dec 13, 2013 9:59 pm

UOS a simple food macro.

Post by Turnabout »

I don't know if hunger status has any impact on the shard, anyway this is a small macro for UOSteam that make your char eat food created with magery spell.

Code: Select all

//create 6 foods with magery "create food" spell. You can adjust the pause and the number of foods created.
for 6
  msg '[cs createfood'
  pause 1000
endfor
//create the list ethereal food. This macro is new, maybe some of the existing ethereal foods is not listed here, you can add it lately.
if not listexists "cibo_etereo"
  createlist "cibo_etereo"
endif
//cut of ribs
pushlist cibo_etereo 0x9f2
//muffins
pushlist cibo_etereo 0x9eb
//cooked bird
pushlist cibo_etereo 0x9b7
//peach
pushlist cibo_etereo 0x9d2
//wedge of cheese
pushlist cibo_etereo 0x97d
//fish steak
pushlist cibo_etereo 0x97b
//pizza
pushlist cibo_etereo 0x1040
//sausage
pushlist cibo_etereo 0x9c0
//ham
pushlist cibo_etereo 0x9c9
//pie
pushlist cibo_etereo 0x1041
//grape bunch
pushlist cibo_etereo 0x9d1
//apple
pushlist cibo_etereo 0x9d0
//Eat all kind of foods in the list that are into your MAIN backpack (level 0), even food that was not created by "create food" spell, so take care. If you need to carry some food that share the same graphics with one of the foods in the list put it into a secondary bag.
for 0 to 'cibo_etereo'
  while @findtype 'cibo_etereo[]' any backpack any 0
    useobject found
    pause 600
  endwhile
endfor
//this "removelist" is just to keep things clean. For example, you may want to remove an object from the list, thanks to this last command the list is updated automatically at every execution.
removelist "cibo_etereo"
The Skilled Image.
GreenBar
Grandmaster Scribe
Posts: 92
Joined: Sat Sep 28, 2013 4:05 pm

Re: UOS a simple food macro.

Post by GreenBar »

Affect from hunger status was put in but then removed. Display was left on the [buffs gump.
Few things:
1) Interestingly the buffs gump acts like a container. You can get its container ID in UOS using the object inspector. Can be used to test for active buffs.

2) To stop people from macroing create food then selling the food to NPC's for a profit, ethereal foods were added. After casting create food "too often" you soon only get three types of food.
pushlist cibo_etereo 0x97d //Wedge Of Ethereal Cheese
pushlist cibo_etereo 0x1040 //Ethereal Pizza
pushlist cibo_etereo 0x1041 //Ethereal Pie
Added bonus trivia, you can in line comment after pushlist statements. Makes the code easier to read in notepad.

3) You can add a hunger level test to your code and then only eat when "needed" with something like:
if @findtype 0x103c XX self
//insert eating code here
endif
XX values
43 is orange
37 is red
Didn't play with this further to document the other hunger level colors.

If you're in the habit of carrying bread hued to 37 or 43 around, you can change self to the buff container ID to make it look only in the buffs for the hunger status icon color.
Post Reply