Multi problem

Here you can post threads requesting help on the official POL Ultima Online Emulator Core 096.
Note: Core 096 is no longer officially supported.

Moderator: POL Developer

Post Reply
Yukiko
Distro Developer
Posts: 2825
Joined: Thu Feb 02, 2006 1:41 pm
Location: San Antonio, Texas
Contact:

Multi problem

Post by Yukiko »

I have a very strange problem.

If I am in realm-britannia and I place a multi it gets duplicated in britannia_alt, not all of it however. The dynamic items,. signs doors etc., don't. This happens for houses and boats alike. The duplicate multi is removed when I demolish the house or drydock the boat.

I believe this is a bug in the 96 core but I am not totally sure.

I am using POL 95 house scripts modified to include the realm parameter in the "create" lines. I checked to be sure the realm parameter was included in the code.

Here is the copy of the house deed script for your perusal:

Code: Select all

use cfgfile;
use uo;
use os;

include "util/key";
include "util/bank";
include "include/objtype";
include "include/findCity";
include "include/canAccess";
include "include/isValidLoc";

const UOBJECT_DOORS_START:=0x675;
const UOBJECT_DOORS_END:=0x6f4;
const UOBJECT_BRASS_SIGN:=0xbd2;
const UOBJECT_WOOD_SIGN:=0xbd0;
const UOBJECT_WOOD_SIGNTWO:=0xbd1;
const UOBJECT_TENT_CHEST:=0xe43;

program usehousedeed(character, deed)
  if(!ReserveItem(deed))
    return;
  endif
  if(!can_access(character, deed))
    return;
  endif
  EraseObjProperty(character, "IsMeditating");
  if(deed.movable == 0)
    SendSysMessage(character, "You cannot use that.");
    return;
  endif
  if(DeedAlreadyBuiltFrom(deed))
    PrintTextAbovePrivate(deed, "That house has already been built.", character);
    DestroyItem(deed);
  else
    Buildhouse(character, deed);
  endif
endprogram

function Buildhouse(character, deed)
  if(!IsInContainer(character.backpack, deed))
    SendSysMessage(character, "The deed has to be in your backpack.");
    return;
  endif
  if(!ReserveItem(deed))
    return;
  endif
  var housetype := GetHouseObjtype(deed);
  if(housetype == error)
    PrintTextAbovePrivate(deed, "That house deed appears to be broken.", character);
    syslog("Deed " + deed.serial + " had no housetype property!");
    return;
  endif
  var where := TargetMultiPlacement(character, housetype);
  if(!where)
    return;
  endif
  if((FindCity(character) != "no city") || (FindCity(where) != "no city"))
    PrintTextAbovePrivate(deed, "You can't build in cities.", character);
    return;
  endif
  if (Distance(character,where) > 50)
    PrintTextAbovePrivate(deed, "You are too far from where you are trying to build.", character);
    return;
  endif
  if(!isValidLoc(where.x, where.y) && (character.cmdlevel < 2))
    PrintTextAbovePrivate(deed, "You may not build in Green Acres.", character);
    return;
  endif
  set_critical(1);
  var created:=CreatehouseKeysAndBuiltDeed(character, housetype, where, deed);
  if(!created)
    return;
  endif
  var lock := GetObjProperty(deed, "numlockdowns");
  var sec  := GetObjProperty(deed, "numsecure");
  if(DestroyItem(deed))
    var lockid := AllocLockId();
    SetObjProperty(created.builtdeed, "builtserial",  created.house.serial);
    SetObjProperty(created.builtdeed, "new",          1);
    SetObjProperty(created.builtdeed, "numlockdowns", lock);
    SetObjProperty(created.builtdeed, "numsecure",    sec);
    SetObjProperty(created.packkey,   "lockid",       lockid);
    SetObjProperty(created.bankkey,   "lockid",       lockid);
    SetObjProperty(created.house,     "numlockdowns", lock);
    SetObjProperty(created.house,     "numsecure",    sec);
    SetObjProperty(created.house,     "footage",      created.footage);
    foreach item in (created.house.components)
      if(((item.objtype >= UOBJECT_DOORS_START) &&(item.objtype <= UOBJECT_DOORS_END)) || item.objtype == UOBJECT_TENT_CHEST || item.objtype == 0x6ad)
        item.locked := 1;
        SetObjProperty(item, "lockid", lockid);
        SetObjProperty(item, "houseserial", created.house.serial);
      elseif((item.objtype == UOBJECT_BRASS_SIGN) || (item.objtype == UOBJECT_WOOD_SIGN) || (item.objtype == UOBJECT_WOOD_SIGNTWO))
        SetObjProperty(item,"lockid",lockid);
        SetObjProperty(item, "house_serial", created.house.serial);
        SetObjProperty(created.house, "signserial", item.serial);
      endif
    endforeach
  else
    DestroyItem(created.builtdeed);
    DestroyItem(created.packkey);
    DestroyItem(created.bankkey);
    foreach item in (created.house.components)
      DestroyItem(item);
    endforeach
    DestroyMulti(created.house);
  endif
