EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Spell Support (https://www.eqemulator.org/forums/forumdisplay.php?f=664)
-   -   Sharing is Caring: Custom Spells (https://www.eqemulator.org/forums/showthread.php?t=40072)

Noport 10-08-2015 01:53 PM

here is how it would be done putting on an item autocasting location last spell slot example: /autocast slotnumber spellid when taken off item /remove slotnumber spellid
example: Pillage Enchantment buff remover

chrsschb 10-08-2015 02:33 PM

Quote:

Originally Posted by Shendare (Post 243928)
Like... a worn effect? :P

In hindsight that was a dumb question and/or poorly worded. What are the limitations of a worn effect?

I'm thinking of adding a specific buff to classes that would only get applied when specific items are equipped. The buff would be different per class and/or none at all.

So if Warrior equipped Demon Sword 001 he'd get 2000 HP, but if Ranger equipped Demon Sword 001 he'd get nothing.

To take it a step even further, I'd like the buffs to be percentage-based. So +10% more strength or +20% HP.

Kingly_Krab 10-08-2015 03:41 PM

There's two subroutines for such a thing chrsschb, EVENT_EQUIP_ITEM and EVENT_UNEQUIP_ITEM.

Cassieze 10-09-2015 08:19 PM

Poison Cloud that follows you around and damages things - pretty much just a carbon copy of steadfast servant but switch the spells to something that damages
2 spells, 1 npc, 1 pet, 1 script

1)
Spell1:Pet spawner I used ID 21063 Adjust as necessary
Spell Effect 1: 152 base value 1 max value is time in seconds it will follow

I was considering putting this on some kind of timer that spawns them every couple seconds. Was having issues with it tho - pretty sure it was with the timer being attached to the spell itself. Although you could probably just use a regen type spell or something that already has ticks built in and just spawn a new one every tick.

2)
Spell2:Any Pbaoe DMG spell Like earthquake.

I made a new one with ID 21064. If you wanted to get fancy you could give it a viral dot or a Pbaoe effect that triggered a viral dot.

This gets called out in the script in order to cast.

If you wanted it to cast multiple spells just look up the steadfast servant and mimic how it picks what spell to use

3)
The basic gist of the mob is you cant hit it, it doesnt do melee attacks it just kinda walks around or follows you (even tho mine go and attack things) and since its a poison cloud it can obviously see through invis

Name it Poison_Cloud or something along those lines

My npcId for it is 999232. Mae sure you adjust as necessary

NPC: Bodytype: 11, Race: 127,Wep1: 11519 Wep2: 11519 Mindmg: 1 Maxdmg: 2 Attack Count: -1 NPC AGGRO: 1. See Hide: 1 See Improved Invis: 1 See undead: 1 Trackable: 0

At this point I'm realizing you could probably make it be a personal rain cloud by just changing the weapons out. I didnt like the dervish (race 431) for the poison cloud but it could work for other things

4)
Script to be placed in quests/global. Give it the name of your npcid so mine was 999232.pl this gets used again when you make the pet in the next step
Code:

#
# Poison Cloud 1-- Redid Steadfast Servant

$HPThreshold = 50;      # HP Threshold at which HoT will be cast.
$Frequency = 3;        # Frequency in seconds with which the EVENT_TIMER is executed.
$Range = 300;          # How close a player must be for a chance to be buffed.

sub EVENT_SPAWN {
        quest::settimer("RandomAction", $Frequency);
}

sub EVENT_TIMER {

        # First we find our owner and see if is in range and in need of any buffs.
        #
        $OwnerID = $npc->GetFollowID();

        if($OwnerID <= 0)
        {
                return;
        }
        $Owner = $entity_list->GetClientByID($OwnerID);

        if($Owner)
        {
                $x = $Owner->GetX();
                $y = $Owner->GetY();
                $z = $Owner->GetZ();

                $Distance = $npc->CalculateDistance($x, $y, $z);

                if($Distance < $Range) {
                                $npc->CastSpell(21064, $ClientID);
 
                }
        }               
}

5)
Make the pet in the pets table

Type: PoisonCloud1 petpower: -1 npcID: 999232 Temp: 1 petcontrol: 0 petnaming: 0 monsterflag: 0 (Or MAYBE YOU CAN MAKE NPCS USE IT?? ehh dodge the poison clouds event type thing - not sure if thats what this is for I keep getting ideas) Equipmentset: -1

Cassieze 10-09-2015 08:28 PM

@Secrets

What have I missed that you can do ground targeted abilities in emu now? Did we move to the next game version or what. Because that opens up the biggest array of spell possibilities as far as targeting and placing things such as traps and could make the game slightly more fast paced if you desired.

(I just want to drop meteor showers on an area without having to click a mob to do so)


All times are GMT -4. The time now is 11:06 AM.

Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.