PenUltima Online

It is currently Sun Sep 07, 2008 1:46 am

All times are UTC - 8 hours




Post new topic Reply to topic  [ 19 posts ] 
Author Message
 Post subject: Hallo everybody, if u know, please help!
PostPosted: Tue Oct 09, 2007 6:30 am 
Offline

Joined: Sat Mar 18, 2006 1:41 am
Posts: 92
Location: World Earth
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):

Quote:
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:
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


Top
 Profile  
 
 Post subject:
PostPosted: Tue Oct 09, 2007 6:36 am 
Offline

Joined: Sat Aug 05, 2006 11:43 am
Posts: 170
The DOCs folder is your best friend. 8) But what is your problem?

_________________
I am sorry, Runtest is to cool to see you right now.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Oct 09, 2007 6:48 am 
Offline

Joined: Sat Mar 18, 2006 1:41 am
Posts: 92
Location: World Earth
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:

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


I don't know how to functions for new houses
Quote:
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!!!


Top
 Profile  
 
 Post subject:
PostPosted: Tue Oct 09, 2007 9:00 pm 
Offline

Joined: Thu Feb 02, 2006 1:41 pm
Posts: 1129
Location: Southern Central USA
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?

_________________
Sincerely,
Yukiko

I know you think you understand what you thought I said but what you heard is not exactly what I meant.

Titus 2:13


Top
 Profile  
 
 Post subject:
PostPosted: Wed Oct 10, 2007 11:26 am 
Offline

Joined: Sat Mar 18, 2006 1:41 am
Posts: 92
Location: World Earth
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!!!


Top
 Profile  
 
 Post subject:
PostPosted: Thu Oct 11, 2007 8:14 am 
Offline

Joined: Sat Mar 18, 2006 1:41 am
Posts: 92
Location: World Earth
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:
 
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:
  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!


Top
 Profile  
 
 Post subject:
PostPosted: Fri Oct 12, 2007 1:09 pm 
Offline

Joined: Sat Mar 18, 2006 1:41 am
Posts: 92
Location: World Earth
Some body helps me, or Administration don't help to noobs?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Oct 12, 2007 5:20 pm 
Offline

Joined: Sat Mar 18, 2006 1:41 am
Posts: 92
Location: World Earth
And how to set ObjProperty "lockid"(at distro pack), to another doors like wooden gate?!


Top
 Profile  
 
 Post subject:
PostPosted: Sat Oct 13, 2007 11:42 am 
Offline

Joined: Sat Mar 18, 2006 1:41 am
Posts: 92
Location: World Earth
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:

Quote:
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!!!


Top
 Profile  
 
 Post subject:
PostPosted: Sun Oct 14, 2007 4:21 am 
Offline

Joined: Thu Feb 02, 2006 8:33 am
Posts: 276
Quote:
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:
    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.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Oct 15, 2007 3:20 am 
Offline

Joined: Sat Mar 18, 2006 1:41 am
Posts: 92
Location: World Earth
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:
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!!!


Top
 Profile  
 
 Post subject:
PostPosted: Mon Oct 15, 2007 6:48 pm 
Offline

Joined: Thu Feb 02, 2006 1:41 pm
Posts: 1129
Location: Southern Central USA
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:
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:
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.

_________________
Sincerely,
Yukiko

I know you think you understand what you thought I said but what you heard is not exactly what I meant.

Titus 2:13


Top
 Profile  
 
 Post subject:
PostPosted: Tue Oct 16, 2007 5:31 am 
Offline

Joined: Sat Mar 18, 2006 1:41 am
Posts: 92
Location: World Earth
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:
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:


Top
 Profile  
 
 Post subject:
PostPosted: Tue Oct 16, 2007 8:26 am 
Offline

Joined: Thu Feb 02, 2006 8:33 am
Posts: 276
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.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Oct 16, 2007 9:11 am 
Offline

Joined: Sat Mar 18, 2006 1:41 am
Posts: 92
Location: World Earth
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


Top
 Profile  
 
 Post subject:
PostPosted: Tue Oct 16, 2007 12:24 pm 
Offline

Joined: Sat Feb 04, 2006 5:49 pm
Posts: 750
Location: Chicago, IL USA
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.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Oct 18, 2007 10:32 am 
Offline

Joined: Sat Mar 18, 2006 1:41 am
Posts: 92
Location: World Earth
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! :(


Top
 Profile  
 
 Post subject:
PostPosted: Mon Oct 22, 2007 5:03 am 
Offline

Joined: Sat Mar 18, 2006 1:41 am
Posts: 92
Location: World Earth
Peeople!!! Any body know how to create this function??? Please!!! Help, very need!!!


Top
 Profile  
 
 Post subject:
PostPosted: Wed Oct 24, 2007 5:14 am 
Offline

Joined: Sat Mar 18, 2006 1:41 am
Posts: 92
Location: World Earth
With many tests, I have known what is this.

Code:
  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:
  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! :)


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 19 posts ] 

All times are UTC - 8 hours


Who is online

Users browsing this forum: Google [Bot] and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Style based on FI Subice by phpBBservice.nl