Page 1 of 1

herb health alias

Posted: 15 Nov 2017 00:09
by bashere
Description: random healing herb array alias. Basically, I wanted some way to grab
a healing herb quickly without searching through my container.

Alias Command: health
Script Type: Javascript

Usage: will randomly attempt to get one of the herbs defined in the healing array. I'll
spam the command until it comes up with an herb from my container.

Required changes: change 'qarraba' below to whatever container you use.

var healing = [
"wintergreen leaf",
"blue gentian flower",
"redwood leaf",
"vampiric moss",
"adillyp weed",
"black raspberry",
"wild strawberry",
"skunk berries",
"sea bubble",
"brown slime",
"red eye",

gwc.connection.send('open qarraba');
var item = healing[Math.floor(Math.random()*healing.length)];
gwc.connection.send( 'get ' + item + ' from jar' );
gwc.connection.send( 'eat ' + item);
gwc.connection.send('close qarraba');