Go Back   EQEmulator Home > EQEmulator Forums > Quests > Quests::Q&A

Quests::Q&A This is the quest support section

Reply
 
Thread Tools Display Modes
  #1  
Old 05-19-2010, 08:37 AM
Angelox
AX Classic Developer
 
Join Date: May 2006
Location: filler
Posts: 2,049
Default

Let me try and explain how this worked, Actually, AXClassic has an event in OOT where all the NPCs and mobs in the zone turn into undead (Wolves, Skeles, etc) even the ship turns into a Ghost Ship.
I always look for ways to "mass produce" what I want
First, you would have to make the new NPCs;
Code:
SELECT * FROM npc_types WHERE (ID>=58000 AND ID<=58999)
will tell you you have 59 npc's in that zone, and your next available id would be 58060, 58 being the zone ID and the range you have for adding npcs (58000 - 58999).
First thing is to duplicate all the NPC's in the zone:
Code:
UPDATE npc_types SET id=id +60 WHERE (ID>=58000 AND ID<=58999);
Each npc in crushbone will duped with a new new id starting at 58061. So now, you have 59 more orcs. you need to isolate them so you can work on them individually if needed (PHP Editor in mind). set all them with two or three "###" Example, ###an_orc_pawn. This way, it would be almost impossible you screw up the original CB spawn (like mua!).
I also use MySql Query Browser, helps me get a better picture of what I'm doing. So, now you got the npcs in place, you need to convert them to elves;
your new npcs should be at 58061 - 58119 , so for wood elf;
Code:
UPDATE npc_types SET RACE=4 WHERE (ID>=58061 AND ID<=58119);
Now, they're all wood elves.. Still you might want to change other facial, armor, etc features, you can do this later, after you get them spawning.
you can "mass rename" like this;
Code:
UPDATE npc_types SET name= '###a_wood_elf' WHERE (ID>=58061 AND ID<=58119);
You can later customize the names. but when checking out your zone, you will see all the wood elves.

You have to remove their old orc loottables;
Code:
UPDATE npc_types SET loottable_id=0 WHERE (ID>=58061 AND ID<=58119);
Now you can set new ones, and not worry if any old ones are left.
Here's some examples from another port I did you could use as templates if you wanted to change levels, damage, HP, etc;
Code:
UPDATE npc_types SET level =level -15 WHERE (ID>=58000 AND ID<=58999) and level >=45;
UPDATE npc_types SET HP =HP +200 WHERE(ID>=58000 AND ID<=58999) and (level >=22 and level <=29);
UPDATE npc_types SET HP =HP -200 WHERE(ID>=58000 AND ID<=58999) and (level >=5 and level <=20);


UPDATE npc_types SET HP=1185 WHERE (ID>=81000 AND ID<=81999) and level =29; 

UPDATE npc_types SET mindmg=14,maxdmg=58 WHERE (ID>=81000 AND ID<=81999);
UPDATE npc_types SET mindmg=14 WHERE (ID>=81000 AND ID<=81999) AND level >=28;
UPDATE npc_types SET mindmg=7 WHERE (ID>=81000 AND ID<=81999) AND (level >=20 AND level <=27);
UPDATE npc_types SET AC=600 WHERE (ID>=81000 AND ID<=81999);

UPDATE npc_types SET MR =MR -60 WHERE(ID>=81000 AND ID<=81999);
UPDATE npc_types SET mr=99, cr=99, dr=99, fr=99, pr=99, str=110, sta=110, dex=110, agi=110, _int=110, wis=110, cha=110  WHERE(ID>=81000 AND ID<=81999);
I did the same with spawn groups, here's how I made new spawns in Droga (for old Droga spawn), after I made the NPCs;
Code:
UPDATE spawn2 SET id=id +205206 WHERE zone = 'droga' AND (ID>=17438 AND ID<=17898);
UPDATE spawn2 SET id=id +197264 WHERE zone = 'droga' AND (ID>=25841 AND ID<=25921);
UPDATE spawn2 SET id=id +180416 WHERE zone = 'droga' AND (ID>=42770 AND ID<=42793);


UPDATE spawn2 SET spawngroupid=spawngroupid +160962 WHERE zone = 'droga' AND (spawngroupID>=80013 AND spawngroupID<=80498);
UPDATE spawn2 SET spawngroupid=spawngroupid +112165 WHERE zone = 'droga' AND (spawngroupID>=129296 AND spawngroupID<=129398);
UPDATE spawn2 SET spawngroupid=spawngroupid +36762 WHERE zone = 'droga' AND (spawngroupID>=204802 AND spawngroupID<=204826);

UPDATE spawngroup SET id=id +160962 WHERE name REGEXP 'droga' AND (ID>=80013 AND ID<=80498);
UPDATE spawngroup  SET id=id +112165 WHERE name REGEXP 'droga' AND (ID>=129296 AND ID<=129398);
UPDATE spawngroup SET id=id +36762 WHERE name REGEXP 'droga' AND (ID>=204802 AND ID<=204826);

UPDATE spawnentry SET NPCid=NPCid +164 WHERE (npcID>=81000 AND npcID<=81999);
UPDATE spawnentry SET NPCid=NPCid +164 WHERE (npcID>=81000 AND npcID<=81999);

