Post Pacific  

Go Back   Post Pacific > Lineage 2 > Lineage 2 Server Modifications ONLY!
FAQ Community Calendar Today's Posts Search

Notices

 
 
Thread Tools Search this Thread Display Modes
Old 12.10.2007, 14:24   #1
FidoW
Guest
 
Posts: n/a
Default [SHARE] Interlude Prime Hours AI

thanks, here 5 dc

can you send me uncompiled one?


Added to the first post.

Восстановлено из публичного снимка Wayback Machine. Тема могла сохраниться частично. Время показано по часам снимка; часовой пояс не установлен. Дата в снимке: 12 October 2007, 14:24. Открыть источник.
 
Old 12.10.2007, 14:26   #2
LoVeRSaMa
Guest
 
Posts: n/a
Default [SHARE] Interlude Prime Hours AI

there is no better compiler than your own mind :cool:


Lies.

Восстановлено из публичного снимка Wayback Machine. Тема могла сохраниться частично. Время показано по часам снимка; часовой пояс не установлен. Дата в снимке: 12 October 2007, 14:26. Открыть источник.
 
Old 12.10.2007, 22:00   #3
FidoW
Guest
 
Posts: n/a
Default [SHARE] Interlude Prime Hours AI

Probably some of you know that one of the changes in Interlude was that Prime Hours thing, whats that ? During some hours of the day (the hours when servers has more players connected) the price of GKs are reduced, so, if we want to implement this first we need to modify teleport AI TELEPORT_REQUESTED handler and here is the needed code and compiled ofc.

You will need to add to each single teleporter a new telposlist called PositionPH, that telposlist will have the reduced prices. Be carefull addin this because if you forgot to add that new telposlist to all GKs when Prime Hours come that GK isnt going to work, is going to show only the default parameters, in this case, Talking Island only Roll Eyes (Sarcastic)

Thanks to Sauron because he give me a hint when i was trying to code this and inspire this job.

Compiled by hand and brain, as always, there is no better compiler than your own mind Cool

This is the NASC code of the addon (not the entire AI), requested by smeli... this is free, not DCs Smile

Code:

Code:
    if( PrimeHours )
    {
      i0 = gg->GetDateTime(0,3);
      i1 = gg->GetDateTime(0,6);
      if ( (i0 >= PHfromHour) && (i0 <= PHtoHour) && (i1 >= PHfromDay) && (i1 <= PHtoDay) )
      {
        myself->Teleport(talker,PositionPH,ShopName,"","","",57,myself->MakeFString(1000308,"","","","",""));
        return;
      }
    }
Do you like this share ? Click the button please Razz

Восстановлено из публичного снимка Wayback Machine. Тема могла сохраниться частично. Дата оценена по относительному времени в снимке (2 Days Ago); точное время не сохранилось. Открыть источник.
 
Old 12.10.2007, 22:00   #4
smeli
Guest
 
Posts: n/a
Default [SHARE] Interlude Prime Hours AI

thanks, here 5 dc

can you send me uncompiled one?

Восстановлено из публичного снимка Wayback Machine. Тема могла сохраниться частично. Дата оценена по относительному времени в снимке (2 Days Ago); точное время не сохранилось. Открыть источник.
 
Old 12.10.2007, 22:00   #5
bfgsnake
Guest
 
Posts: n/a
Default [SHARE] Interlude Prime Hours AI

Use HF script maker or Sauron decompiler to get uncompiled code Smile

Восстановлено из публичного снимка Wayback Machine. Тема могла сохраниться частично. Дата оценена по относительному времени в снимке (2 Days Ago); точное время не сохранилось. Открыть источник.
 
Old 12.10.2007, 22:00   #6
FidoW
Guest
 
Posts: n/a
Default [SHARE] Interlude Prime Hours AI

Quote:


Originally Posted by smeli
View Post

thanks, here 5 dc

can you send me uncompiled one?

Added to the first post.

Восстановлено из публичного снимка Wayback Machine. Тема могла сохраниться частично. Дата оценена по относительному времени в снимке (2 Days Ago); точное время не сохранилось. Открыть источник.
 
Old 12.10.2007, 22:00   #7
LoVeRSaMa
Guest
 
Posts: n/a
Default [SHARE] Interlude Prime Hours AI

Quote:


Originally Posted by FidoW
View Post

there is no better compiler than your own mind Cool

