Skip to content

Commit

Permalink
=General:
Browse files Browse the repository at this point in the history
*Updated to eAthena rev. 15267
-Added Support for 2013-12-23cRagexe

*added a 3 minutes timer to homunculus hungry function. This will trigger when the homunculus hungry rate goes to 0. Official is 18 Intimacy loss per hour. Currently we got 20 (-1 Intimacy / 3 minutes = -20 Intimacy / hour) so it needs some fixing later.

*Introducing the Account/Guild/Party Bounded Items System, thanks to rAthena
-Adds script commands 'getitembound', 'getitembound2', and 'countbound'
-Adds at commands @itembound and @itembound2
-Adds bound_item_drop configuration
-Documentation updated 
-DON'T FORGET TO UPDATE YOUR SQL TABLES USING upgrade_15-3athena_svn6.sql!

*Some other changes here and there (needed for the bound system.)

=Scripts
*The official Rebirth Quest now sets lastJob variable. I've added this feature to make this quest work with the custom Job Changer.
  • Loading branch information
15peaces@googlemail.com committed May 19, 2014
1 parent cfbfa7b commit b37fd38
Show file tree
Hide file tree
Showing 35 changed files with 599 additions and 113 deletions.
3 changes: 2 additions & 1 deletion Changelog-Trunk.txt
@@ -1,5 +1,6 @@
Date Added

2014/05/10
* Added support for 2013-12-23cRagexe. [Ai4rei]
2014/01/21
* Fixed char-server (txt only) would still attempt to allocate zero-sized memory block when there are no characters in the database (bugreport:5138, follow up to r15264). [Ai4rei]
- Modified the alloc functions to print an error zero-sized allocation attempts.
Expand Down
10 changes: 10 additions & 0 deletions conf/atcommand_athena.conf
Expand Up @@ -513,6 +513,16 @@ item2: 60,60
// Deletes an item of your choosing, either Item ID or Name.
delitem: 60,60

//@itembound <item name/ID> <amount> <bound_type>
//Creates the specified item and bounds it to the account.
//bound_type: 1 = Account, 2 = Guild, 3 = Party
itembound: 60,60

//@itembound2 <item name/ID> <quantity> <identify_flag> <refine> <attribute> <card1> <card2> <card3> <card4> <bound_type>
//Creates an item with the given parameters (the 'cards' can be any item) and bounds it to the account.
//identify_flag: 0 = unidentified, 1 = identified, attribute: 0 = not broken, 1 = broken, bound_type: 1 = Account, 2 = Guild, 3 = Party
itembound2: 60,60

// Kill another character without hitting them.
kill: 60,60

Expand Down
42 changes: 23 additions & 19 deletions conf/battle/client.conf
Expand Up @@ -24,25 +24,29 @@
// Set here which client version do you accept. Add all values of clients:
// Clients older than accepted versions, and versions not set to 'accepted'
// here will be rejected when logging in
// 0x00001: Clients older than 2004-09-06aSakray (packet versions 5-9)
// 0x00002: 2004-09-06aSakexe (version 10)
// 0x00004: 2004-09-20aSakexe (version 11)
// 0x00008: 2004-10-05aSakexe (version 12)
// 0x00010: 2004-10-25aSakexe (version 13)
// 0x00020: 2004-11-29aSakexe (version 14)
// 0x00040: 2005-01-10bSakexe (version 15)
// 0x00080: 2005-05-09aSakexe (version 16)
// 0x00100: 2005-06-28aSakexe (version 17)
// 0x00200: 2005-07-18aSakexe (version 18)
// 0x00400: 2005-07-19bSakexe (version 19)
// 0x00800: 2006-03-27aSakexe (version 20)
// 0x01000: 2007-01-08aSakexe (version 21)
// 0x02000: 2007-02-12aSakexe (version 22)
// 0x04000: 2008-09-10aSakexe (version 23)
// 0x08000: 2008-08-27aRagexeRE (version 24)
// 0x10000: 2008-09-10aRagexeRE (version 25)
// default value: 0xFFFFF (all clients)
packet_ver_flag: 0xFFFFF
// 0x000001: Clients older than 2004-09-06aSakray (packet versions 5-9)
// 0x000002: 2004-09-06aSakexe (version 10)
// 0x000004: 2004-09-20aSakexe (version 11)
// 0x000008: 2004-10-05aSakexe (version 12)
// 0x000010: 2004-10-25aSakexe (version 13)
// 0x000020: 2004-11-29aSakexe (version 14)
// 0x000040: 2005-01-10bSakexe (version 15)
// 0x000080: 2005-05-09aSakexe (version 16)
// 0x000100: 2005-06-28aSakexe (version 17)
// 0x000200: 2005-07-18aSakexe (version 18)
// 0x000400: 2005-07-19bSakexe (version 19)
// 0x000800: 2006-03-27aSakexe (version 20)
// 0x001000: 2007-01-08aSakexe (version 21)
// 0x002000: 2007-02-12aSakexe (version 22)
// 0x004000: 2008-09-10aSakexe (version 23)
// 0x008000: 2008-08-27aRagexeRE (version 24)
// 0x010000: 2008-09-10aRagexeRE (version 25)
// 0x020000: 2010-11-24aRagexeRE (version 26)
// 0x040000: 2011-10-05aRagexeRE (version 27)
// 0x080000: 2012-07-02aRagexeRE (version 28)
// 0x100000: 2013-12-23cRagexe (version 29)
// default value: 0xFFFFFFFF (all clients)
packet_ver_flag: 0xFFFFFFFF