UPDATE spawnentry SET spawngroupid=spawngroupid +160962 WHERE (npcID>=81000 AND npcID<=81999) AND (spawngroupID>=80013 AND spawngroupID<=80498);
UPDATE spawnentry SET spawngroupid=spawngroupid +112165 WHERE (npcID>=81000 AND npcID<=81999) AND (spawngroupID>=129296 AND spawngroupID<=129398);
UPDATE spawnentry SET spawngroupid=spawngroupid +36762 WHERE (npcID>=81000 AND npcID<=81999) AND (spawngroupID>=204802 AND spawngroupID<=204826);
A set of querys like the latter will duplicate all the spawns in the zone, all you have to do is set the spawn condition and make script, which can use time, grid-movement, PC movement, etc., as a trigger to switch from one spawn set to another. Here's an example of what might interest you for Crushbone;
Code:
## DAY/NIGHT MOBS
## PITCH BLACK Event in OOT
## Angelox

sub EVENT_SPAWN { 

if (($zonetime >= 0)&&($zonetime <= 500)){           #nighttime
 quest::spawn_condition(oot,7,0); #Day Mobs
 quest::spawn_condition(oot,8,1); #Night Mobs
}else{						     #daytime
 quest::spawn_condition(oot,7,1); #Day Mobs
 quest::spawn_condition(oot,8,0); #Night Mobs
  }
}
sub EVENT_WAYPOINT{
if (($zonetime >= 0)&&($zonetime <= 500)){           #nighttime
 quest::spawn_condition(oot,7,0); #Day Mobs
 quest::spawn_condition(oot,8,1); #Night Mobs
}else{						     #daytime
 quest::spawn_condition(oot,7,1); #Day Mobs
 quest::spawn_condition(oot,8,0); #Night Mobs
  }
}
This spawns my "witching hour" at midnight- 5 am EQ time.
What happens is, the invisible npc that spawns in to this script, will check time when spawning, and also moves on a two point grid with a delay, each movement checks the time and changes spawn if needed.

This event is fail proof - you zone into oot after midnight, and you'lll be standing on the Ghost Ship in a zone populated with undead types.

Spawngroups are tricky, you have to make sure all the numbers between all the related tables are correct, else it won't work. There's probably better querys for this, but it's what I used and what worked for me at the time.

So there you have it - looks complicated, but it isn't, just a lot of number juggling, and a little time consuming. Once understood, you can do all kinds of neat things with these techniques.

Last edited by Angelox; 05-19-2010 at 09:05 AM..
Reply With Quote
  #2  
Old 05-21-2010, 03:28 PM
Darkheat
Fire Beetle
 
Join Date: Apr 2010
Posts: 23
Default

Quote:
Originally Posted by Angelox View Post
Let me try and explain how this worked, Actually, AXClassic has an event in OOT where all the NPCs and mobs in the zone turn into undead (Wolves, Skeles, etc) even the ship turns into a Ghost Ship.
I always look for ways to "mass produce" what I want
First, you would have to make the new NPCs;
Code:
SELECT * FROM npc_types WHERE (ID>=58000 AND ID<=58999)
will tell you you have 59 npc's in that zone, and your next available id would be 58060, 58 being the zone ID and the range you have for adding npcs (58000 - 58999).
First thing is to duplicate all the NPC's in the zone:
Code:
UPDATE npc_types SET id=id +60 WHERE (ID>=58000 AND ID<=58999);
Each npc in crushbone will duped with a new new id starting at 58061. So now, you have 59 more orcs. you need to isolate them so you can work on them individually if needed (PHP Editor in mind). set all them with two or three "###" Example, ###an_orc_pawn. This way, it would be almost impossible you screw up the original CB spawn (like mua!).
I also use MySql Query Browser, helps me get a better picture of what I'm doing. So, now you got the npcs in place, you need to convert them to elves;
your new npcs should be at 58061 - 58119 , so for wood elf;
Code:
UPDATE npc_types SET RACE=4 WHERE (ID>=58061 AND ID<=58119);
Now, they're all wood elves.. Still you might want to change other facial, armor, etc features, you can do this later, after you get them spawning.
you can "mass rename" like this;
Code:
UPDATE npc_types SET name= '###a_wood_elf' WHERE (ID>=58061 AND ID<=58119);
You can later customize the names. but when checking out your zone, you will see all the wood elves.

You have to remove their old orc loottables;
Code:
UPDATE npc_types SET loottable_id=0 WHERE (ID>=58061 AND ID<=58119);
Now you can set new ones, and not worry if any old ones are left.
Here's some examples from another port I did you could use as templates if you wanted to change levels, damage, HP, etc;
Code:
UPDATE npc_types SET level =level -15 WHERE (ID>=58000 AND ID<=58999) and level >=45;
UPDATE npc_types SET HP =HP +200 WHERE(ID>=58000 AND ID<=58999) and (level >=22 and level <=29);
UPDATE npc_types SET HP =HP -200 WHERE(ID>=58000 AND ID<=58999) and (level >=5 and level <=20);


