Go Back   EQEmulator Home > EQEmulator Forums > Quests > Quests::Plugins & Mods

Quests::Plugins & Mods Completed plugins for public use as well as modifications.

Reply
 
Thread Tools Display Modes
  #1  
Old 12-24-2013, 01:45 AM
Akkadius's Avatar
Akkadius
Administrator
 
Join Date: Feb 2009
Location: MN
Posts: 2,071
Default Mod: Mass Weapon and Spell Viewer

Purpose:

When you're developing and shit, have you ever wanted to view a large amount of weapon models or spell models at the same time?

I know I have and wanted to be able to do it in game while developing on another box. Check out the video first, sorry for poor quality. Nothing too crazy about this mod.

-----------



-----------

overthere/player.pl

Code:
sub EVENT_TARGET_CHANGE{
	$CT = $client->GetTarget();
	if($CT && $CT->IsNPC()){ 
		if($CT->GetCleanName()=~/effect/i){
			if($CT->GetEntityVariable("effectid")){
				$client->Message(15, "[Effect ID]: " . $CT->GetEntityVariable("effectid"));
			}
		}
		if($CT->GetCleanName()=~/weapon/i){
			if($CT->GetEntityVariable("weaponid")){
				$client->Message(15, "[Weapon 1]: " . $CT->GetEntityVariable("weaponid"));
				$client->Message(15, "[Weapon 2]: " . $CT->GetEntityVariable("weaponid2"));
			}
		}
	}
}
overthere/default.pl

REQUIRED: You need to create several invisible NPC's (Race 127) and they need to be different ID's because the entity tracker in the zone will run out of unique names and the zone will crash, it is really a quick and dirty hack. Don't ask questions. They are defined in the script below under EVENT_SAY as $mob_1 etc, change them to fit your database system.
REQUIRED: Your controller NPC needs to be named 'Controller' usually placed next to the PoK book in the Overthere
REQUIRED: For the least issues, you use this script while in Overthere instance Version of 1

-------------------------------

Code:
# This function generates random strings of a given length
sub generate_random_string
{
	my $length_of_randomstring=shift;# the length of 
	 # the random string to generate

	my @chars=('a'..'z','A'..'Z','0'..'9','_');
	my $random_string;
	foreach (1..$length_of_randomstring) 
	{
		# rand @chars will generate a random 
		# number between 0 and scalar @chars
		$random_string.=$chars[rand @chars];
	}
	return $random_string;
}

sub RunDepop{
	my @nlist = $entity_list->GetNPCList();
	foreach $val (@nlist){
		if($val->GetCleanName()=~/effect/i || $val->GetCleanName()=~/weapon/i){
			$val->Depop();
			$eid++;
		}
	}
}

sub EVENT_SPAWN{
	$nn = $npc->GetCleanName();
	if($instanceversion == 1){ }
	if($instanceversion == 1 && $nn=~/effect/i){ quest::settimer("effectshow", 10); }
	if($instanceversion == 1 && $nn=~/weapon/i){
		$npc->TempName(generate_random_string(21)); quest::settimer("weaponshow", 10);
	}
}

sub EVENT_SAY{
	my $effect_npc = 1006288;
	my $mob_1 = 1006289;
	my $mob_2 = 1006290;
	my $mob_3 = 1006292;
	my $mob_4 = 1006293;
	my $mob_5 = 1006294;
	my $mob_6 = 1006295;
	my @arg = split(' ', $text); ### Break out arguements
	$nn=$npc->GetCleanName();
	if($nn=~/controller/i){
		if($text=~/effects/i){
			$eid = 50;
			if($nn=~/controller/i){
				my $sx = 1786;
				my $sy = 3214;
				$n=1;
				for($i=1;$i<=700;$i++){
					quest::spawn2($effect_npc, 0, 0, $sx, $sy, 50, 128);
					$sx-=10;
					$n++;
					if($n == 20){
						$sy-=60; 
						$sx = 1786;
						$n=1;
					} 
				}
				quest::settimer("assigneffects", 5);
			}
		}
		elsif($text=~/weapon/i){
			$eid = $arg[1];
			if($nn=~/controller/i){
				RunDepop();
				my $sx = 1786;
				my $sy = 3214;
				$n=1;
				for($i=1;$i<=1000;$i++){ 
					if($i <= 500){ 				 $mobspawn = $mob_1; }
					if($i >= 500 && $i<= 1000){  $mobspawn = $mob_2; }
					if($i >= 1000 && $i<= 1500){ $mobspawn = $mob_3; }
					if($i >= 1500 && $i<= 2000){ $mobspawn = $mob_4; }
					if($i >= 2000 && $i<= 2500){ $mobspawn = $mob_5; }
					if($i >= 2500 && $i<= 3000){ $mobspawn = $mob_6; }
					quest::spawn2($mobspawn, 0, 0, $sx, $sy, -40, 128);
					$sx-=10;
					$n++;
					if($n == 100){
						$sy-=60; 
						$sx = 1786;
						$n=1;
					} 
				}
				quest::settimer("assignweapons", 10);
			}
		}
		elsif($text=~/depop/i){ RunDepop(); }
		else{
			$client->Message(15, "[" . quest::saylink("Effects", 1) . "]");
			$client->Message(15, "[" . quest::saylink("Weapons", 1) . "] [" . quest::saylink("weapon 1 2000", 1, "1 - 2000") . "] [" . quest::saylink("weapon 10000 12000", 1, "10000 - 12000") . "] [" . 
				quest::saylink("weapon 12000 14000", 1, "12000 - 14000") . "] [" . quest::saylink("weapon 14000 16000", 1, "14000 - 16000") . "] [" . quest::saylink("weapon 16000 18000", 1, "16000 - 18000") . "] [" . 
				quest::saylink("weapon 20000 22000", 1, "20000 - 22000") . "] [" . quest::saylink("weapon 22000 24000", 1, "22000 - 24000") . "]");
		}
	}
}