// Minimum delay between whisper/global/party/guild messages (in ms)
// Messages that break this threshold are silently omitted.
Expand Down
4 changes: 4 additions & 0 deletions conf/battle/gm.conf
Expand Up @@ -88,6 +88,10 @@ gm_cant_drop_min_lv: 1
//ie: Use Storage/Guild Storage, Drop Items, Use Vend, Trade items.
gm_cant_drop_max_lv: 0

// The minimum level for a GM to be able to ignore @getitembound permissions.
// Set this to 0 to disable this bound-system. All bound-settings will be ignored then.
bound_item_drop: 60

// Minimum GM level to see the hp of every player? (Default: 60)
// no/0 can be used to disable it.
disp_hpmeter: 0
Expand Down
7 changes: 7 additions & 0 deletions conf/msg_athena.conf
Expand Up @@ -308,6 +308,13 @@
289: The player is now killable.
290: The player is no longer killable.
291: Weather effects will dispell on warp/refresh
//Item Bound System
293: This bounded item cannot be traded to that character.
294: This bounded item cannot be stored there.
295: Please enter an item name or ID (usage: @item <item name/ID> <quantity> <bound_type>).
296: Please enter all parameters (usage: @item2 <item name/ID> <quantity>
297: <identify_flag> <refine> <attribute> <card1> <card2> <card3> <card4> <bound_type>).
298: Invalid bound type. Valid types are - 1:Account 2:Guild 3:Party
// Guild Castles Number
// --------------------
//299: ?? Castles
Expand Down
22 changes: 21 additions & 1 deletion db/packet_db.txt
Expand Up @@ -1704,5 +1704,25 @@ packet_ver: 28
0x0953,5,walktoxy,2
0x0960,5,changedir,2:4

//2013-12-23cRagexe
packet_ver: 29
0x022d,19,wanttoconnection,2:6:10:14:18
0x0202,5,changedir,2:4
0x035f,6,ticksend,2
0x0362,6,dropitem,2:4
0x0364,8,movefromkafra,2:4
0x0366,90,useskilltoposinfo,2:4:6:8:10
0x0368,6,solvecharname,2
0x0369,7,actionrequest,2:6
0x0437,5,walktoxy,2
0x0438,10,useskilltopos,2:4:6:8
0x07e4,6,takeitem,2
0x07ec,8,movetokafra,2:4
0x083c,10,useskilltoid,2:4:6
0x0844,2 // cashshop button onclick
0x08c9,2 // ???
0x096a,6,getcharnamerequest,2
0x09ab,6 // bank button onclick

