Go Back   EQEmulator Home > EQEmulator Forums > Support > Support::General Support

Support::General Support Post all topics here having to do with errors while trying to connect to an EQEMu server but not about the setup/running of the Server itself.

Reply
 
Thread Tools Display Modes
  #1  
Old 06-18-2008, 02:15 AM
spider661
Discordant
 
Join Date: Oct 2005
Location: michigain
Posts: 260
Default items run scripts?

can you make an item run a quest script?

i saw on one server where someone had a box or something that summoned a portable banker thought that was kinda cool and it got me thinking. could you do other things with that.

i cant even figure out how they summoned the banker much less doing something else with it but would be a nice thought maybe click the item every 1 hour and summon a new item that does something else but you only want the player to be able to do it once in a while.

like in wow how you can summon spell cloth and stuff every so many days for crafting would be cool to do something like that maybe.

well anyways can it be done and how if so?
Reply With Quote
  #2  
Old 06-18-2008, 02:30 AM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

Scripts have to be run from NPCs. And that was my server that you saw the banker clickie. All I did was to make a new pet in the NPC_Types and Pet tables and then make it a banker. Then, I used one of the spells called "Free spell" and set it to summon the banker pet. Then just put that spell on a clickie item.

Using that same idea, you could theoretically make a pet with a certain name (I think) and then assign a quest script to it. You could even make the pet invisible and untargetable, so it is as if it isn't even there. Then, the NPC (pet) would execute whatever quest you have assigned for it to run. You could set it for certain zones only or all zones. You can also set the recast timer on the clickie item so it can only be used so often.

Interesting idea, really lol. I may have to put some thought into that...
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #3  
Old 06-18-2008, 02:52 AM
spider661
Discordant
 
Join Date: Oct 2005
Location: michigain
Posts: 260
Default

to do it that way would all the players need the spell file since its being clicked from an item or can that be done server side only?
Reply With Quote
  #4  
Old 06-18-2008, 02:54 AM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

My banker item works perfectly fine server side only, but players will see the spell name as "Free Spell" instead of "Summon Banker" if they don't have my custom spell file. Minor reason to require a custom spell file, but I add it in mine since I have quite a few other reasons to have a custom file.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #5  
Old 06-18-2008, 02:59 AM
spider661
Discordant
 
Join Date: Oct 2005
Location: michigain
Posts: 260
Default

ok cool ill play around with it and let you know how it turned out. thanks for the help and your right it was your server so thanks for the ideal also
Reply With Quote
  #6  
Old 06-18-2008, 03:17 AM
spider661
Discordant
 
Join Date: Oct 2005
Location: michigain
Posts: 260
Default

hmm sitting here thinking about it and trying to figure out how to trigger it i started thinking of using the EVENT_SPAWN but would that trigger as the player that spawned the "pet" or would it trigger by the npc spawning?

im thinking the "pet" will spawn give an item to the player then depop.

but im finding myself having a hard time thinking of how to find the player to give the item to.

and how would i make the pet invisible and untargetable? is there a special attack field i have to put in or a model that don't have a graphic?
Reply With Quote
  #7  
Old 06-18-2008, 05:59 AM
spider661
Discordant
 
Join Date: Oct 2005
Location: michigain
Posts: 260
Default

well i gave it a try and i cant get it to fire the events so i tried setting a proximity around it for enter and exit to see if it triggered when it was summoned but its itehr not working or i don't know how the event works becuase im getting noting only thing that works is hailing it and it just say the line it should say when hailed no event triggering other then the say.

here is the code i got named it the same as the npc in the zone im testing in.
spawning with the #npctypespawn command

Code:
sub EVENT_SAY
{
if ($text =~/Hail/i)
 {
quest::say ("Hello $name. im testing.");
quest::set_proximity(0,5,0,5,0,5);
 }
}

sub EVENT_SPAWN 
{ 
quest::set_proximity(0,5,0,5,0,5); 
} 

sub EVENT_ENTER 
{ 
quest::summonitem("1388"); 
quest::say ("entering proximity");
}
Reply With Quote
  #8  
