Thread: Random fixes
View Single Post
  #9  
Old 08-23-2004, 03:02 PM
Branks
Sarnak
 
Join Date: May 2004
Posts: 58
Default

here a solution to the overpowered pets bug/problem, i havent seen rangerdown's post so sorry if its the same thing, anyway this will simply making any pet thats unknown to the code/database, a lev 10 gnome with a max hit of 10 and display a message in zone.exe stating the character id of the caster and the spell id used with the unknown pet so that you can go through and update them. im not exactly sure how the exsisting code for default pets was supposed to work however it seems it was getting the raw information from the spell being cast and trying to create a pet from that, maybe the way pet spells are made have been changed? dont know, anyway it was multiplying things it shouldnt have in an attempt to make a pet from the spell data and well wasnt working correctly, thus we had lev 200+ pets.


in zone\spells.cpp around line 6472 if youve been useing any of the other code ive been posting.

otherwise do a search for "spell property testing functions" and scroll up a few lines till you find the default case for for MakePet and replace the exsisting code between "default:" and "break;"
with

Code:
	default:
		CastToClient()->Message(0,"Unknown Pet Type! Tell your GM to Update! for now enjoy your gimp!");
		int chid=CastToClient()->CharacterID();
		int spel=casting_spell_id;
		cout<<"Unknown pet type being created by Character ID "<<chid<<" in Spell ID "<<spel<<endl;
		strcpy(npc_type->name, "Gimpy");
		npc_type->size = 2;
		npc_type->level = 10;
		npc_type->race = 12;
		npc_type->gender = 0;
		npc_type->texture = 1;
		npc_type->min_dmg = 1;
		npc_type->max_dmg = 10;
		npc_type->max_hp = 200;
		break;
excluding the "default:" and "break" of course.

edit- I'll learn to type someday.
Reply With Quote