//Add new packets here
//packet_ver: 29
//packet_ver: 30
68 changes: 67 additions & 1 deletion doc/script_commands.txt
Expand Up @@ -4,7 +4,7 @@
//= A reference manual for the eAthena scripting language.
//= Commands are sorted depending on their functionality.
//===== Version ===========================================
//= 3.50.20120416
//= 3.52.20140519
//=========================================================
//= 1.0 - First release, filled will as much info as I could
//= remember or figure out, most likely there are errors,
Expand Down Expand Up @@ -194,6 +194,8 @@
//= 3.51.20130619
//= Added 'setdragon', 'checkdragon', 'setwug', 'checkwug',
//= 'setwugrider', 'checkwugrider', 'setmadogear', 'checkmadogear'. [Rytech]
//= 3.52.20140519
//= Added 'getitembound', '*getitembound2' [15peaces]
//=========================================================

This document is a reference manual for all the scripting commands and functions
Expand Down Expand Up @@ -4582,7 +4584,71 @@ Example(s):
//The invoked character will no longer automatically equip a falchion.
autoequip 1104,0;

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

*getitembound <item id>,<amount>,<bound_type>{,<account ID>};
*getitembound "<item name>",<amount>,<bound_type>{,<account ID>};

This command will give an amount of specified items to the invoking character.
If an optional account ID is specified, and the target character is currently
online, items will be created in their inventory instead. If they are not
online, nothing will happen.

It works essentially the same as 'getitem', except that items created using
this command will bound the item to the player's account. Depending on the bound type issued,
the character may not be able to trade or store these items, however all bounded types
cannot be sold, vended, auctioned, or mailed.

Bound Types:
1 - Account Bound
2 - Guild Bound
3 - Party Bound

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

*getitembound2 <item id>,<amount>,<identify>,<refine>,<attribute>,<card1>,<card2>,<card3>,<card4>,<bound_type>{,<account ID>};
*getitembound2 "<item name>",<amount>,<identify>,<refine>,<attribute>,<card1>,<card2>,<card3>,<card4>,<bound_type>{,<account ID>};

This command will give an amount of specified items to the invoking character.
If an optional account ID is specified, and the target character is currently
online, items will be created in their inventory instead. If they are not
online, nothing will happen.

It works essentially the same as 'getitem2', except that items created using
this command will bound the item to the player's account. Depending on the bound type issued,
the character may not be able to trade or store these items, however all bounded types
cannot be sold, vended, auctioned, or mailed.

Bound Types:
1 - Account Bound
2 - Guild Bound
3 - Party Bound

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

*countbound({<bound_type>})

This function will return a number of bounded items on the character.
Optionally, you may count a specific type of bounded item on the character.

countbound will also build an array of items in the form of @bound_items.
Using countbound without a type counts all types of bounded items.

Available types are:
1 - Account Bound
2 - Guild Bound
3 - Party Bound

Example:
mes "[Bound Counter]";
mes "I see you currently have "+countbound+" bounded items.";
next;
mes "The list of bounded items include:";
for(.@i = 0; .@i<getarraysize(@bound_items); .@i++)
mes getitemname(@bound_items[.@i]);
close;

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

*buyingstore <slots>;

Expand Down
16 changes: 13 additions & 3 deletions npc/jobs/valkyrie.txt
Expand Up @@ -4,8 +4,9 @@
//= Nana, fixes by Poki
//= finished, optimized and tested by Lupus
//= L0ne_W0lf
//= 15peaces
//===== Current Version: =====================================
//= 3.0
//= 3.1
//===== Compatible With: =====================================
//= eAthena SVN
//===== Description: =========================================
Expand Down Expand Up @@ -37,6 +38,7 @@
//= 2.9 Corrected Valkyrie case spicifying where to warp after rebirthing. [L0ne_W0lf]
//= 2.9b Fixed Verdandi typo, fixed resetting vars [Lupus]
//= 3.0 Added quest log commands. [L0ne_W0lf]
//= 3.1 Added compatibillity to Job Changer [15peaces]
//============================================================

