![]() |
Meditation while fighting - Printable Version +- SphereCommunity (https://forum.spherecommunity.net) +-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d) +--- Forum: Script Help (/Forum-Script-Help) +--- Thread: Meditation while fighting (/Thread-Meditation-while-fighting) Pages: 1 2 |
Meditation while fighting - Leonidas - 01-17-2017 10:36 AM Cannot seem to allow meditation when fighting, says you are too preoccupied. My flags for my meditation skill are "SKF_SCRIPTED" and this still occurs. I've also tried using "SKF_FIGHT" but it does nothing. Any ideas? RE: Meditation while fighting - darksun84 - 01-17-2017 10:22 PM In last nightly sphere build (don't know/remember in previous builds) meditation actually starts even if you are in combat (i think it's a bug). Example: Enter War Mode Start Meditation: the message "You attempt a meditative trance" will appear. If Meditation is successfull you get no success message but instead the mana will start to rise, if you fail you get the "You lost concentration" message. Try again to start meditation, you will get the "You are preoccupied with thoughts of battle" message. Note: When you succeed in meditation, the @success trigger is called until you cancel the Meditation action by using another skill or entering/leaving combat mode. Note 2: By applying the SKF_SCRIPTED flag the note above doesn't apply, remember to restart Sphere when you change a SKILL/SPELL flag. Example: Code: [SKILL 46] Anyway, in the script above a lot of checks are missing, so it's just for giving you an idea. RE: Meditation while fighting - Leonidas - 01-18-2017 04:32 AM I tried adding what you suggested and it seems to only work when the player is not "too preoccupied" (not in combat). What is the flag for combat? If I add a check for combat on @select shouldn't that work? I just don't know what to put into the if statement for combat. RE: Meditation while fighting - darksun84 - 01-18-2017 04:43 AM try in Code: ON=@Select RE: Meditation while fighting - Leonidas - 01-18-2017 04:49 AM That would only work if the player is in war mode, when the player is in "combat mode" there is a whole other check somewhere that I cannot find. What you gave me works when you are in war mode, but as soon as you double click anything to attack, this no longer works and it gives the message "You are preoccupied with thoughts of battle". Is there no way to check if a player is fighting something besides checking for war mode? RE: Meditation while fighting - darksun84 - 01-18-2017 05:28 AM Ah i understand, yes looks like you can't meditate during an active fight, but i don't think it's modifiable by scripts. RE: Meditation while fighting - Leonidas - 01-18-2017 08:16 AM There has to be a way.. is there no way to check if a player is attacking something? RE: Meditation while fighting - zottolo - 01-18-2017 03:55 PM (01-18-2017 08:16 AM)Leonidas Wrote: There has to be a way.. is there no way to check if a player is attacking something? sorry about my question but, can i ask you why don't you simply create a new meditation sys unbounded from any char behaviour? RE: Meditation while fighting - Leonidas - 01-18-2017 04:50 PM I would love to do that, but I've never been able to figure out how I would make it so the "Useskill>meditation" macro would use my new system. RE: Meditation while fighting - zottolo - 01-19-2017 05:47 PM (01-18-2017 04:50 PM)Leonidas Wrote: I would love to do that, but I've never been able to figure out how I would make it so the "Useskill>meditation" macro would use my new system. ok, maybe i don't have enough experience for that but if you want this skill to work anywhere, anytime and anyhow you can simply add @select a new memory that delivers a certain amount of mana every second and returning 1 the trigger to block the normal meditation use, something like this: Spoiler (Click to View) |