The following warnings occurred:
Warning [2] Use of undefined constant SAPI_NAME - assumed 'SAPI_NAME' (this will throw an Error in a future version of PHP) - Line: 3388 - File: inc/functions.php PHP 7.4.33-nmm6 (Linux)
File Line Function
/inc/functions.php 3388 errorHandler->error
/showthread.php 116 build_archive_link
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm6 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/inc/functions.php 3324 build_forum_breadcrumb
/showthread.php 195 build_forum_breadcrumb
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm6 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/showthread.php 195 build_forum_breadcrumb






Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
wall spell (local.duration) problem
Author Message
Satvet
Journeyman
*

Posts: 105
Likes Given: 32
Likes Received: 6 in 6 posts
Joined: Sep 2015
Reputation: 0



Post: #1
wall spell (local.duration) problem

I want the wall to get up one by one. Is there something that can not be done?
- Can I be wrong?


Quote:[Image: 8MWjla.png]
Quote:// MAGICF_OSIFORMULAS 00200 // Calculate spell damage and duration based on OSI formulas
MagicFlags=0200

Quote:[Spell 24]
DEFNAME=s_wall_of_stone
NAME=Wall of Stone
SOUND=snd_SPELL_WALL_OF_STONE
RUNES=ISY
CAST_TIME=1.5
RESOURCES=i_reag_blood_moss,i_reag_garlic
RUNE_ITEM=i_rune_WALL_OF_STONE
SCROLL_ITEM=i_scroll_WALL_OF_STONE
FLAGS=SPELLFLAG_TARG_XYZ|SPELLFLAG_HARM|SPELLFLAG_FX_TARG|SPELLFLAG_FIELD|SPELLF​LAG_NOUNPARALYZE
EFFECT_ID=0
EFFECT=0
DURATION=30.0,35.0 //<--Previous Ssystem
MANAUSE=9
SKILLREQ=MAGERY 30.0
INTERRUPT=100.0,100.0

ON=@SUCCESS
LOCAL.DURATION={300 350} //<--Not works.
LOCAL.FieldWidth=7 //<-- It works.
//LOCAL.EFFECTCOLOR=07a1 //<-- It works.

Also
Quote:[Spell 17]
DEFNAME=s_bless
NAME=Bless
SOUND=snd_SPELL_BLESS
RUNES=RS
CAST_TIME=1.5
RESOURCES=i_reag_garlic,i_reag_mandrake_root
RUNE_ITEM=i_rune_BLESS
SCROLL_ITEM=i_scroll_BLESS
FLAGS=SPELLFLAG_TARG_CHAR|SPELLFLAG_FX_TARG|SPELLFLAG_GOOD|spellflag_playeronly|​spellflag_bless
EFFECT_ID=i_fx_BLESS_EFFECT
EFFECT=5,20 //<-- does random not give value?
LAYER=layer_spell_stats
DURATION=2*60.0,4*60.0
MANAUSE=9
SKILLREQ=MAGERY 30.0
INTERRUPT=100.0,100.0

Always gives the same value. (11)
[Image: gqvY12.png]

One more thing.
Has the .shrink function changed?
Shrinked, not in the bag.
(This post was last modified: 04-30-2017 09:42 AM by Satvet.)
04-17-2017 10:02 AM
Find all posts by this user Like Post Quote this message in a reply
escribano
Journeyman
*

Posts: 170
Likes Given: 16
Likes Received: 32 in 23 posts
Joined: Nov 2012
Reputation: 2

Dragon Shard

Post: #2
RE: wall spell local.duration problem
Satvet, sup?

I've noticed this too, but i've change the core code to act as i wanted...

IN "CCharact.cpp" i've chenged the setPoison to:

Code:
bool CChar::SetPoison( int iSkill, int iTicks, CChar * pCharSrc )
{
    ADDTOCALLSTACK("CChar::SetPoison");

    const CSpellDef *pSpellDef = g_Cfg.GetSpellDef(SPELL_Poison);
    if ( !pSpellDef )
        return false;

    // Release if paralyzed ?
    if ( !pSpellDef->IsSpellType(SPELLFLAG_NOUNPARALYZE) )
    {
        CItem *pParalyze = LayerFind(LAYER_SPELL_Paralyze);
        if ( pParalyze )
            pParalyze->Delete();
    }

    CItem *pPoison = Spell_Effect_Create(SPELL_Poison, LAYER_FLAG_Poison, iSkill, 1 + Calc_GetRandVal(2) * TICK_PER_SEC, pCharSrc, false);
    if ( !pPoison )
        return false;
    LayerAdd(pPoison, LAYER_FLAG_Poison);
    
    pPoison->m_itSpell.m_spellcharges = iTicks;        // effect duration
    pPoison->SetTimeout(30);  // FIX DG

    if ( m_pClient && IsSetOF(OF_Buffs) )
    {
        m_pClient->removeBuff(BI_POISON);
        m_pClient->addBuff(BI_POISON, 1017383, 1070722, static_cast<WORD>(pPoison->m_itSpell.m_spellcharges));
    }

    SysMessageDefault(DEFMSG_JUST_BEEN_POISONED);
    StatFlag_Set(STATF_Poisoned);
    UpdateStatsFlag();
    return true;
}