valkyrie,48,86,4 script Valkyrie# 811,{
Expand Down Expand Up @@ -147,6 +149,14 @@ valkyrie,48,86,4 script Valkyrie# 811,{
set ADVJOB, Class+Job_Novice_High; //memo the target 3rd Job ID
if(ADVJOB == Job_Lord_Knight2) set ADVJOB,Job_Lord_Knight;
if(ADVJOB == Job_Paladin2) set ADVJOB,Job_Paladin;
set lastJob, Class;
if(Class == Job_Knight2){
set lastJob, Job_Knight;
} else {
if(Class == Job_Crusader2){
set lastJob, Job_Crusader;
}
}
jobchange Job_Novice_High;
resetlvl(1);
set MISC_QUEST,MISC_QUEST | 1024; //<-reset Skill Reset Event
Expand All @@ -172,7 +182,7 @@ valkyrie,48,86,4 script Valkyrie# 811,{
switch (ADVJOB) {
case 4008:
case 4015:
warp "izlude",94,134; break;
warp "izlude",94,103; break;
case 4009:
case 4016:
warp "prontera",273,354; break;
Expand Down Expand Up @@ -376,7 +386,7 @@ valkyrie,44,33,5 script Teleporter 124,{
case 3: callsub S_Warpchar,"payon",69,100;
case 4: callsub S_Warpchar,"geffen",120,39;
case 5: callsub S_Warpchar,"alberta",117,56;
case 6: callsub S_Warpchar,"izlude",94,134;
case 6: callsub S_Warpchar,"izlude",94,103;
case 7: callsub S_Warpchar,"aldebaran",91,105;
case 8: callsub S_Warpchar,"comodo",209,143;
case 9: callsub S_Warpchar,"yuno",328,101;
Expand Down
4 changes: 4 additions & 0 deletions sql-files/main.sql
Expand Up @@ -42,6 +42,7 @@ CREATE TABLE IF NOT EXISTS `cart_inventory` (
`card2` smallint(11) NOT NULL default '0',
`card3` smallint(11) NOT NULL default '0',
`expire_time` int(11) unsigned NOT NULL default '0',
`bound` tinyint(3) unsigned NOT NULL default '0',
PRIMARY KEY (`id`),
KEY `char_id` (`char_id`)
) ENGINE=MyISAM;
Expand Down Expand Up @@ -314,6 +315,7 @@ CREATE TABLE IF NOT EXISTS `guild_storage` (
`card2` smallint(11) NOT NULL default '0',
`card3` smallint(11) NOT NULL default '0',
`expire_time` int(11) unsigned NOT NULL default '0',
`bound` tinyint(3) unsigned NOT NULL default '0',
PRIMARY KEY (`id`),
KEY `guild_id` (`guild_id`)
) ENGINE=MyISAM;
Expand Down Expand Up @@ -375,6 +377,7 @@ CREATE TABLE IF NOT EXISTS `inventory` (
`card2` smallint(11) NOT NULL default '0',
`card3` smallint(11) NOT NULL default '0',
`expire_time` int(11) unsigned NOT NULL default '0',
`bound` tinyint(3) unsigned NOT NULL default '0',
PRIMARY KEY (`id`),
KEY `char_id` (`char_id`)
) ENGINE=MyISAM;
Expand Down Expand Up @@ -632,6 +635,7 @@ CREATE TABLE IF NOT EXISTS `storage` (
`card2` smallint(11) NOT NULL default '0',
`card3` smallint(11) NOT NULL default '0',
`expire_time` int(11) unsigned NOT NULL default '0',
`bound` tinyint(3) unsigned NOT NULL default '0',
PRIMARY KEY (`id`),
KEY `account_id` (`account_id`)
) ENGINE=MyISAM;
4 changes: 4 additions & 0 deletions sql-files/upgrade_15-3athena_svn6.sql
@@ -0,0 +1,4 @@
ALTER TABLE `inventory` ADD COLUMN `bound` TINYINT(3) UNSIGNED NOT NULL DEFAULT '0' AFTER `expire_time`;
ALTER TABLE `cart_inventory` ADD COLUMN `bound` TINYINT(3) UNSIGNED NOT NULL default '0' AFTER `expire_time`;
ALTER TABLE `storage` ADD COLUMN `bound` TINYINT(3) UNSIGNED NOT NULL default '0' AFTER `expire_time`;
ALTER TABLE `guild_storage` ADD COLUMN `bound` TINYINT(3) UNSIGNED NOT NULL default '0' AFTER `expire_time`;

0 comments on commit b37fd38

Please sign in to comment.