Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Database/World Building

Development::Database/World Building World Building forum, dedicated to the EQEmu MySQL Database. Post partial/complete databases for spawns, items, etc.

Reply
 
Thread Tools Display Modes
  #1  
Old 11-29-2012, 07:55 AM
jsr
Hill Giant
 
Join Date: Aug 2008
Location: melbourne
Posts: 187
Default Useful script for new content dev's

I place this in quests/templates/global_player.pl

It allows someone with 200 status (or whatever you prefer) to hail themselves for some help. This version outputs some spawn commands, and message colours. I'm slightly colourblind so haven't ordered the colours to make a rainbow

Anyone have some useful things to add?

Code:
sub EVENT_SAY {

	if($status>200){
		if($text=~/hail/i){
			my $messages = quest::saylink("messages");
			my $spawns = quest::saylink("spawns");
			$client->Message(300, "$messages or $spawns");
		}

		if($text=~/spawns/i){
			my $addspawn = quest::saylink("Creating Spawns", 1);
			my $removespawn = quest::saylink("Removing Spawns", 1);
			my $editspawn = quest::saylink("Editing Spawns", 1);
			$client->Message(300, "I can assist with $addspawn, $removespawn, or $editspawn!");
		}

		if ($text=~/creating spawns/i){
			$client->Message(300, "--== CREATING SPAWNS ==--");
			$client->Message(300, "STEP 1: Type #spawn (name) to create an npc where you are standing.");
			$client->Message(300, "STEP 2: Target the NPC and type '#advnpcspawn maketype' to add the NPC to the database.  Take note of the npc_type ID");
			$client->Message(300, "STEP 3: Type '#advnpcspawn makegroup (name)' to create a new spawngroup.  Take note of the Group ID");
			$client->Message(300, "STEP 4: Type '#advnpcspawn addgroupentry Group_ID NPC_Type ID chance'.  Chance = 100 if making a single mob spawn.");
			$client->Message(300, "STEP 5: Type '#advnpcspawn addgroupspawn Group_ID' to create the spawn where you are standing.");
		}

		if ($text=~/Removing spawns/i){
			$client->Message(300, "--== REMOVING SPAWNS ==--");
			$client->Message(300, "STEP 1: Target the NPC you wish to remove.");
			$client->Message(300, "STEP 2: Type '#advnpcspawn removegroupspawn'");
		}

		if ($text=~/editing spawns/i){
			$client->Message(300, "--== EDITING SPAWNS ==--");
			$client->Message(300, "STEP 1: Target the NPC you wish to edit.");
			$client->Message(300, "STEP 2: Use #npcedit help for more details");
		}

		if ($text=~/messages/i){
			$client->Message(1,"1");
			$client->Message(2,"2");
			$client->Message(3,"3");
			$client->Message(4,"4");
			$client->Message(5,"5");
			$client->Message(6,"6");
			$client->Message(7,"7");
			$client->Message(8,"8");
			$client->Message(9,"9");
			$client->Message(10,"10");
			$client->Message(11,"11");
			$client->Message(12,"12");
			$client->Message(13,"13");
			$client->Message(14,"14");
			$client->Message(15,"15");
			$client->Message(16,"16");
			$client->Message(17,"17");
			$client->Message(18,"18");
			$client->Message(19,"19");
			$client->Message(20,"20");
			$client->Message(256,"256");
			$client->Message(258,"258");
			$client->Message(259,"259");
			$client->Message(260,"260");
			$client->Message(262,"262");
			$client->Message(263,"263");
			$client->Message(269,"269");
			$client->Message(270,"270");
			$client->Message(271,"271");
			$client->Message(272,"272");
			$client->Message(275,"275");
			$client->Message(281,"281");
			$client->Message(282,"282");
			$client->Message(285,"285");
			$client->Message(286,"286");
			$client->Message(287,"287");
			$client->Message(290,"290");
			$client->Message(291,"291");
			$client->Message(307,"307");
			$client->Message(315,"315");
			$client->Message(325,"325");
			$client->Message(326,"326");
			$client->Message(327,"327");
			$client->Message(330,"330");
			$client->Message(334,"334");
			$client->Message(337,"337");
			$client->Message(341,"341");
			$client->Message(342,"342");
		}
	}
}
Reply With Quote
  #2  
