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.. Bug?

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

Author Message
Poi



Joined: 14 Apr 2006
Posts: 240

PostPosted: Wed Aug 16, 2006 12:52 pm    Post subject: Poison.. Bug? Reply with quote

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)

Author Message
Damien



Joined: 15 Apr 2006
Posts: 65

PostPosted: Thu Aug 17, 2006 7:32 am    Post subject: Reply with quote

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...

Author Message
Poi



Joined: 14 Apr 2006
Posts: 240

PostPosted: Thu Aug 17, 2006 10:31 am    Post subject: Reply with quote

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?

Author Message
DeiviD



Joined: 19 Jun 2006
Posts: 79

PostPosted: Thu Aug 17, 2006 8:23 pm    Post subject: Reply with quote

thats not how you set someone unpoisoned

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

Author Message
Poi



Joined: 14 Apr 2006
Posts: 240

PostPosted: Fri Aug 18, 2006 2:50 pm    Post subject: Reply with quote

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

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