Hallo everybody, if u know, please help!

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

Hallo everybody, if u know, please help!

Post by Harley »

Hallo to all!!! Please, teach me, how add house at the standart POL 096 distro scripts, housing.

I don't understand how to get code like this(housedeed.src):
0x6069: footage := bigtowerarray(house, house.x, house.y, house.z); //tower
How to calculate about such lines and that does its mean?
And please, write me at all lines, what that each line means

Code: Select all

function bigtowerarray(house, x, y, z)
  var boxarray := {};
  var box1 := {};
  box1.append(x - 6);
  box1.append(y - 6);
  box1.append(z + 6);
  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+3, 0x9999, 1);
  banarray.append(bantile.serial);
  SetObjProperty(bantile, "house_serial", house.serial);
  bantile := CreateItemAtLocation(x, y+8, Z+3, 0x9999, 1);
  banarray.append(bantile.serial);
  SetObjProperty(bantile, "house_serial", house.serial);
  bantile := CreateItemAtLocation(x+1, y+8, Z+3, 0x9999, 1);
  banarray.append(bantile.serial);
  SetObjProperty(bantile, "house_serial", house.serial);
  bantile := CreateItemAtLocation(x+2, y+8, Z+3, 0x9999, 1);
  banarray.append(bantile.serial);
  SetObjProperty(bantile, "house_serial", house.serial);
  bantile := CreateItemAtLocation(x-1, y+7, Z+3, 0x9999, 1);
  banarray.append(bantile.serial);
  SetObjProperty(bantile, "house_serial", house.serial);
  bantile := CreateItemAtLocation(x, y+7, Z+6, 0x9999, 1);
  banarray.append(bantile.serial);
  SetObjProperty(bantile, "house_serial", house.serial);
  bantile := CreateItemAtLocation(x+1, y+7, Z+6, 0x9999, 1);
  banarray.append(bantile.serial);
  SetObjProperty(bantile, "house_serial", house.serial);
  bantile := CreateItemAtLocation(x+2, y+7, Z+3, 0x9999, 1);
  banarray.append(bantile.serial);
  SetObjProperty(bantile, "house_serial", house.serial);
  SetObjProperty(house, "bantiles", banarray);
  return boxarray;
endfunction
runtest
Grandmaster Poster
Posts: 194
Joined: Sat Aug 05, 2006 11:43 am

Post by runtest »

The DOCs folder is your best friend. 8) But what is your problem?
Harley
Forum Regular
Posts: 360
Joined: Sat Mar 18, 2006 1:41 am

Post by Harley »

runtest wrote:The DOCs folder is your best friend. 8) But what is your problem?
I don't know, how to add at multis new houses, I don't know, where get code like 0x6069:
0x6069: footage := bigtowerarray(house, house.x, house.y, house.z); //tower
I don't know how to functions for new houses
function bigtowerarray(house, x, y, z) - please, write me at all lines, what that each line means(at first post there function full)
Pleeease! Help!!!
Yukiko
Distro Developer
Posts: 2826
Joined: Thu Feb 02, 2006 1:41 pm

Post by Yukiko »

Harley are you asking how to add new multis to the system? Like if you create a new multi and patch it into the multis.mul file and now you want t6o add it to the config files and scripts?
Harley
Forum Regular
Posts: 360
Joined: Sat Mar 18, 2006 1:41 am

Post by Harley »

Yes, dear Yukiko, yes! I don't know how! I don't know what all lines(up post) is do & etc... Thank u for help!!!
Harley
Forum Regular
Posts: 360
Joined: Sat Mar 18, 2006 1:41 am

Post by Harley »

0x6069: footage := bigtowerarray(house, house.x, house.y, house.z); //tower

- this number display at itemdesc.cfg a house with him ID number

But I yet do not know all how to define these coordinates for house?

Code: Select all

  
function bigtowerarray(house, x, y, z)
var boxarray := {}; 
  var box1 := {}; 
  box1.append(x - 6); 
  box1.append(y - 6); 
  box1.append(z + 6); 
  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;
And this:

Code: Select all

  var banarray := {}; 
  var bantile; 
  bantile := CreateItemAtLocation(x-1, y+8, Z+3, 0x9999, 1); 
  banarray.append(bantile.serial); 
  SetObjProperty(bantile, "house_serial", house.serial); 
  bantile := CreateItemAtLocation(x, y+8, Z+3, 0x9999, 1); 
  banarray.append(bantile.serial); 
  SetObjProperty(bantile, "house_serial", house.serial); 
  bantile := CreateItemAtLocation(x+1, y+8, Z+3, 0x9999, 1); 
  banarray.append(bantile.serial); 
  SetObjProperty(bantile, "house_serial", house.serial); 
  bantile := CreateItemAtLocation(x+2, y+8, Z+3, 0x9999, 1); 
  banarray.append(bantile.serial); 
  SetObjProperty(bantile, "house_serial", house.serial); 
  bantile := CreateItemAtLocation(x-1, y+7, Z+3, 0x9999, 1); 
  banarray.append(bantile.serial); 
  SetObjProperty(bantile, "house_serial", house.serial); 
  bantile := CreateItemAtLocation(x, y+7, Z+6, 0x9999, 1); 
  banarray.append(bantile.serial); 
  SetObjProperty(bantile, "house_serial", house.serial); 
  bantile := CreateItemAtLocation(x+1, y+7, Z+6, 0x9999, 1); 
  banarray.append(bantile.serial); 
  SetObjProperty(bantile, "house_serial", house.serial); 
  bantile := CreateItemAtLocation(x+2, y+7, Z+3, 0x9999, 1); 
  banarray.append(bantile.serial); 
  SetObjProperty(bantile, "house_serial", house.serial); 
  SetObjProperty(house, "bantiles", banarray); 
  return boxarray; 
endfunction
Why coordinats varyб and why they are many!!! Too many!!! Help please!
Harley
Forum Regular
Posts: 360
Joined: Sat Mar 18, 2006 1:41 am

Post by Harley »

Some body helps me, or Administration don't help to noobs?
Harley
Forum Regular
Posts: 360
Joined: Sat Mar 18, 2006 1:41 am

Post by Harley »

And how to set ObjProperty "lockid"(at distro pack), to another doors like wooden gate?!
Harley
Forum Regular
Posts: 360
Joined: Sat Mar 18, 2006 1:41 am

Post by Harley »

LockID i have do, I just added to objtypes.inc new objects for doors(UOBJECT_...._START := ...; UOBJECT_......._END := .... ;) and added to a housedeed after that lines:
var logdoor, item, abc := 0, staticbanstrip, number_ := 0;
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)
.....................
And all! :) But, please, somebody tell me, how to write function for house?

Please help!!!
Pierce
Forum Regular
Posts: 420
Joined: Thu Feb 02, 2006 8:33 am

Post by Pierce »

But, please, somebody tell me, how to write function for house?
I think we or at least me don't understand what you exactly need or want.

First of all: What Core version are you using?
At 95 you have to build your own multis.cfg file and do the itemdesc.cfg file entries for the new deed and house.

At 96/97 you have to run uoconvert multis again and restart the server when you add new multis and do the new itemdesc.cfg entries for the deed and the house.

Also there is a new member called .footprint

Code: Select all

    Added multi member:
        multi.footprint
            returns a struct with "xmin", "xmax", "ymin", "ymax" of the world coordinates
            the house or boat occupies.
which allows you to delete a lot of the bigtowerarray function you mentioned.

But as i said, i think i don't understand what you're exactly looking for.
Harley
Forum Regular
Posts: 360
Joined: Sat Mar 18, 2006 1:41 am

Post by Harley »

Using core 096. UOConvert i have runing and do, that I know! But, at housedeed, I have function. I don't know how to create, but I want to create house function like this for another houses:

Code: Select all