endfunction

function CreatehouseKeysAndBuiltDeed(character, housetype, where, deed)
  var bankbox := FindBankBox(character);
  var x := where.x, y := where.y, z := where.z;
  var packkey := CreateItemInBackpack(character, UOBJ_GOLD_KEY);
  if(!packkey)
    PrintTextAbovePrivate(character, "My backpack is too full!", character);
    return 0;
  endif
  var bankkey := CreateItemInContainer(bankbox, UOBJ_GOLD_KEY);
  if(!bankkey)
    PrintTextAbovePrivate(character, "My bankbox is too full!", character);
    DestroyItem(packkey);
    return 0;
  endif
  var builtdeed := CreateItemInContainer(bankbox, 0x14ef);


  SetName(builtdeed, deed.desc + " at " + x + ", " + y + ", " + z + "(built)");
  if(!builtdeed)
    PrintTextAbovePrivate(character, "My bankbox is too full!", character);
    DestroyItem(packkey);
    DestroyItem(bankkey);
    return 0;
  endif
  var house := CreateMultiAtLocation(x, y, z, housetype, CRMULTI_IGNORE_ALL, character.realm);
    if(!house)
    PrintTextAbovePrivate(character, "I can't place the house there.", character);
    print(house.errortext);
    DestroyItem(packkey);
    DestroyItem(bankkey);
    DestroyItem(builtdeed);
    return;
  endif

  var footage := FindBoxArray(housetype, house);

  var test := CStr(footage);
  SendSysMessage(character, test);

  SetObjProperty(house,"numlockdowns",GetObjProperty(deed,"numlockdowns"));
  SetObjProperty(house,"numsecure",GetObjProperty(deed,"numsecure"));
  SetObjProperty(house,"ownerserial",character.serial);
  SetObjProperty(house,"owneracct",character.acctname);
  SetObjProperty(house,"builtdeed",builtdeed.serial);
  SetObjProperty(house,"decay", (ReadGameClock()+ 2592000));
  if(housetype==0x6bb8 || housetype==0x6070 || housetype==0x6072)
  house.movable:=0;
  house.visible:=1;
  endif

 
 
  var result := struct;
  result.+packkey := packkey;
  result.+bankkey := bankkey;
  result.+builtdeed := builtdeed;
  result.+house := house;
  result.+footage := footage;
  return result;
endfunction

function DeedAlreadyBuiltFrom(deed)
  if(GetObjProperty(deed, "builtserial"))
    return 1;
  else
    return 0;
  endif
endfunction

function GetHouseObjtype(deed)
  var id := ReadConfigFile("itemdesc");
  var elem := id[ deed.objtype ];
  var ot := GetObjtypeByName(elem.HouseObjType);
  return ot;
endfunction

function IsInContainer(container, item)
  foreach thing in EnumerateItemsInContainer(container)
    if(thing.serial == item.serial)
      return 1;
    endif
  endforeach
  return 0;
endfunction

