PenUltima Online Forum Index Official Core: 096.7
Official Core: 097 2008-02-26
Donate towards the POL web hosting bill!
 POL Home   FAQ   Search    Memberlist   Usergroups    Register    Profile   Log in to check your private messages   Log in
Hallo everybody, if u know, please help!
Goto page 1, 2  Next
 
Post new topic   Reply to topic    PenUltima Online Forum Index -> Scripting Help
Display posts from previous:   

Author Message
Harley



Joined: 18 Mar 2006
Posts: 92
Location: World Earth

PostPosted: Tue Oct 09, 2007 10:30 am    Post subject: Hallo everybody, if u know, please help! Reply with quote

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

Author Message
runtest



Joined: 05 Aug 2006
Posts: 98

PostPosted: Tue Oct 09, 2007 10:36 am    Post subject: Reply with quote

The DOCs folder is your best friend. Cool But what is your problem?

Author Message
Harley



Joined: 18 Mar 2006
Posts: 92
Location: World Earth

PostPosted: Tue Oct 09, 2007 10:48 am    Post subject: Reply with quote

runtest wrote:
The DOCs folder is your best friend. Cool 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!!!

Author Message
Yukiko



Joined: 02 Feb 2006
Posts: 1094
Location: Southern Central USA

PostPosted: Wed Oct 10, 2007 1:00 am    Post subject: Reply with quote

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?

Author Message
Harley



Joined: 18 Mar 2006
Posts: 92
Location: World Earth

PostPosted: Wed Oct 10, 2007 3:26 pm    Post subject: Reply with quote

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

Author Message
Harley



Joined: 18 Mar 2006
Posts: 92
Location: World Earth

PostPosted: Thu Oct 11, 2007 12:14 pm    Post subject: Reply with quote

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!

Author Message
Harley



Joined: 18 Mar 2006
Posts: 92
Location: World Earth

PostPosted: Fri Oct 12, 2007 5:09 pm    Post subject: Reply with quote

Some body helps me, or Administration don't help to noobs?

Author Message
Harley



Joined: 18 Mar 2006
Posts: 92
Location: World Earth

PostPosted: Fri Oct 12, 2007 9:20 pm    Post subject: Reply with quote

And how to set ObjProperty "lockid"(at distro pack), to another doors like wooden gate?!

Author Message
Harley



Joined: 18 Mar 2006
Posts: 92
Location: World Earth

PostPosted: Sat Oct 13, 2007 3:42 pm    Post subject: Reply with quote

LockID i have do, I just added to objtypes.inc new objects for doors(UOBJECT_...._START := ...; UOBJECT_......._END := .... Wink 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! Smile But, please, somebody tell me, how to write function for house?

Please help!!!

Author Message
Pierce



Joined: 02 Feb 2006
Posts: 256

PostPosted: Sun Oct 14, 2007 8:21 am    Post subject: Reply with quote

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.

Author Message
Harley



Joined: 18 Mar 2006
Posts: 92
Location: World Earth

PostPosted: Mon Oct 15, 2007 7:20 am    Post subject: Reply with quote

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

Author Message
Yukiko



Joined: 02 Feb 2006
Posts: 1094
Location: Southern Central USA

PostPosted: Mon Oct 15, 2007 10:48 pm    Post subject: Reply with quote

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.

Author Message
Harley



Joined: 18 Mar 2006
Posts: 92
Location: World Earth

PostPosted: Tue Oct 16, 2007 9:31 am    Post subject: Reply with quote

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!!! Embarassed

Author Message
Pierce



Joined: 02 Feb 2006
Posts: 256

PostPosted: Tue Oct 16, 2007 12:26 pm    Post subject: Reply with quote

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.

Author Message
Harley



Joined: 18 Mar 2006
Posts: 92
Location: World Earth

PostPosted: Tue Oct 16, 2007 1:11 pm    Post subject: Reply with quote

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! Razz

Post new topic   Reply to topic    PenUltima Online Forum Index -> Scripting Help All times are GMT - 4 Hours
Goto page 1, 2  Next
Page 1 of 2

 




Powered by phpBB © 2001, 2005 phpBB Group :: Theme & Graphics by GHS & Scott E. Royalty