PenUltima Online Forum Index Official Core: 096.7
Official Core: 097 2008-02-26
Donate towards the POL web hosting bill!
 POL Home   FAQ   Search    Memberlist   Usergroups    Register    Profile   Log in to check your private messages   Log in
Fix to get some scripts to compile

 
Post new topic   This topic is locked: you cannot edit posts or make replies.    PenUltima Online Forum Index -> Development Discussion
Display posts from previous:   

Author Message
Yukiko



Joined: 02 Feb 2006
Posts: 1094
Location: Southern Central USA

PostPosted: Wed Jul 05, 2006 10:13 pm    Post subject: Fix to get some scripts to compile Reply with quote

I am starting this thread for those interested.

Add the following functions taken from the 96 Distro damage.inc file to \Distro 97\Distro\pkg\mobiles\damage\include\damage.inc

Code:

/*
 * ResistancePercentToMult(percent)
 *
 * Purpose
 * Turns a percentage into a resistance multiplier.
 *
 * Parameters
 * percent
 *
 * Return value
 * Double resistance multiplier
 *
 */
function ResistancePercentToMult(percent)
    if ( percent > 0 )
        //print("% to mult: "+percent+" is: "+(CDbl(100 - percent) * 0.010));
        return CDbl(100 - percent) * 0.010;
    else
        //print("% to mult: "+percent+" is: "+(CDbl(100 + percent) * 0.010));
        return CDbl(100 + percent) * 0.010;
    endif
endfunction

/*
 * ResistancePercentToMult(percent)
 *
 * Purpose
 * Turns a resistance multiplier into a percentage.
 *
 * Parameters
 * mult
 *
 * Return value
 * Int percentage
 *
 */
function ResistanceMultToPercent(mult)
    if ( mult > 0 )
        //print("mult to %: "+mult+" is: "+CInt(100 - (mult * 100)));
        return CInt(100 - (mult * 100));
    else
        //print("mult to %: "+mult+" is: "+CInt(100 + (mult * 100)));
        return CInt(100 + (mult * 100));
    endif
endfunction



Author Message
Yukiko



Joined: 02 Feb 2006
Posts: 1094
Location: Southern Central USA

PostPosted: Wed Jul 05, 2006 10:20 pm    Post subject: Reply with quote

You will also need the include file tileEffects.inc from Distro 96. Place it in your ...\scripts\include folder in 97 distro. If you cannot find it I will include it here :

Code:

enum TILE_EFFECTS
   // * general *
   FX_SPLASH         :=  0x352d, //
   FX_EXPLODE_1      :=  0x36ca, //
   FX_EXPLODE_2      :=  0x36bd, //
   FX_EXPLODE_3      :=  0x36b0, //
   FX_FIREBALL       :=  0x36d4, //
   FX_MAGIC_ARROW    :=  0x36e4, //
   FX_FIRE_BOLT      :=  0x36f4, // Firesnake. (pagan?)
   FX_EXPLODE_BALL   :=  0x36fe, // Not used.

   FX_FLAMESTRIKE    :=  0x3709, //
   FX_SMOKE          :=  0x3728,
   FX_TELE_VANISH    :=  0x372a, // Teleport vanish.
   FX_SPELL_FAIL     :=  0x3735, //
   FX_BLESS_EFFECT   :=  0x373a, //
   FX_CURSE_EFFECT   :=  0x374a, //
   FX_SPARK_EFFECT   :=  0x375a, //
   FX_HEAL_EFFECT    :=  0x376a, //
   FX_MARK_EFFECT    :=  0x3779,
   FX_BLUEMOONSTART  :=  0x3789, // Deathvortex?
   FX_ENERGY_BOLT    :=  0x379f, //
   FX_BLADES_EMERGE  :=  0x37a0, // Not used.
   FX_GLOW           :=  0x37b9, // Not used.
   FX_GLOW_SPIKE     :=  0x37c3, // Not used.
   FX_DEATH_FUNNEL   :=  0x37cc, //
   FX_BLADES         :=  0x37eb, //
   FX_STATIC         :=  0x3818, // Not used. (pink static)
   FX_POISON_F_EW    :=  0x3914, // Poison field.
   FX_POISON_F_NS    :=  0x3920, // Poison field.
   FX_ENERGY_F_EW    :=  0x3947, // Energy field.
   FX_ENERGY_F_NS    :=  0x3956, // Energy field.
   FX_PARA_F_EW      :=  0x3967, // Paralyze field.
   FX_PARA_F_NS      :=  0x3979, // Paralyze field.
   FX_FIRE_F_EW      :=  0x398c, // Fire field.
   FX_FIRE_F_NS      :=  0x3996,  // Fire field.

   FX_POISON_GAS     := 0x113a
endenum

Author Message
Austin
POL Developer


Joined: 30 Jan 2006
Posts: 355
Location: San Diego, California

PostPosted: Thu Jul 06, 2006 3:03 am    Post subject: Reply with quote

The reason those 097 spell scripts no longer compile is because those damage.inc functions arent used anymore. I rewrote a big potion of damage.inc and am waiting for Tekproxy to return to update the spells.

Nothing in the 097 distro uses tileEffects.inc

Author Message
Yukiko



Joined: 02 Feb 2006
Posts: 1094
Location: Southern Central USA

PostPosted: Thu Jul 06, 2006 6:04 am    Post subject: Reply with quote

OK Austin.

Didn't know what was actually happening there. I figured you were probably between something or other.

Author Message
tekproxy
Distro Developer


Joined: 06 Apr 2006
Posts: 350
Location: Nederland, Texas

PostPosted: Thu Jul 06, 2006 10:30 pm    Post subject: Reply with quote

I just got out of a 8 hour car ride and I'm going to be doing one again tomorrow. I haven't had time to rewrite any of scripts yet, but I will. Smile

Seriously, if a script doesn't compile, just use ecompile -b. The server will run with a missing script here and there. Or you could just disable the package. This thread will probably be outated every 2 or 3 days, if magery is broken, and 30-45 minutes if it's something Austin is working on.

[edit]
What happened to tileEffects.inc? FX_MARK_EFFECT isn't defined anywhere now. And I'll commit the fixed spell scripts soon.
[/edit]

Author Message
Austin
POL Developer


Joined: 30 Jan 2006
Posts: 355
Location: San Diego, California

PostPosted: Fri Jul 07, 2006 12:26 am    Post subject: Reply with quote

Everything that was in tileEffects.inc was already in client.inc too

Author Message
Austin
POL Developer


Joined: 30 Jan 2006
Posts: 355
Location: San Diego, California

PostPosted: Fri Jul 07, 2006 12:30 am    Post subject: Reply with quote

Also Tek.. there is a timedScripts dealy now thatll allow for Target*() time out. Look into targetUtil.inc in that package. Smile

Post new topic   This topic is locked: you cannot edit posts or make replies.    PenUltima Online Forum Index -> Development Discussion All times are GMT - 4 Hours
Page 1 of 1

 




Powered by phpBB © 2001, 2005 phpBB Group :: Theme & Graphics by GHS & Scott E. Royalty