function FindBoxArray(housetype, house)
  var footage;
  case(housetype)
    0x6060: footage := smallhousearray(house, house.x, house.y, house.z); //smallstoneandplasterhouse
    0x6061: footage := smallhousearray(house, house.x, house.y, house.z); //smallstonehouse
    0x6062: footage := smallhousearray(house, house.x, house.y, house.z); //smallstonehousetwo
    0x6063: footage := smallhousearray(house, house.x, house.y, house.z); //smallwoodenhouse
    0x6064: footage := smallhousearray(house, house.x, house.y, house.z); //smallplasterhouse
    0x6073: footage := smallhousearray(house, house.x, house.y, house.z); //smallwoodandstrawhouse
    0x6065: footage := largehousearray(house, house.x, house.y, house.z); //largebrickhouse
    0x6072: footage := largehousearray(house, house.x, house.y, house.z); //largepatiohouse
    0x6066: footage := twostoryarray(house, house.x, house.y, house.z); //twostorywoodandplasterhouse
    0x6068: footage := twostoryarray(house, house.x, house.y, house.z); //twostorystoneandplasterhouse
    0x6069: footage := bigtowerarray(house, house.x, house.y, house.z); //tower
    0x6070: footage := keeparray(house, house.x, house.y, house.z); //keep
    0x6071: footage := castlearray(house, house.x, house.y, house.z); //castle
    0x6074: footage := smalltowerarray(house, house.x, house.y, house.z); //smalltower
    0x6075: footage := smallmarbleshoparray(house, house.x, house.y, house.z); //smallmarbleshop
    0x6076: footage := smallstoneshoparray(house, house.x, house.y, house.z); //smallstoneshop
    0x6077: footage := largemarblehousearray(house, house.x, house.y, house.z); //largemarblehouse
    0x6078: footage := logcabinarray(house, house.x, house.y, house.z); //logcabin
    0x6079: footage := sandstonepatiohousearray(house, house.x, house.y, house.z); //sandstonepatiohouse
    0x607A: footage := twostoryvillaarray(house, house.x, house.y, house.z); //twostoryvilla
  endcase
  return footage;
endfunction

// Added rope ladders to fix an issue with core and ladder climbing on multi's.
// Also done was adjustment to house floor for items that for some reason end
// up below the actual z of the floor (up to -3 z from floor)
function logcabinarray(house, x, y, z)
  var boxarray := {};
  var box1 := {};
  box1.append(x - 2);
  box1.append(y - 5);
  box1.append(z + 5);
  box1.append(x + 3);
  box1.append(y + 5);
  box1.append(z + 65);
  boxarray[1] := box1;
  var banarray := {};
  var bantile;
  bantile := CreateItemAtLocation(x+1, y+5, Z+5, 0x9999, 1, house.realm);
  banarray.append(bantile.serial);
  SetObjProperty(bantile, "house_serial", house.serial);
  bantile := CreateItemAtLocation(x+1, y+6, Z+2, 0x9999, 1, house.realm);
  banarray.append(bantile.serial);
  SetObjProperty(bantile, "house_serial", house.serial);
  // Added for Rope Ladders
  bantile := CreateItemAtLocation(x+3, y-4, Z+7, 0x8A5, 1, house.realm);
  bantile.movable := 0;
  bantile.invisible := 1;
  banarray.append(bantile.serial);
  SetObjProperty(bantile, "house_serial", house.serial);
  bantile := CreateItemAtLocation(x+3, y-5, Z+11, 0x8A5, 1, house.realm);
  bantile.movable := 0;
  bantile.invisible := 1;
  banarray.append(bantile.serial);
  SetObjProperty(bantile, "house_serial", house.serial);
  SetObjProperty(house, "bantiles", banarray);
  return boxarray;
endfunction

// Ladders added here for same reason. Z Adjusted for box also on here, and
// on all remaining houses.
function sandstonepatiohousearray(house, x, y, z)
  var boxarray := {};
  var box1 := {};
  box1.append(x - 4);
  box1.append(y - 3);
  box1.append(z + 0);
  box1.append(x + 5);
  box1.append(y + 2);
  box1.append(z + 46);
  boxarray[1] := box1;
  var banarray := {};
  var bantile;
  bantile := CreateItemAtLocation(x, y+4, Z+3, 0x9999, 1, house.realm);
  banarray.append(bantile.serial);
  SetObjProperty(bantile, "house_serial", house.serial);
  bantile := CreateItemAtLocation(x-1, y+4, Z+3, 0x9999, 1, house.realm);
  banarray.append(bantile.serial);
  SetObjProperty(bantile, "house_serial", house.serial);
  bantile := CreateItemAtLocation(x-2, y+4, Z+3, 0x9999, 1, house.realm);
  banarray.append(bantile.serial);
  SetObjProperty(bantile, "house_serial", house.serial);
  // Ladders
  bantile := CreateItemAtLocation(x-4, y-2, Z+7, 0x8a3, 1, house.realm);
  bantile.movable := 0;
  bantile.invisible := 1;
  banarray.append(bantile.serial);
  SetObjProperty(bantile, "house_serial", house.serial);
  bantile := CreateItemAtLocation(x-4, y-3, Z+15, 0x8a3, 1, house.realm);
  bantile.movable := 0;
  bantile.invisible := 1;
  banarray.append(bantile.serial);
  SetObjProperty(bantile, "house_serial", house.serial);
  SetObjProperty(house, "bantiles", banarray);
  return boxarray;
