PenUltima Online

It is currently Sat Sep 06, 2008 10:14 pm

All times are UTC - 8 hours




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Poison Problem
PostPosted: Thu Jan 25, 2007 5:37 pm 
Offline

Joined: Mon Jan 15, 2007 5:29 pm
Posts: 2
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


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jan 26, 2007 5:23 am 
Offline

Joined: Wed May 10, 2006 5:15 pm
Posts: 113
We can't do anything without the source code; can you paste your poison source here?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jan 26, 2007 10:04 am 
Offline
Distro Developer
User avatar

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


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jan 26, 2007 5:33 pm 
Offline

Joined: Mon Jan 15, 2007 5:29 pm
Posts: 2
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 :) 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:


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 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:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Style based on FI Subice by phpBBservice.nl