PenUltima Online

It is currently Fri Sep 05, 2008 3:59 am

All times are UTC - 8 hours




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Poison.. Bug?
PostPosted: Wed Aug 16, 2006 8:52 am 
Offline

Joined: Fri Apr 14, 2006 9:36 am
Posts: 240
When someone dies by poison, they remain poisoned.. is there a way to fix this?(Poisoned while dead so when they res they die again)


Top
 Profile  
 
 Post subject:
PostPosted: Thu Aug 17, 2006 3:32 am 
Offline

Joined: Sat Apr 15, 2006 11:50 am
Posts: 66
I dont really know but this is worth a try:

Go into Scripts/misc/chrdeath.src
And add the line who.SetPoison( 0 );

Its worth a try...


Top
 Profile  
 
 Post subject:
PostPosted: Thu Aug 17, 2006 6:31 am 
Offline

Joined: Fri Apr 14, 2006 9:36 am
Posts: 240
NEvermind, i found the problem...
In the script it says " // ghost.SetPoisoned(0); " Notice it has the two //'s by default


Well that didn't work... Any one else know why?


Top
 Profile  
 
 Post subject:
PostPosted: Thu Aug 17, 2006 4:23 pm 
Offline

Joined: Mon Jun 19, 2006 4:48 pm
Posts: 79
thats not how you set someone unpoisoned

open your cure spell to know how to do it ;) prolly by erasing the props poisonstamp, poisonlevel and... i think thats all


Top
 Profile  
 
 Post subject:
PostPosted: Fri Aug 18, 2006 10:50 am 
Offline

Joined: Fri Apr 14, 2006 9:36 am
Posts: 240
Well i looked at cure and didnt really see what un poisones them.. but so far my chrdeath is this and it doesnt work:

Quote:
use uo;
use os;
use util;

include "include/NPCBackpacks";
include "include/attributes";
include "include/statMod";
include "include/noto";
include "include/reportMurder";

program chrdeath(corpse,ghost,who)
EraseObjProperty(ghost, "IsMeditating");
ghost.SetPoisoned(0);
who.SetPoisoned(0);
var killer := GetObjProperty(ghost, "LastHit");
if(killer != error)
AdjustNoto((SystemFindObjectBySerial(killer[2], SYSFIND_SEARCH_OFFLINE_MOBILES)), ghost);
endif
var fame := CInt(GetObjProperty(ghost, "Fame"));
fame := (fame - CInt(fame / 20));
SetObjProperty(ghost, "Fame", fame);
SetObjProperty(corpse,"serial", ghost.serial);
dismount(ghost, corpse);
CheckForAutoRes(ghost, corpse);
var corpsenamearray := SplitWords(corpse.name);
var corpsenamearraylen := len(corpsenamearray);
var x, corpsename := "";
for (x := 4; x <= corpsenamearraylen; x := x + 1)
corpsename := corpsename + " " + corpsenamearray[x];
endfor
if(len(ghost.reportables)>0)
SendReportGump(ghost);
endif
endprogram

function CheckForAutoRes(who, corpse)
if(CInt(GetObjProperty(corpse, "AutoRes")) == 1)
Resurrect(who);
SetHp(who, GetMaxHP(who));
SetMana(who, GetMaxMana(who));
SetStamina(who, GetMaxStamina(who));
var itemlist := {};
var mypack := who.backpack;
if(!mypack)
return;
endif
foreach thing in EnumerateItemsInContainer(corpse)
if(thing.container == corpse)
if(!EquipItem(who, thing))
MoveItemToContainer(thing, mypack);
endif
endif
endforeach
endif
endfunction

function dismount(me,corpse)
var mount := GetEquipmentByLayer( corpse, 25 );
foreach item in EnumerateItemsInContainer(corpse)
if (item.objtype == 0xf021)
mount := item;
break;
endif
endforeach
if (!mount)
return;
endif
var animal := SystemFindObjectBySerial(CInt(GetObjProperty(mount,"serial")));
animal.facing := corpse.facing;
EraseObjProperty(animal, "mounted");
EraseObjProperty(animal, "mounted_on");
MoveCharacterToLocation( animal, corpse.x, corpse.y, corpse.z, MOVECHAR_FORCELOCATION);
DestroyItem(mount);
endfunction


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC - 8 hours


Who is online

Users browsing this forum: No registered users and 1 guest


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