endfunction

function twostoryvillaarray(house, x, y, z)
  var boxarray := {};
  var box1 := {};
  box1.append(x - 4);
  box1.append(y - 4);
  box1.append(z + 0);
  box1.append(x + 4);
  box1.append(y + 4);
  box1.append(z + 47);
  boxarray[1] := box1;
  var banarray := {};
  var bantile;
  bantile := CreateItemAtLocation(x+2, y+6, Z+2, 0x9999, 1, house.realm);
  banarray.append(bantile.serial);
  SetObjProperty(bantile, "house_serial", house.serial);
  bantile := CreateItemAtLocation(x+3, y+6, Z+2, 0x9999, 1, house.realm);
  banarray.append(bantile.serial);
  SetObjProperty(bantile, "house_serial", house.serial);
  bantile := CreateItemAtLocation(x+4, y+6, Z+2, 0x9999, 1, house.realm);
  banarray.append(bantile.serial);
  SetObjProperty(bantile, "house_serial", house.serial);
  bantile := CreateItemAtLocation(x+5, y+6, Z+2, 0x9999, 1, house.realm);
  banarray.append(bantile.serial);
  SetObjProperty(bantile, "house_serial", house.serial);
  SetObjProperty(house, "bantiles", banarray);
  return boxarray;
endfunction


function largemarblehousearray(house, x, y, z)
  var boxarray := {};
  var box1 := {};
  box1.append(x - 6);
  box1.append(y - 6);
  box1.append(z + 0);
  box1.append(x + 6);
  box1.append(y + 5);
  box1.append(z + 65);
  boxarray[1] := box1;
  var banarray := {};
  var bantile;
  bantile := CreateItemAtLocation(x-6, y+7, Z+1, 0x9999, 1, house.realm);
  banarray.append(bantile.serial);
  SetObjProperty(bantile, "house_serial", house.serial);
  bantile := CreateItemAtLocation(x-5, y+7, Z+1, 0x9999, 1, house.realm);
  banarray.append(bantile.serial);
  SetObjProperty(bantile, "house_serial", house.serial);
  bantile := CreateItemAtLocation(x-4, y+7, Z+1, 0x9999, 1, house.realm);
  banarray.append(bantile.serial);
  SetObjProperty(bantile, "house_serial", house.serial);
  bantile := CreateItemAtLocation(x-3, y+7, Z+1, 0x9999, 1, house.realm);
  banarray.append(bantile.serial);
  SetObjProperty(bantile, "house_serial", house.serial);
  bantile := CreateItemAtLocation(x-2, y+7, Z+1, 0x9999, 1, house.realm);
  banarray.append(bantile.serial);
  SetObjProperty(bantile, "house_serial", house.serial);
  bantile := CreateItemAtLocation(x-1, y+7, Z+1, 0x9999, 1, house.realm);
  banarray.append(bantile.serial);
  SetObjProperty(bantile, "house_serial", house.serial);
  // Added for ladder to rooftop
  bantile := CreateItemAtLocation(x-5, y+4, Z+35, 0x8a3, 1, house.realm);
  banarray.append(bantile.serial);
  SetObjProperty(bantile, "house_serial", house.serial);
  bantile.movable := 0;
  bantile.invisible := 1;
  bantile := CreateItemAtLocation(x-5, y+5, Z+24, 0x8a4, 1, house.realm);
  bantile.movable := 0;
  bantile.invisible := 1;
  banarray.append(bantile.serial);
  SetObjProperty(bantile, "house_serial", house.serial);
  SetObjProperty(house, "bantiles", banarray);
  return boxarray;
endfunction