Lies.

Восстановлено из публичного снимка Wayback Machine. Тема могла сохраниться частично. Дата оценена по относительному времени в снимке (2 Days Ago); точное время не сохранилось. Открыть источник.
 
Old 12.10.2007, 22:00   #8
ZeniMax
Guest
 
Posts: n/a
Default [SHARE] Interlude Prime Hours AI

1/99 post in 1 week who its really useful, thanks fidow DC for you.

Восстановлено из публичного снимка Wayback Machine. Тема могла сохраниться частично. Дата оценена по относительному времени в снимке (2 Days Ago); точное время не сохранилось. Открыть источник.
 
Old 12.10.2007, 22:00   #9
Osito2Dancer
Guest
 
Posts: n/a
Default [SHARE] Interlude Prime Hours AI

Nice share, 5DC for you!

A question: which are the "prime hours"? 8-12? 6-12?

Oso

Восстановлено из публичного снимка Wayback Machine. Тема могла сохраниться частично. Дата оценена по относительному времени в снимке (2 Days Ago); точное время не сохранилось. Открыть источник.
 
Old 14.10.2007, 02:00   #10
mcrabben7
Guest
 
Posts: n/a
Default [SHARE] Interlude Prime Hours AI

The days don't make any sense. I was testing it and 0 = Saturday, but later it didn't. I'm confused.

Восстановлено из публичного снимка Wayback Machine. Тема могла сохраниться частично. Дата оценена по относительному времени в снимке (20 Hours Ago); точное время не сохранилось. Открыть источник.
 
Old 14.10.2007, 02:00   #11
FidoW
Guest
 
Posts: n/a
Default [SHARE] Interlude Prime Hours AI

Quote:


Originally Posted by mcrabben7
View Post

The days don't make any sense. I was testing it and 0 = Saturday, but later it didn't. I'm confused.

Well.. the days stuff you can delete it.. isnt really necessary.

Восстановлено из публичного снимка Wayback Machine. Тема могла сохраниться частично. Дата оценена по относительному времени в снимке (20 Hours Ago); точное время не сохранилось. Открыть источник.
 
Old 14.10.2007, 08:00   #12
sikorskys
Guest
 
Posts: n/a
Default [SHARE] Interlude Prime Hours AI

Quote:


Originally Posted by mcrabben7
View Post

The days don't make any sense. I was testing it and 0 = Saturday, but later it didn't. I'm confused.

It's working:

Code:

Code:
	
	// i_ai4 = gg->GetDateTime(0,6);
	push_event	//  myself
	push_const 704
	add
	fetch_i	//  i_ai4
	push_const 324
	add
	push_reg_sp
	fetch_i
	push_event	//  gg
	push_const 632
	add
	fetch_i
	push_const 0
	push_const 6
	func_call 218234890	//  func[GetDateTime]
	shift_sp -2
	assign4
	shift_sp -1

	// Monday - Friday
	push_event	//  myself
	push_const 704
	add
	fetch_i	//  i_ai4
	push_const 324
	add
	fetch_i4
	push_const 1
	greater_equal
	branch_false L200

	push_event	//  myself
	push_const 704
	add
	fetch_i	//  i_ai4
	push_const 324
	add
	fetch_i4
	push_const 5
	less_equal
	branch_false L200

	... do something
Восстановлено из публичного снимка Wayback Machine. Тема могла сохраниться частично. Дата оценена по относительному времени в снимке (14 Hours Ago); точное время не сохранилось. Открыть источник.
 
Old 23.11.2007, 09:54   #13
HF
Guest
 
Posts: n/a
Default [SHARE] Interlude Prime Hours AI

Small fixing.

Optimized.

Applyed.

Approved.

Good share pressed (because idea and realization good).

Восстановлено из публичного снимка Wayback Machine. Тема могла сохраниться частично. Время показано по часам снимка; часовой пояс не установлен. Дата в снимке: 23 November 2007, 09:54. Открыть источник.
 
Old 23.11.2007, 11:45   #14
djvogans
Guest
 
Posts: n/a
Default [SHARE] Interlude Prime Hours AI

good share fidow

Восстановлено из публичного снимка Wayback Machine. Тема могла сохраниться частично. Время показано по часам снимка; часовой пояс не установлен. Дата в снимке: 23 November 2007, 11:45. Открыть источник.
 
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 23:36.