function bigtowerarray(house, x, y, z) 
  var boxarray := {}; 
  var box1 := {}; 
  box1.append(x - 6); 
  box1.append(y - 6); 
  box1.append(z + 6); 
  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+3, 0x9999, 1); 
  banarray.append(bantile.serial); 
  SetObjProperty(bantile, "house_serial", house.serial); 
  bantile := CreateItemAtLocation(x, y+8, Z+3, 0x9999, 1); 
  banarray.append(bantile.serial); 
  SetObjProperty(bantile, "house_serial", house.serial); 
  bantile := CreateItemAtLocation(x+1, y+8, Z+3, 0x9999, 1); 
  banarray.append(bantile.serial); 
  SetObjProperty(bantile, "house_serial", house.serial); 
  bantile := CreateItemAtLocation(x+2, y+8, Z+3, 0x9999, 1); 
  banarray.append(bantile.serial); 
  SetObjProperty(bantile, "house_serial", house.serial); 
  bantile := CreateItemAtLocation(x-1, y+7, Z+3, 0x9999, 1); 
  banarray.append(bantile.serial); 
  SetObjProperty(bantile, "house_serial", house.serial); 
  bantile := CreateItemAtLocation(x, y+7, Z+6, 0x9999, 1); 
  banarray.append(bantile.serial); 
  SetObjProperty(bantile, "house_serial", house.serial); 
  bantile := CreateItemAtLocation(x+1, y+7, Z+6, 0x9999, 1); 
  banarray.append(bantile.serial); 
  SetObjProperty(bantile, "house_serial", house.serial); 
  bantile := CreateItemAtLocation(x+2, y+7, Z+3, 0x9999, 1); 
  banarray.append(bantile.serial); 
  SetObjProperty(bantile, "house_serial", house.serial); 
  SetObjProperty(house, "bantiles", banarray); 
  return boxarray; 
endfunction
Thank you!!!
Yukiko
Distro Developer
Posts: 2826
Joined: Thu Feb 02, 2006 1:41 pm

Post by Yukiko »

Harley I know what you want to do. I am sorry but I have never patched in new multis into the multis.mul file. I did once create a deed for the Minax Stronghold but that already exists in the multis.mul file. I can help you with creating the itemdesc.cfg entries but as for patching the new multi into the multis.mul file I cannot.

First you'll need to create a deed entry for the new house. I am going to use examples so you'll have to change the data to fit your situation.

Deed entry in itemdesc.cfg file:

Code: Select all

Item 0xNNNN
{
    Name             newhousedeed
    Desc             deed to a new style house
    Graphic          0x14F0
    Script           houseDeed
    newbie           1
    VendorSellsFor   300000
    VendorBuysFor    76500
    HouseObjType     newstylehouse
    cprop numlockdowns i86
    cprop numsecure  i4
}
Entry in itemdesc.cfg for the actual house item:

Code: Select all

House 0xNNNN
{
    Name             newstylehouse
    WalkOnScript     houseBanning
    Graphic          0xYYYY
    MultiID          0xID
//    OldObjtype       0x4066 this is not used by housedeed.src
}
Note that 'NNNN' should be replaced with unique objtype numbers above 0x4FFF and below 0xEE00. The value for Graphic 0xYYYY should be an unused number in the range of 0x4000 - 0x4FFF. I have to be honest that I do not know how to determine what the right number for that graphic should be. I have only experimented with this a couple of times. Maybe someone can add to this info.

I hope this is helpful. Sorry I can't help you more.
Harley
Forum Regular
Posts: 360
Joined: Sat Mar 18, 2006 1:41 am

Post by Harley »

Dear Yukiko!!! Thank u! Thank to all who help me with this, but! Tell me please, what is this function do and how to create this function??

Code: Select all

