Tytuł: [Poradnik] Custom NPC
Wiadomość wysłana przez: Matim w Listopad 02, 2008, 10:26:21 PM
Wiadomość wysłana przez: Matim w Listopad 02, 2008, 10:26:21 PM
Witam!
W tym poradniku napiszę krok po kroku jak stworzyć custom NPC-a z przejrzystym menu i innymi udogodniami , ktore upiększą Npc-a .
1. Pierwszy krok to zdecydowanie o roli naszego nowego NPC-a . Weźmy na przykład NPC-a odpowiadającego za sprzedaż danych przedmiotów . Zaczynamy od stworzenia pliku HTML ( Pliku odpowiadającego za menu , które wyświetla się podczas rozmowy z danym NPC-em . Przykładowy plik HTML :
Wytłumaczenie poszczególnych linijek :
2. Jeśli chcemy aby nasz NPC pełnił funkcję sklepu , ktory będzie sprzedawał lub wymieniał itemy to należy przygotowac plik multisell. Przykładowy multisell :
Wyjaśnienie poszczególnych linijek :
3. Dodawanie ikon/obrazków do htmla-a . Jeśli znasz dokładna nazwe ikony to wystraczy , ze wpiszesz taki oto wpis :
-itemu - edytuj etcitemsgrp
-broni - edytuj wapeongrp
-skilli - edytuj skillgrp
-zbroi - edytuj armorgrp
Te pliki znajdziesz w folderze System . Edytuj te pliki za pomocą FileEdita . Szukaj wpisu ( ikon....)
4. Jeżeli chcesz zrobic Buffera z ikonami buffów to tutaj mozesz znalezc nazwe ikony :
Buffs:
Acument
<img src=icon.skill1085 width=32 height=32>
Guidance
<img src=icon.skill1240 width=32 height=32>
Magic Barrier
<img src=icon.skill1243 width=32 height=32>
Agility
<img src=icon.skill1087 width=32 height=32>
Medal Shield
<img src=icon.skill1035 width=32 height=32>
Wild Magic
<img src=icon.skill1303 width=32 height=32>
Resist Poison
<img src=icon.skill1033 width=32 height=32>
Blesse The Soul
<img src=icon.skill1048 width=32 height=32>
Bless The Body
<img src=icon.skill1045 width=32 height=32>
Concetration
<img src=icon.skill1078 width=32 height=32>
Invigor
<img src=icon.skill1032 width=32 height=32>
Empower
<img src=icon.skill1059 width=32 height=32>
Elemental Protection
<img src=icon.skill1352 width=32 height=32>
Bless Shield
<img src=icon.skill1243 width=32 height=32>
Resist Shock
<img src=icon.skill1259 width=32 height=32>
Vampiric Rage
<img src=icon.skill1268 width=32 height=32>
Unholy Resist
<img src=icon.skill1393 width=32 height=32>
Holy Resist
<img src=icon.skill1392 width=32 height=32>
Wind Walk
<img src=icon.skill1204 width=32 height=32>
Shield
<img src=icon.skill1040 width=32 height=32>
Might
<img src=icon.skill1068 width=32 height=32>
Berseker Spirit
<img src=icon.skill1268 width=32 height=32>
Haste
<img src=icon.skill1086 width=32 height=32>
Focus
<img src=icon.skill1077 width=32 height=32>
Death Wishper
<img src=icon.skill1242 width=32 height=32>
Greater Might
<img src=icon.skill1388 width=32 height=32>
Greater Shield
<img src=icon.skill1389 width=32 height=32>
Advance Block
<img src=icon.skill1304 width=32 height=32>
Arcana Protection
<img src=icon.skill1354 width=32 height=32>
Divine Protection
<img src=icon.skill1353 width=32 height=32>
Prophency :
Prophecy of Fire
<img src=icon.skill1356 width=32 height=32>
Prophecy of Water
<img src=icon.skill1355 width=32 height=32>
Prophecy of Wind
<img src=icon.skill1357 width=32 height=32>
Chant Of Victory
<img src=icon.skill1363 width=32 height=32>
Magnus
<img src=icon.skill1413 width=32 height=32>
Chant's
Chant of Battle
<img src=icon.skill1007 width=32 height=32>
Chant of Shielding
<img src=icon.skill1009 width=32 height=32>
Chant of Fire
<img src=icon.skill1006 width=32 height=32>
Chant of Flame
<img src=icon.skill1002 width=32 height=32>
Chant of Fury
<img src=icon.skill1251 width=32 height=32>
Chant of Evasion
<img src=icon.skill1252 width=32 height=32>
Chant of Rage
<img src=icon.skill1253 width=32 height=32>
Chant of Revenge
<img src=icon.skill1284 width=32 height=32>
Chant of Vampire
<img src=icon.skill1310 width=32 height=32>
Chant of Eagle
<img src=icon.skill1309 width=32 height=32>
Chant of Predator
<img src=icon.skill1308 width=32 height=32>
Chant of Spirit
<img src=icon.skill1413 width=32 height=32>
Dance's
Dance of Warrior
<img src=icon.skill0271 width=32 height=32>
Dance of Inspiration
<img src=icon.skill0272 width=32 height=32>
Dance of Mystic
<img src=icon.skill0273 width=32 height=32>
Dance of Fire
<img src=icon.skill0274 width=32 height=32>
Dance of Fury
<img src=icon.skill0275 width=32 height=32>
Dance of Concentration
<img src=icon.skill0276 width=32 height=32>
Dance of Light
<img src=icon.skill0277 width=32 height=32>
Aqua Guard
<img src=icon.skill0307 width=32 height=32>
Earth Guard
<img src=icon.skill0309 width=32 height=32>
Dance of Vampire
<img src=icon.skill0310 width=32 height=32>
Dance of Protection
<img src=icon.skill0311width=32 height=32>
Dance of Shadow
<img src=icon.skill0366 width=32 height=32>
Dance of Siren
<img src=icon.skill0365 width=32 height=32>
Dance of Alignment
<img src=icon.skill0530 width=32 height=32>
Song's :
Song of Earth
<img src=icon.skill0264 width=32 height=32>
Song of Life
<img src=icon.skill0265 width=32 height=32>
Song of Water
<img src=icon.skill0266 width=32 height=32>
Song of Warding
<img src=icon.skill0267 width=32 height=32>
Song of Wind
<img src=icon.skill0268 width=32 height=32>
Song of Hunter
<img src=icon.skill0269 width=32 height=32>
Song of Invocation
<img src=icon.skill0270 width=32 height=32>
Song of Vitality
<img src=icon.skill0304 width=32 height=32>
Song of Vengeance
<img src=icon.skill0305 width=32 height=32>
Song of Flame Guard
<img src=icon.skill0306 width=32 height=32>
Song of Storm Guard
<img src=icon.skill0307 width=32 height=32>
Song of Meditination
<img src=icon.skill0308 width=32 height=32>
Song of Champion
<img src=icon.skill0364 width=32 height=32>
Song of Renewal
<img src=icon.skill0349 width=32 height=32>
Song of Elemental
<img src=icon.skill0529 width=32 height=32>
5 . Własna grafika w HTML-u . Jeśli chcesz dodac własny obrazek albo screen do html to nic trudnego :
Najpierw pobierz :
Plugin DDS : http://www.speedyshare.com/527359623.html
PhotoShop CS 3 : kup/pobierz
Unreal Editor : http://files.filefront.com/ue2runtime+22261903exe/;3804932;/fileinfo.html
-Przygotuj screen/zdjecie o wymiarach 256*256 pixeli . Otwórz w photoshopie i daj opcje zapisz jako. Wybierz rodzaj .DDS .
-Uruchom UnrealEd.exe . Zobaczysz okno o nazwe Textures . Idz do opcji FILE-> NEW. Zobaczysz nastepne okno o nazwie ''New Material'' uzupełnij :
Package: tutorialtest
Group: <empty>
name : cokolwiek
Nacisnij NEW . I zamknij nastepne okienko. Idz do FILE->Import i wskaż zdjecie , ktore edytowales w photoshopie. Opcja Files->save . Nastepnie plik przerzucamy do naszego clienta . A w htmlu dodajemy wpis :
6. Ważne
Pliki HTML zawsze zapisuj w formacje .HTM a nie .HTML !!! Inaczej będziesz miał błedy podczas rozmowy z Npc-kiem
--------------------
Gatekeeper :
Dobrze , a więc jest to wyjątkowo proste . Jeśli zrobiłeś juz plik .htm to przenieś go do :
Aby przenosiło Cie do jakiegoś miejsca , musisz zrobić coś takiego ( Jest to ładny , estetyczny przycisk ) :
Czyli :
To odpowiada , że po kliknięciu przenosi postać do teleportu z ID 814
Czyli text jaki będzie na przycisku
Wysokość i szerokość przycisku
A to tylko odpowiada za wygląd , styl przycisku , a więc jak już masz plik .htm , trzeba zrobić plik .sql , w którym zdefiniujemy , do którego miejsca będzie nam teleportować oraz ID teleportu , który potem podajemy w htmlu ( Podałem , w którym miejscu )
Plik .sql wyglądać powinien tak :
Gdzie :
To tylko opis teleportu ( Nigdzie się nie pokazuje , pomaga nam tylko odszukać dany teleport w bazie )
W miejsce xxx podajemu ID teleportu ( przypominam , że musi być identyczny z tym w htmlu aby działał )
Jest to x/y/z ( położenie , do którego będzie przenosić ) W grze wpisz /loc aby sprawdzić Twoje położenie
10000 oznacza cene za teleport ( w adenach ) Jeśli chciałbyś zrobić teleport za inny przedmiot to musisz zrobić to w pythonie ( patrz data/script ) . Potem jest 0 - zawsze
-----------------------------
Maślan:
(https://forum.lineage2.com.pl/dead-image.svg)
W tym poradniku napiszę krok po kroku jak stworzyć custom NPC-a z przejrzystym menu i innymi udogodniami , ktore upiększą Npc-a .
1. Pierwszy krok to zdecydowanie o roli naszego nowego NPC-a . Weźmy na przykład NPC-a odpowiadającego za sprzedaż danych przedmiotów . Zaczynamy od stworzenia pliku HTML ( Pliku odpowiadającego za menu , które wyświetla się podczas rozmowy z danym NPC-em . Przykładowy plik HTML :
Cytat<html><title>Twój tytuł</title>
<body>
<center>
<img src="L2UI_CH3.herotower_deco" width=256 height=32>
<br>Witam ! Tutaj możesz kupic custom itemy.<br>
<button value="Tekst" action="bypass -h npc_%objectId%_multisell 80010" width=200 height=26 back="L2UI_ct1.button_df">
</body>
</html>
Wytłumaczenie poszczególnych linijek :
Cytat<html>- Od tego zawsze zaczynamy plik HTML
Cytat<title></title>- Odpowiada za tekst w tytule NPC-a
Cytat<body>- Rozpoczęcie
Cytat<center>- Centrowanie tekstu
Cytat<button ...>odpowiada za przycisk
Cytataction="bypass -h npc_%objectId%_multisell 80010"- Wykonanie czynnosci . W tym wypadku przeniesienie do danego multisellu
Cytat<img src="L2UI_CH3.herotower_deco" width=256 height=32><br><br>- wstawienie obrazka ( mozna tylko wykozystywac obrazki z clienta )
Cytat<font color="black">- zmiana kolor czcionki ( tutaj : black - czarny )
2. Jeśli chcemy aby nasz NPC pełnił funkcję sklepu , ktory będzie sprzedawał lub wymieniał itemy to należy przygotowac plik multisell. Przykładowy multisell :
Cytat<!-- Wooden Helmet -->
<item id="1">
<ingredient id="57" count="200000"/>
<production id="43" count="1"/>
</item>
Wyjaśnienie poszczególnych linijek :
Cytat<!-- Wooden Helmet -->- item , ktory otrzymamy
Cytat<item id="1">- numer multisellu jesli chcemy dodac 2 item nalezy w id wpisac 2 itd.
Cytat<ingredient id="57" count="200000"/>- ID itemu , ktorym zapłaciłem w tym wypadku id 57 - adena . Count - ilosc
Cytat<production id="43" count="1"/>- item , ktory otrzymamy w zamian . Count ilosc otrzymanych przedmiotów.
Cytat</item>- zakonczenie wymiany jednego przedmiotu . Jesli chcesz podawac inne przedmioty , rozpocznij od <item> (id musi byc rosnące )
3. Dodawanie ikon/obrazków do htmla-a . Jeśli znasz dokładna nazwe ikony to wystraczy , ze wpiszesz taki oto wpis :
Cytat<img src="icon.etc_spirit_bullet_gold_i00"/>- Gdzie w pogrubione miejsce wpisujesz nazwe ikony . W tym przypadku Soul Shot S . Jeśli chcesz znalezc ikone :
-itemu - edytuj etcitemsgrp
-broni - edytuj wapeongrp
-skilli - edytuj skillgrp
-zbroi - edytuj armorgrp
Te pliki znajdziesz w folderze System . Edytuj te pliki za pomocą FileEdita . Szukaj wpisu ( ikon....)
4. Jeżeli chcesz zrobic Buffera z ikonami buffów to tutaj mozesz znalezc nazwe ikony :
Buffs:
Acument
<img src=icon.skill1085 width=32 height=32>
Guidance
<img src=icon.skill1240 width=32 height=32>
Magic Barrier
<img src=icon.skill1243 width=32 height=32>
Agility
<img src=icon.skill1087 width=32 height=32>
Medal Shield
<img src=icon.skill1035 width=32 height=32>
Wild Magic
<img src=icon.skill1303 width=32 height=32>
Resist Poison
<img src=icon.skill1033 width=32 height=32>
Blesse The Soul
<img src=icon.skill1048 width=32 height=32>
Bless The Body
<img src=icon.skill1045 width=32 height=32>
Concetration
<img src=icon.skill1078 width=32 height=32>
Invigor
<img src=icon.skill1032 width=32 height=32>
Empower
<img src=icon.skill1059 width=32 height=32>
Elemental Protection
<img src=icon.skill1352 width=32 height=32>
Bless Shield
<img src=icon.skill1243 width=32 height=32>
Resist Shock
<img src=icon.skill1259 width=32 height=32>
Vampiric Rage
<img src=icon.skill1268 width=32 height=32>
Unholy Resist
<img src=icon.skill1393 width=32 height=32>
Holy Resist
<img src=icon.skill1392 width=32 height=32>
Wind Walk
<img src=icon.skill1204 width=32 height=32>
Shield
<img src=icon.skill1040 width=32 height=32>
Might
<img src=icon.skill1068 width=32 height=32>
Berseker Spirit
<img src=icon.skill1268 width=32 height=32>
Haste
<img src=icon.skill1086 width=32 height=32>
Focus
<img src=icon.skill1077 width=32 height=32>
Death Wishper
<img src=icon.skill1242 width=32 height=32>
Greater Might
<img src=icon.skill1388 width=32 height=32>
Greater Shield
<img src=icon.skill1389 width=32 height=32>
Advance Block
<img src=icon.skill1304 width=32 height=32>
Arcana Protection
<img src=icon.skill1354 width=32 height=32>
Divine Protection
<img src=icon.skill1353 width=32 height=32>
Prophency :
Prophecy of Fire
<img src=icon.skill1356 width=32 height=32>
Prophecy of Water
<img src=icon.skill1355 width=32 height=32>
Prophecy of Wind
<img src=icon.skill1357 width=32 height=32>
Chant Of Victory
<img src=icon.skill1363 width=32 height=32>
Magnus
<img src=icon.skill1413 width=32 height=32>
Chant's
Chant of Battle
<img src=icon.skill1007 width=32 height=32>
Chant of Shielding
<img src=icon.skill1009 width=32 height=32>
Chant of Fire
<img src=icon.skill1006 width=32 height=32>
Chant of Flame
<img src=icon.skill1002 width=32 height=32>
Chant of Fury
<img src=icon.skill1251 width=32 height=32>
Chant of Evasion
<img src=icon.skill1252 width=32 height=32>
Chant of Rage
<img src=icon.skill1253 width=32 height=32>
Chant of Revenge
<img src=icon.skill1284 width=32 height=32>
Chant of Vampire
<img src=icon.skill1310 width=32 height=32>
Chant of Eagle
<img src=icon.skill1309 width=32 height=32>
Chant of Predator
<img src=icon.skill1308 width=32 height=32>
Chant of Spirit
<img src=icon.skill1413 width=32 height=32>
Dance's
Dance of Warrior
<img src=icon.skill0271 width=32 height=32>
Dance of Inspiration
<img src=icon.skill0272 width=32 height=32>
Dance of Mystic
<img src=icon.skill0273 width=32 height=32>
Dance of Fire
<img src=icon.skill0274 width=32 height=32>
Dance of Fury
<img src=icon.skill0275 width=32 height=32>
Dance of Concentration
<img src=icon.skill0276 width=32 height=32>
Dance of Light
<img src=icon.skill0277 width=32 height=32>
Aqua Guard
<img src=icon.skill0307 width=32 height=32>
Earth Guard
<img src=icon.skill0309 width=32 height=32>
Dance of Vampire
<img src=icon.skill0310 width=32 height=32>
Dance of Protection
<img src=icon.skill0311width=32 height=32>
Dance of Shadow
<img src=icon.skill0366 width=32 height=32>
Dance of Siren
<img src=icon.skill0365 width=32 height=32>
Dance of Alignment
<img src=icon.skill0530 width=32 height=32>
Song's :
Song of Earth
<img src=icon.skill0264 width=32 height=32>
Song of Life
<img src=icon.skill0265 width=32 height=32>
Song of Water
<img src=icon.skill0266 width=32 height=32>
Song of Warding
<img src=icon.skill0267 width=32 height=32>
Song of Wind
<img src=icon.skill0268 width=32 height=32>
Song of Hunter
<img src=icon.skill0269 width=32 height=32>
Song of Invocation
<img src=icon.skill0270 width=32 height=32>
Song of Vitality
<img src=icon.skill0304 width=32 height=32>
Song of Vengeance
<img src=icon.skill0305 width=32 height=32>
Song of Flame Guard
<img src=icon.skill0306 width=32 height=32>
Song of Storm Guard
<img src=icon.skill0307 width=32 height=32>
Song of Meditination
<img src=icon.skill0308 width=32 height=32>
Song of Champion
<img src=icon.skill0364 width=32 height=32>
Song of Renewal
<img src=icon.skill0349 width=32 height=32>
Song of Elemental
<img src=icon.skill0529 width=32 height=32>
5 . Własna grafika w HTML-u . Jeśli chcesz dodac własny obrazek albo screen do html to nic trudnego :
Najpierw pobierz :
Plugin DDS : http://www.speedyshare.com/527359623.html
PhotoShop CS 3 : kup/pobierz
Unreal Editor : http://files.filefront.com/ue2runtime+22261903exe/;3804932;/fileinfo.html
-Przygotuj screen/zdjecie o wymiarach 256*256 pixeli . Otwórz w photoshopie i daj opcje zapisz jako. Wybierz rodzaj .DDS .
-Uruchom UnrealEd.exe . Zobaczysz okno o nazwe Textures . Idz do opcji FILE-> NEW. Zobaczysz nastepne okno o nazwie ''New Material'' uzupełnij :
Package: tutorialtest
Group: <empty>
name : cokolwiek
Nacisnij NEW . I zamknij nastepne okienko. Idz do FILE->Import i wskaż zdjecie , ktore edytowales w photoshopie. Opcja Files->save . Nastepnie plik przerzucamy do naszego clienta . A w htmlu dodajemy wpis :
Cytat<IMG src="NAZWA" width=256 height=256>Zapisz i juz gotowe !
6. Ważne
Pliki HTML zawsze zapisuj w formacje .HTM a nie .HTML !!! Inaczej będziesz miał błedy podczas rozmowy z Npc-kiem
--------------------
Gatekeeper :
Cytat: executorosw ·
No dobra, robie sobie global gk, utworzyłem all pliki .htm z miejscami... ale jak teraz włożyć te opcje do npc, oraz "co" napisać, żeby po kliknięciu np. primeval island wharf przeniosło mnie tam?? wiem, że współżędne trzeba przepisać... ale gdzie:? ;]
Dobrze , a więc jest to wyjątkowo proste . Jeśli zrobiłeś juz plik .htm to przenieś go do :
Cytatdata/html/teleporter
Aby przenosiło Cie do jakiegoś miejsca , musisz zrobić coś takiego ( Jest to ładny , estetyczny przycisk ) :
Cytat<button action="bypass -h npc_%objectId%_goto 814" value="Aden" width=110 height=24 back="L2UI_ct1.button_df" fore="L2UI_ct1.button_df">
Czyli :
Cytataction="bypass -h npc_%objectId%_goto 814"
To odpowiada , że po kliknięciu przenosi postać do teleportu z ID 814
Cytatvalue="Aden"
Czyli text jaki będzie na przycisku
Cytatwidth=110 height=24
Wysokość i szerokość przycisku
Cytatback="L2UI_ct1.button_df" fore="L2UI_ct1.button_df">
A to tylko odpowiada za wygląd , styl przycisku , a więc jak już masz plik .htm , trzeba zrobić plik .sql , w którym zdefiniujemy , do którego miejsca będzie nam teleportować oraz ID teleportu , który potem podajemy w htmlu ( Podałem , w którym miejscu )
Plik .sql wyglądać powinien tak :
CytatINSERT INTO teleport VALUES
('Dark Elven Town -> Town of Gludio',xxx,-12672,122776,-3116,10000,0),
Gdzie :
Cytat'Dark Elven Town -> Town of Gludio'
To tylko opis teleportu ( Nigdzie się nie pokazuje , pomaga nam tylko odszukać dany teleport w bazie )
W miejsce xxx podajemu ID teleportu ( przypominam , że musi być identyczny z tym w htmlu aby działał )
Cytat-12672,122776,-3116,
Jest to x/y/z ( położenie , do którego będzie przenosić ) W grze wpisz /loc aby sprawdzić Twoje położenie
Cytat10000,0)
10000 oznacza cene za teleport ( w adenach ) Jeśli chciałbyś zrobić teleport za inny przedmiot to musisz zrobić to w pythonie ( patrz data/script ) . Potem jest 0 - zawsze
-----------------------------
Maślan:
(https://forum.lineage2.com.pl/dead-image.svg)