Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update packets for all client types #3082

Merged
merged 65 commits into from
Dec 1, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
ce481c7
Update shuffle packets and keys
4144 Oct 12, 2021
c4401a1
Update messages
4144 Oct 12, 2021
6262638
Update packets table
4144 Oct 12, 2021
d84be90
Update chars list packets
4144 Oct 15, 2021
8fbfe13
Fix packet ZC_EQUIPWIN_MICROSCOPE for old clients and update struct
4144 Oct 15, 2021
6fe0073
Update HPM
4144 Oct 15, 2021
ac3e616
Update packet ZC_PROPERTY_HOMUN
4144 Oct 15, 2021
bbce448
Update packet ZC_FRIENDS_LIST
4144 Oct 16, 2021
7807bd6
Update packet ZC_GUILD_INFO
4144 Oct 16, 2021
62bfc8a
Update packet ZC_BAN_LIST
4144 Oct 16, 2021
5674355
Update packet GUILD_MEMBER_INFO
4144 Oct 16, 2021
ec80515
Add packet 0xb25 and some 4th jobs stats to player with zero values
4144 Oct 17, 2021
ae182a7
Add packet names to function clif_updatestatus
4144 Oct 17, 2021
e8bc315
Simplify code in clif_updatestatus
4144 Oct 17, 2021
bb26f29
Update packet ZC_SEARCH_STORE_INFO_ACK
4144 Oct 18, 2021
9bb5ad0
Add grade field into search store
4144 Oct 18, 2021
05d5dd7
Update HPM
4144 Oct 18, 2021
6be1eb0
Update packet ZC_REPAIRITEMLIST
4144 Oct 18, 2021
aa20aef
Update HPM
4144 Oct 18, 2021
b061126
Update packet CZ_REQ_ITEMREPAIR
4144 Oct 18, 2021
d857002
Update packet ZC_ITEM_PICKUP_PARTY
4144 Oct 18, 2021
f6a4814
Update ZC_EQUIPWIN_MICROSCOPE
4144 Oct 19, 2021
3387638
Update packet ZC_STORE_ITEMLIST_EQUIP
4144 Oct 19, 2021
9c7f8be
Update HPM
4144 Oct 19, 2021
42b218b
Update packet ZC_ACK_ADD_ITEM_RODEX
4144 Oct 19, 2021
66e8c4f
Update packet ZC_PC_PURCHASE_MYITEMLIST
4144 Oct 19, 2021
5b1aa3e
Update item repair cz and zc packets
4144 Oct 19, 2021
cafa21e
Update HPM
4144 Oct 19, 2021
8be2b59
Update packet ZC_ITEM_PICKUP_ACK
4144 Oct 20, 2021
f8b6087
Update HPM
4144 Oct 20, 2021
6c8811b
Update packet ZC_ADD_EXCHANGE_ITEM
4144 Oct 20, 2021
cb2b6df
Update packet ZC_ITEM_PREVIEW
4144 Oct 20, 2021
1089c93
Update packet ZC_ADD_ITEM_TO_STORE
4144 Oct 21, 2021
9b8a303
Update packet ZC_ADD_ITEM_TO_CART
4144 Oct 21, 2021
7394c70
Improve packet ZC_ACK_READ_RODEX
4144 Oct 21, 2021
ec3f2f9
Update HPM
4144 Oct 21, 2021
03cd58e
Update packet ZC_ACK_READ_RODEX
4144 Oct 21, 2021
2aa9383
Add missing packet id for inventory and storage item lists
4144 Oct 21, 2021
857b676
Add item grade saving in database
Asheraf Oct 21, 2021
21c03fa
Add an atcommand for item grading
Asheraf Oct 21, 2021
b75e64a
Add item db flag for enabling item grades
Asheraf Oct 22, 2021
5d83236
Add some item grade script commands
Asheraf Oct 22, 2021
61a49fa
Update packet CZ_CHECKNAME
4144 Oct 21, 2021
5af6131
Update HPM
4144 Oct 21, 2021
cc3b39b
Update packet ZC_CHECKNAME
4144 Oct 22, 2021
88d9ed8
Update packet ZC_PC_PURCHASE_ITEMLIST
4144 Oct 24, 2021
3c7b719
Update packet ZC_NPC_BARTER_OPEN
4144 Oct 25, 2021
74b3a2e
Update packet ZC_NPC_EXPANDED_BARTER_OPEN
4144 Oct 25, 2021
9500d7b
Update packet ZC_NPC_MARKET_OPEN
4144 Oct 25, 2021
20f31b1
Update packet ZC_PROPERTY_HOMUN
4144 Oct 25, 2021
e53c401
Add at command @unequipall
4144 Oct 26, 2021
1bc579f
Add packets for unequip all items
4144 Oct 26, 2021
bea29eb
Use struct in all versions of packet ZC_NOTIFY_HP_TO_GROUPM
4144 Oct 28, 2021
d507e2b
Update packet ZC_NOTIFY_HP_TO_GROUPM
4144 Oct 28, 2021
a48cbaa
Update HPM
4144 Oct 28, 2021
ee39dec
Convert ZC_BATTLEFIELD_NOTIFY_HP into struct
4144 Oct 28, 2021
fc97e9d
Update packet ZC_BATTLEFIELD_NOTIFY_HP
4144 Oct 28, 2021
e8cb7ee
Add support for script command for show first type of dialog with mes…
4144 Oct 29, 2021
8f19e46
Add support for script command for show second type of dialog with me…
4144 Oct 29, 2021
39a8a37
Add support for menu and select with new zero ui
4144 Oct 29, 2021
1f2792a
Update HPM
4144 Oct 29, 2021
28ca509
Disable zero ui demo in script_custom.conf
4144 Oct 29, 2021
27a3479
Update packet version checks for new re clients
4144 Nov 5, 2021
dc5d4b9
Use unequip all items packet only for first tab in equipment window
4144 Nov 16, 2021
e018692
Add script command for set text align in npc dialogs
4144 Nov 16, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions conf/messages.conf
Original file line number Diff line number Diff line change
Expand Up @@ -1684,5 +1684,13 @@
1522: Instant monster kill state started.
1523: Instant monster kill state ended.