function bigtowerarray(house, x, y, z) 
  var boxarray := {}; 
  var box1 := {}; 
  box1.append(x - 6); 
  box1.append(y - 6); 
  box1.append(z + 6); 
  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+3, 0x9999, 1); 
  banarray.append(bantile.serial); 
  SetObjProperty(bantile, "house_serial", house.serial); 
  bantile := CreateItemAtLocation(x, y+8, Z+3, 0x9999, 1); 
  banarray.append(bantile.serial); 
  SetObjProperty(bantile, "house_serial", house.serial); 
  bantile := CreateItemAtLocation(x+1, y+8, Z+3, 0x9999, 1); 
  banarray.append(bantile.serial); 
  SetObjProperty(bantile, "house_serial", house.serial); 
  bantile := CreateItemAtLocation(x+2, y+8, Z+3, 0x9999, 1); 
  banarray.append(bantile.serial); 
  SetObjProperty(bantile, "house_serial", house.serial); 
  bantile := CreateItemAtLocation(x-1, y+7, Z+3, 0x9999, 1); 
  banarray.append(bantile.serial); 
  SetObjProperty(bantile, "house_serial", house.serial); 
  bantile := CreateItemAtLocation(x, y+7, Z+6, 0x9999, 1); 
  banarray.append(bantile.serial); 
  SetObjProperty(bantile, "house_serial", house.serial); 
  bantile := CreateItemAtLocation(x+1, y+7, Z+6, 0x9999, 1); 
  banarray.append(bantile.serial); 
  SetObjProperty(bantile, "house_serial", house.serial); 
  bantile := CreateItemAtLocation(x+2, y+7, Z+3, 0x9999, 1); 
  banarray.append(bantile.serial); 
  SetObjProperty(bantile, "house_serial", house.serial); 
  SetObjProperty(house, "bantiles", banarray); 
  return boxarray; 
endfunction
p.s. My new house was created at game, but I don't know how to create this function, please help me with this!!! :oops:
Pierce
Forum Regular
Posts: 420
Joined: Thu Feb 02, 2006 8:33 am

Post by Pierce »

Where do you found this code?
I have no pol distro but i think this should or could belong to some kind of housedeed.src function because it sets areas/boxes and bantiles.
Harley
Forum Regular
Posts: 360
Joined: Sat Mar 18, 2006 1:41 am

Post by Harley »

Pierce wrote:Where do you found this code?
I have no pol distro but i think this should or could belong to some kind of housedeed.src function because it sets areas/boxes and bantiles.
Yes Pierce, this is at Zulu Scripts, and I don't know what this function, and how to create it! Very interesting and mistycally! :P
User avatar
CWO
POL Expert
Posts: 1160
Joined: Sat Feb 04, 2006 5:49 pm

Post by CWO »

All I truly know that this function is doing is creating bantiles. Bantiles are put at all of the doorways and when someone steps on them, it will check if you are banned from the house or not and handle accordingly. I'm not completely sure about the coordinates set in the first half of the function though. Try posting the code that comes after the call to bigtowerarray and maybe we can figure it out.
Harley
Forum Regular
Posts: 360
Joined: Sat Mar 18, 2006 1:41 am

Post by Harley »

CWO wrote:All I truly know that this function is doing is creating bantiles. Bantiles are put at all of the doorways and when someone steps on them, it will check if you are banned from the house or not and handle accordingly. I'm not completely sure about the coordinates set in the first half of the function though. Try posting the code that comes after the call to bigtowerarray and maybe we can figure it out.
This is close for right way! After bigtowerarray goes function for keep(after castle...)! I have see multis.cfg, and something like thoose coordinates I don't search! :(
Harley
Forum Regular
Posts: 360
Joined: Sat Mar 18, 2006 1:41 am

Post by Harley »

Peeople!!! Any body know how to create this function??? Please!!! Help, very need!!!
Harley
Forum Regular
Posts: 360
Joined: Sat Mar 18, 2006 1:41 am

Post by Harley »

With many tests, I have known what is this.

Code: Select all

  var boxarray := {}; 
  var box1 := {}; 
  box1.append(x - 6); 
  box1.append(y - 6); 
  box1.append(z + 6); 
  box1.append(x + 7); 
  box1.append(y + 5); 
  box1.append(z + 65); 
  boxarray[1] := box1;
This is a house range(when we build the house, at the centre of our self we have coordinates, and we search X of the house and Y(on a diagonal)). Then we write them at thoose box1.append(x ; y; z.

Code: Select all

  var banarray := {}; 
  var bantile; 
  bantile := CreateItemAtLocation(x-1, y+8, Z+3, 0x9999, 1); 
  banarray.append(bantile.serial); 
  SetObjProperty(bantile, "house_serial", house.serial);
This is slice of a threshold in the house. At our coordinates, we calculate or we add (like x-1 y+8 z+3).

Thats all folks! :)
Post Reply