Target Type
Moderator: Team Members
Forum rules
READ THE FORUM STICKY THREADS BEFORE ASKING FOR HELP!
Most information can be found there, and if not, the posts will help you determine the information required to get assistance from the development team.
Incomplete Help Requests will be locked or deleted.
READ THE FORUM STICKY THREADS BEFORE ASKING FOR HELP!
Most information can be found there, and if not, the posts will help you determine the information required to get assistance from the development team.
Incomplete Help Requests will be locked or deleted.
- Gangrenous
- Posts: 812
- Joined: Sun Apr 24, 2016 6:54 am
- Characters: Dinsmoor
Target Type
I noticed we have target types like Self, Caster Pet, Enemy but nothing for caster or caster pet. Or how about Caster, Pet, Group? If I set the spell for Friendly would that fix it? I want players to be able to cast on another player or their pet, but not enemies.
Resident Dirty Hippy
-
Jabantiz
- Lead Developer
- Posts: 2912
- Joined: Wed Jul 25, 2007 2:52 pm
- Location: California
Re: Target Type
Code: Select all
#define SPELL_TARGET_SELF 0
#define SPELL_TARGET_ENEMY 1
#define SPELL_TARGET_GROUP_AE 2
#define SPELL_TARGET_CASTER_PET 3
#define SPELL_TARGET_ENEMY_PET 4
#define SPELL_TARGET_ENEMY_CORPSE 5
#define SPELL_TARGET_GROUP_CORPSE 6
#define SPELL_TARGET_NONE 7
#define SPELL_TARGET_RAID_AE 8
#define SPELL_TARGET_OTHER_GROUP_AE 9
- Gangrenous
- Posts: 812
- Joined: Sun Apr 24, 2016 6:54 am
- Characters: Dinsmoor
Re: Target Type
Yes, I knew those from the editor. I am saying that I cannot seem to find a way to be able to spell target either me, or my pet. I can cast the spell on myself by choosing self as target, or target type caster pet. But what if I want the spell to affect me, a group member or just a group members pet. You should be able to target a strangers pet and buff his pet.
Resident Dirty Hippy
- Gangrenous
- Posts: 812
- Joined: Sun Apr 24, 2016 6:54 am
- Characters: Dinsmoor
Re: Target Type
Also, shouldn't there be an "any" target. I see old post referring to it.
Resident Dirty Hippy
- Scribble
- Team Member
- Posts: 157
- Joined: Wed Jun 22, 2016 5:30 am
- EQ2Emu Server: Norrath Reborn
- Characters: Scribe
- Location: East Coast , USA
- Contact:
Re: Target Type
Searching for knowledge on this. If anyone has any ideas? At a minor roadblock with this.
Follow me at https://twitter.com/EqIIEmulator
Like to keep up with news via Discordapp chat?
Join eq2emulator public discord at https://discord.gg/sCR4fPZ
Check me out on Twtich at https://www.twitch.tv/scribbleeq23
Like to keep up with news via Discordapp chat?
Join eq2emulator public discord at https://discord.gg/sCR4fPZ
Check me out on Twtich at https://www.twitch.tv/scribbleeq23
- Gangrenous
- Posts: 812
- Joined: Sun Apr 24, 2016 6:54 am
- Characters: Dinsmoor
Re: Target Type
Let me try to be more specific on the issue. Lets just say you have a spell something like an HP buff, Damage Shield, AC buff, etc. What do you use for the target? If you pick enemy, you actually will go into attack mode when cast. Also I can seem to force effects on the target, but the icon for the buff will never appear on the target.
Resident Dirty Hippy
-
Jabantiz
- Lead Developer
- Posts: 2912
- Joined: Wed Jul 25, 2007 2:52 pm
- Location: California
Re: Target Type
Set the buff to enemy and friendly to 1, it should be set to friendly when you examine it. Again I don't have a complete list on how the friendly flag changes the original list.Jabantiz wrote:Some of these will be different if the friendly flag is set or not but I don't have that exact list
- Gangrenous
- Posts: 812
- Joined: Sun Apr 24, 2016 6:54 am
- Characters: Dinsmoor
Re: Target Type
Xinux helped me with this last night. The issue ended up being the editor throwing a negative number in instead of zero. When a combobox has no selection, it needs to be told to not return a -1. This cost me a lot of time, I was looking in the wrong spot. So basically any spells I edited using the editor was throwing a -1 under det_type. I change my editor for all the spell fields that use a combobox to not return a -1.
I think what was happening in C++ was the typical UINT operator issue where it thinks a negative number is greater than 0, I think we have all seen that at some point.
I think what was happening in C++ was the typical UINT operator issue where it thinks a negative number is greater than 0, I think we have all seen that at some point.
Code: Select all
private void button_spell_update_Click(object sender, EventArgs e)
{
string id = textBox_spell_id.Text;
string soe_spell_crc = textBox_spell_soespellcrc.Text;
string type = textBox_spell_type.Text;
int cast_type = GetCastTypeID((string)comboBox_spell_casttype.SelectedItem) == -1 ? 0 : GetCastTypeID((string)comboBox_spell_casttype.SelectedItem);
string name = textBox_spell_name.Text;
string description = db.RemoveEscapeCharacters(textBox_spell_description.Text);
string icon = textBox_spell_icon.Text;
string icon_heroic = textBox_spell_iconheroicop.Text;
string icon_backdrop = textBox_spell_iconbackdrop.Text;
long class_skill = GetSkillID((string)comboBox_spell_classskill.SelectedItem) == -1 ? 0 : GetSkillID((string)comboBox_spell_classskill.SelectedItem);
long mastery_skill = GetSkillID((string)comboBox_spell_masteryskill.SelectedItem) == -1 ? 0 : GetSkillID((string)comboBox_spell_masteryskill.SelectedItem);
string min_class_skill_req = textBox_spell_minclassskillreq.Text;
int duration_until_cancel = Convert.ToInt32(checkBox_spell_durationuntilcancel.Checked);
int target_type = GetTargetTypeID((string)comboBox_spell_targettype.SelectedItem) == -1 ? 0 : GetTargetTypeID((string)comboBox_spell_targettype.SelectedItem);
string success_message = db.RemoveEscapeCharacters(textBox_spell_successmessage.Text);
string fade_message = db.RemoveEscapeCharacters(textBox_spell_fademessage.Text);
int interruptable = Convert.ToInt32(checkBox_spell_interruptable.Checked);
int cast_while_moving = Convert.ToInt32(checkBox_spellcastwhilemoving.Checked);
string luascript = db.RemoveEscapeCharacters(textBox_spell_luascript.Text);
string spell_visual = textBox_spell_spellvisual.Text;
string effect_message = db.RemoveEscapeCharacters(textBox_spell_effectmessage.Text);
int spell_book_type = GetSpellBookTypeID((string)comboBox_spell_spellbooktype.SelectedItem);
int can_effect_raid = Convert.ToInt32(checkBox_spell_caneffectraid.Checked);
int affect_only_group_members = Convert.ToInt32(checkBox_spell_affectonlygroupmembers.Checked);
int display_spell_tier = Convert.ToInt32(checkBox_spell_displayspelltier.Checked);
int friendly_spell = Convert.ToInt32(checkBox_spell_friendlyspell.Checked);
int group_spell = Convert.ToInt32(checkBox_spell_groupspell.Checked);
int det_type = GetDetTypeID((string)comboBox_spell_dettype.Text) == -1 ? 0 : GetDetTypeID((string)comboBox_spell_dettype.Text);
int control_effect_type = GetControlEffectTypeID((string)comboBox_spell_controleffecttype.Text) == -1 ? 0 : GetControlEffectTypeID((string)comboBox_spell_controleffecttype.Text);
int incurable = Convert.ToInt32(checkBox_spell_incurable.Checked);
string linked_timer_id = textBox_spell_linkedtimerid.Text;
int not_maintained = Convert.ToInt32(checkBox_spell_notmaintained.Checked);
string casting_flags = textBox_spell_castingflags.Text;
int persist_through_death = Convert.ToInt32(checkBox_spell_persistthroughdeath.Checked);
string savage_bar = textBox_spell_savagebar.Text;
string savage_bar_slot = textBox_spell_savagebarslot.Text;
int is_active = Convert.ToInt32(checkBox_spell_isactive.Checked);
int is_aa = Convert.ToInt32(checkBox_spell_isaa.Checked);
int is_deity = Convert.ToInt32(checkBox_spell_isdeity.Checked);
string deity = textBox_spell_deity.Text;
string last_auto_update = textBox_spell_lastautoupdate.Text;
string soe_last_update = textBox_spell_soelastupdate.Text;
int rows = db.RunQuery("UPDATE spells SET type=" + type + ", cast_type=" + cast_type + ", name='" + name + "', description='" + description + "', icon=" + icon + ", icon_heroic_op=" + icon_heroic + ", icon_backdrop=" + icon_backdrop + ", class_skill= " + class_skill + ", mastery_skill=" + mastery_skill + ", min_class_skill_req=" + min_class_skill_req + ", duration_until_cancel=" + duration_until_cancel + ", target_type=" + target_type + ", success_message='" + success_message + "', fade_message='" + fade_message + "', interruptable=" + interruptable + ", cast_while_moving=" + cast_while_moving + ", lua_script='" + luascript + "', spell_visual=" + spell_visual + ", effect_message='" + effect_message + "', spell_book_type=" + spell_book_type + ", can_effect_raid=" + can_effect_raid + ", affect_only_group_members=" + affect_only_group_members + ", display_spell_tier=" + display_spell_tier + ", friendly_spell=" + friendly_spell + ", group_spell=" + group_spell + ", det_type=" + det_type + ", control_effect_type=" + control_effect_type + ", incurable=" + incurable + ", linked_timer_id=" + linked_timer_id + ", not_maintained=" + not_maintained + ", casting_flags=" + casting_flags + ", persist_through_death=" + persist_through_death + ", savage_bar=" + savage_bar + ", savage_bar_slot=" + savage_bar_slot + ", is_active=" + is_active + ", is_aa=" + is_aa + ", is_deity=" + is_deity + ", deity=" + deity + " WHERE id=" + id);
}Resident Dirty Hippy
Who is online
Users browsing this forum: No registered users and 0 guests