Go Back   EQEmulator Home > EQEmulator Forums > Support > Spell Support

Spell Support Broken Spells? Want them Fixed? Request it here.

Reply
 
Thread Tools Display Modes
  #1  
Old 08-02-2017, 03:54 PM
Fridgecritter
Hill Giant
 
Join Date: Feb 2008
Posts: 195
Default

Necroing this post to see if there has been any toying with this as far as casting a spell using an item, and having it trigger a quest. How would you accomplish that? I was thinking you would just hand this in to an NPC and they would do a level check, hand you a couple pieces of the appropriate level armor and be done with it, but I thought the spell triggering a quest event idea sounded cool. Does anyone know how to do this?
Reply With Quote
  #2  
Old 08-02-2017, 10:30 PM
Sturm
Hill Giant
 
Join Date: Dec 2015
Posts: 122
Default

Save file in quests/global/items folder as:
script_1000.pl
Code:
sub EVENT_ITEM_CLICK {

   if ($itemid == 999999 && $ulevel <= 10 && !defined $qglobals{"Defiant10"}) {
        $client->NukeItem(999999);
		quest::setglobal("Defiant10", 1, 5, "F"); #prevent player from using item again
		quest::summonitem(123456); #whatever your defiant armor item ID is you want to add
		$client->Message(18, "You've summoned Defiant Armor!");
    } else {
        $client->Message(15, "Nice try, you're too powerful to use this.");
    }
}
Add the number of the script file to the item in the "Script File ID:" in this case it would be "1000". Add in any extra perl you want to suit your needs into the code and TADA! Item that uses a script on click.

Edit: I didn't check this for syntax or to see if it works, it should but just pointing you in the right direction here. Good luck!
Reply With Quote
Reply

Thread Tools
Display Modes

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 08:04 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 - 2026, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3