Post Pacific  

Go Back   Post Pacific > Восстановленный архив > Темы без сохранившегося раздела
FAQ Community Calendar Today's Posts Search

Notices

 
 
Thread Tools Search this Thread Display Modes
Old 07.11.2005, 19:47   #26
horyfilipe
Архивный участник
 
Join Date: Jul 2005
Posts: 242
Default

hmm thanks now it makes sense, so that player is marked.. but anyway, i put this code on the default_npc class.. but seems that not just exploiters are going there because this error is spawning like each 2 secs..
horyfilipe is offline  
Old 11.11.2005, 18:59   #27
dinesat4
Архивный участник
 
Join Date: Jul 2005
Posts: 123
Default

More tutorial plz
dinesat4 is offline  
Old 12.11.2005, 12:08   #28
kvoxi
Архивный участник
 
Join Date: Oct 2005
Posts: 102
Default

Quote:
Originally Posted by dinesat4
More tutorial plz
what to do this code?

push_const 111
push_const 222
push_reg_sp
push_reg_sp
push_reg_sp
sub
add
fetch_i
kvoxi is offline  
Old 12.11.2005, 23:09   #29
StaticVoid
Архивный участник
 
Join Date: Oct 2005
Posts: 18
Default

Quote:
Originally Posted by kvoxi
Quote:
Originally Posted by dinesat4
More tutorial plz
what to do this code?

push_const 111
push_const 222
push_reg_sp
push_reg_sp
push_reg_sp
sub
add
fetch_i
is that a real example? the above code makes some operations with the stack pointer so that you can get the value 111 on top of 222 since after the execution the stack looks like :

111
222
111

but you can have the same result using :
push_const 111
push_const 222
push_reg_sp
push_const 1
sub
fetch_i

There is a more powerfull way of manipulating the stack that i will present it in the next update of the tutorial, as soon as i find some time.
StaticVoid is offline  
Old 13.11.2005, 10:30   #30
kvoxi
Архивный участник
 
Join Date: Oct 2005
Posts: 102
Default

Quote:
Originally Posted by StaticVoid
is that a real example? the above code makes some operations with the stack pointer so that you can get the value 111 on top of 222 since after the execution the stack looks like :
111
222
111
This is real example. This is very small part of my code. But, the code
Code:
push_const 111 
push_const 222 
push_reg_sp 
push_const 1 
sub 
fetch_i
is not correct, because addresses difference is 4 (not 1)
kvoxi is offline  
Old 13.11.2005, 20:02   #31
_styx
Архивный участник
 
Join Date: Nov 2005
Posts: 28
Default

i'm sorry, but i don't fully understand push_reg_sp

shift_sp -2
push_const 1
equal
push_reg_sp
fetch_i
branch_false L33297

if i understand it right, then that would never be false
_styx is offline  
Old 14.11.2005, 00:05   #32
_styx
Архивный участник
 
Join Date: Nov 2005
Posts: 28
Default

also, how unique do the following need to be?
'Sxxx.'
'Lxxxxx'
do they need to be unique throughout the entire AI.obj, the class, or just the handler?
_styx is offline  
Old 14.11.2005, 13:13   #33
toolpunk
Архивный участник
 
Join Date: May 2005
Posts: 2,033
Default

i think it needs to be absolutely unique in the whole ai.obj...
at least it wont hurt lol
toolpunk is offline  
Old 03.12.2005, 20:47   #34
montejo1974
Архивный участник
 
Join Date: Aug 2005
Posts: 42
Default

This one must will be a stickie
montejo1974 is offline  
Old 03.12.2005, 22:52   #35
toolpunk
Архивный участник
 
Join Date: May 2005
Posts: 2,033
Default

just what is missing is what a function/handler really does...
i mean theres nothing like:
AddDoNothingDesire --> the npc receiving this command will do nothing when all conditions are ok.
well i dont know if this is what this function does.
thats why i am sorta asking for such a list.
i still want to write a quest. so i need pretty every piece of info i can get...
however its still a great tutorial and great tutorial
toolpunk is offline  
Old 08.12.2005, 12:58   #36
Kirikups
Архивный участник
 
Join Date: Oct 2005
Posts: 175
Default

hello, i try to check if pc (talker) is Caslte Owner in order my npc give an item only if pc owns a castle, i found this but i dont understand what it means exactly:

Code:
shift_sp 1 
func_call 126	//  func[Castle_GetPledgeId] 
push_event	//  talker 
push_const 32 
add 
fetch_i		//  pledge_id 
push_const 664 
add 
fetch_i 
equal 
push_reg_sp 
fetch_i 
branch_false LXXX
Any help is welcome, tx
Kirikups is offline  
Old 09.12.2005, 11:13   #37
montejo1974
Архивный участник
 
Join Date: Aug 2005
Posts: 42
Default

a) This post isnt for ask questions. There is a complete forum for help people.
b) That code is the way to obtain if the player talking to the NPC Castle Related, is the clan leader owning the castle to whom the NPC is associated.
c) You must have ai.obj knowledge for understand the code.
d) If you have more questions please do them at the Lineage2 Help forum...I will be pleased to answer you.
montejo1974 is offline  
Old 12.12.2005, 00:17   #38
nemeek
Архивный участник
 
Join Date: May 2005
Posts: 105
Default

somebody know how i can use the function SetDBValue

Thanks
nemeek is offline  
Old 13.12.2005, 17:22   #39
_styx
Архивный участник
 
Join Date: Nov 2005
Posts: 28
Default