sub EVENT_TIMER{
	if($timer eq "effectshow"){
		my $neid = $npc->GetEntityVariable("effectid");
		$npc->SpellEffect($neid);
	}
	if($timer eq "weaponshow"){
		my $neid = $npc->GetEntityVariable("weaponid");
		quest::wearchange(7, $neid);
		my $neidd = $npc->GetEntityVariable("weaponid2");
		quest::wearchange(8, $neidd);
	}
	if($timer eq "assigneffects"){
		quest::stoptimer("assigneffects");
		my @nlist = $entity_list->GetNPCList();
		foreach $val (@nlist){
			if($val->GetCleanName()=~/effect/i){
				if($eid == 167){ $eid++; }
				else{
					$val->SetEntityVariable("effectid", $eid);
					$eid++;
				}
			}
		}
	}
	if($timer eq "assignweapons"){
		quest::stoptimer("assignweapons");
		my @nlist = $entity_list->GetNPCList();
		foreach $val (@nlist){
			if($val->GetCleanName()=~/weapon/i){
				$val->SetEntityVariable("weaponid", $eid);
				$eid++;
				$val->SetEntityVariable("weaponid2", $eid);
				$eid++;
			}
		}
	}
}

Last edited by Akkadius; 12-24-2013 at 01:50 AM..
Reply With Quote
  #2  
Old 12-24-2013, 02:12 AM
Township EQ
Hill Giant
 
Join Date: Sep 2013
Posts: 118
Default

this is so awesome.. thanks!
Reply With Quote
  #3  
Old 01-10-2015, 09:04 PM
Bohbo
Hill Giant
 
Join Date: Dec 2012
Posts: 116
Default

Hey Akkadius,

I got the mobs in the DB and the quest in OT and working. Except for one thing... I dont seem to get any effects or weapons to display just a bunch of invisible men with their name showing.

I have them set as Race 127 BodyType 1 Material 0 both melee textures set to 0.

Any idea why the textures themselves won't populate on the beautiful rows of invis mobs?
Reply With Quote
  #4  
Old 01-10-2015, 09:08 PM
Akkadius's Avatar
Akkadius
Administrator
 
Join Date: Feb 2009
Location: MN
Posts: 2,071
Default

Make sure you name the NPC's appropriately.

'effects' for effects NPC's and 'weapon' for weapons NPC's
Reply With Quote
  #5  
Old 01-10-2015, 09:14 PM
Bohbo
Hill Giant
 
Join Date: Dec 2012
Posts: 116
Default

Quote:
Originally Posted by Akkadius View Post
Make sure you name the NPC's appropriately.

'effects' for effects NPC's and 'weapon' for weapons NPC's
I have them named exactly now, not sure it helped though. I repopped the zone and talked to controller and said weapon and i get a bunch of "weapon" then they start to turn into "!weapon" but no graphics.


If i click a weapon it does return the ID though, just no graphic.
Reply With Quote
  #6  
Old 01-10-2015, 09:35 PM
Akkadius's Avatar
Akkadius
Administrator
 
Join Date: Feb 2009
Location: MN
Posts: 2,071
Default

Quote:
Originally Posted by Bohbo View Post
I have them named exactly now, not sure it helped though. I repopped the zone and talked to controller and said weapon and i get a bunch of "weapon" then they start to turn into "!weapon" but no graphics.


If i click a weapon it does return the ID though, just no graphic.
Try different ranges, you might be using ranges that you just can't see on your client
Reply With Quote
  #7  
Old 01-10-2015, 09:48 PM
Bohbo
Hill Giant
 
Join Date: Dec 2012
Posts: 116
Default

Quote:
Originally Posted by Akkadius View Post
Try different ranges, you might be using ranges that you just can't see on your client
I dont think that is the issue, for example for effects I cant see a single one with UF or RoF2... i am stumped.


EDIT:: what about REQUIRED: For the least issues, you use this script while in Overthere instance Version of 1

I am using overthere off of the PoK book and then i depopped zone
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 11:31 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