function smalltowerarray(house, x, y, z)
  var boxarray := {};
  var box1 := {};
  box1.append(x - 2);
  box1.append(y - 2);
  box1.append(z + 0);
  box1.append(x + 3);
  box1.append(y + 2);
  box1.append(z + 65);
  boxarray[1] := box1;
  var banarray := {};
  var bantile;
  bantile := CreateItemAtLocation(x+1, y+4, Z+2, 0x9999, 1, house.realm);
  banarray.append(bantile.serial);
  SetObjProperty(bantile, "house_serial", house.serial);
  bantile := CreateItemAtLocation(x+2, y+4, Z+2, 0x9999, 1, house.realm);
  banarray.append(bantile.serial);
  SetObjProperty(bantile, "house_serial", house.serial);
  bantile := CreateItemAtLocation(x+3, y+4, Z+2, 0x9999, 1, house.realm);
  banarray.append(bantile.serial);
  SetObjProperty(bantile, "house_serial", house.serial);
  bantile := CreateItemAtLocation(x+4, y+4, Z+2, 0x9999, 1, house.realm);
  banarray.append(bantile.serial);
  SetObjProperty(bantile, "house_serial", house.serial);
  // Threw in for adding Ladders. Easiest here so no additions needed for decays
  bantile := CreateItemAtLocation(x+3, y-2, z+17, 0x8a3, 1, house.realm);
  bantile.movable := 0;
  bantile.invisible := 1;
  banarray.append(bantile.serial);
  SetObjProperty(bantile, "house_serial", house.serial);
  bantile := CreateItemAtLocation(x-2, y-2, z+37, 0x8a0, 1, house.realm);
  bantile.movable := 0;
  bantile.invisible := 1;
  banarray.append(bantile.serial);
  SetObjProperty(bantile, "house_serial", house.serial);
  SetObjProperty(house, "bantiles", banarray);
  return boxarray;
endfunction

function smallmarbleshoparray(house, x, y, z)
  var boxarray := {};
  var box1 := {};
  box1.append(x - 2);
  box1.append(y - 2);
  box1.append(z + 0);
  box1.append(x + 2);
  box1.append(y + 2);
  box1.append(z + 65);
  boxarray[1] := box1;
  var banarray := {};
  var bantile;
  bantile := CreateItemAtLocation(x-1, y+4, Z+2, 0x9999, 1, house.realm);
  banarray.append(bantile.serial);
  SetObjProperty(bantile, "house_serial", house.serial);
  bantile := CreateItemAtLocation(x, y+4, Z+2, 0x9999, 1, house.realm);
  banarray.append(bantile.serial);
  SetObjProperty(bantile, "house_serial", house.serial);
  bantile := CreateItemAtLocation(x+1, y+4, Z+2, 0x9999, 1, house.realm);
  banarray.append(bantile.serial);
  bantile := CreateItemAtLocation(x+2, y+4, Z+2, 0x9999, 1, house.realm);
  banarray.append(bantile.serial);
  SetObjProperty(bantile, "house_serial", house.serial);
  // Ladders
  bantile := CreateItemAtLocation(x-2, y, Z+18, 0x8a3, 1, house.realm);
  bantile.movable := 0;
  bantile.invisible := 1;
  banarray.append(bantile.serial);
  SetObjProperty(bantile, "house_serial", house.serial);
  bantile := CreateItemAtLocation(x-2, y+1, Z+7, 0x8a4, 1, house.realm);
  bantile.movable := 0;
  bantile.invisible := 1;
  banarray.append(bantile.serial);
  SetObjProperty(bantile, "house_serial", house.serial);
  SetObjProperty(house, "bantiles", banarray);
  return boxarray;
endfunction

function smallstoneshoparray(house, x, y, z)
  var boxarray := {};
  var box1 := {};
  box1.append(x - 2);
  box1.append(y - 2);
  box1.append(z + 0);
  box1.append(x + 2);
  box1.append(y + 2);
  box1.append(z + 65);
  boxarray[1] := box1;
  var banarray := {};
  var bantile;
  bantile := CreateItemAtLocation(x-2, y+4, Z+4, 0x9999, 1, house.realm);
  banarray.append(bantile.serial);
  SetObjProperty(bantile, "house_serial", house.serial);
  bantile := CreateItemAtLocation(x-1, y+4, Z+4, 0x9999, 1, house.realm);
  banarray.append(bantile.serial);
  SetObjProperty(bantile, "house_serial", house.serial);
  bantile := CreateItemAtLocation(x, y+4, Z+4, 0x9999, 1, house.realm);
  banarray.append(bantile.serial);
  SetObjProperty(bantile, "house_serial", house.serial);
  // Ladders
  bantile := CreateItemAtLocation(x-2, y, Z+18, 0x8a3, 1, house.realm);
  bantile.movable := 0;
  bantile.invisible := 1;
  banarray.append(bantile.serial);
  SetObjProperty(bantile, "house_serial", house.serial);
  bantile := CreateItemAtLocation(x-2, y+1, Z+7, 0x8a4, 1, house.realm);
  bantile.movable := 0;
  bantile.invisible := 1;
  banarray.append(bantile.serial);
  SetObjProperty(bantile, "house_serial", house.serial);
  SetObjProperty(house, "bantiles", banarray);
  return boxarray;