UPDATE npc_types SET HP=1185 WHERE (ID>=81000 AND ID<=81999) and level =29; 

UPDATE npc_types SET mindmg=14,maxdmg=58 WHERE (ID>=81000 AND ID<=81999);
UPDATE npc_types SET mindmg=14 WHERE (ID>=81000 AND ID<=81999) AND level >=28;
UPDATE npc_types SET mindmg=7 WHERE (ID>=81000 AND ID<=81999) AND (level >=20 AND level <=27);
UPDATE npc_types SET AC=600 WHERE (ID>=81000 AND ID<=81999);

UPDATE npc_types SET MR =MR -60 WHERE(ID>=81000 AND ID<=81999);
UPDATE npc_types SET mr=99, cr=99, dr=99, fr=99, pr=99, str=110, sta=110, dex=110, agi=110, _int=110, wis=110, cha=110  WHERE(ID>=81000 AND ID<=81999);
I did the same with spawn groups, here's how I made new spawns in Droga (for old Droga spawn), after I made the NPCs;
Code:
UPDATE spawn2 SET id=id +205206 WHERE zone = 'droga' AND (ID>=17438 AND ID<=17898);
UPDATE spawn2 SET id=id +197264 WHERE zone = 'droga' AND (ID>=25841 AND ID<=25921);
UPDATE spawn2 SET id=id +180416 WHERE zone = 'droga' AND (ID>=42770 AND ID<=42793);


UPDATE spawn2 SET spawngroupid=spawngroupid +160962 WHERE zone = 'droga' AND (spawngroupID>=80013 AND spawngroupID<=80498);
UPDATE spawn2 SET spawngroupid=spawngroupid +112165 WHERE zone = 'droga' AND (spawngroupID>=129296 AND spawngroupID<=129398);
UPDATE spawn2 SET spawngroupid=spawngroupid +36762 WHERE zone = 'droga' AND (spawngroupID>=204802 AND spawngroupID<=204826);

UPDATE spawngroup SET id=id +160962 WHERE name REGEXP 'droga' AND (ID>=80013 AND ID<=80498);
UPDATE spawngroup  SET id=id +112165 WHERE name REGEXP 'droga' AND (ID>=129296 AND ID<=129398);
UPDATE spawngroup SET id=id +36762 WHERE name REGEXP 'droga' AND (ID>=204802 AND ID<=204826);

UPDATE spawnentry SET NPCid=NPCid +164 WHERE (npcID>=81000 AND npcID<=81999);
UPDATE spawnentry SET NPCid=NPCid +164 WHERE (npcID>=81000 AND npcID<=81999);

UPDATE spawnentry SET spawngroupid=spawngroupid +160962 WHERE (npcID>=81000 AND npcID<=81999) AND (spawngroupID>=80013 AND spawngroupID<=80498);
UPDATE spawnentry SET spawngroupid=spawngroupid +112165 WHERE (npcID>=81000 AND npcID<=81999) AND (spawngroupID>=129296 AND spawngroupID<=129398);
UPDATE spawnentry SET spawngroupid=spawngroupid +36762 WHERE (npcID>=81000 AND npcID<=81999) AND (spawngroupID>=204802 AND spawngroupID<=204826);
A set of querys like the latter will duplicate all the spawns in the zone, all you have to do is set the spawn condition and make script, which can use time, grid-movement, PC movement, etc., as a trigger to switch from one spawn set to another. Here's an example of what might interest you for Crushbone;
Code:
## DAY/NIGHT MOBS
## PITCH BLACK Event in OOT
## Angelox

sub EVENT_SPAWN { 

if (($zonetime >= 0)&&($zonetime <= 500)){           #nighttime
 quest::spawn_condition(oot,7,0); #Day Mobs
 quest::spawn_condition(oot,8,1); #Night Mobs
}else{						     #daytime
 quest::spawn_condition(oot,7,1); #Day Mobs
 quest::spawn_condition(oot,8,0); #Night Mobs
  }
}
sub EVENT_WAYPOINT{
if (($zonetime >= 0)&&($zonetime <= 500)){           #nighttime
 quest::spawn_condition(oot,7,0); #Day Mobs
 quest::spawn_condition(oot,8,1); #Night Mobs
}else{						     #daytime
 quest::spawn_condition(oot,7,1); #Day Mobs
 quest::spawn_condition(oot,8,0); #Night Mobs
  }
}
This spawns my "witching hour" at midnight- 5 am EQ time.
What happens is, the invisible npc that spawns in to this script, will check time when spawning, and also moves on a two point grid with a delay, each movement checks the time and changes spawn if needed.

This event is fail proof - you zone into oot after midnight, and you'lll be standing on the Ghost Ship in a zone populated with undead types.

Spawngroups are tricky, you have to make sure all the numbers between all the related tables are correct, else it won't work. There's probably better querys for this, but it's what I used and what worked for me at the time.

So there you have it - looks complicated, but it isn't, just a lot of number juggling, and a little time consuming. Once understood, you can do all kinds of neat things with these techniques.

Thanks for this post it is very helpful and gives me a few event ideas
Reply With Quote
Reply


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 03:51 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 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3