PDA

View Full Version : Item Script to AoE items to all Ally Players


Bytebait
03-01-2021, 06:46 PM
From an Item script I would like to give an Item in all players within x distance of the caster. I've seen client methods for groups but not players outside the group like an MGB.

I'm sure you know what I'm trying to say but for example, the following script but to all players in X distance from caster.


sub EVENT_ITEM_CLICK {
#:: Match item 57816 - Bag of Ebon Crystals
if ($itemid == 57816) {
#:: Give 40902 - Ebon Crystal x100 to the client who triggered the event
$client->AddCrystals(0, 100);
}
}

Huppy
03-01-2021, 06:56 PM
Take a look through the quest script a_jester_of_bristlebane (in quests/global folder). It might give you some insight on what you're looking for. He used to cast spells on random players and give out bread ? ;)