endfunction

function smallhousearray(house, x, y, z)
  var boxarray := {};
  var box1 := {};
  box1.append(x - 2);
  box1.append(y - 2);
  box1.append(z + 0);
  box1.append(x + 2);
  box1.append(y + 2);
  box1.append(z + 27);
  boxarray[1] := box1;
  var banarray := {};
  var bantile;
  bantile := CreateItemAtLocation(x-1, y+4, Z+4, 0x9999, 1, house.realm);
  banarray.append(bantile.serial);
  SetObjProperty(bantile, "house_serial", house.serial);
  bantile := CreateItemAtLocation(x-0, y+4, Z+4, 0x9999, 1, house.realm);
  banarray.append(bantile.serial);
  SetObjProperty(bantile, "house_serial", house.serial);
  bantile := CreateItemAtLocation(x+1, y+4, Z+4, 0x9999, 1, house.realm);
  banarray.append(bantile.serial);
  SetObjProperty(bantile, "house_serial", house.serial);
  SetObjProperty(house, "bantiles", banarray);
  return boxarray;
endfunction

function largehousearray(house, x, y, z)
  var boxarray := {};
  var box1 := {};
  box1.append(x - 6);
  box1.append(y - 6);
  box1.append(z + 0);
  box1.append(x + 6);
  box1.append(y + 5);
  box1.append(z + 27);
  boxarray[1] := box1;
  var banarray := {};
  var bantile;
  if(house.objtype == 0x6072)
    bantile := CreateItemAtLocation(x-5, y+7, Z+4, 0x9999, 1, house.realm);
    banarray.append(bantile.serial);
    SetObjProperty(bantile, "house_serial", house.serial);
    bantile := CreateItemAtLocation(x-4, y+7, Z+4, 0x9999, 1, house.realm);
    banarray.append(bantile.serial);
    SetObjProperty(bantile, "house_serial", house.serial);
    bantile := CreateItemAtLocation(x-3, y+7, Z+4, 0x9999, 1, house.realm);
    banarray.append(bantile.serial);
    SetObjProperty(bantile, "house_serial", house.serial);
    bantile := CreateItemAtLocation(x-2, y+7, Z+4, 0x9999, 1, house.realm);
    banarray.append(bantile.serial);
    SetObjProperty(bantile, "house_serial", house.serial);
  else
    bantile := CreateItemAtLocation(x-2, y+7, Z+4, 0x9999, 1, house.realm);
    banarray.append(bantile.serial);
    SetObjProperty(bantile, "house_serial", house.serial);
    bantile := CreateItemAtLocation(x-1, y+7, Z+4, 0x9999, 1, house.realm);
    banarray.append(bantile.serial);
    SetObjProperty(bantile, "house_serial", house.serial);
    bantile := CreateItemAtLocation(x, y+7, Z+4, 0x9999,house.realm);
    banarray.append(bantile.serial);
    SetObjProperty(bantile, "house_serial", house.serial);
    bantile := CreateItemAtLocation(x+1, y+7, Z+4, 0x9999,house.realm);
    banarray.append(bantile.serial);
    SetObjProperty(bantile, "house_serial", house.serial);
  endif
  SetObjProperty(house, "bantiles", banarray);
  return boxarray;
endfunction