1524: Please enter a position bitmask and an amount (usage: @grade <equip position> <+/- amount>).
1525: %d: Grade All Equip (General)
1526: %d: Grade All Equip (Costume)
1527: %d: Grade All Equip (Shadow)
1528: No item has been graded.
1529: 1 item has been graded.
1530: %d items have been graded.

// Custom translations
import: conf/import/msg_conf.txt
1 change: 1 addition & 0 deletions db/item_db2.conf
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ item_db: (
EquipLv: Equip required level (int, defaults to 0)
EquipLv: [min, max] (alternative syntax with min / max level)
Refine: Refineable (boolean, defaults to true)
Grade: Gradable (boolean, defaults to false)
DisableOptions: true/false (boolean, defaults to false !!for equipments only!!) [Smokexyz]
Subtype: Item Subtype (int, defaults to 0)
ViewSprite: Sprite view ID (int, defaults to 0)
Expand Down
1 change: 1 addition & 0 deletions db/pre-re/item_db.conf
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ item_db: (
EquipLv: Equip required level (int, defaults to 0)
EquipLv: [min, max] (alternative syntax with min / max level)
Refine: Refineable (boolean, defaults to true)
Grade: Gradable (boolean, defaults to false)
DisableOptions: true/false (boolean, defaults to false !!for equipments only!!) [Smokexyz]
Subtype: Item Subtype (int, defaults to 0)
ViewSprite: Sprite view ID (int, defaults to 0)
Expand Down
1 change: 1 addition & 0 deletions db/re/item_db.conf
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ item_db: (
EquipLv: Equip required level (int, defaults to 0)
EquipLv: [min, max] (alternative syntax with min / max level)
Refine: Refineable (boolean, defaults to true)
Grade: Gradable (boolean, defaults to false)
DisableOptions: true/false (boolean, defaults to false !!for equipments only!!) [Smokexyz]
Subtype: Item Subtype (int, defaults to 0)
ViewSprite: Sprite view ID (int, defaults to 0)
Expand Down
8 changes: 8 additions & 0 deletions doc/atcommands.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1584,3 +1584,11 @@ Obs: it will reload 'db/clans.conf' too since it's included inside 'conf/clans.c
Allow show/hide or change client camera parameters

---------------------------------------

@unequipall
@unequipall basic

Unequip all equipped items.
If basic parameter added, unequip only from first tab in equipment window.

---------------------------------------
4 changes: 4 additions & 0 deletions doc/item_db.txt
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ item_db: (
EquipLv: Equip required level (int, defaults to 0)
EquipLv: [min, max] (alternative syntax with min / max level)
Refine: Refineable (boolean, defaults to true)
Grade: Gradable (boolean, defaults to false)
DisableOptions: true/false (boolean, defaults to false !!for equipments only!!) [Smokexyz]
Subtype: Item Subtype (int, defaults to 0)
ViewSprite: Sprite view ID (int, defaults to 0)
Expand Down Expand Up @@ -259,6 +260,9 @@ EquipLv: Base level required to be able to equip. It is possible to specify
Refineable: true if the item can be refined, false otherwise. If no value is
specified, it defaults to true.

Gradable: true if the item can be graded, false otherwise. If no value is
specified, it defaults to false.

Subtype: For weapons and ammo, indicates the weapon-class of the item.

For weapons, the types are:
Expand Down
96 changes: 96 additions & 0 deletions doc/script_commands.txt
Original file line number Diff line number Diff line change
Expand Up @@ -803,6 +803,7 @@ MAX_BANK_ZENY - Maximum Zeny in the bank
MAX_BG_MEMBERS - Maximum BattleGround members
MAX_CHAT_USERS - Maximum Chat users
MAX_REFINE - Maximum Refine level
MAX_ITEM_GRADE - Maximum Grade level
MAX_ITEM_ID - Maximum Item ID
MAX_MENU_OPTIONS - Maximum NPC menu options
MAX_MENU_LENGTH - Maximum NPC menu string length
Expand Down Expand Up @@ -1374,6 +1375,42 @@ for more details.

---------------------------------------

*zmes1f("<format>"{, <param>{, <param>{, ...}}})

This command will displays a box on the screen for the invoking character, with zero ui at bottom.
Works same as *mesf* except zero ui.

Works only in zero clients starting from 20210721.

---------------------------------------

*zmes2f("<format>"{, <param>{, <param>{, ...}}})

This command will displays a box on the screen for the invoking character, with zero ui at center.
Works same as *mesf* except zero ui.

Works only in zero clients starting from 20210721.

---------------------------------------

*zmes1("<string>")

This command will displays a box on the screen for the invoking character, with zero ui at bottom.
Works same as *mes* except zero ui.

Works only in zero clients starting from 20210721.

---------------------------------------

*zmes2("<string>")

This command will displays a box on the screen for the invoking character, with zero ui at center.
Works same as *mes* except zero ui.

Works only in zero clients starting from 20210721.

---------------------------------------

*next()

This command will display a 'next' button in the message window for the
Expand Down Expand Up @@ -1721,6 +1758,13 @@ perfectly equivalent.

---------------------------------------

*zmenu("<option_text>", <target_label>{, "<option_text>", <target_label>, ...})

Same as *menu* but for zero npc dialogs.
Works only in zero clients starting from 20210721.

---------------------------------------

*select("<option>"{, "<option>", ...})

This function is a handy replacement for 'menu' that doesn't use a complex
Expand All @@ -1735,6 +1779,13 @@ and empty options.

---------------------------------------

*zselect("<option>"{, "<option>", ...})

Same as *select* but for zero npc dialogs.
Works only in zero clients starting from 20210721.

---------------------------------------

*prompt("<option>"{, "<option>", ...})

This function behaves exactly like select(), but when a player presses cancel
Expand All @@ -1743,6 +1794,13 @@ want to use select() rather than prompt().

---------------------------------------

*zprompt("<option>"{, "<option>", ...})

Same as *prompt* but for zero npc dialogs.
Works only in zero clients starting from 20210721.

---------------------------------------

*input(<variable>{, <min>{, <max>}})

This command will make an input box pop up on the client connected to the
Expand Down Expand Up @@ -3262,6 +3320,7 @@ recreate these items perfectly if they are destroyed. Here's what you get:
@inventorylist_amount[] - their corresponding item amounts.
@inventorylist_equip[] - will return the slot the item is equipped on, if at all.
@inventorylist_refine[] - for how much it is refined.
@inventorylist_grade[] - for grade levels.
@inventorylist_identify[] - whether it is identified.
@inventorylist_attribute[] - whether it is broken.
@inventorylist_card1[] - These four arrays contain card data for the items.
Expand Down Expand Up @@ -3300,6 +3359,7 @@ recreate these items perfectly if they are destroyed. Here's what you get:
@cartinventorylist_id[] - array of item ids.
@cartinventorylist_amount[] - their corresponding item amounts.
@cartinventorylist_refine[] - for how much it is refined.
@cartinventorylist_grade[] - for grade levels.
@cartinventorylist_identify[] - whether it is identified.
@cartinventorylist_attribute[] - whether it is broken.
@cartinventorylist_card1[] - These four arrays contain card data for the items.
Expand Down Expand Up @@ -3429,6 +3489,7 @@ Valid types are:
ITEMINFO_CLASS_BASE_3 - Class base 3
ITEMINFO_CLASS_UPPER - Class Upper
ITEMINFO_FLAG_NO_REFINE - No refine flag
ITEMINFO_FLAG_NO_GRADE - No grade flag
ITEMINFO_FLAG_DELAY_CONSUME - Delay consume flag
ITEMINFO_FLAG_AUTOEQUIP - Auto equip flag
ITEMINFO_FLAG_AUTO_FAVORITE - Auto favorite flag
Expand Down Expand Up @@ -10814,3 +10875,38 @@ Opens lapine ddukddak upgrade user interface for the player
returns true on success and false on failure

---------------------------------------
*getgrade()

This function will return the grade level of the equipment from which
the function is called. This function is intended for use in item scripts.

if (getgrade() == 1)
mes("Wow. That's a 1st grade weapon.");

---------------------------------------
*getequipisenablegrade(<equipment slot>)

Will return true if the item equipped on the invoking character in the
specified equipment slot is gradable, and false if it isn't. For a list
of equipment slots see getequipid().

---------------------------------------
*getequipgrade(<equipment slot>);

Gets the grade level of an equipment.

---------------------------------------
*setdialogalign(<align>);

Set vertical or horizontal align in npc dialog.
Valid aligns:
horizontal align:
DIALOG_ALIGN_LEFT
DIALOG_ALIGN_RIGHT
DIALOG_ALIGN_CENTER
vertical align:
DIALOG_ALIGN_TOP
DIALOG_ALIGN_MIDDLE
DIALOG_ALIGN_BOTTOM

Works from clients: main 20210203, re 20211103
74 changes: 74 additions & 0 deletions npc/custom/dialogalign.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
//===== Hercules Script ======================================
//= Dialog text align demo
//===== By: ==================================================
//= 4144
//===== Current Version: =====================================
//= 1.0
//===== Description: =========================================
//= Dialog align demo in prontera.
//============================================================

prontera,162,284,4 script Align demo#prt 4_M_KID1,{
setdialogalign(DIALOG_ALIGN_LEFT);
mes("Align left");
next;
setdialogalign(DIALOG_ALIGN_RIGHT);
mes("Align right");
next;
setdialogalign(DIALOG_ALIGN_CENTER);
mes("Align center");
next;
// reset horizontal align
setdialogalign(DIALOG_ALIGN_LEFT);

setdialogalign(DIALOG_ALIGN_TOP);
mes("Align top");
next;
setdialogalign(DIALOG_ALIGN_MIDDLE);
mes("Align middle");
next;
setdialogalign(DIALOG_ALIGN_BOTTOM);
mes("Align bottom");
next;

setdialogalign(DIALOG_ALIGN_LEFT);
setdialogalign(DIALOG_ALIGN_TOP);
mes("Align left + top");
next;
setdialogalign(DIALOG_ALIGN_LEFT);
setdialogalign(DIALOG_ALIGN_MIDDLE);
mes("Align left + middle");
next;
setdialogalign(DIALOG_ALIGN_LEFT);
setdialogalign(DIALOG_ALIGN_BOTTOM);
mes("Align left + bottom");
next;

setdialogalign(DIALOG_ALIGN_RIGHT);
setdialogalign(DIALOG_ALIGN_TOP);
mes("Align right + top");
next;
setdialogalign(DIALOG_ALIGN_RIGHT);
setdialogalign(DIALOG_ALIGN_MIDDLE);
mes("Align right + middle");
next;
setdialogalign(DIALOG_ALIGN_RIGHT);
setdialogalign(DIALOG_ALIGN_BOTTOM);
mes("Align right + bottom");
next;

setdialogalign(DIALOG_ALIGN_CENTER);
setdialogalign(DIALOG_ALIGN_TOP);
mes("Align center + top");
next;
setdialogalign(DIALOG_ALIGN_CENTER);
setdialogalign(DIALOG_ALIGN_MIDDLE);
mes("Align center + middle");
next;
setdialogalign(DIALOG_ALIGN_CENTER);
setdialogalign(DIALOG_ALIGN_BOTTOM);
mes("Align center + bottom");
next;

close;
}
40 changes: 40 additions & 0 deletions npc/custom/zeroui.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
//===== Hercules Script ======================================
//= Zero ui demo
//===== By: ==================================================
//= 4144
//===== Current Version: =====================================
//= 1.0
//===== Description: =========================================
//= Zero ui demo in prontera.
//============================================================

prontera,161,284,4 script Zero UI demo#prt 4_M_KID1,{
cutin("h_iris01.bmp", 2);
zmes1("Hello <FONT SIZE = 30><B>hercules</B></FONT> with zero ui!");
next;
switch (zselect("zmes1", "zmes2", "zmes1f", "zmes2f")) {
case 1:
zmes1("zmes1: select 1");
break;
case 2:
zmes2("zmes2: 2");
break;
case 3:
zmes1f("zmes1f: %d", 3);
break;
case 4:
zmes2f("zmes2f: %d", 4);
break;
case 255:
zmes1("select cancel");
break;
}
next;
zmes1("line after ^FF0000next");
next;
zmes1("again line after ^FF0000next");
zmes2("test message2 ^00FF004");
next;
zmes2("Hello <FONT SIZE = 30><B>^00FF00hercules^FFFFFF</B></FONT> with zero <FONT SIZE = 20>^FF0000UI^FFFFFF</FONT>!");
close;
}
2 changes: 2 additions & 0 deletions npc/scripts_custom.conf
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@
//"npc/custom/woe_controller.txt",
//"npc/custom/bartershop.txt",
//"npc/custom/expandedbartershop.txt",
//"npc/custom/zeroui.txt",
//"npc/custom/dialogalign.txt",

//================= Other Scripts =========================================
// -- MVP Arena
Expand Down
1 change: 1 addition & 0 deletions sql-files/logs.sql
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ CREATE TABLE IF NOT EXISTS `picklog` (
`nameid` INT NOT NULL DEFAULT '0',
`amount` INT NOT NULL DEFAULT '1',
`refine` TINYINT UNSIGNED NOT NULL DEFAULT '0',
`grade` TINYINT UNSIGNED NOT NULL DEFAULT '0',
`card0` INT NOT NULL DEFAULT '0',
`card1` INT NOT NULL DEFAULT '0',
`card2` INT NOT NULL DEFAULT '0',
Expand Down
Loading