Old 06-18-2008, 08:23 PM
spider661
Discordant
 
Join Date: Oct 2005
Location: michigain
Posts: 260
Default

is there an way to get a pc on spawning the npc maybe even something like get the closest one. the code i posted did not work like i though it would and i have been working all day trying to figure it out and nota yet
Reply With Quote
  #9  
Old 06-19-2008, 12:37 AM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

When making the pet, set the race to 240 and the bodytype to 11 and that should make it invisible with no name and untargetable. You can also set it to untrackable too if you wanted.

And, so you know, you cannot set a proximity or make changes to it without resetting the zone. Just doing a #reloadquest won't do it. The best way is to zone out and back in or out and do a #zoneshutdown and back in. That is probably why your proximity wasn't working.

And for the actual quest, you would probably be better off using Quest Objects from this wiki page:

http://www.eqemulator.net/wiki/wikka...a=QuestObjects

I don't use quest objects often yet, but maybe something close to this would be a way to start it:

Code:
sub EVENT_SPAWN {
$owner = $mob->GetOwnerID();
quest::settarget(entity,$owner);
}
But, if all you are wanting to do is have a clicky that summons an item, you can do that easily by editing a spell server-side. Just use the Ailia/Bleh spell editor and look at one of the mage summon item spells to see what you need to set to get it working. Then, you can use another free spell for the clickie. You can even set it to summon a whole bag full of items if you want
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #10  
Old 06-19-2008, 12:44 AM
ChaosSlayer
Demi-God
 
Join Date: May 2007
Posts: 1,032
Default

Trev - when your pet banker gets summoned- does has a unique name (like BANKER)? or do you get your regular goner/kabantik/vobn/etc?

cuase if you do get random names as for a common pet, the only way to attach a script to it is via npc npc ID number.
even then i am not sure if game would treat a PET as a legal npc to triger a script

PS. the idea to make summoneable banker or a merchant was flowing around my mind for a year now, but at the end I decided it would be an exploiteable feature, like during raid pulls
Reply With Quote
  #11  
Old 06-19-2008, 01:12 AM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

Actually, the type of name the banker gets depends on the type of pet you set him to in the spell settings. The one I am currently using sets it to the name of the player that summoned it (example; Trevazar's Pet) and it says "EQEmu Banker" underneath for the lastname of the NPC. I imagine with some experimenting, it would be possible to get a quest working for all summoned pets. I believe I have heard of people using them to return all items that are given to them so that quest items don't get turned into the pet by mistake. Of course in that case, you would still have to allow for summoned weapons and items to be turned in. It would be nice if there was a way to do a check against a certain item stat like NO RENT or whatever when making a quest.

If you set it to be a normal pet, it will spawn with the Goner or Kobaner or whatever names like normal. Or you can set it to be a familiar, or swarm pet, etc etc. I set mine to have 2 min recast timer and is temporary and only lasts 2 minutes. It also only has 1 HP and hits for 1. And I believe it is set to "H" special attack code so it can't attack other NPCs. I forget offhand, but I made it to be minimal exploit risk.

I know it isn't revolutionary or anything. But I hadn't seen it on any other servers yet and have been looking for new and interesting ideas to help enhance my server. My most recent one is an NPC in Nexus that changes the race of characters as they zone in, just for a little extra fun.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #12  
Old 06-19-2008, 01:29 AM
ChaosSlayer
Demi-God
 
Join Date: May 2007
Posts: 1,032
Default

hmm where do you ater pets type like that (swarm /others you mentioned) ? i don't recall this from DB...
Reply With Quote
  #13  
Old 06-19-2008, 01:33 AM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

In the spell file. Try the Ailia/Bleh spell editor and check out some pet spells. It is very easy to understand from that point. Well, maybe not very easy, because you still have to find the pet type that does what you want it to and not what you don't want it to. But other than that, it isn't too tough to figure it out. The only problem is that you have to restart your server each time you change your spell file.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
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 06:49 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 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3