New Houses

Get Help on scripting in POL with configurations, config setups, script trouble shooting, etc.
Post Reply
Harley
Forum Regular
Posts: 360
Joined: Sat Mar 18, 2006 1:41 am

New Houses

Post 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
Yukiko
Distro Developer
Posts: 2825
Joined: Thu Feb 02, 2006 1:41 pm

Re: New Houses

Post 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.
Harley
Forum Regular
Posts: 360
Joined: Sat Mar 18, 2006 1:41 am

Re: New Houses

Post by Harley »

Yukiko, thanks for the answer.

How can I find or discover this locations?
And what could be the analogue of these coordinates?
Tomi
POL Developer
Posts: 478
Joined: Tue Feb 21, 2006 5:08 pm

Re: New Houses

Post 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
Harley
Forum Regular
Posts: 360
Joined: Sat Mar 18, 2006 1:41 am

Re: New Houses

Post by Harley »

Thank Tomi for information!
Very needful!
Post Reply