View Full Version : It is possible to make whole new pet?
heh ;-)
I want make 2nd class for wolfs.. there is no problem about NPC ..
but I study the pet collar and dragon bugle item . and can't find the way how this item is bind on pet?
I here see this item use skill that summon. but summon what? there is nothing concrete.. I think it is possible to make new WITHOUT hexaediting .exe - make it clean way.. not like striders via hexaediting and then //create_pet = that is bady messy way ..
I think about way like cubic? Do you think it is possible?
Metalmurphy
02.09.2005, 21:29
unless you want to edit the db manually everytime a player gets ur new pet you'll have to do something like the wolf quest or hex l2server.exe
why not just use ai.obj? no need to manually add the pet to the DB...
shift_sp 1
push_event // talker
push_const 32
add
fetch_i
push_const 2375 //Item ID of collar
push_const 1012077 //NPC id of pet (npc_pch)
func_call 196 // func[CreatePet]
shift_sp -3
shift_sp -1
like call to wolf? create_pet 9? 10?
Metalmurphy
03.09.2005, 12:14
why not just use ai.obj? no need to manually add the pet to the DB...
shift_sp 1
push_event // talker
push_const 32
add
fetch_i
push_const 2375 //Item ID of collar
push_const 1012077 //NPC id of pet (npc_pch)
func_call 196 // func[CreatePet]
shift_sp -3
shift_sp -1
what do you think i meant by "something like the wolf quest". how can u do that if not by ai.obj ;)
Fulminus
04.09.2005, 08:43
I may be wrong, but what I found (for l2off) is this:
In the MS-SQL database there is an id for the item a user has (user_item table). In the pet_data table, there is also an id field. While there is no apparent linkage between these fields in the DB structure, you will see that the pet's id matches exactly the id of the colar/flute for that pet!
I am not aware of the insides of this and if it will work by just changing the pet's npc_id, or how to do any of that, but since you were looking for a link between item and pet, this is one ;) Perhaps the code looks at more things than just that, though. I recommend you use caution.
hmm this is too tought for me ;-(
I simply think about how to make any item clikable.. and when I clickn on it.. it spawn any summon.
I want use pet_wolf_a cloned to _B with another look (ID of any other wolf..)
its same AI .. but only better dmg/hp and another look
why not just use ai.obj? no need to manually add the pet to the DB...
shift_sp 1
push_event // talker
push_const 32
add
fetch_i
push_const 2375 //Item ID of collar
push_const 1012077 //NPC id of pet (npc_pch)
func_call 196 // func[CreatePet]
shift_sp -3
shift_sp -1
Thanks for this cool example.. this help me alot.. I look on ai code for pet wolf
hmm I simply dont know where to start.. how start write code to ai.obj
I look in ai for your code.. its part of quest.. I dont need any quest..
I simply need ai for item that summon pet.. maybe this will work?
class pet_wolf_b : pet_physicalattack
shift_sp 1
push_event // talker
push_const 32
add
fetch_i
push_const 5592 //Item ID of collar
push_const 1001121 //NPC id of pet (npc_pch)
func_call 196 // func[CreatePet]
shift_sp -3
shift_sp -1
class_end
I simply dont know where to paste in my ai.obj code about new wolf collar (I used advanced cp potion) .. function about summoning that pet
can anybody explain me what is
org_hp=2400 org_mp=1300 physical_hit_modify=3.75 physical_avoid_modify=0 base_critical=4
how can I count how much HP that pet get in game?? its org_hp * phys modify? or what is phys modify?
It would be org_hp and I guess whatever the monsters CON is would raise it more
ok let me give u better code....
class wolf_maker : default_npc
handler 32
push_event // ask
push_const 100
add
fetch_i
push_const 1
equal
branch_false L133371
push_event // reply
push_const 104
add
fetch_i
push_const 0
equal
branch_false L133371
shift_sp 1
push_event // talker
push_const 32
add
fetch_i
push_const 2375 //Item ID of collar
push_const 1012077 //NPC id of pet (npc_pch)
func_call 196 // func[CreatePet]
shift_sp -3
shift_sp -1
jump L133371
L133371
call_super //does anyone know wtf this does? is it even needed? O.o im not exactly a pro with ai coding ;p
handler_end
class_end
ok now if i did that right it should work, i not tested it so :p
basically create a new npc like a trader or something, set its npc_ai to wolf_maker, then make a html to bypass -h menu_select?ask=0&reply=1, and it will make a pet with the collar id and the npc pet id and make it so when u summon it, it actually comes out, and u wont need to manually add the pet to the DB....
woot..thanks..
but I dont understand 1 thing.. why there must be trader? for what?
I only need item that summon my own pet. This must be attached on NPC?
basically it doesnt have to be a trader, u can manually add it to the database, or telnet the cached and do it that way, but using an npc to create the pet i find to be the easyest way as i dont really know how to hex it into the l2server or anything like that, and its just a pain in the ass to manually add it to the database...
hmm that ai code is not working ;-( parsing AI failed..
rawrz I now understand why npc :-) .. but as I said :( not working.. I past here log
09/06/2005 14:02:xx.xx2, Fail to load. Reset the AI.
09/06/2005 14:02:xx.xx1, Cannot find AI class[partisan_ordery_brakel]
09/06/2005 14:02:xx.xx1, Npc[partisan_ordery_brakel] doesn't have ai handler. cannot set the ai parameter[fnHi]
... flood with almost all AI in ai.obj ;]