Quote:
Originally Posted by montejo1974
a) This post isnt for ask questions. There is a complete forum for help people.
b) That code is the way to obtain if the player talking to the NPC Castle Related, is the clan leader owning the castle to whom the NPC is associated.
c) You must have ai.obj knowledge for understand the code.
d) If you have more questions please do them at the Lineage2 Help forum...I will be pleased to answer you.
This is a tutorial thread. Tutorials need to be continually modified and corrected. Asking questions here is ok. Questions asked here are most likely the FAQ. So it's easier to ask here, get an answer here, then post the Q and A on the first post for all to see.

Which reminds me, maybe I should comandeer this thread since the tutorial maker hasn't touched this thread in more than a month.
_styx is offline  
Old 13.12.2005, 18:29   #40
toolpunk
Архивный участник
 
Join Date: May 2005
Posts: 2,033
Default

think what you want...
i promise you less people will look in a [TUTORIAL] thread for answering questions...
so i dont mind if the thread gets flooded as hell, but it wont help the people very much.
but maybe im wrong. however this is turning in a nonsense discussion about the goddamn rules :lol:
toolpunk is offline  
Old 20.12.2005, 02:26   #41
RmzVoid
Архивный участник
 
Join Date: Apr 2005
Posts: 357
Default

Quote:
Originally Posted by toolpunk
i think it needs to be absolutely unique in the whole ai.obj...
at least it wont hurt lol
LXXX SXXX may be unique whole each class. I use this in my ai.obj and have no problems.


Question:

class some_class1 : default_npc
handler 32 // MENU_SELECTED
variable_begin
"talker"
"ask"
"reply"
"myself"
"_choiceN"
"_code"
"_from_choice"
variable_end
....
handler_end
class_end

class some_class2 : some_class1
handler 32 // MENU_SELECTED
variable_begin
"talker"
"ask"
"reply"
"myself"
"_choiceN"
"_code"
"_from_choice"
variable_end
....
call_super
handler_end
class_end

npc_ai={[some_class2]}

in some_class2 I process this URL menu_select?ask=2&reply=10
in some_class1 I process menu_select?ask=2&reply=11

If user press second URL, ask and reply in some_class1 equal to 2 and 11? Or call_super not pass parameters?
RmzVoid is offline  
Old 20.12.2005, 17:03   #42
kvoxi
Архивный участник
 
Join Date: Oct 2005
Posts: 102
Default

Quote:
Originally Posted by RmzVoid
If user press second URL, ask and reply in some_class1 equal to 2 and 11? Or call_super not pass parameters?
Class inheritance (from parent to child):
some_class2 <- some_class1 <- default_npc
Event data proccessing flow (from child to parent):
some_class2 -> some_class1 -> default_npc
ASK & REPLY - is EVENT structure variables
If u will pass ask&reply pair to the some_class2 menu_selected handler, it is possible to process EVENT values in menu_selected handler of every parent class.

"call_super" never pass the parameters from child to parent class
--
sorry for my english, learn russian lang
kvoxi is offline  
Old 20.12.2005, 21:30   #43
RmzVoid
Архивный участник
 
Join Date: Apr 2005
Posts: 357
Default

Quote:
Originally Posted by kvoxi
ASK & REPLY - is EVENT structure variables
If u will pass ask&reply pair to the some_class2 menu_selected handler, it is possible to process EVENT values in menu_selected handler of every parent class.

sorry for my english, learn russian lang
that is all I want ot know

зачем мне учить русский? если я русский ))) в школе на 4 окончил ))))))
RmzVoid is offline  
Old 20.12.2005, 21:42   #44
filrip
Архивный участник
 
Join Date: May 2005
Posts: 99
Default

call_super keep the parameter in the function

is you have MENU_SELECTED(talker,ask,reply)
and do a "call_super", all variables "talker", "ask" & "reply" will have correct value, not reset to 0 in the child.


AddDoNothingDesire do nothing, right. In fact it stop to do something, like attack or move. and EventHandler NO_DESIRE is called.
filrip is offline  
Old 21.12.2005, 06:59   #45
kvoxi
Архивный участник
 
Join Date: Oct 2005
Posts: 102
Default

Quote:
Originally Posted by filrip
AddDoNothingDesire do nothing, right. In fact it stop to do something, like attack or move. and EventHandler NO_DESIRE is called.
AddDoNothing... change NPC desire state. Its not same as "keep parameters"
Maybe, call_super pass parameters to funcs of parent classes. Ask AI lang developers about it
kvoxi is offline  
Old 21.12.2005, 11:12   #46
RmzVoid
Архивный участник
 
Join Date: Apr 2005
Posts: 357
Default

kvoxi, filrip wrote 2 different things. One about parameters (I asked) and 2nd about func AddNothingDesire (asked somethere above) ))
RmzVoid is offline  
Old 15.01.2006, 20:24   #47
kvoxi
Архивный участник
 
Join Date: Oct 2005
Posts: 102
Default

This is complete list of C1 L2NPC.exe AI functions (my first work with IDA)
kvoxi is offline  
Old 17.01.2006, 21:42   #48
Mabus
Архивный участник
 
Join Date: Jan 2006
Posts: 7
Default

<rus>Пишу квест на страйдера. такой вот вопрос: у плеера получающего квест должен быть дракончик 55 лвл или выше тогда ему можно разрешить пройти квест на страйдера.... как узнать лвл имеющего в инвентаре дракона? или например лвл заточки вещи?</rus>
Mabus is offline  
Old 17.01.2006, 21:47   #49
toolpunk
Архивный участник
 
Join Date: May 2005
Posts: 2,033
Default

very nice share
i love it...
looks very complete and informative...
thx kvoxi
toolpunk is offline  
Old 17.01.2006, 23:45   #50
kvoxi
Архивный участник
 
Join Date: Oct 2005
Posts: 102
Default

This is event variables list
Maybe StaticVoid want add some info.
He was promise to do it
kvoxi is offline  
 


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 17:17.