It was the Bitcointalk forum that inspired us to create Bitcointalksearch.org - Bitcointalk is an excellent site that should be the default page for anybody dealing in cryptocurrency, since it is a virtual gold-mine of data. However, our experience and user feedback led us create our site; Bitcointalk's search is slow, and difficult to get the results you need, because you need to log in first to find anything useful - furthermore, there are rate limiters for their search functionality.
The aim of our project is to create a faster website that yields more results and faster without having to create an account and eliminate the need to log in - your personal data, therefore, will never be in jeopardy since we are not asking for any of your data and you don't need to provide them to use our site with all of its capabilities.
We created this website with the sole purpose of users being able to search quickly and efficiently in the field of cryptocurrency so they will have access to the latest and most accurate information and thereby assisting the crypto-community at large.
// mob tries to quaff us
public boolean event_quaff(Engine e, Mobile mob) {
e.msg.pline("You quaff " + aname() + ".");
if (objkind == PotionData.WATER) {
mob.hp += Dice.roll(1, 1);
if (mob.hp > mob.hp_max) {
mob.hp = mob.hp_max;
}
if (mob instanceof Player) {
e.msg.pline("Ahh, a nice cool drink of water. You feel refreshed!");
if (this.identified() == false) {
this.identify(true);
e.pc.score += 10;
}
}
} else if (objkind == PotionData.HEALING) {
mob.hp += Dice.roll("1d8");
if (mob.hp > mob.hp_max) {
mob.hp = mob.hp_max;
}
if (mob instanceof Player) {
e.msg.pline("You feel better.");
if (this.identified() == false) {
this.identify(true);
e.pc.score += 10;
}
}
} else if (objkind == PotionData.POISON) {
if (mob instanceof Player) {
e.msg.pline("That didn't taste good. You feel sick!");
if (this.identified() == false) {
this.identify(true);
e.pc.score += 10;
}
}
mob.takedamage(Dice.roll(1, 12), Damage.POISON);
if (mob.hp < 1) {
mob.killme = true;
if (mob instanceof Player) {
e.do_pc_death("You drank poison!", "poisoned by " + aname());
} else {
// if a monster dies from drinking poison, what pline
// should we send?
}
}
} else if (objkind == PotionData.SPEED) {
// speed potions auto-id.
if ((mob instanceof Player) && (this.identified() == false)) {
this.identify(true);
e.pc.score += 10;
}
} else if (objkind == PotionData.BLINDNESS) {
// blindness potions auto-id.
if ((mob instanceof Player) && (this.identified() == false)) {
this.identify(true);
e.pc.score += 10;
}
}
// We have been quaffed!
mob.fxlist.transferByItemTrigger(this, Effect.T_QUAFF);
killme = true;
mob.inv.remove(this);
mob.hunger -= nutrition;
if (mob instanceof Player) {
e.pc.score += value; // destroying a potion by using it keeps it's value
e.pc.score += 1; // plus one ^^
}
e.update_statline();
e.rend.vs.update();
return true;
}
public static void loadTreeStructure(String dbname) {
Listunresolved_ids = new ArrayList();
Listunresolved_parents = new ArrayList();
Listunresolved_names = new ArrayList();
Listunresolved_selected = new ArrayList();
try {
db = openDictionaryDB(dbname);
rs = db.executeQuery("select * from tagstructure;");
while (rs.next()) {
TagNode n = new TagNode();
n.id = rs.getInt("id");
String parent = rs.getString("parent");
n.name = rs.getString("tagname");
n.flagSelected = rs.getBoolean("selected");
unresolved_ids.add(String.valueOf(n.id));
unresolved_names.add(n.name);
unresolved_parents.add(parent);
unresolved_selected.add(String.valueOf(n.flagSelected));
}
rs.close();
} catch (SQLException sqle) {
Log.log("oTS(): " + sqle.getMessage(), Log.ERROR);
}
TagNode subRoot = new TagNode("root");
for (int i = 0; i < unresolved_ids.size(); i++) {
int id = Integer.parseInt(unresolved_ids.get(i));
if (id > TagNode.idpool) {
TagNode.idpool = id + 1;
}
int parent_id = Integer.parseInt(unresolved_parents.get(i));
if (id == parent_id) {
// found the root node.
subRoot.id = id;
subRoot.name = "root";
subRoot.flagSelected = Boolean.valueOf(unresolved_selected.get(i));
unresolved_ids.remove(i);
unresolved_names.remove(i);
unresolved_parents.remove(i);
unresolved_selected.remove(i);
break;
}
}
boolean found_parent = true;
while ((unresolved_ids.isEmpty() == false) && (found_parent == true)) {
found_parent = false;
for (int i = 0; i < unresolved_ids.size(); i++) {
int id = Integer.parseInt(unresolved_ids.get(i));
if (id > TagNode.idpool) {
TagNode.idpool = id + 1;
}
String name = unresolved_names.get(i);
int parent_id = Integer.parseInt(unresolved_parents.get(i));
boolean selected = Boolean.valueOf(unresolved_selected.get(i));
TagNode parent = Kongzi.getTagNodeByID(subRoot, parent_id);
if (parent != null) {
TagNode tn = new TagNode();
tn.id = id;
tn.name = name;
tn.flagSelected = selected;
parent.add(tn);
found_parent = true;
unresolved_ids.remove(i);
unresolved_names.remove(i);
unresolved_parents.remove(i);
unresolved_selected.remove(i);
break;
}
}
}
while (subRoot.getChildCount() > 0) {
TagNode tn = (TagNode) subRoot.getChildAt(0);
subRoot.remove(0);
Kongzi.rootNode.add(tn);
}
Kongzi.load_taglist();
Kongzi.ensure_node_ids();
Kongzi.rootNode.merge_children();
return;
}