Closed canerksk closed 1 month ago
SpellEffect do that with argo being the item used, but it will be nice to add the coooldown time for potions as currently is hardcoded
SpellEffect bunu argo kullanılan öğeyle yapıyor, ancak şu anda sabit kodlanmış olduğundan iksirlere bekleme süresi eklemek güzel olacak
It would also be nice if it gives an empty potion after using the potion or if it gives an empty potion with a different id.
I like this new trigger. Could be use on alcool bottle too.
SpellEffect bunu argo kullanılan öğeyle yapıyor, ancak şu anda sabit kodlanmış olduğundan iksirlere bekleme süresi eklemek güzel olacak
It would also be nice if it gives an empty potion after using the potion or if it gives an empty potion with a different id.
U can modify data1 to retrieve a diferent empty bottle or whatever. And u can do it by script before potion is consumed,for example using the trigger drk84 said: @spelleffect or any other trigger that allow u to modify tdata1 before potion is consumed.
and LAYER_FLAG_PotionUsed should be able to be modified so u can set there the CoolDown by many ways.
For example using @MEMORYEQUIP
on=@memoryequip
IF (<ARGN1> == LAYER_FLAG_PotionUsed)
timer= 25
if <src.tag0.potioverride>
timer -=<src.tag0.potioverride>
src.tag0.potioverride
endif
eNDIF
I agree trigger could be interesting, maybe something like this:
const CItemBase *pItemDef = pItem->Item_GetDef();
if ((IsTrigUsed(TRIGGER_DRINK))
{
CScriptTriggerArgs pArgs;
pArgs.m_iN1 = idbottle;
if (pItem->OnTrigger(ITRIG_DRINK, this, &pArgs) == TRIGRET_RET_TRUE)
{
return;
}
}
ITEMID_TYPE idbottle = (ITEMID_TYPE)pItemDef->m_ttDrink.m_ridEmpty.GetResIndex();
on=@drink
if (<type>==t_booze)
IF <src.tag. drunk>
src.spelleffect s_bless 100.0
endif
//You can script custom cd for boozes here.
elif (<type>==t_potion && !<src.findlayer.layer.LAYER_FLAG_PotionUsed>) //be sure u will drink the potion!
IF <src.tag. drunk>
//modify potion before everything takes places.
more1=s_poison
more2=1000
Tdata1 = //no bottle back, put it on the floor instead
serv.newitem i_cristals_2
new.p=<src.p>
src.message Why do u do this to me? Dont dare to give this %&/$ to me again!!
tdata2=3000 //cd timer override ???
endif
else
IF <src.tag. drunk>
src.message I dont want to drink this.
return 1
endif
endif
SpellEffect do that with argo being the item used, but it will be nice to add the coooldown time for potions as currently is hardcoded
Should be nice to use tdata2 for it. so if tdata2 is defined it would be used to override potion's cd.
When the potion is made with the tdata value, this will be valid for all items. It seems like it would be nice to set the empty potion refund in a customized settings menu so that it can be turned on and off. For example, Empty Bottle Return is on/off and this will be character based. I don't think it's shockingly effective to include too many triggers instead of controlling many things about the pot you drink with a single trigger.
There may be a need for a trigger that will fire when a character drinks potion. It may be necessary to replace the empty bottle returned by a potion, or you may want to adjust the time of drinking the next potion here, or you may want to turn off the loss of potion when the potion is drunk.
under void CChar::Use_Drink( CItem * pItem )
ON=@ drink // return 1 = does not give empty potions // argo =the potion she drank // local.IdBottle = empty potion id // src = drinking char // argn1 = cooldown time // argn2 = potion reduce amount
The codes here are purely examples. Although many have been tested, some may need to be rewritten.