function twostoryarray(house, x, y, z)
  var boxarray := {};
  var box1 := {};
  box1.append(x - 6);
  box1.append(y - 6);
  box1.append(z + 0);
  box1.append(x    );
  box1.append(y + 5);
  box1.append(z + 47);
  boxarray[1] := box1;
  box1 := {};
  box1.append(x    );
  box1.append(y    );
  box1.append(z + 7);
  box1.append(x + 5);
  box1.append(y + 5);
  box1.append(z + 47);
  boxarray[2] := box1;
  var banarray := {};
  var bantile;
  bantile := CreateItemAtLocation(x-4, y+7, Z+4, 0x9999,house.realm);
  banarray.append(bantile.serial);
  SetObjProperty(bantile, "house_serial", house.serial);
  bantile := CreateItemAtLocation(x-3, y+7, Z+4, 0x9999,house.realm);
  banarray.append(bantile.serial);
  SetObjProperty(bantile, "house_serial", house.serial);
  bantile := CreateItemAtLocation(x-2, y+7, Z+4, 0x9999,house.realm);
  banarray.append(bantile.serial);
  SetObjProperty(bantile, "house_serial", house.serial);
  bantile := CreateItemAtLocation(x-1, y+7, Z+4, 0x9999,house.realm);
  banarray.append(bantile.serial);
  SetObjProperty(bantile, "house_serial", house.serial);
  SetObjProperty(house, "bantiles", banarray);
  return boxarray;
endfunction

function bigtowerarray(house, x, y, z)
  var boxarray := {};
  var box1 := {};
  box1.append(x - 6);
  box1.append(y - 6);
  box1.append(z + 0);
  box1.append(x + 7);
  box1.append(y + 5);
  box1.append(z + 65);
  boxarray[1] := box1;
  box1 := {};
  box1.append(x - 10);
  box1.append(y - 6);
  box1.append(z + 66);
  box1.append(x + 11);
  box1.append(y + 5);
  box1.append(z + 86);
  boxarray[2] := box1;
  var banarray := {};
  var bantile;
  bantile := CreateItemAtLocation(x-1, y+8, Z+2, 0x9999,house.realm);
  banarray.append(bantile.serial);
  SetObjProperty(bantile, "house_serial", house.serial);
  bantile := CreateItemAtLocation(x, y+8, Z+2, 0x9999,house.realm);
  banarray.append(bantile.serial);
  SetObjProperty(bantile, "house_serial", house.serial);
  bantile := CreateItemAtLocation(x+1, y+8, Z+2, 0x9999,house.realm);
  banarray.append(bantile.serial);
  SetObjProperty(bantile, "house_serial", house.serial);
  bantile := CreateItemAtLocation(x+2, y+8, Z+2, 0x9999,house.realm);
  banarray.append(bantile.serial);
  SetObjProperty(bantile, "house_serial", house.serial);
  bantile := CreateItemAtLocation(x-1, y+7, Z+5, 0x9999,house.realm);
  banarray.append(bantile.serial);
  SetObjProperty(bantile, "house_serial", house.serial);
  bantile := CreateItemAtLocation(x, y+7, Z+5, 0x9999,house.realm);
  banarray.append(bantile.serial);
  SetObjProperty(bantile, "house_serial", house.serial);
  bantile := CreateItemAtLocation(x+1, y+7, Z+5, 0x9999,house.realm);
  banarray.append(bantile.serial);
  SetObjProperty(bantile, "house_serial", house.serial);
  bantile := CreateItemAtLocation(x+2, y+7, Z+5, 0x9999,house.realm);
  banarray.append(bantile.serial);
  SetObjProperty(bantile, "house_serial", house.serial);
  SetObjProperty(house, "bantiles", banarray);
  return boxarray;
endfunction

