Post Pacific

Post Pacific (https://postpacific.mmorpg-game.online/index.php)
-   Lineage 2 Server Modifications ONLY! (https://postpacific.mmorpg-game.online/forumdisplay.php?f=28)
-   -   [RESEARCH] NASC functions for manor system (https://postpacific.mmorpg-game.online/showthread.php?t=4093)

nucer 18.04.2006 20:46

[RESEARCH] NASC functions for manor system
 
I found some functions, that we can use for create manor system. But how?...

Castle_SetCropDrop( item_id , drop_rate , some_level ); - add any items into some drop with some rate and some level!

Castle_SetCropPrice( item_id , price ); - set price for item, that was added before with Castle_SetCropDrop().

Castle_DeleteCropDrop( item_id ); - delete item from crop drop.

Castle_PostCropPurchase( c0 , item_id , item_count ); - what it does... It seems to be does nothing...


i0=Castle_GetCropRate( item_id ); - get rate of drop (???) for item from crop drop.

i0=Castle_GetCropPrice( item_id ); - get price for item from crop drop.

i0=Castle_GetCropIncome(); - always returns 0... Hope that only for me... )


And in castledata we have:

Quote:

castle_begin
[gludio_castle]
1
//residence_owner_id = -1
residence_territory = {{{-20370;106804;-6827;1172};{-15723;106720;-6827;1172};{-15708;113862;-6827;1172};{-20394;113770;-6827;1172}}}
battlefield_territory = {{{-23842;105415;-5601;2398};{-14902;105487;-5601;2398};{-14319;116830;-5601;2398};{-24008;116786;-5601;2398}}}
headquarter_territory = {{{-22198;114423;-4536;-2536};{-16245;114339;-4536;-2536};{-16150;117396;-4536;-2536};{-22190;117369;-4536;-2536}};{{-20732;108644;-4556;-2556};{-23293;108628;-4556;-2556};{-23311;111659;-4556;-2556};{-20724;111786;-4556;-2556}};{{-13739;110269;-4074;-2074};{-15546;110232;-4074;-2074};{-15565;113263;-4074;-2074};{-13811;113303;-4074;-2074}}}
domain_territory = {}
manor_territory = {}
owner_restart_point = {-16350;109380;-1784}
So we can set and get items and its price for manor system.
But buyed crop items must appear in castle vault, how make it...
Somebody have ideas? :)

Eanae 18.04.2006 23:08

Hmm good info. o.o

nucer 19.04.2006 11:49

Nobody knows how this functions are working?...

archy 19.04.2006 14:03

might :)

Napo1eon 19.04.2006 15:07

wow.... its amazing, where are you find it? Good share...
Sorry for my bad english

kvoxi 19.04.2006 15:09

There is one limitation for all Crop functions: max items per castle is 12.
Try it and look at Castle_Crop table in lin2world DB.
IMHO: Hex is not allowed - most data stored in static memory of l2server process. In addition, Crop data stored in shared memory. If u can expand static arrays... - флаг вам в руки :)

humordwarf 19.04.2006 15:12

12... its not enough?

kvoxi 19.04.2006 15:21

Quote:

Originally Posted by humordwarf
12... its not enough?

not, becoze:
~25 seed per catsle
~25 crops per catsle
Each seed and each crop have some parameters
And more and more...
12 is not enough :)

humordwarf 19.04.2006 15:28

dont know... not enough information about this shit...

nucer 19.04.2006 15:40

And what is manor_territory?...

humordwarf 19.04.2006 15:56

fields...

humordwarf 20.04.2006 06:14

int Castle_GetCropRate(int itemID)
int Castle_GetCropPrice(int itemID)
int Castle_GetCropIncome() ---
int Castle_GetTaxIncome() --- i think very similar
void Castle_SetCropPrice(int itemID, int price)
void Castle_SetCropDrop(int itemID, int delta, int price, int level)
void Castle_DeleteCropDrop(int itemID)
void Castle_PostCropPurchase(CSharedCreatureData* c, int itemID, int count)

Darkraven 21.04.2006 10:45

Quote:

Originally Posted by Napo1eon
wow.... its amazing, where are you find it? Good share...
Sorry for my bad english

func_call 145 // func[Castle_GetCropRate]
func_call 146 // func[Castle_GetCropPrice]
func_call 152 // func[Castle_PostCropPurchase]

It's from Digital's post about ai.obj breakdown =)

Napo1eon 21.04.2006 13:54

Quote:

Originally Posted by Darkraven
Quote:

Originally Posted by Napo1eon
wow.... its amazing, where are you find it? Good share...
Sorry for my bad english

func_call 145 // func[Castle_GetCropRate]
func_call 146 // func[Castle_GetCropPrice]
func_call 152 // func[Castle_PostCropPurchase]

It's from Digital's post about ai.obj breakdown =)

i found it.... tnh...
Question:
Atacked handler is work with "if(myself.sm.hp <= 0)"?)))

lich 21.04.2006 18:08

Yes, work perfectly, as with alive mob.

Napo1eon 22.04.2006 06:48

oooo tnh Lich, and second question
where i record skill_name_id (global)? because i using it in differend handler)))
myself.i_ai4 = skill_name_id;??? its work???

Darkraven 23.04.2006 13:32

Up. Please answer to Napoleon's question. It's very important.

Xelat 23.04.2006 14:37

I think that manor_territory it's a territory, where you must to farming with coda's, that u buy there.

P.S. Sry my eng... :P

Darkraven 23.04.2006 17:08

Everybody know this 8)


All times are GMT. The time now is 21:45.