<!--{{{-->
<link rel='alternate' type='application/rss+xml' title='RSS' href='index.xml' />
<!--}}}-->
Background: #fff
Foreground: #000
PrimaryPale: #8cf
PrimaryLight: #18f
PrimaryMid: #04b
PrimaryDark: #014
SecondaryPale: #ffc
SecondaryLight: #fe8
SecondaryMid: #db4
SecondaryDark: #841
TertiaryPale: #eee
TertiaryLight: #ccc
TertiaryMid: #999
TertiaryDark: #666
Error: #f88
/*{{{*/
body {background:[[ColorPalette::Background]]; color:[[ColorPalette::Foreground]];}

a {color:[[ColorPalette::PrimaryMid]];}
a:hover {background-color:[[ColorPalette::PrimaryMid]]; color:[[ColorPalette::Background]];}
a img {border:0;}

h1,h2,h3,h4,h5,h6 {color:[[ColorPalette::SecondaryDark]]; background:transparent;}
h1 {border-bottom:2px solid [[ColorPalette::TertiaryLight]];}
h2,h3 {border-bottom:1px solid [[ColorPalette::TertiaryLight]];}

.button {color:[[ColorPalette::PrimaryDark]]; border:1px solid [[ColorPalette::Background]];}
.button:hover {color:[[ColorPalette::PrimaryDark]]; background:[[ColorPalette::SecondaryLight]]; border-color:[[ColorPalette::SecondaryMid]];}
.button:active {color:[[ColorPalette::Background]]; background:[[ColorPalette::SecondaryMid]]; border:1px solid [[ColorPalette::SecondaryDark]];}

.header {background:[[ColorPalette::PrimaryMid]];}
.headerShadow {color:[[ColorPalette::Foreground]];}
.headerShadow a {font-weight:normal; color:[[ColorPalette::Foreground]];}
.headerForeground {color:[[ColorPalette::Background]];}
.headerForeground a {font-weight:normal; color:[[ColorPalette::PrimaryPale]];}

.tabSelected{color:[[ColorPalette::PrimaryDark]];
	background:[[ColorPalette::TertiaryPale]];
	border-left:1px solid [[ColorPalette::TertiaryLight]];
	border-top:1px solid [[ColorPalette::TertiaryLight]];
	border-right:1px solid [[ColorPalette::TertiaryLight]];
}
.tabUnselected {color:[[ColorPalette::Background]]; background:[[ColorPalette::TertiaryMid]];}
.tabContents {color:[[ColorPalette::PrimaryDark]]; background:[[ColorPalette::TertiaryPale]]; border:1px solid [[ColorPalette::TertiaryLight]];}
.tabContents .button {border:0;}

#sidebar {}
#sidebarOptions input {border:1px solid [[ColorPalette::PrimaryMid]];}
#sidebarOptions .sliderPanel {background:[[ColorPalette::PrimaryPale]];}
#sidebarOptions .sliderPanel a {border:none;color:[[ColorPalette::PrimaryMid]];}
#sidebarOptions .sliderPanel a:hover {color:[[ColorPalette::Background]]; background:[[ColorPalette::PrimaryMid]];}
#sidebarOptions .sliderPanel a:active {color:[[ColorPalette::PrimaryMid]]; background:[[ColorPalette::Background]];}

.wizard {background:[[ColorPalette::PrimaryPale]]; border:1px solid [[ColorPalette::PrimaryMid]];}
.wizard h1 {color:[[ColorPalette::PrimaryDark]]; border:none;}
.wizard h2 {color:[[ColorPalette::Foreground]]; border:none;}
.wizardStep {background:[[ColorPalette::Background]]; color:[[ColorPalette::Foreground]];
	border:1px solid [[ColorPalette::PrimaryMid]];}
.wizardStep.wizardStepDone {background:[[ColorPalette::TertiaryLight]];}
.wizardFooter {background:[[ColorPalette::PrimaryPale]];}
.wizardFooter .status {background:[[ColorPalette::PrimaryDark]]; color:[[ColorPalette::Background]];}
.wizard .button {color:[[ColorPalette::Foreground]]; background:[[ColorPalette::SecondaryLight]]; border: 1px solid;
	border-color:[[ColorPalette::SecondaryPale]] [[ColorPalette::SecondaryDark]] [[ColorPalette::SecondaryDark]] [[ColorPalette::SecondaryPale]];}
.wizard .button:hover {color:[[ColorPalette::Foreground]]; background:[[ColorPalette::Background]];}
.wizard .button:active {color:[[ColorPalette::Background]]; background:[[ColorPalette::Foreground]]; border: 1px solid;
	border-color:[[ColorPalette::PrimaryDark]] [[ColorPalette::PrimaryPale]] [[ColorPalette::PrimaryPale]] [[ColorPalette::PrimaryDark]];}

