Skip to content

Commit

Permalink
Merge pull request #3082 from 4144/updatepackets
Browse files Browse the repository at this point in the history
Update packets for all client types
  • Loading branch information
MishimaHaruna authored Dec 1, 2021
2 parents 699434b + e018692 commit 01bbe6b
Show file tree
Hide file tree
Showing 95 changed files with 19,882 additions and 675 deletions.
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

0 comments on commit 01bbe6b

Please sign in to comment.