PenUltima Online

It is currently Tue Oct 07, 2008 1:27 am

All times are UTC - 8 hours




Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 7 posts ] 
Author Message
 Post subject: Fix to get some scripts to compile
PostPosted: Wed Jul 05, 2006 6:13 pm 
Offline

Joined: Thu Feb 02, 2006 1:41 pm
Posts: 1154
Location: Southern Central USA
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



_________________
Sincerely,
Yukiko

I know you think you understand what you thought I said but what you heard is not exactly what I meant.

Titus 2:13


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jul 05, 2006 6:20 pm 
Offline

Joined: Thu Feb 02, 2006 1:41 pm
Posts: 1154
Location: Southern Central USA
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

_________________
Sincerely,
Yukiko

I know you think you understand what you thought I said but what you heard is not exactly what I meant.

Titus 2:13


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jul 05, 2006 11:03 pm 
Offline
POL Developer
User avatar

Joined: Wed Jan 25, 2006 2:30 am
Posts: 419
Location: San Diego, California
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

_________________
-Austin


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jul 06, 2006 2:04 am 
Offline

Joined: Thu Feb 02, 2006 1:41 pm
Posts: 1154
Location: Southern Central USA
OK Austin.

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

_________________
Sincerely,
Yukiko

I know you think you understand what you thought I said but what you heard is not exactly what I meant.

Titus 2:13


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jul 06, 2006 6:30 pm 
Offline
Distro Developer
User avatar

Joined: Thu Apr 06, 2006 5:11 pm
Posts: 350
Location: Nederland, Texas
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. :)

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]


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jul 06, 2006 8:26 pm 
Offline
POL Developer
User avatar

Joined: Wed Jan 25, 2006 2:30 am
Posts: 419
Location: San Diego, California
Everything that was in tileEffects.inc was already in client.inc too

_________________
-Austin


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jul 06, 2006 8:30 pm 
Offline
POL Developer
User avatar

Joined: Wed Jan 25, 2006 2:30 am
Posts: 419
Location: San Diego, California
Also Tek.. there is a timedScripts dealy now thatll allow for Target*() time out. Look into targetUtil.inc in that package. :)

_________________
-Austin


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 7 posts ] 

All times are UTC - 8 hours


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Style based on FI Subice by phpBBservice.nl