Take a look at the method definition, at this part "1 + Calc_GetRandVal(2) * TICK_PER_SEC" it's the spell duration!
Sphere always treat the poison duration minimum: 10 segs to maximum: 30 segs", you can change this for any duration you want...

And in "CCharSpell.cpp" to:
Code:
case SPELL_Poison:
        {
            // Both potions and poison spells use this.
            // m_itSpell.m_spelllevel = strength of the poison ! 0-1000

            if ( iCharges <= 0 )
                return false;

            int iDmg = 0;

            // The poison in your body is having an effect.
            if ( iLevel < 50 )
                return false;
            if ( iLevel < 200 )    // Lesser
                iLevel = 0;
            else if ( iLevel < 400 ) // Normal
                iLevel = 1;
            else if ( iLevel < 800 ) // Greater
                iLevel = 2;
            else    // Deadly.
                iLevel = 3;

            pItem->m_itSpell.m_spelllevel -= 50;    // gets weaker too.    Only on old formulas
            iDmg = IMULDIV(Stat_GetMax(STAT_STR), iLevel * 2, 100);
            pItem->SetTimeout(30); // FIX DG

            static LPCTSTR const sm_Poison_Message[] =
            {
                g_Cfg.GetDefaultMsg(DEFMSG_SPELL_POISON_1),
                g_Cfg.GetDefaultMsg(DEFMSG_SPELL_POISON_2),
                g_Cfg.GetDefaultMsg(DEFMSG_SPELL_POISON_3),
                g_Cfg.GetDefaultMsg(DEFMSG_SPELL_POISON_4)
            };

            TCHAR *pszMsg = Str_GetTemp();
            sprintf(pszMsg, g_Cfg.GetDefaultMsg(DEFMSG_SPELL_LOOKS), sm_Poison_Message[iLevel]);
            Emote(pszMsg, m_pClient);
            SysMessagef(g_Cfg.GetDefaultMsg(DEFMSG_SPELL_YOUFEEL), sm_Poison_Message[iLevel]);

            static const int sm_iPoisonMax[] = { 2, 4, 6, 8, 10 };
            OnTakeDamage(maximum(sm_iPoisonMax[iLevel], iDmg), pItem->m_uidLink.CharFind(), DAMAGE_MAGIC|DAMAGE_POISON|DAMAGE_NODISTURB|DAMAGE_NOREVEAL, 0, 0, 0, 100, 0);

            if ( IsSetOF(OF_Buffs) && m_pClient )
            {
                m_pClient->removeBuff(BI_POISON);
                m_pClient->addBuff(BI_POISON, 1017383, 1070722, static_cast<WORD>(pItem->GetTimerAdjusted()));
            }
            break;
        }


Another thing to look at: "SetTimeout(30);" (both files) in my shard, poisin deals damage every 3 seconds, you also can change this to any delay you want...


I basically ignored all script proccess and fixed the spell as i wanted directly in the core...


You can do something like in any spells you want... i also removed the OSI_MAGICFORMULA from the code cuz i don't use it.


Hope it helps again Smile

UltimaPHP - OpenSource Ultima Online Server v0.1-pre-alpha under development, we need help!
(This post was last modified: 04-18-2017 04:17 AM by escribano.)
04-18-2017 04:14 AM
Find all posts by this user Like Post Quote this message in a reply
Satvet
Journeyman
*

Posts: 105
Likes Given: 32
Likes Received: 6 in 6 posts
Joined: Sep 2015
Reputation: 0



Post: #3
RE: wall spell local.duration problem

Thank you so much for your interest, Escribano.
04-18-2017 05:45 AM
Find all posts by this user Like Post Quote this message in a reply
escribano
Journeyman
*

Posts: 170
Likes Given: 16
Likes Received: 32 in 23 posts
Joined: Nov 2012
Reputation: 2

Dragon Shard

Post: #4
RE: wall spell local.duration problem
I'm here to help Smile

UltimaPHP - OpenSource Ultima Online Server v0.1-pre-alpha under development, we need help!
04-18-2017 06:07 AM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)