Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Bots

Development::Bots Forum for bots.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 07-20-2011, 02:27 PM
Criimson
Hill Giant
 
Join Date: Sep 2006
Posts: 172
Default Opinions on my new project

Hello everyone
So last night I was tinkering with an idea Ive had for several days.
Basically I run one character and wanted to mess with JC. So the idea came to look into having my chanter bot be able to enchant my silver. The idea was to hold a single bar of silver on my cursor and type #bot enchant silver. After I had that working add the other chants.

Here is the code and it works as it is supposed to (sort of)

Code:
		//Enchant Metals
	if(!strcasecmp(sep->arg[1], "enchant")) {
		if(c->IsGrouped()){
			bool hasenchanter = false;
			Group *g = c->GetGroup();
			for(int i=0; i<MAX_GROUP_MEMBERS; i++){
				if(g && g->members[i] && g->members[i]->IsBot()) {
					uint8 casterlevel = g->members[i]->GetLevel();
					uint8 casterclass = g->members[i]->GetClass();
					if (casterclass == ENCHANTER){
						if(!strcasecmp(sep->arg[2], "silver")){
							if (casterlevel >= 7){
								g->members[i]->Say("Enchanting your silver bar");
								g->members[i]->CastSpell(30015, c->GetID(), SLOT_CURSOR);
							}
							else {g->members[i]->Say("I must be at least level 7 to enchant silver.");}
						}
					}
				}
			}
		}
		else {
			c->Message(15, "You need to be grouped with an enchanter.");
		}
		return;
	}
The problem I realized is Enchant <Metal> is a self spell. So I went into the DB and copied the spell and renamed it Bot Enchant Silver at # 500000. Made it have a range of 100. No luck.
Used Nulls editor and it really didn't do anything different except number it at 30k and allow for easy changing of the spells_us.txt

So my question:
Would you:
1) Simply create a merchant that sold enchanted metals (this is my least preferable idea)

2) Create a spell (which isn't as portable to people who can't work in the DB or spells file)

3) Write code where a player can hand the silver bar to the bot and it casts the spell and hands it back (more like live I guess anyway)

Criimson
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 02:54 PM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3