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
Poison Problem

 
Post new topic   Reply to topic    PenUltima Online Forum Index -> General Help (095)
Display posts from previous:   

Author Message
rbrbrb



Joined: 15 Jan 2007
Posts: 2

PostPosted: Thu Jan 25, 2007 9:37 pm    Post subject: Poison Problem Reply with quote

Hello

I have a problem in my shard

The poison remove damage and in some cases the str stay 0 and the char dont die

Can anyone help me to fix it plz?

Sorry my english

Author Message
SMJ



Joined: 10 May 2006
Posts: 113

PostPosted: Fri Jan 26, 2007 9:23 am    Post subject: Reply with quote

We can't do anything without the source code; can you paste your poison source here?

Author Message
tekproxy
Distro Developer


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

PostPosted: Fri Jan 26, 2007 2:04 pm    Post subject: Reply with quote

Poison reduces strength on your shard and you want the character to die at 0 strength? If this is true, you will have to kill the character in the script (ApplyRawDamage()) once the strength is 0.

If you need help with that, post your source.

Author Message
rbrbrb



Joined: 15 Jan 2007
Posts: 2

PostPosted: Fri Jan 26, 2007 9:33 pm    Post subject: Reply with quote

SMJ wrote:
We can't do anything without the source code; can you paste your poison source here?


I try to found the script os poison but have a lot of scripts , can you tell me what script i can paste plz??

I will post a Code of processpoisonmod.src in the folder \pkg\opt\summoning is that the script?

I work basied in UL scripts

Thx Smile


tekproxy wrote:
Poison reduces strength on your shard and you want the character to die at 0 strength? If this is true, you will have to kill the character in the script (ApplyRawDamage()) once the strength is 0.

If you need help with that, post your source.



Yes Smile i want when the strenght is 0 the char die.
What script i need put (ApplyRawDamage()) ??

Thx Smile

Code:
use uo;
use os;


include "include/spelldata";
include "include/attributes";
include "include/dotempmods";

program processtempmods( parms )
   set_script_option( SCRIPTOPT_CAN_ACCESS_OFFLINE_MOBILES, 1 );

   var who   := parms[1];
   var plvl   := parms[2];
   var msg   := parms[3];
   var serial   := who.serial;

   plvl := CInt(plvl);
   var protected := PoisonProtected( who, plvl );

   if( protected == IMMUNED )
      return;
   endif

   if( protected == CURSED )
      plvl := plvl + 2;
   endif

   if (plvl < 1)
      return;
   endif

   if ( plvl > 6 )
      plvl := 6;
   endif

   var current := 0;
   set_critical(1);
   var currentmod := GetObjProperty( who, "poison" );

   if( currentmod )
      current := CInt( currentmod[1] );
   else
      currentmod := {};
   endif

   if( plvl < current )
      set_critical(0);
      return;
   endif

   var duration := CInt(29 + ( 20 * plvl ) + 1);
   var newpoisonregenmod := GetPoisonRegenMod( plvl );
   var current_clock := CInt(ReadGameClock());

   if( plvl > current )
      SetHpRegenRate(who , ( CInt(BaseRegenRate(who) + newpoisonregenmod)) * 12 );
   endif

   var mmod := { plvl, CInt(current_clock + duration) };

   if( !current )
      who.poisoned := 1;
      if( msg )
         PrintTextAbovePrivate( who, msg, who );
      endif
      currentmod := mmod;
   else
      AddToPoisonMod( currentmod, mmod );
   endif

   SetObjProperty( who, "poison", currentmod );

   set_critical(0);

   // Edited by Sno, Jan 12 2003.
   // This part replaces "sleep(duration+1)". I *think* there's a problem regen'ing negatively.
 
      sleep(duration);

   if( !who )
      who := SystemFindObjectBySerial( CInt(serial), SYSFIND_SEARCH_OFFLINE_MOBILES );
   endif

   if( who )
      set_critical(1);
      currentmod := GetObjProperty( who, "poison" );

      if( !currentmod )
         set_critical( 0 );
         return;
      endif

      if( ReadGameClock() >= CInt(currentmod[2]) )
         CurePoison( who );
      endif

      set_critical(0);
   endif

endprogram




Thx Smile

Post new topic   Reply to topic    PenUltima Online Forum Index -> General Help (095) All times are GMT - 4 Hours
Page 1 of 1

 




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