.wizard .notChanged {background:transparent;}
.wizard .changedLocally {background:#80ff80;}
.wizard .changedServer {background:#8080ff;}
.wizard .changedBoth {background:#ff8080;}
.wizard .notFound {background:#ffff80;}
.wizard .putToServer {background:#ff80ff;}
.wizard .gotFromServer {background:#80ffff;}

#messageArea {border:1px solid [[ColorPalette::SecondaryMid]]; background:[[ColorPalette::SecondaryLight]]; color:[[ColorPalette::Foreground]];}
#messageArea .button {color:[[ColorPalette::PrimaryMid]]; background:[[ColorPalette::SecondaryPale]]; border:none;}

.popupTiddler {background:[[ColorPalette::TertiaryPale]]; border:2px solid [[ColorPalette::TertiaryMid]];}

.popup {background:[[ColorPalette::TertiaryPale]]; color:[[ColorPalette::TertiaryDark]]; border-left:1px solid [[ColorPalette::TertiaryMid]]; border-top:1px solid [[ColorPalette::TertiaryMid]]; border-right:2px solid [[ColorPalette::TertiaryDark]]; border-bottom:2px solid [[ColorPalette::TertiaryDark]];}
.popup hr {color:[[ColorPalette::PrimaryDark]]; background:[[ColorPalette::PrimaryDark]]; border-bottom:1px;}
.popup li.disabled {color:[[ColorPalette::TertiaryMid]];}
.popup li a, .popup li a:visited {color:[[ColorPalette::Foreground]]; border: none;}
.popup li a:hover {background:[[ColorPalette::SecondaryLight]]; color:[[ColorPalette::Foreground]]; border: none;}
.popup li a:active {background:[[ColorPalette::SecondaryPale]]; color:[[ColorPalette::Foreground]]; border: none;}
.popupHighlight {background:[[ColorPalette::Background]]; color:[[ColorPalette::Foreground]];}
.listBreak div {border-bottom:1px solid [[ColorPalette::TertiaryDark]];}

.tiddler .defaultCommand {font-weight:bold;}

.shadow .title {color:[[ColorPalette::TertiaryDark]];}

.title {color:[[ColorPalette::SecondaryDark]];}
.subtitle {color:[[ColorPalette::TertiaryDark]];}

.toolbar {color:[[ColorPalette::PrimaryMid]];}
.toolbar a {color:[[ColorPalette::TertiaryLight]];}
.selected .toolbar a {color:[[ColorPalette::TertiaryMid]];}
.selected .toolbar a:hover {color:[[ColorPalette::Foreground]];}

.tagging, .tagged {border:1px solid [[ColorPalette::TertiaryPale]]; background-color:[[ColorPalette::TertiaryPale]];}
.selected .tagging, .selected .tagged {background-color:[[ColorPalette::TertiaryLight]]; border:1px solid [[ColorPalette::TertiaryMid]];}
.tagging .listTitle, .tagged .listTitle {color:[[ColorPalette::PrimaryDark]];}
.tagging .button, .tagged .button {border:none;}

.footer {color:[[ColorPalette::TertiaryLight]];}
.selected .footer {color:[[ColorPalette::TertiaryMid]];}

.sparkline {background:[[ColorPalette::PrimaryPale]]; border:0;}
.sparktick {background:[[ColorPalette::PrimaryDark]];}

.error, .errorButton {color:[[ColorPalette::Foreground]]; background:[[ColorPalette::Error]];}
.warning {color:[[ColorPalette::Foreground]]; background:[[ColorPalette::SecondaryPale]];}
.lowlight {background:[[ColorPalette::TertiaryLight]];}

.zoomer {background:none; color:[[ColorPalette::TertiaryMid]]; border:3px solid [[ColorPalette::TertiaryMid]];}

.imageLink, #displayArea .imageLink {background:transparent;}

.annotation {background:[[ColorPalette::SecondaryLight]]; color:[[ColorPalette::Foreground]]; border:2px solid [[ColorPalette::SecondaryMid]];}

.viewer .listTitle {list-style-type:none; margin-left:-2em;}
.viewer .button {border:1px solid [[ColorPalette::SecondaryMid]];}
.viewer blockquote {border-left:3px solid [[ColorPalette::TertiaryDark]];}

.viewer table, table.twtable {border:2px solid [[ColorPalette::TertiaryDark]];}
.viewer th, .viewer thead td, .twtable th, .twtable thead td {background:[[ColorPalette::SecondaryMid]]; border:1px solid [[ColorPalette::TertiaryDark]]; color:[[ColorPalette::Background]];}
.viewer td, .viewer tr, .twtable td, .twtable tr {border:1px solid [[ColorPalette::TertiaryDark]];}

.viewer pre {border:1px solid [[ColorPalette::SecondaryLight]]; background:[[ColorPalette::SecondaryPale]];}
.viewer code {color:[[ColorPalette::SecondaryDark]];}
.viewer hr {border:0; border-top:dashed 1px [[ColorPalette::TertiaryDark]]; color:[[ColorPalette::TertiaryDark]];}

.highlight, .marked {background:[[ColorPalette::SecondaryLight]];}

.editor input {border:1px solid [[ColorPalette::PrimaryMid]];}
.editor textarea {border:1px solid [[ColorPalette::PrimaryMid]]; width:100%;}
.editorFooter {color:[[ColorPalette::TertiaryMid]];}

#backstageArea {background:[[ColorPalette::Foreground]]; color:[[ColorPalette::TertiaryMid]];}
#backstageArea a {background:[[ColorPalette::Foreground]]; color:[[ColorPalette::Background]]; border:none;}
#backstageArea a:hover {background:[[ColorPalette::SecondaryLight]]; color:[[ColorPalette::Foreground]]; }
#backstageArea a.backstageSelTab {background:[[ColorPalette::Background]]; color:[[ColorPalette::Foreground]];}
#backstageButton a {background:none; color:[[ColorPalette::Background]]; border:none;}
#backstageButton a:hover {background:[[ColorPalette::Foreground]]; color:[[ColorPalette::Background]]; border:none;}
#backstagePanel {background:[[ColorPalette::Background]]; border-color: [[ColorPalette::Background]] [[ColorPalette::TertiaryDark]] [[ColorPalette::TertiaryDark]] [[ColorPalette::TertiaryDark]];}
.backstagePanelFooter .button {border:none; color:[[ColorPalette::Background]];}
.backstagePanelFooter .button:hover {color:[[ColorPalette::Foreground]];}
#backstageCloak {background:[[ColorPalette::Foreground]]; opacity:0.6; filter:'alpha(opacity=60)';}
/*}}}*/
/*{{{*/
* html .tiddler {height:1%;}

body {font-size:.75em; font-family:arial,helvetica; margin:0; padding:0;}

h1,h2,h3,h4,h5,h6 {font-weight:bold; text-decoration:none;}
h1,h2,h3 {padding-bottom:1px; margin-top:1.2em;margin-bottom:0.3em;}
h4,h5,h6 {margin-top:1em;}
h1 {font-size:1.35em;}
h2 {font-size:1.25em;}
h3 {font-size:1.1em;}
h4 {font-size:1em;}
h5 {font-size:.9em;}

hr {height:1px;}

a {text-decoration:none;}

dt {font-weight:bold;}

ol {list-style-type:decimal;}
ol ol {list-style-type:lower-alpha;}
ol ol ol {list-style-type:lower-roman;}
ol ol ol ol {list-style-type:decimal;}
ol ol ol ol ol {list-style-type:lower-alpha;}
ol ol ol ol ol ol {list-style-type:lower-roman;}
ol ol ol ol ol ol ol {list-style-type:decimal;}

.txtOptionInput {width:11em;}

#contentWrapper .chkOptionInput {border:0;}

.externalLink {text-decoration:underline;}

.indent {margin-left:3em;}
.outdent {margin-left:3em; text-indent:-3em;}
code.escaped {white-space:nowrap;}

.tiddlyLinkExisting {font-weight:bold;}
.tiddlyLinkNonExisting {font-style:italic;}

/* the 'a' is required for IE, otherwise it renders the whole tiddler in bold */
a.tiddlyLinkNonExisting.shadow {font-weight:bold;}

#mainMenu .tiddlyLinkExisting,
	#mainMenu .tiddlyLinkNonExisting,
	#sidebarTabs .tiddlyLinkNonExisting {font-weight:normal; font-style:normal;}
#sidebarTabs .tiddlyLinkExisting {font-weight:bold; font-style:normal;}

.header {position:relative;}
.header a:hover {background:transparent;}
.headerShadow {position:relative; padding:4.5em 0 1em 1em; left:-1px; top:-1px;}
.headerForeground {position:absolute; padding:4.5em 0 1em 1em; left:0px; top:0px;}

.siteTitle {font-size:3em;}
.siteSubtitle {font-size:1.2em;}

#mainMenu {position:absolute; left:0; width:10em; text-align:right; line-height:1.6em; padding:1.5em 0.5em 0.5em 0.5em; font-size:1.1em;}

#sidebar {position:absolute; right:3px; width:16em; font-size:.9em;}
#sidebarOptions {padding-top:0.3em;}
#sidebarOptions a {margin:0 0.2em; padding:0.2em 0.3em; display:block;}
#sidebarOptions input {margin:0.4em 0.5em;}
#sidebarOptions .sliderPanel {margin-left:1em; padding:0.5em; font-size:.85em;}
#sidebarOptions .sliderPanel a {font-weight:bold; display:inline; padding:0;}
#sidebarOptions .sliderPanel input {margin:0 0 0.3em 0;}
#sidebarTabs .tabContents {width:15em; overflow:hidden;}

.wizard {padding:0.1em 1em 0 2em;}
.wizard h1 {font-size:2em; font-weight:bold; background:none; padding:0; margin:0.4em 0 0.2em;}
.wizard h2 {font-size:1.2em; font-weight:bold; background:none; padding:0; margin:0.4em 0 0.2em;}
.wizardStep {padding:1em 1em 1em 1em;}
.wizard .button {margin:0.5em 0 0; font-size:1.2em;}
.wizardFooter {padding:0.8em 0.4em 0.8em 0;}
.wizardFooter .status {padding:0 0.4em; margin-left:1em;}
.wizard .button {padding:0.1em 0.2em;}

#messageArea {position:fixed; top:2em; right:0; margin:0.5em; padding:0.5em; z-index:2000; _position:absolute;}
.messageToolbar {display:block; text-align:right; padding:0.2em;}
#messageArea a {text-decoration:underline;}

.tiddlerPopupButton {padding:0.2em;}
.popupTiddler {position: absolute; z-index:300; padding:1em; margin:0;}

.popup {position:absolute; z-index:300; font-size:.9em; padding:0; list-style:none; margin:0;}
.popup .popupMessage {padding:0.4em;}
.popup hr {display:block; height:1px; width:auto; padding:0; margin:0.2em 0;}
.popup li.disabled {padding:0.4em;}
.popup li a {display:block; padding:0.4em; font-weight:normal; cursor:pointer;}
.listBreak {font-size:1px; line-height:1px;}
.listBreak div {margin:2px 0;}

.tabset {padding:1em 0 0 0.5em;}
.tab {margin:0 0 0 0.25em; padding:2px;}
.tabContents {padding:0.5em;}
.tabContents ul, .tabContents ol {margin:0; padding:0;}
.txtMainTab .tabContents li {list-style:none;}
.tabContents li.listLink { margin-left:.75em;}

#contentWrapper {display:block;}
#splashScreen {display:none;}

#displayArea {margin:1em 17em 0 14em;}

.toolbar {text-align:right; font-size:.9em;}

.tiddler {padding:1em 1em 0;}

.missing .viewer,.missing .title {font-style:italic;}

.title {font-size:1.6em; font-weight:bold;}

.missing .subtitle {display:none;}
.subtitle {font-size:1.1em;}

.tiddler .button {padding:0.2em 0.4em;}

.tagging {margin:0.5em 0.5em 0.5em 0; float:left; display:none;}
.isTag .tagging {display:block;}
.tagged {margin:0.5em; float:right;}
.tagging, .tagged {font-size:0.9em; padding:0.25em;}
.tagging ul, .tagged ul {list-style:none; margin:0.25em; padding:0;}
.tagClear {clear:both;}

.footer {font-size:.9em;}
.footer li {display:inline;}

.annotation {padding:0.5em; margin:0.5em;}

* html .viewer pre {width:99%; padding:0 0 1em 0;}
.viewer {line-height:1.4em; padding-top:0.5em;}
.viewer .button {margin:0 0.25em; padding:0 0.25em;}
.viewer blockquote {line-height:1.5em; padding-left:0.8em;margin-left:2.5em;}
.viewer ul, .viewer ol {margin-left:0.5em; padding-left:1.5em;}

.viewer table, table.twtable {border-collapse:collapse; margin:0.8em 1.0em;}
.viewer th, .viewer td, .viewer tr,.viewer caption,.twtable th, .twtable td, .twtable tr,.twtable caption {padding:3px;}
table.listView {font-size:0.85em; margin:0.8em 1.0em;}
table.listView th, table.listView td, table.listView tr {padding:0px 3px 0px 3px;}

.viewer pre {padding:0.5em; margin-left:0.5em; font-size:1.2em; line-height:1.4em; overflow:auto;}
.viewer code {font-size:1.2em; line-height:1.4em;}

.editor {font-size:1.1em;}
.editor input, .editor textarea {display:block; width:100%; font:inherit;}
.editorFooter {padding:0.25em 0; font-size:.9em;}
.editorFooter .button {padding-top:0px; padding-bottom:0px;}

.fieldsetFix {border:0; padding:0; margin:1px 0px;}

.sparkline {line-height:1em;}
.sparktick {outline:0;}

.zoomer {font-size:1.1em; position:absolute; overflow:hidden;}
.zoomer div {padding:1em;}

* html #backstage {width:99%;}
* html #backstageArea {width:99%;}
#backstageArea {display:none; position:relative; overflow: hidden; z-index:150; padding:0.3em 0.5em;}
#backstageToolbar {position:relative;}
#backstageArea a {font-weight:bold; margin-left:0.5em; padding:0.3em 0.5em;}
#backstageButton {display:none; position:absolute; z-index:175; top:0; right:0;}
#backstageButton a {padding:0.1em 0.4em; margin:0.1em;}
#backstage {position:relative; width:100%; z-index:50;}
#backstagePanel {display:none; z-index:100; position:absolute; width:90%; margin-left:3em; padding:1em;}
.backstagePanelFooter {padding-top:0.2em; float:right;}
.backstagePanelFooter a {padding:0.2em 0.4em;}
#backstageCloak {display:none; z-index:20; position:absolute; width:100%; height:100px;}

.whenBackstage {display:none;}
.backstageVisible .whenBackstage {display:block;}
/*}}}*/
/***
StyleSheet for use when a translation requires any css style changes.
This StyleSheet can be used directly by languages such as Chinese, Japanese and Korean which need larger font sizes.
***/
/*{{{*/
body {font-size:0.8em;}
#sidebarOptions {font-size:1.05em;}
#sidebarOptions a {font-style:normal;}
#sidebarOptions .sliderPanel {font-size:0.95em;}
.subtitle {font-size:0.8em;}
.viewer table.listView {font-size:0.95em;}
/*}}}*/
/*{{{*/
@media print {
#mainMenu, #sidebar, #messageArea, .toolbar, #backstageButton, #backstageArea {display: none !important;}
#displayArea {margin: 1em 1em 0em;}
noscript {display:none;} /* Fixes a feature in Firefox 1.5.0.2 where print preview displays the noscript content */
}
/*}}}*/
<!--{{{-->
<div class='header' macro='gradient vert [[ColorPalette::PrimaryLight]] [[ColorPalette::PrimaryMid]]'>
<div class='headerShadow'>
<span class='siteTitle' refresh='content' tiddler='SiteTitle'></span>&nbsp;
<span class='siteSubtitle' refresh='content' tiddler='SiteSubtitle'></span>
</div>
<div class='headerForeground'>
<span class='siteTitle' refresh='content' tiddler='SiteTitle'></span>&nbsp;
<span class='siteSubtitle' refresh='content' tiddler='SiteSubtitle'></span>
</div>
</div>
<div id='mainMenu' refresh='content' tiddler='MainMenu'></div>
<div id='sidebar'>
<div id='sidebarOptions' refresh='content' tiddler='SideBarOptions'></div>
<div id='sidebarTabs' refresh='content' force='true' tiddler='SideBarTabs'></div>
</div>
<div id='displayArea'>
<div id='messageArea'></div>
<div id='tiddlerDisplay'></div>
</div>
<!--}}}-->
<!--{{{-->
<div class='toolbar' macro='toolbar [[ToolbarCommands::ViewToolbar]]'></div>
<div class='title' macro='view title'></div>
<div class='subtitle'><span macro='view modifier link'></span>, <span macro='view modified date'></span> (<span macro='message views.wikified.createdPrompt'></span> <span macro='view created date'></span>)</div>
<div class='tagging' macro='tagging'></div>
<div class='tagged' macro='tags'></div>
<div class='viewer' macro='view text wikified'></div>
<div class='tagClear'></div>
<!--}}}-->
<!--{{{-->
<div class='toolbar' macro='toolbar [[ToolbarCommands::EditToolbar]]'></div>
<div class='title' macro='view title'></div>
<div class='editor' macro='edit title'></div>
<div macro='annotations'></div>
<div class='editor' macro='edit text'></div>
<div class='editor' macro='edit tags'></div><div class='editorFooter'><span macro='message views.editor.tagPrompt'></span><span macro='tagChooser excludeLists'></span></div>
<!--}}}-->
To get started with this blank [[TiddlyWiki]], you'll need to modify the following tiddlers:
* [[SiteTitle]] & [[SiteSubtitle]]: The title and subtitle of the site, as shown above (after saving, they will also appear in the browser title bar)
* [[MainMenu]]: The menu (usually on the left)
* [[DefaultTiddlers]]: Contains the names of the tiddlers that you want to appear when the TiddlyWiki is opened
You'll also need to enter your username for signing your edits: <<option txtUserName>>
These [[InterfaceOptions]] for customising [[TiddlyWiki]] are saved in your browser

Your username for signing your edits. Write it as a [[WikiWord]] (eg [[JoeBloggs]])

<<option txtUserName>>
<<option chkSaveBackups>> [[SaveBackups]]
<<option chkAutoSave>> [[AutoSave]]
<<option chkRegExpSearch>> [[RegExpSearch]]
<<option chkCaseSensitiveSearch>> [[CaseSensitiveSearch]]
<<option chkAnimate>> [[EnableAnimations]]

----
Also see [[AdvancedOptions]]
<<importTiddlers>>
D2BS stands for Diablo II Botting System.
Welcome
//{{{

config.macros.eventList = {
	handler: function (place, macroName, params, wikifier, paramString) {
		var functions = "!Events:\r\n\r\n";
		params = params.sort();
		for(var i = 0; i < params.length; i++)
			functions += '[[' + params[i] + ']]\r\n';

		wikify(functions, place);
	}
};

//}}}
//{{{

config.macros.event = {
	handler: function (place, macroName, params, wikifier, paramString, tiddler) {
		var p = paramString.parseParams(null, null, true);
		var len = tiddler.title.indexOf('Event');
		if(len == -1) len = tiddler.title.length;
		var name = getParam(p, "name") || tiddler.title.slice(0, len);
		var args = getParam(p, "args");
		var retVal = getParam(p, "returnType") || 'void';
		var remarks = getParam(p, "remarks") || 'none';
		var example = getParam(p, "example") || '';
		wikify("!Event:\r\n{{{" + retVal + " " + name + "(" + args + ")}}}\r\n\r\n" +
			 "!!!''Remarks:''\r\n" + remarks + "\r\n\r\n" +
			 "!!!''Example:''\r\n{{{" + example + "}}}",
			 place);
	}
};

//}}}
<<eventList
	ItemActionEvent
	GameMsgEvent
	ChatMsgEvent
	WhisperMsgEvent
	MeLifeEvent
	MeManaEvent
	KeyUpEvent
	KeyDownEvent
	PlayerAssignEvent
	MouseClickEvent
	ScriptMsgEvent
	GoldDropEvent
	CopyDataEvent
	GameEventEvent
>>
[[Terminology]]
[[How D2BS works]]
[[How to run a script]]
[[How to write a script]]
<<func prefix:"File" args:"" returnType:"" returns:"" remarks:"" example:"">>
<<functionList prefix:"File" type:"Static"
	open
>>
<<functionList prefix:"File"
	close
	reopen
	read
	readLine
	readAllLines
	readAll
	write
	seek
	flush
	reset
	end
>>
<<propertyList prefix:"File"
	readable
	writable
	seekable
	mode
	binaryMode
	autoflush
	length
	path
	position
	eof
>>
<<func prefix:"FileTools" args:"string name, object content [, ... ]" returnType:"bool" returns:"True if all the content was successfully appended, otherwise false." remarks:"Appends all of the contents to a file based on the file name. All paths are relative to the script folder." example:"FileTools.appendText('/logs/mylog.txt', 'January 2nd. Got eaten by a grue. Apparently he wanted the beans.');">>
<<func prefix:"FileTools" args:"string original, string newname" returnType:"bool" returns:"True if the copy succeeded, otherwise false." remarks:"Copies a file on disk to a new name. All paths are relative to the script folder." example:"var contents = FileTools.copy('/logs/mylog.txt', '/logs/mybackup.txt');">>
<<func prefix:"FileTools" args:"string name" returnType:"bool" returns:"True if the file exists, otherwise false." remarks:"Checks to see if the specified file exists on disk. All paths are relative to the script folder." example:"if(FileTools.exists('/logs/mylog.txt'))
	print('I have a log!');">>
<<func prefix:"FileTools" args:"string name" returnType:"string" returns:"The entire file contents." remarks:"Reads all of the contents from the specified file and returns it as a string. All paths are relative to the script folder." example:"var contents = FileTools.readText('/logs/mylog.txt');">>
<<func prefix:"FileTools" args:"string name" returnType:"bool" returns:"True if the file was removed, otherwise false." remarks:"Remove a file based on the file name. All paths are relative to the script folder." example:"FileTools.remove('/some/file.txt');">>
<<func prefix:"FileTools" args:"string original, string newname" returnType:"bool" returns:"True if the rename succeeded, otherwise false." remarks:"Renames a file on disk to a new name. All paths are relative to the script folder." example:"var contents = FileTools.rename('/logs/mylog.txt', '/logs/oldlog.txt');">>
<<func prefix:"FileTools" args:"string name, object content [, ... ]" returnType:"bool" returns:"True if of all the contents were successfully written, otherwise false." remarks:"Overwrites all of the old contents of a file with the new specified contents based on the file name. All paths are relative to the script folder." example:"FileTools.writeText('/logs/mylog.txt', 'January 1st. Found an old can of beans. No idea what it's for, but it's got to be useful for something.');">>
<<functionList prefix:"FileTools"
	remove
	rename
	copy
	exists
	readText
	writeText
	appendText
>>
//{{{

config.macros.functionList = {
	handler: function (place, macroName, params, wikifier, paramString) {
		var args = paramString.parseParams(null,null,true);

		var prefix = getParam(args, "prefix") || '';
		if(prefix != '') {
			prefix += '.';
			params.shift();
		}

		var type = getParam(args, "type") || '';
		if(type != '') {
			type += ' ';
			params.shift();
		}

		params = params.sort();
		var functions = '!' + type + 'Functions:\r\n\r\n';
		for(var i = 0; i < params.length; i++)
		{
			functions += '[[' + prefix + params[i] + ']]\r\n';
		}

		wikify(functions, place);
	}
};

//}}}
//{{{

config.macros.func = {
	handler: function (place, macroName, params, wikifier, paramString, tiddler) {
		var p = paramString.parseParams(null, null, true);
		var name = getParam(p, "name") || tiddler.title.slice(tiddler.title.indexOf('.')+1);
		var args = getParam(p, "args") || '';
		var retVal = getParam(p, "returnType") || 'void';
		var ret = getParam(p, "returns") || 'void';
		var remarks = getParam(p, "remarks") || 'none';
		var example = getParam(p, "example") || '';
		var prefix = getParam(p, "prefix") || '';
		wikify("!Function:\r\n{{{" + retVal + " " + (prefix != '' ? prefix + '.' : '') + name + "(" + args + ")}}}\r\n\r\n" +
			 "''Returns:'' " + ret + "\r\n\r\n" +
			 "!!!''Remarks:''\r\n" + remarks + "\r\n\r\n" +
			 "!!!''Example:''\r\n{{{" + example + "}}}",
			 place);
	}
};

//}}}
<<functionList
	getUnit
	getPath
	getCollision
	getMercHP
	getCursorType
	getSkillByName
	getSkillById
	getLocaleString
	getTextWidthHeight
	getThreadPriority
	getUIFlag
	getTradeInfo
	getWaypoint
	getScript
	getRoom
	getParty
	getPresetUnit
	getPresetUnits
	getArea
	getBaseStat
	getControl
	getPlayerFlag
	getTickCount
	getInteractedNPC
	print
	delay
	load
	isIncluded
	include
	stop
	rand
	sendCopyData
	sendDDE
	keystate
	addEventListener
	removeEventListener
	clearEvent
	clearAllEvents
	js_strict
	version
	scriptBroadcast
	sqlite_version
	dopen
	debugLog
	iniread
	iniwrite
	submitItem
	login
	createGame
	joinGame
	getLocation
	getMouseCoords
	copyUnit
	clickMap
	acceptTrade
	beep
	clickItem
	getDistance
	gold
	checkCollision
	playSound
	quit
	quitGame
	say
	clickParty
	blockMinimize
	weaponSwitch
	transmute
	md5
	sha1
	sha256
	sha384
	sha512
	md5_file
	sha1_file
	sha256_file
	sha384_file
	sha512_file
	addProfile
	profileExists
>>
<<objectList
	me
>>
As a test, we'll use a continuous spam message while we remain in game.

Here's the code:
{{{
while(me.ingame)
{
	me.overhead("Hello, world!");
	delay(1500);
}
}}}

Save the above code as, for now, "test.dbj" inside of your scripts folder.

Now open the default.dbj and add the following to the top of that file:

{{{load("test.dbj");}}}

Then, join a game and watch as your character says "Hello, world!" in his overhead message box!
<<event args:"int gid, int mode, string code, bool global" remarks:"If global is true, the item action is a 'world action', meaning everyone in game got the same event">>
GlobalFunctions
GlobalObjects
[[Objects]]
[[Events]]
[[FAQs]]
//{{{

config.macros.objectList = {
	handler: function (place, macroName, params, wikifier, paramString) {
		var functions = "!Objects:\r\n\r\n";
		params = params.sort();
		for(var i = 0; i < params.length; i++)
			functions += '[[' + params[i] + ']]\r\n';

		wikify(functions, place);
	}
};

//}}}
<<objectList
	SQLiteObject
	DBStatementObject
	FileObject
	FileToolsObject
	D2BSScriptObject
	FrameObject
	BoxObject
	LineObject
	TextObject
	ImageObject
	SandboxObject
	RoomObject
	PresetUnitObject
	PartyObject
	ExitObject
	DirectoryObject
	ControlObject
	AreaObject
	UnitObject
>>
//{{{

config.macros.propertyList = {
	handler: function (place, macroName, params, wikifier, paramString) {
		var args = paramString.parseParams(null,null,true);
		var prefix = getParam(args, "prefix") || '';
		if(prefix != '') {
			prefix += '.';
			params.shift();
		}
		var functions = '!Properties:\r\n\r\n';
		var start = (prefix != '' ? 1 : 0);
		params = params.sort();
		for(var i = start; i < params.length; i++)
		{
			functions += '[[' + prefix + params[i] + ']]\r\n';
		}
		wikify(functions, place);
	}
};

//}}}
//{{{

config.macros.property = {
	handler: function (place, macroName, params, wikifier, paramString, tiddler) {
		var p = paramString.parseParams(null, null, true);
		var name = getParam(p, "name") || tiddler.title.slice(tiddler.title.indexOf('.')+1);
		var type = getParam(p, "type") || '';
		var remarks = getParam(p, "remarks") || 'none';
		var example = getParam(p, "example") || '';
		var prefix = getParam(p, "prefix") || '';
		wikify("!Property:\r\n{{{" + type + " " + (prefix != '' ? prefix + '.' : '') + name +";}}}\r\n\r\n" +
			 "!!!''Remarks:''\r\n" + remarks + "\r\n\r\n" +
			 "!!!''Example:''\r\n{{{" + example + "}}}",
			 place);
	}
};

//}}}
everything you wanted to know about D2BS, but were afraid to ask
D2BS API
http://www.assembla.com/wiki/show/d2bs/
code { color: #555 !important; margin-left: 15px !important; }
!Function:
{{{$1($2)}}}

''Returns:'' $3

!!!''Remarks:''
$4

!!!''Example:''
{{{$5}}}
Welcome to the D2BS API Documentation.

Online support is available [[via forums|http://www.edgeofnowhere.cc/index.php?c=22]] and [[via irc|irc://irc.synirc.net/d2bs]].

The Assembla project page is available [[here|http://www.assembla.com/wiki/show/d2bs/]], and the latest release can be downloaded from the [[files section|http://www.assembla.com/spaces/d2bs/documents]].

!!THIS DOCUMENT HAS BEEN SUPERCEDED BY THE DOCUMENTATION [[HERE|http://docs.d2bs.org]]

This document is not complete! A lot of things are still missing, a lot of things have just stubs, and a lot of things need to be double checked to ensure accuracy! If you want to help with this, please contact any member of the D2BS team via forums or irc (linked above).
<<func args:"[ int mode ]" returnType:"int" returns:"If you pass a mode, the return value varies based on what mode. If you do not pass a mode, the return value is true if the trade action was not blocked, otherwise false" remarks:"Modes:
1 - Whether or not you have accepted trade
2 - Returns the trade flags (Not documented yet)
3 - Whether or not the 'checkbox' is red (unable to trade)" example:"">>
<<func args:"string event, Function listener" returnType:"" returns:"" remarks:"Registers listener to listen to events of the specified type" example:"">>
<<func args:"string name, string mode, string gateway, string username, string password, string character" remarks:"Adds the specified profile to ~D2BS.ini." example:"if(!profileExists('test')) addProfile('test', 'single', '', '', '', 'tester');">>
<<func args:"uint type" remarks:"This function is the equivalent of the ~WinAPI function [[MessageBeep|http://msdn.microsoft.com/en-us/library/ms680356%28VS.85%29.aspx]]." example:"">>
<<func args:"bool enabled" returnType:"void" returns:"Nothing." remarks:"Enables or disables minimize blocking." example:"blockMinimize(true);">>
<<func args:"Unit a, Unit b, int collisionFlag" returnType:"bool" returns:"True if the collision values between Units a and b match the flag, otherwise false" remarks:"Uses the internal game's collision checking function" example:"">>
<<func args:"" returnType:"" returns:"" remarks:"Clears all registered event handlers for all events on the current script" example:"">>
<<func args:"string event" returnType:"" returns:"" remarks:"Clears all registered event handlers for the specified event on the current script" example:"">>
<<func args:"int clickType, [Unit item OR int x, int y [, int location] ]" remarks:"This function's parameters vary based on the desired functionality.
Locations:
0 - Inventory
2 - Trade Window
3 - Cube
4 - Stash
5 - Belt

Click Types:
0 - Left
1 - Right
2 - Shift-left (put to belt)
3 - Mercenary Item (see below)

Mercenary Body Locations:
1 - Helmet
3 - Armor
4 - Weapon" example:"">>
<<func args:"int type, bool shift, [Unit a OR int x, int y]" returnType:"bool" returns:"True if the click succeeded, otherwise false" remarks:"Either a unit or an x/y is required. If you specify a unit, that unit will be selected prior to clicking. If shift is true, the character will stand in place while clicking. The coordinates are in-game coordinates.
Click types:
0 - Left down
1 - Left held
2 - Left up
3 - Right down
4 - Right held
5 - Right up" example:"">>
<<func args:"Party obj, int mode" remarks:"The Party object comes from the [[getParty]] function
Modes:
0 - Loot player
1 - Hostile player
2 - Party with player
3 - Leave current party" example:"">>
<<func args:"Unit a" returnType:"Unit" returns:"A copy of the Unit passed in" remarks:"Because Unit.getNext modifies the underlying unit instead of returning the new unit, this function is necessary to keep a copy of the old unit before working with it." example:"">>
<<func args:"string name[, string pass[, int difficulty ] ]" returns:"" remarks:"Attempts to create a game with the specified name and password in the specified difficulty.
Difficulties:
0 - Normal
1 - Nightmare
2 - Hell
3 - Pick the hardest available" example:"">>
<<func args:"string message" returnType:"" returns:"" remarks:"Writes the specified message to the D2BS log" example:"">>
<<func args:"int milliseconds" returnType:"" returns:"" remarks:"Delays for the specified number of milliseconds. Milliseconds must be greater than 0." example:"">>
<<func args:"string path" returnType:"Directory" returns:"A [[Directory|DirectoryObject]] object representing the specified directory" remarks:"If the directory does not exist, it is created." example:"">>
<<func args:"[ int id ]" returnType:"Area" returns:"An Area object representing the specified area, if no area specified then the current one is assumed" remarks:"" example:"">>
<<func args:"int table OR string tableName, int row, int column OR string columnName" returnType:"string/int" returns:"The MPQ value for the specified row/column in the specified table" remarks:"Tables (these names are also valid for argument 1):
0 - items
1 - monstats
2 - skilldesc
3 - skills
4 - objects
5 - missiles
6 - monstats2
7 - itemstatcost
8 - levels
9 - leveldefs
10 - lvlmaze
11 - lvlsub
12 - lvlwarp
13 - lvlprest
14 - lvltypes
15 - charstats
16 - setitems
17 - uniqueitems
18 - sets
19 - itemtypes
20 - runes
21 - cubemain
22 - gems 
23 - experience
24 - pettype
25 - superuniques" example:"">>
<<func args:"int area, int x, int y" returnType:"int" returns:"The collision data for the specified (x, y) in the specified area" remarks:"" example:"">>
<<func args:"[ int type[, int x[, int y[, int xsize[, int ysize ] ] ] ] ]" returnType:"Control" returns:"A Control object matching the specified (if any) parameters" remarks:"All parameters are optional." example:"">>
<<func args:"[ bool shopType ]" returnType:"int" returns:"The type of cursor currently selected (possible values to be filled in later)" remarks:"" example:"">>
<<func args:"pick one: Unit a, Unit b OR int x, int y, Unit a OR Unit a, int x, int y OR int x, int y, int x2, int y2" returnType:"int" returns:"The distance between the specified points (Unit parameters use their x/y positions)" remarks:"This function has a complicated set of parameters for a reason: nearly anything can be passed to it." example:"">>
<<func args:"Area area" returnType:"Exit[]" returns:"An array of exits leading from the specified area" remarks:"" example:"">>
<<func args:"" returnType:"Unit" returns:"A [[Unit|UnitObject]] representing the current NPC you are interacted with; if not interacted, returns undefined" remarks:"" example:"">>
<<func args:"int id" returnType:"string" returns:"A string from the locale table representing the specified id" remarks:"" example:"">>
<<func args:"" returnType:"int" returns:"The current 'location' in the game menu." remarks:"Locations:
0 - None
1 - Lobby
2 - In line
3 - Chat channel
4 - Create game screen
5 - Join game screen
6 - Ladder screen
7 - Channel menu
8 - Main menu
9 - Login screen
10 - Login error screen
11 - Unable to Connect
12 - Character select screen
13 - Realm down
14 - Disconnected
15 - New Character (no character type selected) screen
16 - Please Wait for Character Select
17 - Lost connection screen
18 - Diablo II Splash screen (prior to main menu)
19 - CD Key in use screen
20 - Single player difficulty selection screen
21 - 'Connecting' screen (main menu)
22 - Invalid CD Key screen
23 - Some other 'Connecting' screen (need more documentation)
24 - Server is Down screen
25 - Please Wait screen
26 - Game Exists screen
27 - Gateway select screen
28 - Game Does Not Exist message
29 - New Character (character type selected) screen
30 - Character Already Exists
31 - 'Agree to terms' screen
32 - New Account screen
33 - 'Please read' screen
34 - Register email screen
35 - Credits screen
36 - Cinematics list
37 - Switch Realm (on character select) screen
38 - Game is full message
39 - Other Multiplayer screen
40 - TCP/IP screen
41 - 'Enter IP address' screen
42 - Character select screen -- no characters are displayed
43 - Change realm on character select screen (...? need more documentation here too)" example:"">>
<<func args:"" returnType:"int" returns:"The HP value (in percentage form) of your mercenary" remarks:"" example:"">>
<<func args:"[ bool mapCoords[, bool returnObject ] ]" returnType:"Array/Object" returns:"The current mouse coordinates." remarks:"If mapCoords is true, the coordinates are converted to map coordinates first. If returnObject is true, an object with an x/y property is returned instead of an array." example:"">>
<<func args:"" returnType:"Party" returns:"A Party object representing the first roster in the list" remarks:"" example:"">>
<<func args:"int area or int[] areas, int startX, int startY, int endX, int endY [, bool useTeleportPathing [, int radius [, bool useReduction ] ] ]" returnType:"int[]" returns:"A path representing the points needed to travel in order to get from (startX, startY) to (endX, endY) with the specified parameters" remarks:"" example:"">>
<<func args:"int unitid, int unitid, int flag" returnType:"bool" returns:"True if the specified flag is set, otherwise false" remarks:"The units must be specified by gid. Need documentation on what flags are available." example:"">>
<<func args:"int area[, int type[, int classid ] ]" returnType:"PresetUnit" returns:"The first preset unit matching the specified type and classid in the specified area" remarks:"" example:"">>
<<func args:"int area[, int type[, int classid ] ]" returnType:"PresetUnit[]" returns:"An array of all preset units matching the specified type and classid in the specified area" remarks:"" example:"">>
<<func args:"[ int area OR int x, int y OR int area, int x, int y ]" returnType:"Room" returns:"A Room object matching the specified parameters" remarks:"If area is 0, then the current area is assumed" example:"">>
<<func args:"[ bool current OR string name OR int threadId ]" returnType:"D2BSScript" returns:"A ~D2BSScript object matching either the name or the thread id (or the current script, if true is passed instead)." remarks:"" example:"">>
<<func args:"int id" returnType:"string" returns:"The name of the specified skill ID." remarks:"Looks up the name of the skill ID based on the internal table (this will be replaced with MPQ lookup at some point)." example:"var name = getSkillById(1);">>
<<func args:"string name" returnType:"int" returns:"The ID of the specified skill name." remarks:"Looks up the ID of the skill name based on the internal table (this will be replaced with MPQ lookup at some point)." example:"var id = getSkillByName('kick');">>
<<func args:"string text[, bool returnObject ]" returnType:"Array/Object" returns:"The width and height of the specified text" remarks:"If returnObject is true, an object with a width/height property is returned instead of an array" example:"">>
<<func returnType:"int" returns:"The priority of the current script's execution thread." remarks:"This function is the equivalent of the ~WinAPI function [[of the same name|http://msdn.microsoft.com/en-us/library/ms683235%28VS.85%29.aspx]]." example:"print('My thread priority is ' + getThreadPriority());">>
<<func args:"" returnType:"int" returns:"The current system tick count" remarks:"This function is identical to the ~WinAPI function [[of the same name|http://msdn.microsoft.com/en-us/library/ms724408%28VS.85%29.aspx]]." example:"">>
<<func args:"int mode" returnType:"int" returns:"If mode is 0, returns the current trade flags. If mode is 1, returns the name of the most recent trading partner. If mode is 2, returns the gid of the most recent trading partner." remarks:"" example:"">>
<<func args:"int flag" returnType:"bool" returns:"True if the specified screen is open, otherwise false" remarks:"Flags:
0 - Nothing
1 - Inventory screen
2 - Character screen
3 - Skill speedbar
4 - Skill tree
5 - Chat box
6 - Unknown
7 - Unknown
8 - NPC menu
9 - NPC dialog (NPC talking at you)
10 - Main ESC menu
11 - Automap
12 - Hotkey configuration
13 - NPC shop menu
14 - ALT held
15 - Item submit screen
16 - Quest button visible
17 - Bark scroll (...? Need more documentation)
18 - Quest screen
19 - Status area (...? Need more documentation)
20 - ESC menu extras (...? Need more documentation)
21 - Waypoint screen
22 - Mini-panel visible
23 - Party screen
24 - Trade screen (which one? Need more documentation)
25 - Message log
26 - Stash screen
27 - Cube screen
28 - Inventory extras (...? Need more documentation)
29 - Inventory extras 2 (...? Need more documentation)
30 - Belt open
31 - Help screen
32 - Help button visible
33 - ESC menu (unused?)
34 - Mercenary screen
35 - Scroll (...? Need more documentation)" example:"">>
<<func args:"int type [, string localizedName or int classid [, int mode [, int globalid ] ] ]" returnType:"Unit" returns:"A [[Unit|UnitObject]] object representing the specified unit, or undefined" remarks:"This function scans the local rooms for units matching the specified criteria.
If bit 30 of mode is on, then mode is treated as a bitmask, where the number of the bit corresponds to the mode to check, and any unit matching any of the specified modes is returned." example:"">>
<<func args:"int waypoint" returnType:"bool" returns:"True if the player has the specified waypoint, otherwise false" remarks:"You must interact with a waypoint before you can call this function, otherwise it will always return false. Waypoints are ordered by their actual number on the waypoint page (i.e. Rogue Encampment is 0, Lut Gholein is 10)" example:"">>
<<func args:"int amount, int mode" remarks:"Performs the requested gold transaction with the specified amount
Modes:
Currently unknown (needs to be documented)" example:"">>
<<func args:"string file" returnType:"bool" returns:"True if the file successfully included, otherwise false" remarks:"The file path is relative to the <scripts>\libs folder." example:"">>
<<func args:"string file, string section, string key, string default" returnType:"string" returns:"The specified key in the specified section of the specified INI file" remarks:"''THIS FUNCTION IS DEPRECATED.'' It will be removed in future releases." example:"">>
<<func args:"string file, string section, string key, string value" returnType:"void" returns:"" remarks:"''THIS FUNCTION IS DEPRECATED.'' It will be removed in future releases.
Writes the specified key with the specified value to the specified section of the specified file." example:"">>
<<func args:"string file" returnType:"bool" returns:"True if the file is included, otherwise false" remarks:"The file path is relative to the <scripts>\libs folder." example:"">>
<<func args:"string name[, string password]" returns:"" remarks:"Attempts to join the specified game" example:"">>
<<func args:"[bool enabled]" returnType:"bool" returns:"If no parameter is passed, returns the current strict setting. Otherwise, no return value." remarks:"Enables or disables strict evaluation for the current script. Defaults to disabled, but highly recommended to enable" example:"js_strict(true);">>
<<func args:"int vKey" returnType:"bool" returns:"True if the key is currently pressed, otherwise false" remarks:"This function is identical to the ~WinAPI function [[GetAsyncKeyState|http://msdn.microsoft.com/en-us/library/ms646293%28VS.85%29.aspx]]." example:"">>
<<func args:"string file" returnType:"bool" returns:"True if the script successfully loaded, otherwise false" remarks:"The file path is relative to the <scripts> folder." example:"">>
<<func args:"string profileName" returnType:"" returns:"" remarks:"Attempts to log into the specified profileName. The profileName comes from the section inside d2bs.ini." example:"">>
D2BS lead developer and all around awesome guy.
<<func args:"string value" returnType:"string" returns:"The ~MD5 value of the input." remarks:"This function implements the algorithm described [[here|http://en.wikipedia.org/wiki/Md5]]." example:"var result = md5('Hello');">>
<<func args:"string fileName" returnType:"string" returns:"The ~MD5 value of the file specified as input." remarks:"This function implements the algorithm described [[here|http://en.wikipedia.org/wiki/Md5]]. All paths are relative to the script folder." example:"var result = md5_file('Hello.txt');">>
<<functionList prefix:"me"
	getRepairCost
>>

<<propertyList prefix:"me"
	account
	charname
	diff
	gamename
	gamepassword
	gameserverip
	gamestarttime
	gametype
	itemoncursor
	ladder
	ping
	fps
	playertype
	realm
	realmshort
	mercrevivecost
	runwalk
	weaponswitch
	chickenhp
	chickenmp
	quitonhostile
	blockKeys
	blockMouse
	screensize
	windowtitle
	ingame
	quitonerror
	maxgametime
>>
<<property type:"string" prefix:"me" remarks:"Returns the current account name, or undefined if not logged into Battle.net" example:"print('I am currently logged into ' + me.account);">>
<<property type:"bool" prefix:"me" remarks:"Returns the current keystroke block setting (can be toggled, true to enable key blocking, false to disable)" example:"me.blockKeys = true; /* block incoming keystrokes from reaching the client */">>
<<property type:"bool" prefix:"me" remarks:"Returns the current mouse block setting (can be toggled, true to enable mouse blocking, false to disable)" example:"me.blockMouse = true; /* block mouse moves/clicks from reaching the client */">>
<<property type:"string" prefix:"me" remarks:"Returns the current character name, or an empty string if not in a game" example:"print('I am ' + me.charname);">>
<<property type:"int" prefix:"me" remarks:"Returns the current HP chicken setting (can be set to change the current HP chicken setting, 0 to disable)" example:"me.chickenhp = parseInt(me.hpmax * .1, 10); /* set to chicken at 10% health */">>
<<property type:"int" prefix:"me" remarks:"Returns the current MP chicken setting (can be set to change the current MP chicken setting, 0 to disable)" example:"me.chickenmp = parseInt(me.mpmax * .2, 10); /* set to chicken at 20% mana */">>
<<property type:"int" prefix:"me" remarks:"Returns the difficulty of the current game, or 0 if not in a game.
0 - Normal
1 - Nightmare
2 - Hell"
example:"print('I am in ' + ['normal', 'nightmare', 'hell'][me.diff] + ' difficulty');">>
<<property type:"int" prefix:"me" remarks:"Returns the current frames-per-second (as measured by the client)" example:"print('The current fps is ' + me.fps);">>
<<property type:"string" prefix:"me" remarks:"Returns the current game name, or an empty string if not in a game or in a single player game" example:"print('The current game is ' + me.gamename);">>
<<property type:"string" prefix:"me" remarks:"Returns the current game password, or an empty string if not in a game or in a single player game" example:"print('The current game's password is ' + me.gamepassword);">>
<<property type:"string" prefix:"me" remarks:"Returns the current game's ip address" example:"print('The current game server is ' + me.gameserverip);">>
<<property type:"int" prefix:"me" remarks:"Returns the start time (in ticks) of the current game" example:"print('I entered this game ' + me.gamestarttime + ' ticks ago');">>
<<property type:"int" prefix:"me" remarks:"Returns the current game type
0 - Classic
1 - Expansion" example:"print('The current game type is ' + ['Classic', 'Expansion'][me.gametype]);">>
<<func prefix:"me" args:"[ int classid ]" returnType:"" returns:"" remarks:"The classid parameter is any NPC classid with (defaults to the current NPC)" example:"">>
<<property type:"bool" prefix:"me" remarks:"Returns false if at the menu, otherwise true" example:"print('I am' + (me.ingame ? ' ' : ' not ') + 'in a game');">>
<<property type:"bool" prefix:"me" remarks:"Returns true if you have an item on the cursor, false if not" example:"print('I ' + (me.itemoncursor ? 'do' : 'do not') +' have an item on my cursor');">>
<<property type:"bool" prefix:"me" remarks:"Returns true if the character is a ladder character, false if not" example:"print('I am' + (me.ladder ? ' ' : ' not ') + 'a ladder character');">>
<<property type:"int" prefix:"me" remarks:"Returns the current maximum game time (in seconds, 0 to disable)" example:"me.maxgametime = 300; /* quit after 300 seconds */">>
<<property type:"int" prefix:"me" remarks:"Returns the cost to revive your merc (0 if already alive)" example:"print('My merc is ' + (me.mercrevivecost > 0 ? 'dead' : 'alive'));">>
<<property type:"int" prefix:"me" remarks:"Returns the current ping (as measured by the client)" example:"print('The current ping is ' + me.ping);">>
<<property type:"int" prefix:"me" remarks:"Returns the current player type
0 - Softcore
1 - Hardcore" example:"print('I am a ' + ['softcore', 'hardcore'][me.playertype] + ' character');">>
<<property type:"bool" prefix:"me" remarks:"Returns the current error chicken setting (can be set to change the current error chicken setting, false to disable)" example:"me.quitonerror = true; /* quit if my script has an error */">>
<<property type:"bool" prefix:"me" remarks:"Returns the current hostile chicken setting (can be set to change the current hostile chicken setting, false to disable)" example:"me.quitonhostile = true; /* set to chicken on hostile */">>
<<property type:"string" prefix:"me" remarks:"Returns the current realm (long name)" example:"print('The current realm is ' + me.realm);">>
<<property type:"string" prefix:"me" remarks:"Returns the current realm (short name)" example:"print('The (shorter) current realm is ' + me.realmshort);">>
<<property type:"bool" prefix:"me" remarks:"Returns true if run/walk is set to run, false if not (can also be set to enable/disable run/walk)" example:"print('I am currently ' + ['walking', 'running'][parseInt(me.runwalk, 10)]);">>
<<property type:"int" prefix:"me" remarks:"Returns the current screen size
0 - 640x480
1 - 800x600" example:"print('I am running at ' + ['640x480', '800x600'][me.screensize]);">>
<<property type:"int" prefix:"me" remarks:"Returns the current weapon switch (can also be set to toggle the weapon switch)" example:"print('My current weapon switch is ' + me.weaponswitch);">>
<<property type:"string" prefix:"me" remarks:"Returns the current window title" example:"print('The window title is ' + me.windowtitle);">>
<<func args:"int soundId" remarks:"Plays the sound based on the id you pass in (the id can be found in the sounds.txt file in patch_d2.mpq)" example:"">>
<<func args:"string message, ..." returnType:"" returns:"" remarks:"Writes the specified messages to the console and (optionally, based on the d2bs.ini setting) the screen" example:"">>
<<func args:"string profileName" returnType:"bool" returns:"True if the profile exists, otherwise false" remarks:"Checks the existing profiles in ~D2BS.ini to see if the specified one exists.">>
<<func remarks:"Quits the current game" example:"">>
<<func remarks:"Quits the entire Diablo II process" example:"">>
<<func args:"int min, int max" returnType:"int" returns:"A number between min and max" remarks:"Uses C [[rand|http://www.cppreference.com/wiki/c/other/rand]] (seeded with the current time) when out of game, and Diablo II's internal RNG when in game." example:"">>
<<func args:"string event, Function listener" returnType:"" returns:"" remarks:"If listener is registered for event, it is removed" example:"">>
<<func args:"string message" remarks:"Sends a message to the other players in the game" example:"">>
<<func args:"..." returnType:"" returns:"" remarks:"Takes any number of arguments and broadcasts them as-is to all scripts currently running." example:"">>
<<func args:"string windowClass, string windowName, int mode, string data" returnType:"int" returns:"False if the window is not found, otherwise true or false depending on if the window processed the message" remarks:"This function sends a [[WM_COPYDATA|http://msdn.microsoft.com/en-us/library/ms649011%28VS.85%29.aspx]] event to the target window." example:"">>
<<func args:"int mode, string server, string topic, string item, string data" returnType:"" returns:"" remarks:"For more information, see [[here|http://msdn.microsoft.com/en-us/library/ms648774%28VS.85%29.aspx]].
Modes:
0 - ~XTYP_REQUEST
1 - ~XTYP_POKE
2 - ~XTYP_EXECUTE" example:"">>
<<func args:"string value" returnType:"string" returns:"The ~SHA-1 value of the input." remarks:"This function implements the algorithm for ~SHA-1 described [[here|http://en.wikipedia.org/wiki/SHA_hash_functions]]." example:"var result = sha1('Hello');">>
<<func args:"string fileName" returnType:"string" returns:"The ~SHA-1 value of the file specified as input." remarks:"This function implements the ~SHA-1 algorithm described [[here|http://en.wikipedia.org/wiki/SHA_hash_functions]]. All paths are relative to the script folder." example:"var result = sha1_file('Hello.txt');">>
<<func args:"string value" returnType:"string" returns:"The ~SHA-256 value of the input." remarks:"This function implements the algorithm for ~SHA-256 described [[here|http://en.wikipedia.org/wiki/SHA_hash_functions]]." example:"var result = sha256('Hello');">>
<<func args:"string fileName" returnType:"string" returns:"The ~SHA-256 value of the file specified as input." remarks:"This function implements the ~SHA-256 algorithm described [[here|http://en.wikipedia.org/wiki/SHA_hash_functions]]. All paths are relative to the script folder." example:"var result = sha256_file('Hello.txt');">>
<<func args:"string value" returnType:"string" returns:"The ~SHA-384 value of the input." remarks:"This function implements the algorithm for ~SHA-384 described [[here|http://en.wikipedia.org/wiki/SHA_hash_functions]]." example:"var result = sha384('Hello');">>
<<func args:"string fileName" returnType:"string" returns:"The ~SHA-384 value of the file specified as input." remarks:"This function implements the ~SHA-384 algorithm described [[here|http://en.wikipedia.org/wiki/SHA_hash_functions]]. All paths are relative to the script folder." example:"var result = sha384_file('Hello.txt');">>
<<func args:"string value" returnType:"string" returns:"The ~SHA-512 value of the input." remarks:"This function implements the algorithm for ~SHA-512 described [[here|http://en.wikipedia.org/wiki/SHA_hash_functions]]." example:"var result = sha512('Hello');">>
<<func args:"string fileName" returnType:"string" returns:"The ~SHA-512 value of the file specified as input." remarks:"This function implements the ~SHA-512 algorithm described [[here|http://en.wikipedia.org/wiki/SHA_hash_functions]]. All paths are relative to the script folder." example:"var result = sha512_file('Hello.txt');">>
<<func args:"" returnType:"string" returns:"The ~SQLite library version" remarks:"" example:"">>
<<func args:"[ bool stopAll ]" returnType:"" returns:"" remarks:"Stops the current script, if stopAll is true then it stops all scripts." example:"">>
<<func args:"" returnType:"" returns:"" remarks:"Submits the item on the cursor." example:"">>
<<func remarks:"Transmutes the current contents of the Horadric Cube. The cube must be open for this function to work." example:"clickItem(1, getUnit(4, 'box')); delay(1000); transmute();">>
<<func args:"[ bool returnAsWell ]" returnType:"string" returns:"The current version" remarks:"Prints the current version, and if returnAsWell is true, returns it" example:"">>
<<func args:"[ bool switch ]" returnType:"int" returns:"True if switch is specified, otherwise the current weapon switch" remarks:"The return value varies depending on the arguments passed in; if you pass true, the return value is always true, otherwise the return value is an int representing the current weapon switch." example:"">>