Thread: Random fixes
View Single Post
  #35  
Old 09-02-2004, 05:58 AM
Branks
Sarnak
 
Join Date: May 2004
Posts: 58
Default

lovely time for the forums to crash.
so anyway still in spells.cpp now do a search for
"case SE_StackingCommand_Block:" and on the line below it and all this.

Code:
			case SE_TemporaryPets:			//Dook- swarms and wards
				{
					Mob* c=CastToClient();
					Mob* targ=c->GetTarget();
					if(!targ)
					{
						targ=c;
					}
					int tim=spell.unknown[12];
					int time=tim*1000;
					NPCType* npc_type = new NPCType;
					memset(npc_type, 0, sizeof(NPCType));
					strcpy(npc_type->name, CastToClient()->GetName());
					strcat(npc_type->name, "'s_pet");
					npc_type->level = 59;
					npc_type->race = 127;
					npc_type->class_ = 1;
					npc_type->runspeed = 1.25f; 
					npc_type->min_dmg = 1;
					npc_type->max_dmg = 50;
					npc_type->walkspeed = 0.7f;
					npc_type->bodytype = 63;	//Dook- claimed 63 for swarm pets
					npc_type->max_hp = 100;
					npc_type->cur_hp = npc_type->max_hp;
					npc_type->gender = 2;
					switch(spell_id) {
					case 2272:
						{//listed as wrath of xuzl but i dont
						}//think this is in game
						break;
					case 3265:		//3265-67 servant of ro
						{
							npc_type->level = 61;
							npc_type->race = 89;
							npc_type->texture = 2;
							npc_type->max_dmg = 150;
							npc_type->max_hp = 100;
							npc_type->walkspeed = 0;
							npc_type->runspeed = 0; 
							npc_type->cur_hp = npc_type->max_hp;
							NPC* npca = new NPC(npc_type, 0,
								c->GetX()+5, c->GetY()+5,
								c->GetZ(), c->GetHeading());
							safe_delete(npc_type);
							npca->SetOwnerID(c->GetID());
							entity_list.AddNPC(npca);
							npca->AddToHateList(targ,1000,1000);
							npca->swarm_timer->Start(time);
						}
						break;
					case 3266:
						{
							npc_type->level = 61;
							npc_type->race = 89;
							npc_type->texture = 2;
							npc_type->max_dmg = 150;
							npc_type->max_hp = 100;
							npc_type->walkspeed = 0;
							npc_type->runspeed = 0; 
							npc_type->cur_hp = npc_type->max_hp;
							NPC* npca = new NPC(npc_type, 0,
								c->GetX()+5, c->GetY()+5,
								c->GetZ(), c->GetHeading());
							safe_delete(npc_type);
							npca->SetOwnerID(c->GetID());
							entity_list.AddNPC(npca);
							npca->AddToHateList(targ,1000,1000);
							npca->swarm_timer->Start(time);
						}
						break;
					case 3267:
						{
							npc_type->level = 61;
							npc_type->race = 89;
							npc_type->texture = 2;
							npc_type->max_dmg = 150;
							npc_type->max_hp = 100;
							npc_type->walkspeed = 0;
							npc_type->runspeed = 0; 
							npc_type->cur_hp = npc_type->max_hp;
							NPC* npca = new NPC(npc_type, 0,
								c->GetX()+5, c->GetY()+5,
								c->GetZ(), c->GetHeading());
							safe_delete(npc_type);
							npca->SetOwnerID(c->GetID());
							entity_list.AddNPC(npca);
							npca->AddToHateList(targ,1000,1000);
							npca->swarm_timer->Start(time);
						}
						break;
					case 3283:		//3283-85 spirit call
						{
							npc_type->race = 120;
							npc_type->texture = 4;
							npc_type->max_hp = 2050;
							npc_type->cur_hp = npc_type->max_hp;
							NPC* npca = new NPC(npc_type, 0,
								c->GetX()+5, c->GetY()+5,
								c->GetZ(), c->GetHeading());
							NPC* npcb = new NPC(npc_type, 0,
								c->GetX()-5, c->GetY()+5,
								c->GetZ(), c->GetHeading());
							NPC* npcc = new NPC(npc_type, 0,
								c->GetX()+5, c->GetY()-5,
								c->GetZ(), c->GetHeading());
							safe_delete(npc_type);
							npca->SetOwnerID(c->GetID());
							npcb->SetOwnerID(c->GetID());
							npcc->SetOwnerID(c->GetID());
							entity_list.AddNPC(npca);
							entity_list.AddNPC(npcb);
							entity_list.AddNPC(npcc);
							npca->AddToHateList(targ,1000,1000);
							npca->swarm_timer->Start(time);
							npcb->AddToHateList(targ,1000,1000);
							npcb->swarm_timer->Start(time);
							npcc->AddToHateList(targ,1000,1000);
							npcc->swarm_timer->Start(time);
						}
						break;
					case 3284:
						{
							npc_type->race = 120;
							npc_type->texture = 4;
							npc_type->max_hp = 2050;
							npc_type->cur_hp = npc_type->max_hp;
							NPC* npca = new NPC(npc_type, 0,
								c->GetX()+5, c->GetY()+5,
								c->GetZ(), c->GetHeading());
							NPC* npcb = new NPC(npc_type, 0,
								c->GetX()-5, c->GetY()+5,
								c->GetZ(), c->GetHeading());
							NPC* npcc = new NPC(npc_type, 0,
								c->GetX()+5, c->GetY()-5,
								c->GetZ(), c->GetHeading());
							NPC* npcd = new NPC(npc_type, 0,
								c->GetX()-5, c->GetY()-5,
								c->GetZ(), c->GetHeading());
							safe_delete(npc_type);
							npca->SetOwnerID(c->GetID());
							npcb->SetOwnerID(c->GetID());
							npcc->SetOwnerID(c->GetID());
							npcd->SetOwnerID(c->GetID());
							entity_list.AddNPC(npca);
							entity_list.AddNPC(npcb);
							entity_list.AddNPC(npcc);
							entity_list.AddNPC(npcd);
							npca->AddToHateList(targ,1000,1000);
							npca->swarm_timer->Start(time);
							npcb->AddToHateList(targ,1000,1000);
							npcb->swarm_timer->Start(time);
							npcc->AddToHateList(targ,1000,1000);
							npcc->swarm_timer->Start(time);
							npcd->AddToHateList(targ,1000,1000);
							npcd->swarm_timer->Start(time);
						}
						break;
					case 3285:
						{
							npc_type->race = 120;
							npc_type->texture = 4;
							npc_type->max_hp = 2050;
							npc_type->cur_hp = npc_type->max_hp;
							NPC* npca = new NPC(npc_type, 0,
								c->GetX()+5, c->GetY()+5,
								c->GetZ(), c->GetHeading());
							NPC* npcb = new NPC(npc_type, 0,
								c->GetX()-5, c->GetY()+5,
								c->GetZ(), c->GetHeading());
							NPC* npcc = new NPC(npc_type, 0,
								c->GetX()+5, c->GetY()-5,
								c->GetZ(), c->GetHeading());
							NPC* npcd = new NPC(npc_type, 0,
								c->GetX()-5, c->GetY()-5,
								c->GetZ(), c->GetHeading());
							NPC* npce = new NPC(npc_type, 0,
								c->GetX()+10, c->GetY()+10,
								c->GetZ(), c->GetHeading());
							safe_delete(npc_type);
							npca->SetOwnerID(c->GetID());
							npcb->SetOwnerID(c->GetID());
							npcc->SetOwnerID(c->GetID());
							npcd->SetOwnerID(c->GetID());
							npce->SetOwnerID(c->GetID());
							entity_list.AddNPC(npca);
							entity_list.AddNPC(npcb);
							entity_list.AddNPC(npcc);
							entity_list.AddNPC(npcd);
							entity_list.AddNPC(npce);
							npca->AddToHateList(targ,1000,1000);
							npca->swarm_timer->Start(time);
							npcb->AddToHateList(targ,1000,1000);
							npcb->swarm_timer->Start(time);
							npcc->AddToHateList(targ,1000,1000);
							npcc->swarm_timer->Start(time);
							npcd->AddToHateList(targ,1000,1000);
							npcd->swarm_timer->Start(time);
							npce->AddToHateList(targ,1000,1000);
							npce->swarm_timer->Start(time);
						}
						break;
					case 3286:		//3286-88 host of the elements
						{
							npc_type->race = 75;
							npc_type->texture = 0;
							npc_type->size = 3;
							NPC* npca = new NPC(npc_type, 0,
								c->GetX()+5, c->GetY()+5,
								c->GetZ(), c->GetHeading());
							NPC* npcb = new NPC(npc_type, 0,
								c->GetX()-5, c->GetY()+5,
								c->GetZ(), c->GetHeading());
							NPC* npcc = new NPC(npc_type, 0,
								c->GetX()+5, c->GetY()-5,
								c->GetZ(), c->GetHeading());
							NPC* npcd = new NPC(npc_type, 0,
								c->GetX()-5, c->GetY()-5,
								c->GetZ(), c->GetHeading());
							NPC* npce = new NPC(npc_type, 0,
								c->GetX()+10, c->GetY()+10,
								c->GetZ(), c->GetHeading());
							safe_delete(npc_type);
							npca->SetOwnerID(c->GetID());
							npcb->SetOwnerID(c->GetID());
							npcc->SetOwnerID(c->GetID());
							npcd->SetOwnerID(c->GetID());
							npce->SetOwnerID(c->GetID());
							entity_list.AddNPC(npca);
							entity_list.AddNPC(npcb);
							entity_list.AddNPC(npcc);
							entity_list.AddNPC(npcd);
							entity_list.AddNPC(npce);
							npca->AddToHateList(targ,1000,1000);
							npca->swarm_timer->Start(time);
							npcb->AddToHateList(targ,1000,1000);
							npcb->swarm_timer->Start(time);
							npcc->AddToHateList(targ,1000,1000);
							npcc->swarm_timer->Start(time);
							npcd->AddToHateList(targ,1000,1000);
							npcd->swarm_timer->Start(time);
							npce->AddToHateList(targ,1000,1000);
							npce->swarm_timer->Start(time);
						}
						break;
					case 3287:
						{
							npc_type->race = 75;
							npc_type->texture = 0;
							npc_type->size = 3;
							NPC* npca = new NPC(npc_type, 0,
								c->GetX()+5, c->GetY()+5,
								c->GetZ(), c->GetHeading());
							NPC* npcb = new NPC(npc_type, 0,
								c->GetX()-5, c->GetY()+5,
								c->GetZ(), c->GetHeading());
							NPC* npcc = new NPC(npc_type, 0,
								c->GetX()+5, c->GetY()-5,
								c->GetZ(), c->GetHeading());
							NPC* npcd = new NPC(npc_type, 0,
								c->GetX()-5, c->GetY()-5,
								c->GetZ(), c->GetHeading());
							NPC* npce = new NPC(npc_type, 0,
								c->GetX()+10, c->GetY()+10,
								c->GetZ(), c->GetHeading());
							NPC* npcf = new NPC(npc_type, 0,
								c->GetX()-10, c->GetY()+10,
								c->GetZ(), c->GetHeading());
							NPC* npcg = new NPC(npc_type, 0,
								c->GetX()+10, c->GetY()-10,
								c->GetZ(), c->GetHeading());
							safe_delete(npc_type);
							npca->SetOwnerID(c->GetID());
							npcb->SetOwnerID(c->GetID());
							npcc->SetOwnerID(c->GetID());
							npcd->SetOwnerID(c->GetID());
							npce->SetOwnerID(c->GetID());
							npcf->SetOwnerID(c->GetID());
							npcg->SetOwnerID(c->GetID());
							entity_list.AddNPC(npca);
							entity_list.AddNPC(npcb);
							entity_list.AddNPC(npcc);
							entity_list.AddNPC(npcd);
							entity_list.AddNPC(npce);
							entity_list.AddNPC(npcf);
							entity_list.AddNPC(npcg);
							npca->AddToHateList(targ,1000,1000);
							npca->swarm_timer->Start(time);
							npcb->AddToHateList(targ,1000,1000);
							npcb->swarm_timer->Start(time);
							npcc->AddToHateList(targ,1000,1000);
							npcc->swarm_timer->Start(time);
							npcd->AddToHateList(targ,1000,1000);
							npcd->swarm_timer->Start(time);
							npce->AddToHateList(targ,1000,1000);
							npce->swarm_timer->Start(time);
							npcf->AddToHateList(targ,1000,1000);
							npcf->swarm_timer->Start(time);
							npcg->AddToHateList(targ,1000,1000);
							npcg->swarm_timer->Start(time);
						}
						break;
					case 3288:
						{
							npc_type->race = 75;
							npc_type->texture = 0;
							npc_type->size = 3;
							if(CastToClient()->GetGM())
							{
								npc_type->race = 95;
								npc_type->size = 3;
								npc_type->gender = 2;
								npc_type->texture = 0;
								npc_type->max_dmg = 200;
							}
							NPC* npca = new NPC(npc_type, 0,
								c->GetX()+5, c->GetY()+5,
								c->GetZ(), c->GetHeading());
							NPC* npcb = new NPC(npc_type, 0,
								c->GetX()-5, c->GetY()+5,
								c->GetZ(), c->GetHeading());
							NPC* npcc = new NPC(npc_type, 0,
								c->GetX()+5, c->GetY()-5,
								c->GetZ(), c->GetHeading());
							NPC* npcd = new NPC(npc_type, 0,
								c->GetX()-5, c->GetY()-5,
								c->GetZ(), c->GetHeading());
							NPC* npce = new NPC(npc_type, 0,
								c->GetX()+10, c->GetY()+10,
								c->GetZ(), c->GetHeading());
							NPC* npcf = new NPC(npc_type, 0,
								c->GetX()-10, c->GetY()+10,
								c->GetZ(), c->GetHeading());
							NPC* npcg = new NPC(npc_type, 0,
								c->GetX()+10, c->GetY()-10,
								c->GetZ(), c->GetHeading());
							NPC* npch = new NPC(npc_type, 0,
								c->GetX()-10, c->GetY()-10,
								c->GetZ(), c->GetHeading());
							NPC* npci = new NPC(npc_type, 0,
								c->GetX()+8, c->GetY()+8,
								c->GetZ(), c->GetHeading());
							safe_delete(npc_type);
							npca->SetOwnerID(c->GetID());
							npcb->SetOwnerID(c->GetID());
							npcc->SetOwnerID(c->GetID());
							npcd->SetOwnerID(c->GetID());
							npce->SetOwnerID(c->GetID());
							npcf->SetOwnerID(c->GetID());
							npcg->SetOwnerID(c->GetID());
							npch->SetOwnerID(c->GetID());
							npci->SetOwnerID(c->GetID());
							entity_list.AddNPC(npca);
							entity_list.AddNPC(npcb);
							entity_list.AddNPC(npcc);
							entity_list.AddNPC(npcd);
							entity_list.AddNPC(npce);
							entity_list.AddNPC(npcf);
							entity_list.AddNPC(npcg);
							entity_list.AddNPC(npch);
							entity_list.AddNPC(npci);
							npca->AddToHateList(targ,1000,1000);
							npca->swarm_timer->Start(time);
							npcb->AddToHateList(targ,1000,1000);
							npcb->swarm_timer->Start(time);
							npcc->AddToHateList(targ,1000,1000);
							npcc->swarm_timer->Start(time);
							npcd->AddToHateList(targ,1000,1000);
							npcd->swarm_timer->Start(time);
							npce->AddToHateList(targ,1000,1000);
							npce->swarm_timer->Start(time);
							npcf->AddToHateList(targ,1000,1000);
							npcf->swarm_timer->Start(time);
							npcg->AddToHateList(targ,1000,1000);
							npcg->swarm_timer->Start(time);
							npch->AddToHateList(targ,1000,1000);
							npch->swarm_timer->Start(time);
							npci->AddToHateList(targ,1000,1000);
							npci->swarm_timer->Start(time);
						}
						break;
					case 3292:		//3292-94 call of xuzl
						{
							npc_type->equipment[7] = 62;
							npc_type->gender = 0;
							npc_type->texture = 4;
							NPC* npca = new NPC(npc_type, 0,
								c->GetX()+5, c->GetY()+5,
								c->GetZ(), c->GetHeading());
							NPC* npcb = new NPC(npc_type, 0,
								c->GetX()-5, c->GetY()+5,
								c->GetZ(), c->GetHeading());
							safe_delete(npc_type);
							npca->SetOwnerID(c->GetID());
							npcb->SetOwnerID(c->GetID());
							entity_list.AddNPC(npca);
							entity_list.AddNPC(npcb);
							npca->AddToHateList(targ,1000,1000);
							npca->swarm_timer->Start(time);
							npcb->AddToHateList(targ,1000,1000);
							npcb->swarm_timer->Start(time);
						}
						break;
					case 3293:
						{
							npc_type->equipment[7] = 62;
							npc_type->gender = 0;
							npc_type->texture = 4;
							NPC* npca = new NPC(npc_type, 0,
								c->GetX()+5, c->GetY()+5,
								c->GetZ(), c->GetHeading());
							NPC* npcb = new NPC(npc_type, 0,
								c->GetX()-5, c->GetY()+5,
								c->GetZ(), c->GetHeading());
							NPC* npcc = new NPC(npc_type, 0,
								c->GetX()+5, c->GetY()-5,
								c->GetZ(), c->GetHeading());
							safe_delete(npc_type);
							npca->SetOwnerID(c->GetID());
							npcb->SetOwnerID(c->GetID());
							npcc->SetOwnerID(c->GetID());
							entity_list.AddNPC(npca);
							entity_list.AddNPC(npcb);
							entity_list.AddNPC(npcc);
							npca->AddToHateList(targ,1000,1000);
							npca->swarm_timer->Start(time);
							npcb->AddToHateList(targ,1000,1000);
							npcb->swarm_timer->Start(time);
							npcc->AddToHateList(targ,1000,1000);
							npcc->swarm_timer->Start(time);
						}
						break;
					case 3294:
						{
							npc_type->equipment[7] = 62;
							npc_type->gender = 0;
							npc_type->texture = 4;
							if(CastToClient()->GetGM())
							{
								npc_type->race = 66;
								npc_type->gender = 2;
								npc_type->texture = 1;
								npc_type->max_dmg = 200;
								npc_type->size = 5;
							}
							NPC* npca = new NPC(npc_type, 0,
								c->GetX()+5, c->GetY()+5,
								c->GetZ(), c->GetHeading());
							NPC* npcb = new NPC(npc_type, 0,
								c->GetX()-5, c->GetY()+5,
								c->GetZ(), c->GetHeading());
							NPC* npcc = new NPC(npc_type, 0,
								c->GetX()+5, c->GetY()-5,
								c->GetZ(), c->GetHeading());
							NPC* npcd = new NPC(npc_type, 0,
								c->GetX()-5, c->GetY()-5,
								c->GetZ(), c->GetHeading());
							safe_delete(npc_type);
							npca->SetOwnerID(c->GetID());
							npcb->SetOwnerID(c->GetID());
							npcc->SetOwnerID(c->GetID());
							npcd->SetOwnerID(c->GetID());
							entity_list.AddNPC(npca);
							entity_list.AddNPC(npcb);
							entity_list.AddNPC(npcc);
							entity_list.AddNPC(npcd);
							npca->AddToHateList(targ,1000,1000);
							npca->swarm_timer->Start(time);
							npcb->AddToHateList(targ,1000,1000);
							npcb->swarm_timer->Start(time);
							npcc->AddToHateList(targ,1000,1000);
							npcc->swarm_timer->Start(time);
							npcd->AddToHateList(targ,1000,1000);
							npcd->swarm_timer->Start(time);
						}
						break;
					case 3495:
						{//another that i dont think is in game
						}
						break;
					case 3633:		//call of the mistwalker
						{//some say invis man with epic, most say wolf /shrug
							npc_type->race = 120;
							npc_type->texture = 4;
							npc_type->max_dmg = 94;
							npc_type->gender = 2;
							NPC* npc = new NPC(npc_type, 0,
								c->GetX()+5, c->GetY()+5,
								c->GetZ(), c->GetHeading());
							safe_delete(npc_type);
							npc->SetOwnerID(c->GetID());
							entity_list.AddNPC(npc);
							npc->AddToHateList(targ,1000,1000);
							npc->swarm_timer->Start(time);
						}
						break;
					case 3634:		//call of the dark knight
						{
							npc_type->equipment[7] = 145;
							npc_type->max_dmg = 94;
							npc_type->gender = 0;
							//custom for Mog
							if(CastToClient()->GetGM())	//for Mog
							{
								strcpy(npc_type->name, CastToClient()->GetName());
								strcat(npc_type->name, "'s_Minion");
								npc_type->race = 367;
								npc_type->gender = 2;
								npc_type->equipment[7] = 145;
								npc_type->equipment[8] = 145;
								npc_type->texture = 4;
								npc_type->max_dmg = 1500;
								npc_type->min_dmg = 500;
							}
							//custom for Mog
							NPC* npc = new NPC(npc_type, 0,
								c->GetX()+5, c->GetY()+5,
								c->GetZ(), c->GetHeading());
							safe_delete(npc_type);
							npc->SetOwnerID(c->GetID());
							entity_list.AddNPC(npc);
							npc->AddToHateList(targ,1000,1000);
							npc->swarm_timer->Start(time);
						}
						break;
					case 3635:			//call of faith
						{	//dunno
							npc_type->equipment[7] = 62;
							npc_type->gender = 0;
							npc_type->max_dmg = 94;
							NPC* npc = new NPC(npc_type, 0,
								c->GetX()+5, c->GetY()+5,
								c->GetZ(), c->GetHeading());
							safe_delete(npc_type);
							npc->SetOwnerID(c->GetID());
							entity_list.AddNPC(npc);
							npc->AddToHateList(targ,1000,1000);
							npc->swarm_timer->Start(time);
						}
						break;
					case 3636:			//call of battle
						{	//invis war epic
							npc_type->equipment[7] = 141;
							npc_type->equipment[8] = 142;
							npc_type->max_dmg = 94;
							npc_type->gender = 0;
							NPC* npc = new NPC(npc_type, 0,
								c->GetX()+5, c->GetY()+5,
								c->GetZ(), c->GetHeading());
							safe_delete(npc_type);
							npc->SetOwnerID(c->GetID());
							entity_list.AddNPC(npc);
							npc->AddToHateList(targ,1000,1000);
							npc->swarm_timer->Start(time);
						}
						break;
					case 3637:			//call of the beast
						{	//wtf are the bst epic textures =/
							npc_type->equipment[7] = 431;
							npc_type->equipment[8] = 431;
							npc_type->max_dmg = 94;
							npc_type->gender = 0;
							NPC* npc = new NPC(npc_type, 0,
								c->GetX()+5, c->GetY()+5,
								c->GetZ(), c->GetHeading());
							safe_delete(npc_type);
							npc->SetOwnerID(c->GetID());
							entity_list.AddNPC(npc);
							npc->AddToHateList(targ,1000,1000);
							npc->swarm_timer->Start(time);
						}
						break;
					case 3638:			//call of wu
						{	//cant be right, can barely see it
							npc_type->equipment[7] = 159;
							npc_type->equipment[8] = 159;
							npc_type->max_dmg = 94;
							npc_type->gender = 0;
							NPC* npc = new NPC(npc_type, 0,
								c->GetX()+5, c->GetY()+5,
								c->GetZ(), c->GetHeading());
							safe_delete(npc_type);
							npc->SetOwnerID(c->GetID());
							entity_list.AddNPC(npc);
							npc->AddToHateList(targ,1000,1000);
							npc->swarm_timer->Start(time);
						}
						break;
					case 3639:			//call of rizlona
						{
							npc_type->equipment[7] = 148;
							npc_type->gender = 0;
							npc_type->max_dmg = 94;
							NPC* npc = new NPC(npc_type, 0,
								c->GetX()+5, c->GetY()+5,
								c->GetZ(), c->GetHeading());
							safe_delete(npc_type);
							npc->SetOwnerID(c->GetID());
							entity_list.AddNPC(npc);
							npc->AddToHateList(targ,1000,1000);
							npc->swarm_timer->Start(time);
						}
						break;
					case 3640:			//call of the assassin
						{	//unsure on this one also
							npc_type->equipment[7] = 140;
							npc_type->gender = 0;
							npc_type->max_dmg = 94;
							NPC* npc = new NPC(npc_type, 0,
								c->GetX()+5, c->GetY()+5,
								c->GetZ(), c->GetHeading());
							safe_delete(npc_type);
							npc->SetOwnerID(c->GetID());
							entity_list.AddNPC(npc);
							npc->AddToHateList(targ,1000,1000);
							npc->swarm_timer->Start(time);
						}
						break;
					case 3649:			//call of time  
						{	//again no textures
							//needs correct weapon
							//someone said sol ro spear?
							npc_type->min_dmg = 100;
							npc_type->max_dmg = 415;
							npc_type->equipment[7] = 431;
							npc_type->equipment[8] = 431;
							npc_type->gender = 0;
							NPC* npc = new NPC(npc_type, 0,
								c->GetX()+5, c->GetY()+5,
								c->GetZ(), c->GetHeading());
							safe_delete(npc_type);
							npc->SetOwnerID(c->GetID());
							entity_list.AddNPC(npc);
							npc->AddToHateList(targ,1000,1000);
							npc->swarm_timer->Start(time);
						}
						break;
					case 3807:			//trickster's calling
						{//not a clue what this is
							npc_type->max_dmg = 90;
							npc_type->gender = 0;
							NPC* npc = new NPC(npc_type, 0,
								c->GetX()+5, c->GetY()+5,
								c->GetZ(), c->GetHeading());
							safe_delete(npc_type);
							npc->SetOwnerID(c->GetID());
							entity_list.AddNPC(npc);
							npc->AddToHateList(targ,1000,1000);
							npc->swarm_timer->Start(time);
						}
						break;
					case 3869:			//ancient call
						{	//no clue
							//needs correct weapon
							npc_type->min_dmg = 100;
							npc_type->max_dmg = 415;
							npc_type->equipment[7] = 431;
							npc_type->equipment[8] = 431;
							npc_type->gender = 0;
							NPC* npc = new NPC(npc_type, 0,
								c->GetX()+5, c->GetY()+5,
								c->GetZ(), c->GetHeading());
							safe_delete(npc_type);
							npc->SetOwnerID(c->GetID());
							entity_list.AddNPC(npc);
							npc->AddToHateList(targ,1000,1000);
							npc->swarm_timer->Start(time);
						}
						break;
					case 3870:			//call of the tempest
						{	//need to make this despawn when disengaged
							//and limit one per fight
							//without a timer
							npc_type->min_dmg = 100;
							npc_type->max_dmg = 330;
							npc_type->race = 75;
							npc_type->texture = 3;
							npc_type->gender = 2;
							NPC* npc = new NPC(npc_type, 0,
								c->GetX()+5, c->GetY()+5,
								c->GetZ(), c->GetHeading());
							safe_delete(npc_type);
							npc->SetOwnerID(c->GetID());
							entity_list.AddNPC(npc);
							npc->AddToHateList(targ,1000,1000);
							npc->swarm_timer->Start(time);
						}
						break;
					case 4460:			//anguish of torment
						{//again clueless
							npc_type->max_dmg = 90;
							npc_type->gender = 0;
							NPC* npc = new NPC(npc_type, 0,
								c->GetX()+5, c->GetY()+5,
								c->GetZ(), c->GetHeading());
							safe_delete(npc_type);
							npc->SetOwnerID(c->GetID());
							entity_list.AddNPC(npc);
							npc->AddToHateList(targ,1000,1000);
							npc->swarm_timer->Start(time);
						}
						break;
					case 4490:			//stone animation
						{//......
							npc_type->max_dmg = 90;
							npc_type->gender = 0;
							NPC* npc = new NPC(npc_type, 0,
								c->GetX()+5, c->GetY()+5,
								c->GetZ(), c->GetHeading());
							safe_delete(npc_type);
							npc->SetOwnerID(c->GetID());
							entity_list.AddNPC(npc);
							npc->AddToHateList(targ,1000,1000);
							npc->swarm_timer->Start(time);
						}
						break;
					case 4564:					//4564-66 swarm of fear/swarm of decay
						{//cant find the stonewood compound bow texture
							npc_type->equipment[7] = 4;
							npc_type->gender = 2;
							npc_type->race = 367;
							npc_type->texture = 1;
							npc_type->walkspeed = 0;
							npc_type->runspeed = 0;
							npc_type->class_ = 4;
							npc_type->max_hp = 1025;
							npc_type->cur_hp = npc_type->max_hp;
							NPC* npca = new NPC(npc_type, 0,
								c->GetX()+5, c->GetY()+5,
								c->GetZ(), c->GetHeading());
							safe_delete(npc_type);
							npca->SetOwnerID(c->GetID());
							entity_list.AddNPC(npca);
							npca->AddToHateList(targ,1000,1000);
							npca->swarm_timer->Start(time);
						}
						break;
					case 4565:
						{
							npc_type->equipment[7] = 4;
							npc_type->gender = 2;
							npc_type->race = 367;
							npc_type->texture = 1;
							npc_type->walkspeed = 0;
							npc_type->runspeed = 0;
							npc_type->class_ = 4;
							npc_type->max_hp = 1025;
							npc_type->cur_hp = npc_type->max_hp;
							NPC* npca = new NPC(npc_type, 0,
								c->GetX()+5, c->GetY()+5,
								c->GetZ(), c->GetHeading());
							NPC* npcb = new NPC(npc_type, 0,
								c->GetX()-5, c->GetY()+5,
								c->GetZ(), c->GetHeading());
							safe_delete(npc_type);
							npca->SetOwnerID(c->GetID());
							npcb->SetOwnerID(c->GetID());
							entity_list.AddNPC(npca);
							entity_list.AddNPC(npcb);
							npca->AddToHateList(targ,1000,1000);
							npca->swarm_timer->Start(time);
							npcb->AddToHateList(targ,1000,1000);
							npcb->swarm_timer->Start(time);
						}
						break;
					case 4566:
						{
							npc_type->equipment[7] = 4;
							npc_type->gender = 2;
							npc_type->race = 367;
							npc_type->texture = 1;
							npc_type->walkspeed = 0;
							npc_type->runspeed = 0;
							npc_type->class_ = 4;
							npc_type->max_hp = 1025;
							npc_type->cur_hp = npc_type->max_hp;
							NPC* npca = new NPC(npc_type, 0,
								c->GetX()+5, c->GetY()+5,
								c->GetZ(), c->GetHeading());
							NPC* npcb = new NPC(npc_type, 0,
								c->GetX()-5, c->GetY()+5,
								c->GetZ(), c->GetHeading());
							NPC* npcc = new NPC(npc_type, 0,
								c->GetX()+5, c->GetY()-5,
								c->GetZ(), c->GetHeading());
							safe_delete(npc_type);
							npca->SetOwnerID(c->GetID());
							npcb->SetOwnerID(c->GetID());
							npcc->SetOwnerID(c->GetID());
							entity_list.AddNPC(npca);
							entity_list.AddNPC(npcb);
							entity_list.AddNPC(npcc);
							npca->AddToHateList(targ,1000,1000);
							npca->swarm_timer->Start(time);
							npcb->AddToHateList(targ,1000,1000);
							npcb->swarm_timer->Start(time);
							npcc->AddToHateList(targ,1000,1000);
							npcc->swarm_timer->Start(time);
						}
						break;
					case 4568:				//call of discord
						{//no idea what this is
							npc_type->max_dmg = 90;
							npc_type->gender = 0;
							NPC* npc = new NPC(npc_type, 0,
								c->GetX()+5, c->GetY()+5,
								c->GetZ(), c->GetHeading());
							safe_delete(npc_type);
							npc->SetOwnerID(c->GetID());
							entity_list.AddNPC(npc);
							npc->AddToHateList(targ,1000,1000);
							npc->swarm_timer->Start(time);
						}
						break;
					case 4569:			//call of chaos
						{//la la la
							npc_type->max_dmg = 90;
							npc_type->gender = 0;
							NPC* npc = new NPC(npc_type, 0,
								c->GetX()+5, c->GetY()+5,
								c->GetZ(), c->GetHeading());
							safe_delete(npc_type);
							npc->SetOwnerID(c->GetID());
							entity_list.AddNPC(npc);
							npc->AddToHateList(targ,1000,1000);
							npc->swarm_timer->Start(time);
						}
						break;
					case 4790:	//4790-4794=Exquisite Benediction
						break;
					case 4791://heard they cast aura of restoration
						break;
					case 4792:
						break;
					case 4793:
						break;
					case 4794:
						break;
					case 4796:	//4796-4800=Nature's Boon
						break;
					case 4797:
						break;
					case 4798:
						break;
					case 4799:
						break;
					case 4800:
						break;
					case 4826:		//Spirit Call 4
						{//should have a 640 poison DD proc
							npc_type->race = 120;
							npc_type->gender = 2;
							npc_type->texture = 1;
							npc_type->max_hp = 2050;
							npc_type->min_dmg = 80;
							npc_type->max_dmg = 140;
							npc_type->class_ = 91;
							sprintf(npc_type->npc_attacks, "E");
							npc_type->cur_hp = npc_type->max_hp;
							NPC* npca = new NPC(npc_type, 0,
								c->GetX()+5, c->GetY()+5,
								c->GetZ(), c->GetHeading());
							NPC* npcb = new NPC(npc_type, 0,
								c->GetX()-5, c->GetY()+5,
								c->GetZ(), c->GetHeading());
							safe_delete(npc_type);
							npca->SetOwnerID(c->GetID());
							npcb->SetOwnerID(c->GetID());
							entity_list.AddNPC(npca);
							entity_list.AddNPC(npcb);
							npca->AddToHateList(targ,1000,1000);
							npca->swarm_timer->Start(time);
							npcb->AddToHateList(targ,1000,1000);
							npcb->swarm_timer->Start(time);
						}
						break;
					case 4827:		//Sprit Call 5
						{//should have a 640 poison DD proc
							npc_type->race = 120;
							npc_type->gender = 2;
							npc_type->texture = 1;
							npc_type->max_hp = 2050;
							npc_type->min_dmg = 80;
							npc_type->max_dmg = 140;
							npc_type->class_ = 91;
							sprintf(npc_type->npc_attacks, "E");
							npc_type->cur_hp = npc_type->max_hp;
							NPC* npca = new NPC(npc_type, 0,
								c->GetX()+5, c->GetY()+5,
								c->GetZ(), c->GetHeading());
							NPC* npcb = new NPC(npc_type, 0,
								c->GetX()-5, c->GetY()+5,
								c->GetZ(), c->GetHeading());
							NPC* npcc = new NPC(npc_type, 0,
								c->GetX()+5, c->GetY()-5,
								c->GetZ(), c->GetHeading());
							safe_delete(npc_type);
							npca->SetOwnerID(c->GetID());
							npcb->SetOwnerID(c->GetID());
							npcc->SetOwnerID(c->GetID());
							entity_list.AddNPC(npca);
							entity_list.AddNPC(npcb);
							entity_list.AddNPC(npcc);
							npca->AddToHateList(targ,1000,1000);
							npca->swarm_timer->Start(time);
							npcb->AddToHateList(targ,1000,1000);
							npcb->swarm_timer->Start(time);
							npcc->AddToHateList(targ,1000,1000);
							npcc->swarm_timer->Start(time);
						}
						break;
					case 4828://Call of the Ancient 4828-4832
						break;
					case 4829:
						break;
					case 4830:
						break;
					case 4831:
						break;
					case 4832:
						break;
					case 4836://4836-4840 = Flaming ward of Ro
						break;
					case 4837:
						break;
					case 4838:
						break;
					case 4839:
						break;
					case 4840:
						break;
					case 5110:		//5110-5111 wrth of xuzl
						{	//Useing class 90 for their proc
							npc_type->equipment[7] = 62;
							npc_type->gender = 0;
							npc_type->texture = 4;
							npc_type->min_dmg = 80;
							npc_type->max_dmg = 140;
							npc_type->class_ = 90;
							NPC* npca = new NPC(npc_type, 0,
								c->GetX()+5, c->GetY()+5,
								c->GetZ(), c->GetHeading());
							NPC* npcb = new NPC(npc_type, 0,
								c->GetX()-5, c->GetY()+5,
								c->GetZ(), c->GetHeading());
							safe_delete(npc_type);
							npca->SetOwnerID(c->GetID());
							npcb->SetOwnerID(c->GetID());
							entity_list.AddNPC(npca);
							entity_list.AddNPC(npcb);
							npca->AddToHateList(targ,1000,1000);
							npca->swarm_timer->Start(time);
							npcb->AddToHateList(targ,1000,1000);
							npcb->swarm_timer->Start(time);
						}
						break;
					case 5111:
						{
							npc_type->equipment[7] = 62;
							npc_type->gender = 0;
							npc_type->texture = 4;
							npc_type->min_dmg = 80;
							npc_type->max_dmg = 140;
							npc_type->class_ = 90;
							NPC* npca = new NPC(npc_type, 0,
								c->GetX()+5, c->GetY()+5,
								c->GetZ(), c->GetHeading());
							NPC* npcb = new NPC(npc_type, 0,
								c->GetX()-5, c->GetY()+5,
								c->GetZ(), c->GetHeading());
							NPC* npcc = new NPC(npc_type, 0,
								c->GetX()+5, c->GetY()-5,
								c->GetZ(), c->GetHeading());
							safe_delete(npc_type);
							npca->SetOwnerID(c->GetID());
							npcb->SetOwnerID(c->GetID());
							npcc->SetOwnerID(c->GetID());
							entity_list.AddNPC(npca);
							entity_list.AddNPC(npcb);
							entity_list.AddNPC(npcc);
							npca->AddToHateList(targ,1000,1000);
							npca->swarm_timer->Start(time);
							npcb->AddToHateList(targ,1000,1000);
							npcb->swarm_timer->Start(time);
							npcc->AddToHateList(targ,1000,1000);
							npcc->swarm_timer->Start(time);
						}
						break;
					case 5156://Call of Nexona..not a clue
						break;
					default:
						{
							c->Message(0,"Unknown pet!");
							cout<<"Unknown Temporary Pet in Spell "<<spell_id<<endl;
							safe_delete(npc_type);
						}
					}
					targ->AddToHateList(c, 1, 0);
				}
				break;

			case SE_Doppelganger:
				{
					NPCType* npc_type = new NPCType;
					memset(npc_type, 0, sizeof(NPCType));
					strcpy(npc_type->name, caster->GetName());
					strcat(npc_type->name, "'s_image");
					npc_type->level = (caster->GetLevel());
					npc_type->race = (caster->GetRace());
					npc_type->class_ = (caster->GetClass());
					npc_type->luclinface = caster->CastToClient()->GetFace();
					npc_type->walkspeed = 0.7f;
					npc_type->size = (caster->GetSize());
					npc_type->runspeed = 1.25f;
					npc_type->bodytype = 63;
					npc_type->texture = 14;
					npc_type->gender = (caster->GetGender());
					npc_type->AC = (caster->GetAC());
					npc_type->equipment[7] = caster->GetEquipmentMaterial(7);//primary
					if(spell_id==4552)
					{
						npc_type->max_hp = (caster->CalcMaxHP())/2;
						npc_type->min_dmg = 1;
						npc_type->max_dmg = 1;
					}
					if(spell_id==4553)
					{
						npc_type->min_dmg = 1;
						npc_type->max_dmg = 150;
						npc_type->max_hp = (caster->CalcMaxHP());
					}
					if(spell_id==4554)
					{
						npc_type->min_dmg = 1;
						npc_type->max_dmg = 150;
						npc_type->max_hp = ((caster->CalcMaxHP())*1.3);
						npc_type->npc_spells_id = 5;
					}
					npc_type->cur_hp = npc_type->max_hp;
					NPC* npc = new NPC(npc_type, 0,
						caster->GetX(), caster->GetY(),
						caster->GetZ(), caster->GetHeading());
					npc->swarm_timer->Start(600000);
					safe_delete(npc_type);
					entity_list.AddNPC(npc);
					Mob* targ=caster->GetTarget();
					if((targ)&&(targ != caster))
					{
						int hate=hate_list.GetEntHate(caster);
						targ->AddToHateList(npc,hate+100);
						npc->AddToHateList(targ,1);
					}
				}
				break;

			case SE_FadingMemories:		//Dook- escape etc
				{
					entity_list.WipeHateAll(this);
					SpellOnTarget(1406,this);
				}
				break;

			case SE_WakeTheDead:		//Dook- Wake the Dead
				{
					Mob* corpse=entity_list.GetMobInZoneByRange(caster, 1, 20);
					Mob* c=caster;
					Mob* targ=caster->GetTarget();
					if(!targ)
					{
						targ=caster;
					}
					if(!corpse)
					{
						caster->Message(0,"Could not find the dead!");
						break;
					}
					else
					{
						NPCType* npc_type = new NPCType;
						memset(npc_type, 0, sizeof(NPCType));
						strcpy(npc_type->name, c->GetName());
						strcat(npc_type->name, "'s_pet");
						npc_type->level = corpse->GetLevel();
						npc_type->race = corpse->GetRace();
						npc_type->class_ = corpse->GetClass();
						npc_type->runspeed = 1.25f; 
						npc_type->min_dmg = 50;
						npc_type->max_dmg = 300;
						npc_type->walkspeed = 0.7f;
						npc_type->bodytype = 63;//Dook- useing swarm timer for this
						npc_type->max_hp = 5000;
						npc_type->cur_hp = npc_type->max_hp;
						npc_type->gender = corpse->GetGender();
						npc_type->texture = corpse->GetTexture();
						npc_type->helmtexture = corpse->GetHelmTexture();
						npc_type->equipment[7] = corpse->GetEquipmentMaterial(7);
						npc_type->equipment[8] = corpse->GetEquipmentMaterial(8);
						NPC* npc = new NPC(npc_type, 0,
							c->GetX()+5, c->GetY()+5,
							c->GetZ(), c->GetHeading());
						safe_delete(npc_type);
						npc->SetOwnerID(c->GetID());
						entity_list.AddNPC(npc);
						npc->AddToHateList(targ,1000,1000);
						if(spell_id==3268)
							npc->swarm_timer->Start(60000);
						if(spell_id==3269)
							npc->swarm_timer->Start(75000);
						if(spell_id==3270)
							npc->swarm_timer->Start(90000);
					}
				}
				break;
well i think thats all of it but not too sure, if i find ive left anything out ill update. anyway i could really use some help finishing this up so if you see anything wrong with it please post, also i do understand theres other ways that might have been nicer or better than this but this is the current state im at, help is always appreciated and if you simply want to fill me in on some of the details im missing can do so here or on my server which ive left up basicly 24/7.
Reply With Quote