Page 1 of 1

New Houses

Posted: Sat Jan 04, 2014 12:14 pm
by Harley
Is there some guide, how add new houses in POL server???
And full description, about this code and else?

Code: Select all

 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
Happy New Year to all!!!
With best regards

Re: New Houses

Posted: Tue Jan 07, 2014 2:15 am
by Yukiko
I can tell you what that script does. It places "ban tiles" at the location of entries to a house, usually just inside a door.. These tiles have a walkon script attached to them that teleports a banned player out of the house if they walk onto the tile. They are placed at the coordinates of the house sign associated with the house. The script you posted attaches the house serial as a CProp to each ban tile so that the ban walkon script can look-up the house sign for its location so it knows where to deposit the banned character.

Re: New Houses

Posted: Tue Jan 07, 2014 10:18 am
by Harley
Yukiko, thanks for the answer.

How can I find or discover this locations?
And what could be the analogue of these coordinates?

Re: New Houses

Posted: Tue Jan 07, 2014 1:56 pm
by Tomi
x y and z coordinates you have in that code is based on the multi ( house in this case ) center tile coordinates
You can check these with who.multi.x, who.multi.y and so on
Move your character ingame and compare who.x with who.multi.x to get the correct coordinates needed for that script

And another thing about that code is that it seems like it fill the box array with the top left and bottom right corner coordinates to get the boundaries for that house. These coordinates you get the same way as those bantile coordinates

Re: New Houses

Posted: Thu Jan 09, 2014 1:59 am
by Harley
Thank Tomi for information!
Very needful!