function castlearray(house, x, y, z)
  var boxarray := {};
  var box1 := {};
  box1.append(x - 14);
  box1.append(y - 14);
  box1.append(z + 0);
  box1.append(x + 14);
  box1.append(y + 14);
  box1.append(z + 47);
  boxarray[1] := box1;
  var banarray := {};
  var bantile;
  bantile := CreateItemAtLocation(x-1, y+16, Z+3, 0x9999,house.realm);
  banarray.append(bantile.serial);
  SetObjProperty(bantile, "house_serial", house.serial);
  bantile := CreateItemAtLocation(x, y+16, Z+3, 0x9999,house.realm);
  banarray.append(bantile.serial);
  SetObjProperty(bantile, "house_serial", house.serial);
  bantile := CreateItemAtLocation(x+1, y+16, Z+3, 0x9999,house.realm);
  banarray.append(bantile.serial);
  SetObjProperty(bantile, "house_serial", house.serial);
  bantile := CreateItemAtLocation(x+2, y+16, Z+3, 0x9999,house.realm);
  banarray.append(bantile.serial);
  SetObjProperty(bantile, "house_serial", house.serial);
  bantile := CreateItemAtLocation(x-1, y+10, Z+3, 0x9999,house.realm);
  banarray.append(bantile.serial);
  SetObjProperty(bantile, "house_serial", house.serial);
  bantile := CreateItemAtLocation(x, y+10, Z+3, 0x9999,house.realm);
  banarray.append(bantile.serial);
  SetObjProperty(bantile, "house_serial", house.serial);
  bantile := CreateItemAtLocation(x+1, y+10, Z+3, 0x9999,house.realm);
  banarray.append(bantile.serial);
  SetObjProperty(bantile, "house_serial", house.serial);
  bantile := CreateItemAtLocation(x+2, y+10, Z+3, 0x9999,house.realm);
  banarray.append(bantile.serial);
  SetObjProperty(bantile, "house_serial", house.serial);
  bantile := CreateItemAtLocation(x-1,  y+6, Z+3, 0x9999,house.realm);
  banarray.append(bantile.serial);
  SetObjProperty(bantile, "house_serial", house.serial);
  bantile := CreateItemAtLocation(x,  y+6, Z+3, 0x9999,house.realm);
  banarray.append(bantile.serial);
  SetObjProperty(bantile, "house_serial", house.serial);
  bantile := CreateItemAtLocation(x+1,  y+6, Z+3, 0x9999,house.realm);
  banarray.append(bantile.serial);
  SetObjProperty(bantile, "house_serial", house.serial);
  bantile := CreateItemAtLocation(x+2,  y+6, Z+3, 0x9999,house.realm);
  banarray.append(bantile.serial);
  SetObjProperty(bantile, "house_serial", house.serial);
  bantile := CreateItemAtLocation(x-2, y-10, Z+3, 0x9999,house.realm);
  banarray.append(bantile.serial);
  SetObjProperty(bantile, "house_serial", house.serial);
  bantile := CreateItemAtLocation(x-1, y-10, Z+3, 0x9999,house.realm);
  banarray.append(bantile.serial);
  SetObjProperty(bantile, "house_serial", house.serial);
  bantile := CreateItemAtLocation(x, y-10, Z+3, 0x9999,house.realm);
  banarray.append(bantile.serial);
  SetObjProperty(bantile, "house_serial", house.serial);
  bantile := CreateItemAtLocation(x+1, y-10, Z+3, 0x9999,house.realm);
  banarray.append(bantile.serial);
  SetObjProperty(bantile, "house_serial", house.serial);
  SetObjProperty(house, "bantiles", banarray);
  return boxarray;
endfunction

function keeparray(house, x, y, z)
  var boxarray := {};
  var box1 := {};
  box1.append(x - 10);
  box1.append(y - 10);
  box1.append(z + 0);
  box1.append(x + 11);
  box1.append(y + 11);
  box1.append(z + 47);
  boxarray[1] := box1;
  var banarray := {};
  var bantile;
  bantile := CreateItemAtLocation(x-1, y+11, Z+3, 0x9999, house.realm);
  banarray.append(bantile.serial);
  SetObjProperty(bantile, "house_serial", house.serial);
  bantile := CreateItemAtLocation(x, y+11, Z+3, 0x9999, house.realm);
  banarray.append(bantile.serial);
  SetObjProperty(bantile, "house_serial", house.serial);
  bantile := CreateItemAtLocation(x+1, y+11, Z+3, 0x9999, house.realm);
  banarray.append(bantile.serial);
  SetObjProperty(bantile, "house_serial", house.serial);
  bantile := CreateItemAtLocation(x+2, y+11, Z+3, 0x9999, house.realm);
  banarray.append(bantile.serial);
  SetObjProperty(bantile, "house_serial", house.serial);
  SetObjProperty(house, "bantiles", banarray);
  return boxarray;
endfunction
THanks for any help you can provide.
User avatar
OldnGrey
POL Expert
Posts: 657
Joined: Sat Feb 04, 2006 6:26 pm

Post by OldnGrey »

Have you confirmed that a world save will save 2 items, one in britannia and one in britannia_alt?
Yukiko
Distro Developer
Posts: 2825
Joined: Thu Feb 02, 2006 1:41 pm
Location: San Antonio, Texas
Contact:

Post by Yukiko »

I don't know how to tell if both items are being saved but the duplicate house is still there after 24 hours. I tested this on POL 96.1 and a new candidate for release as POL 96.2 which is supposed to correct some multi problems. This appears to me to be a bug so I shall post it there as well.
Hidvuhbup

Post by Hidvuhbup »

To early.
Post Reply