Page 1 of 1
Hallo everybody, if u know, please help!
Posted: Tue Oct 09, 2007 6:30 am
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
Posted: Tue Oct 09, 2007 6:36 am
by runtest
The DOCs folder is your best friend.

But what is your problem?
Posted: Tue Oct 09, 2007 6:48 am
by Harley
runtest wrote:The DOCs folder is your best friend.

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!!!
Posted: Tue Oct 09, 2007 9:00 pm
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?
Posted: Wed Oct 10, 2007 11:26 am
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!!!
Posted: Thu Oct 11, 2007 8:14 am
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!
Posted: Fri Oct 12, 2007 1:09 pm
by Harley
Some body helps me, or Administration don't help to noobs?
Posted: Fri Oct 12, 2007 5:20 pm
by Harley
And how to set ObjProperty "lockid"(at distro pack), to another doors like wooden gate?!
Posted: Sat Oct 13, 2007 11:42 am
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!!!
Posted: Sun Oct 14, 2007 4:21 am
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.
Posted: Mon Oct 15, 2007 3:20 am
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!!!
Posted: Mon Oct 15, 2007 6:48 pm
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.
Posted: Tue Oct 16, 2007 5:31 am
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!!!

ops:
Posted: Tue Oct 16, 2007 8:26 am
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.
Posted: Tue Oct 16, 2007 9:11 am
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!

Posted: Tue Oct 16, 2007 12:24 pm
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.
Posted: Thu Oct 18, 2007 10:32 am
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!

Posted: Mon Oct 22, 2007 5:03 am
by Harley
Peeople!!! Any body know how to create this function??? Please!!! Help, very need!!!
Posted: Wed Oct 24, 2007 5:14 am
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!
