I've been watching this topic:
http://forums.polserver.com/viewtopic.php?t=201
and I checked at the script and changed it to my x1y1x2y2 in that zone i want it to be noloot.
Everything ecompiles and so on BUT it dont work...
So i wonder if someone see anything that need a modification.
Here it is:
Code: Select all
use uo;
program noloot( who, corpse, item )
var serial := cint(GetObjProperty(corpse, "serial"));
var komp := getobjproperty(corpse, "npctemplate");
if( serial == who.serial )
return 1;
elseif(komp)
return ;
elseif(corpse.x >= 5390 && corpse.y >= 1262 && corpse.x<=5376 && corpse.y<=1279 )
SendSysMessage(who, "Restricted Area! Can't loot!",3,40);
return 0;
else
return 1;
endif
endprogram
And in Config/Itemdesc :
Code: Select all
Container 0x2006
{
Name Corpse
Gump 0x0009
MinX 20
MaxX 80
MinY 85
MaxY 165
ControlScript corpseControl
RequiresAttention 0
DecayOnMultis 1
SaveOnExit 0
CanRemoveScript ::noloot
}
It makes other people be able to loot my corpse and this message:
SendSysMessage(who, "Restricted Area! Can't loot!",3,40);
Won't show up.
Is the x and y location wrong?
Please Help me!
Code: Select all
Thanks.Code: Select all