EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Quests::Q&A (https://www.eqemulator.org/forums/forumdisplay.php?f=599)
-   -   double loot item (https://www.eqemulator.org/forums/showthread.php?t=33448)

aesian 05-03-2011 06:35 AM

double loot item
 
is there a possibility to create an item that gives double loot.
Lets say like stat food.
You eat it and receive a buff for an hour that gives you double loot.

I think it's a database setting so there should be something running that checks when buff is there and that checks when buff is gone.

Is this kind of creation possible?

joligario 05-03-2011 06:39 AM

Maybe by script. You can add loot to an NPC.

trevius 05-03-2011 07:34 AM

You can add the sub below and it should work to do what you are wanting. If you name the file default.pl, and put it in the specific zone folder you want this effect to work in, or in templates folder for all zones, it will work on any NPC that doesn't already have a script associated with it.

default.pl
Code:

sub EVENT_COMBAT {

        # Activated when first engaged into combat
        if ($combat_state)
        {
                # Check if they have buff with spell id 11 - Courage - example
                if ($client && $client->FindBuff(11))
                {
                        # Check if they have already doubled their loot table once
                        if(!$npc->EntityVariableExists(1))
                        {
                                # Double the loot table
                                $npc->AddLootTable();
                                # Set an entity var so they don't double it again
                                $npc->SetEntityVariable(1, 1);
                        }
                }
        }

}

Note, I haven't actually tested this, but it should work or be really close to functional.

ChaosSlayerZ 05-03-2011 11:53 AM

I have a related question- from the other side - is it possible to write a script, that will detect that specific food/drink was consumed, and then give player specific buff?

trevius 05-03-2011 01:27 PM

That should be possible on SoF+ clients or at least SoD+. You would just add item scripts to the food/drink and then put scripts in for them so when they are clicked, it runs the script and buffs them. If you wanted to do that on Titanium, you would probably need a click effect on the food/drink, which I don't even think is possible, but haven't really tried (might actually work).


All times are GMT -4. The time now is 06:02 PM.

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