Code: Select all
function cast(Caster, Target, Type, Min, Max)
SetMaxHP(Target, (GetMaxHP(Target) + 50))
endModerator: Team Members
Code: Select all
function cast(Caster, Target, Type, Min, Max)
SetMaxHP(Target, (GetMaxHP(Target) + 50))
endCode: Select all
function cast (Caster, Target)
AddSpellBonus(Target, 500, 50)
end
That would be a blue stat on an item. Do we support blue stats yet?provocating wrote:I think I had tried 606
Good to see you posting again Z.Zcoretri wrote:That would be a blue stat on an item. Do we support blue stats yet?
I assume the spell is not set to toggle? It would seems when it needs to overwrite something the time is not being reset for some reason, I will look into it. As for the hp not going up I think I have an idea about that, I assume you are casting the buff when you are already full hp, if so can you go fight a mob so you take damage and then see if it regens up to max?provocating wrote:But sigh, still an issue. I am getting frustrated. It is doing something strange still. The first time I cast it, it seems to work but your current HP never goes up to the max like it should, just sits at the current value. If you can the spell again it last a half a second, then if I cast again same thing. If I do a /reload spells sometimes it lets me cast it again but either goes to default HP or on occasion to the adjusted +50hp, but rarely last the amount of time it should, 27 minutes.
How long is the duration of this buff? Can you post your complete script?provocating wrote:No, not set to toggle, set to normal. What is does currently, as I have it set is this.
Max HP goes all the way to what I set it to. I start regen up to that amount. I recast the spell and the max HP goes up to my normal HP. Everytime I cast the spell the duration changes to random amounts. Then after a cast or two the duration stays at around a half a second, at least for the effect. The icon does still show up but the duration for the icon is wrong.
Code: Select all
--[[
Script Name : Spells/Mage/Summoner/Conjuror/MinorShielding.lua
Script Author : Provocating
Script Date : 2016.05.20 02:05:09
Script Notes : Enter special notes here
:
--]]
function cast(Caster, Target, MaxVal)
-- AddSpellBonus(Caster, 606, 50)
AddSpellBonus(Caster, 500, 50)
end
function tick(Caster, Target, Type, Min, Max)
-- code to process each call_frequency (tick) set in spell_tiers
end
function remove(Caster, Target)
RemoveSpellBonus(Caster)
end
Code: Select all
ItemStatsValues* EquipmentItemList::CalculateEquipmentBonuses(Entity* entity){
ItemStatsValues* stats = new ItemStatsValues;
memset(stats, 0, sizeof(ItemStatsValues));
//entity->GetInfoStruct()->mitigation_base = 0;
MEquipmentItems.lock();
for(int8 i=0;i<NUM_SLOTS;i++){
if(items[i] && items[i]->details.item_id > 0){
master_item_list.CalculateItemBonuses(items[i], entity, stats);
if (items[i]->armor_info && !items[i]->IsShield())
entity->GetInfoStruct()->mitigation_base += items[i]->armor_info->mitigation_high;
}
}
MEquipmentItems.unlock();
return stats;
}Code: Select all
//entity->GetInfoStruct()->mitigation_base = 0;Oh I know, I was in a hurry when typing it out. Also keep in mind I am learning as I go. I am not even close to familiar with the source in this project.Jabantiz wrote:Commenting out that line will result in the mitigation being added on top of itself when that function is called again, everything is calculated from scratch and that is why mit and stats are reset to 0 in this function.
No, the duration on the icon matches what the spell is, the effect seems to always fade about half a second after I reapply the buff.provocating wrote:Also do you get the crazy random durations on recast?
Users browsing this forum: No registered users and 0 guests