Old 11-29-2012, 10:15 AM
Caryatis
Dragon
 
Join Date: May 2009
Location: Milky Way
Posts: 539
Default

Seems pretty useless, one would hope that you could just remember npcedit and advnpcspawn removegroupspawn... or like make hotkeys.

Quote:
$client->Message(300, "STEP 1: Type #spawn (name) to create an npc where you are standing.");
$client->Message(300, "STEP 2: Target the NPC and type '#advnpcspawn maketype' to add the NPC to the database. Take note of the npc_type ID");
$client->Message(300, "STEP 3: Type '#advnpcspawn makegroup (name)' to create a new spawngroup. Take note of the Group ID");
$client->Message(300, "STEP 4: Type '#advnpcspawn addgroupentry Group_ID NPC_Type ID chance'. Chance = 100 if making a single mob spawn.");
$client->Message(300, "STEP 5: Type '#advnpcspawn addgroupspawn Group_ID' to create the spawn where you are standing.");
Is possibly the most convoluted, backwards way to spawn an npc I have ever seen.
Reply With Quote
  #3  
Old 11-29-2012, 10:24 AM
Davood
Discordant
 
Join Date: Jan 2005
Posts: 488
Default

Then dont use it

Some people learn differently
__________________
----------
Demon Overlord of Alakamin
skype @ davoodinator
Reply With Quote
  #4  
Old 11-29-2012, 12:42 PM
Drajor's Avatar
Drajor
Developer
 
Join Date: Nov 2012
Location: Halas
Posts: 355
Default

Hi jsr,

I see you are from Melbourne! *waves*
This is a great idea, building your own documentation and recording processes is IMHO a fast way of learning. I do the same thing for new APIs and languages I use.

Quote:
Seems pretty useless, one would hope that you could just remember npcedit and advnpcspawn removegroupspawn...
On the flip side, extremely useful if you do not remember the commands and parameters.

Quote:
or like make hotkeys
Hotkeys is a good suggestion though I tend to not develop on any specific character as I am normally testing class X at any given time. As hotkeys are bound to a specific character, jsr's approach works for which ever character you are on at any time.

Quote:
Is possibly the most convoluted, backwards way to spawn an npc I have ever seen.
I am not great at using the internal commands, can you please explain this more and perhaps share a better way?

Again, sweet idea jsr!
__________________
Drajor regards you indifferently -- what would you like your tombstone to say?

Last edited by Drajor; 11-29-2012 at 12:43 PM.. Reason: Spelling
Reply With Quote
  #5  
Old 11-29-2012, 02:21 PM
Caryatis
Dragon
 
Join Date: May 2009
Location: Milky Way
Posts: 539
Default

#spawn <stuff>
#npcspawn create
Reply With Quote
  #6  
Old 11-29-2012, 05:46 PM
jsr
Hill Giant
 
Join Date: Aug 2008
Location: melbourne
Posts: 187
Default

Caryatis,
Hotkeys are useful, but not when the command requires a variable. I agree that if you have a good memory and know the commands that this is not useful.

Is there a better way to create and place spawn groups without editing the database? I find this way efficient but if there's a better way obviously I'd like to hear it.


Drajor, cheers
Reply With Quote
  #7  
Old 11-29-2012, 05:50 PM
Drajor's Avatar
Drajor
Developer
 
Join Date: Nov 2012
Location: Halas
Posts: 355
Default

Quote:
Originally Posted by Caryatis View Post
#spawn <stuff>
#npcspawn create
This (vaguely)describes making a new npc, which by using #npcspawn create will be added to a new spawn group and spawn entry. Jsr's process includes much more detail about creating an npc from possibly preexisting npc_type, creating and adding a new spawn group plus configuring the chance of the npc spawning. I get the impression you and Jsr have different goals in mind.
__________________
Drajor regards you indifferently -- what would you like your tombstone to say?
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 01:44 AM.


 

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