* Removed "F_CheckMaxCount" as it seems "checkweight". preforms the aforementioned check in addition to checking weight.
* Updated 2004 headgear quests to use checkweight. git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12256 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
parent
5b5caa7043
commit
66071c3330
@ -99,6 +99,8 @@
|
|||||||
//= Updated 'setcell' desc to match latest code changes [ultramage]
|
//= Updated 'setcell' desc to match latest code changes [ultramage]
|
||||||
//= 3.14.20080211
|
//= 3.14.20080211
|
||||||
//= Updated 'input' (new arguments and return value). [FlavioJS]
|
//= Updated 'input' (new arguments and return value). [FlavioJS]
|
||||||
|
//= 3.15.20080227
|
||||||
|
//= Updated 'checkweight' description slightly. [L0ne_W0lf]
|
||||||
//=========================================================
|
//=========================================================
|
||||||
|
|
||||||
This document is a reference manual for all the scripting commands and functions
|
This document is a reference manual for all the scripting commands and functions
|
||||||
@ -2953,6 +2955,10 @@ capacity, and 0 otherwise. It is important to see if a player can carry the
|
|||||||
items you expect to give them, failing to do that may open your script up to
|
items you expect to give them, failing to do that may open your script up to
|
||||||
abuse or create some very unfair errors.
|
abuse or create some very unfair errors.
|
||||||
|
|
||||||
|
This fucntion, in addition to checking to see if the player is capable of
|
||||||
|
holding a set amount of items, also ensures the player has room in their
|
||||||
|
inventory for the item(s) they will be receciving.
|
||||||
|
|
||||||
Like 'getitem', this function will also accept an 'english name' from the
|
Like 'getitem', this function will also accept an 'english name' from the
|
||||||
database as an argument.
|
database as an argument.
|
||||||
|
|
||||||
|
@ -1,6 +1,9 @@
|
|||||||
Date Added
|
Date Added
|
||||||
======
|
======
|
||||||
2008/02/27
|
2008/02/27
|
||||||
|
* Rev 12256 Removed "F_CheckMaxCount" as it seems "checkweight". [L0ne_W0lf]
|
||||||
|
preforms the aforementioned check in addition to checking weight.
|
||||||
|
* Updated 2004 headgear quests to use checkweight.
|
||||||
* Rev 12255 Implemented new function F_CheckMaxCount. [L0ne_W0lf]
|
* Rev 12255 Implemented new function F_CheckMaxCount. [L0ne_W0lf]
|
||||||
- Checks if you have enough room in your inventory to accept items
|
- Checks if you have enough room in your inventory to accept items
|
||||||
* Updated 2004 headgear quests to fully official.
|
* Updated 2004 headgear quests to fully official.
|
||||||
|
@ -32,6 +32,7 @@
|
|||||||
//= 2.07 Added TK_Q variable clear. 2.08 Added NINJ_Q variable clear [Lupus]
|
//= 2.07 Added TK_Q variable clear. 2.08 Added NINJ_Q variable clear [Lupus]
|
||||||
//= 2.09 Cleared F_ClearGarbage [Lupus]
|
//= 2.09 Cleared F_ClearGarbage [Lupus]
|
||||||
//= 2.10 Added F_CheckMaxCount to check count of carrid items. [L0ne_w0lf]
|
//= 2.10 Added F_CheckMaxCount to check count of carrid items. [L0ne_w0lf]
|
||||||
|
//= 2.10a Removed fuction F_CheckMaxCount. Not needed. [L0ne_W0lf]
|
||||||
//============================================================
|
//============================================================
|
||||||
|
|
||||||
|
|
||||||
@ -307,21 +308,3 @@ function script F_Load2Skills {
|
|||||||
set ADV_QSK2,0; //Clear var
|
set ADV_QSK2,0; //Clear var
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////////////////
|
|
||||||
// *** Function "F_CheckMaxCount"
|
|
||||||
//////////////////////////////////////////////////////////////////////////////////
|
|
||||||
// Return 1 if the max items in inventory is 100, else 0.
|
|
||||||
// Ensure that this corrisponds to MAX_INVENTORY in src/common/mmo.h,
|
|
||||||
// otherwise you will not be able to use several quests, as they will
|
|
||||||
// check this if you have over 100 items in your inventory.
|
|
||||||
// This function will return 1 if you cannot carry anymore items.
|
|
||||||
|
|
||||||
function script F_CheckMaxCount {
|
|
||||||
getinventorylist;
|
|
||||||
if (@inventorylist_count > 99) {
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
//===== By: ==================================================
|
//===== By: ==================================================
|
||||||
//= Dj-Yhn
|
//= Dj-Yhn
|
||||||
//===== Current Version: =====================================
|
//===== Current Version: =====================================
|
||||||
//= 1.4
|
//= 1.5
|
||||||
//===== Compatible With: =====================================
|
//===== Compatible With: =====================================
|
||||||
//= eAthena SVN
|
//= eAthena SVN
|
||||||
//===== Description: =========================================
|
//===== Description: =========================================
|
||||||
@ -31,12 +31,13 @@
|
|||||||
//= 17) Orc Hero Helm (in_orcs01 31 93 & 162 33)
|
//= 17) Orc Hero Helm (in_orcs01 31 93 & 162 33)
|
||||||
//===== Additional Comments: =================================
|
//===== Additional Comments: =================================
|
||||||
//= 1.4 Rescripted to Aegis 10.3 standards. [L0ne_W0lf]
|
//= 1.4 Rescripted to Aegis 10.3 standards. [L0ne_W0lf]
|
||||||
|
//= 1.5 Vito'd function call for checkweight. [L0ne_W0lf]
|
||||||
//============================================================
|
//============================================================
|
||||||
|
|
||||||
// Black Cat Ears
|
// Black Cat Ears
|
||||||
//============================================================
|
//============================================================
|
||||||
payon,115,131,3 script Neko Neko#1 725,{
|
payon,115,131,3 script Neko Neko#1 725,{
|
||||||
if (callfunc("F_CheckMaxCount") == 1) {
|
if (checkweight(1201,1) == 0) {
|
||||||
mes "- Wait a minute! -";
|
mes "- Wait a minute! -";
|
||||||
mes "- Currently you're carrying -";
|
mes "- Currently you're carrying -";
|
||||||
mes "- too many items with you. -";
|
mes "- too many items with you. -";
|
||||||
@ -103,7 +104,7 @@ payon,115,131,3 script Neko Neko#1 725,{
|
|||||||
// X Hairpin, Band Aid, Flower Hairpin
|
// X Hairpin, Band Aid, Flower Hairpin
|
||||||
//============================================================
|
//============================================================
|
||||||
geffen,129,148,3 script Argen#1 779,{
|
geffen,129,148,3 script Argen#1 779,{
|
||||||
if (callfunc("F_CheckMaxCount") == 1) {
|
if (checkweight(1201,1) == 0) {
|
||||||
mes "[Argen]";
|
mes "[Argen]";
|
||||||
mes "Hey~ why are you carrying so many items?";
|
mes "Hey~ why are you carrying so many items?";
|
||||||
mes "You mind sharing them with me?";
|
mes "You mind sharing them with me?";
|
||||||
@ -292,7 +293,7 @@ geffen,129,148,3 script Argen#1 779,{
|
|||||||
// Hot-blooded Headband
|
// Hot-blooded Headband
|
||||||
//============================================================
|
//============================================================
|
||||||
yuno,300,188,5 script Zhenbolt#1 753,{
|
yuno,300,188,5 script Zhenbolt#1 753,{
|
||||||
if (callfunc("F_CheckMaxCount") == 1) {
|
if (checkweight(1201,1) == 0) {
|
||||||
mes "- Wait a minute! -";
|
mes "- Wait a minute! -";
|
||||||
mes "- Currently you're carrying -";
|
mes "- Currently you're carrying -";
|
||||||
mes "- too many items with you. -";
|
mes "- too many items with you. -";
|
||||||
@ -387,7 +388,7 @@ yuno,300,188,5 script Zhenbolt#1 753,{
|
|||||||
// Red Ribbon
|
// Red Ribbon
|
||||||
//============================================================
|
//============================================================
|
||||||
prontera,165,232,3 script Nephia#1 744,{
|
prontera,165,232,3 script Nephia#1 744,{
|
||||||
if (callfunc("F_CheckMaxCount") == 1) {
|
if (checkweight(1201,1) == 0) {
|
||||||
mes "- Wait a minute! -";
|
mes "- Wait a minute! -";
|
||||||
mes "- Currently you're carrying -";
|
mes "- Currently you're carrying -";
|
||||||
mes "- too many items with you. -";
|
mes "- too many items with you. -";
|
||||||
@ -501,7 +502,7 @@ prontera,165,232,3 script Nephia#1 744,{
|
|||||||
// Indian Headband
|
// Indian Headband
|
||||||
//============================================================
|
//============================================================
|
||||||
comodo,237,217,5 script Meruntei#1 732,{
|
comodo,237,217,5 script Meruntei#1 732,{
|
||||||
if (callfunc("F_CheckMaxCount") == 1) {
|
if (checkweight(1201,1) == 0) {
|
||||||
mes "- Wait a minute! -";
|
mes "- Wait a minute! -";
|
||||||
mes "- Currently you're carrying -";
|
mes "- Currently you're carrying -";
|
||||||
mes "- too many items with you. -";
|
mes "- too many items with you. -";
|
||||||
@ -555,7 +556,7 @@ comodo,237,217,5 script Meruntei#1 732,{
|
|||||||
// Mushroom Band
|
// Mushroom Band
|
||||||
//============================================================
|
//============================================================
|
||||||
geffen,67,87,3 script Ipore#1 700,{
|
geffen,67,87,3 script Ipore#1 700,{
|
||||||
if (callfunc("F_CheckMaxCount") == 1) {
|
if (checkweight(1201,1) == 0) {
|
||||||
mes "- Wait a minute! -";
|
mes "- Wait a minute! -";
|
||||||
mes "- Currently you're carrying -";
|
mes "- Currently you're carrying -";
|
||||||
mes "- too many items with you. -";
|
mes "- too many items with you. -";
|
||||||
@ -636,7 +637,7 @@ geffen,67,87,3 script Ipore#1 700,{
|
|||||||
//============================================================
|
//============================================================
|
||||||
yuno,241,52,3 script Old Blacksmith#hgear 813,{
|
yuno,241,52,3 script Old Blacksmith#hgear 813,{
|
||||||
//DisableItemMove
|
//DisableItemMove
|
||||||
if (callfunc("F_CheckMaxCount") == 1) {
|
if (checkweight(1201,1) == 0) {
|
||||||
mes "- Wait a minute! -";
|
mes "- Wait a minute! -";
|
||||||
mes "- Currently you're carrying -";
|
mes "- Currently you're carrying -";
|
||||||
mes "- too many items with you. -";
|
mes "- too many items with you. -";
|
||||||
@ -964,7 +965,7 @@ yuno,241,52,3 script Old Blacksmith#hgear 813,{
|
|||||||
// Sea-Otter Hat
|
// Sea-Otter Hat
|
||||||
//============================================================
|
//============================================================
|
||||||
xmas,183,267,3 script Pretty Lindsay#1 793,{
|
xmas,183,267,3 script Pretty Lindsay#1 793,{
|
||||||
if (callfunc("F_CheckMaxCount") == 1) {
|
if (checkweight(1201,1) == 0) {
|
||||||
mes "- Wait a minute! -";
|
mes "- Wait a minute! -";
|
||||||
mes "- Currently you're carrying -";
|
mes "- Currently you're carrying -";
|
||||||
mes "- too many items with you. -";
|
mes "- too many items with you. -";
|
||||||
@ -1079,7 +1080,7 @@ xmas,183,267,3 script Pretty Lindsay#1 793,{
|
|||||||
// Teddybear Hat
|
// Teddybear Hat
|
||||||
//============================================================
|
//============================================================
|
||||||
xmas,175,156,3 script Fuzzy Fuzz#1 712,{
|
xmas,175,156,3 script Fuzzy Fuzz#1 712,{
|
||||||
if (callfunc("F_CheckMaxCount") == 1) {
|
if (checkweight(1201,1) == 0) {
|
||||||
mes "- Wait a minute! -";
|
mes "- Wait a minute! -";
|
||||||
mes "- Currently you're carrying -";
|
mes "- Currently you're carrying -";
|
||||||
mes "- too many items with you. -";
|
mes "- too many items with you. -";
|
||||||
@ -1166,7 +1167,7 @@ xmas,175,156,3 script Fuzzy Fuzz#1 712,{
|
|||||||
// Model Training Hat
|
// Model Training Hat
|
||||||
//============================================================
|
//============================================================
|
||||||
payon_in03,8,193,4 script Nanhyang#1 77,{
|
payon_in03,8,193,4 script Nanhyang#1 77,{
|
||||||
if (callfunc("F_CheckMaxCount") == 1) {
|
if (checkweight(1201,1) == 0) {
|
||||||
mes "- Wait a minute! -";
|
mes "- Wait a minute! -";
|
||||||
mes "- Currently you're carrying -";
|
mes "- Currently you're carrying -";
|
||||||
mes "- too many items with you. -";
|
mes "- too many items with you. -";
|
||||||
@ -1326,7 +1327,7 @@ payon_in03,8,193,4 script Nanhyang#1 77,{
|
|||||||
// Tulip Hairpin
|
// Tulip Hairpin
|
||||||
//============================================================
|
//============================================================
|
||||||
geffen,83,189,5 script Seth#1 716,{
|
geffen,83,189,5 script Seth#1 716,{
|
||||||
if (callfunc("F_CheckMaxCount") == 1) {
|
if (checkweight(1201,1) == 0) {
|
||||||
mes " [Seth]";
|
mes " [Seth]";
|
||||||
mes "Whoa, why are you carrying so many items with you?";
|
mes "Whoa, why are you carrying so many items with you?";
|
||||||
mes "You look so heavy...! Maybe you can walk more easily if you put some of your stuff away?";
|
mes "You look so heavy...! Maybe you can walk more easily if you put some of your stuff away?";
|
||||||
@ -1444,7 +1445,7 @@ geffen,83,189,5 script Seth#1 716,{
|
|||||||
// Party Hat, Straw Hat, Cowboy Hat, Sombrero, Beanie
|
// Party Hat, Straw Hat, Cowboy Hat, Sombrero, Beanie
|
||||||
//============================================================
|
//============================================================
|
||||||
xmas_in,35,30,3 script Hat Merchant#zero 797,{
|
xmas_in,35,30,3 script Hat Merchant#zero 797,{
|
||||||
if (callfunc("F_CheckMaxCount") == 1) {
|
if (checkweight(1201,1) == 0) {
|
||||||
mes "- Wait a minute !! -";
|
mes "- Wait a minute !! -";
|
||||||
mes "- Currently you're carrying -";
|
mes "- Currently you're carrying -";
|
||||||
mes "- too many items with you. -";
|
mes "- too many items with you. -";
|
||||||
@ -1734,7 +1735,7 @@ xmas_in,35,30,3 script Hat Merchant#zero 797,{
|
|||||||
// Decorative Golden Bell, Crown of Ancient Queen, Crown of Mistress
|
// Decorative Golden Bell, Crown of Ancient Queen, Crown of Mistress
|
||||||
//============================================================
|
//============================================================
|
||||||
yuno_in03,20,18,6 script Nehris#1 726,{
|
yuno_in03,20,18,6 script Nehris#1 726,{
|
||||||
if (callfunc("F_CheckMaxCount") == 1) {
|
if (checkweight(1201,1) == 0) {
|
||||||
mes "- Wait a minute! -";
|
mes "- Wait a minute! -";
|
||||||
mes "- Currently you're carrying -";
|
mes "- Currently you're carrying -";
|
||||||
mes "- too many items with you. -";
|
mes "- too many items with you. -";
|
||||||
@ -1898,7 +1899,7 @@ yuno_in03,20,18,6 script Nehris#1 726,{
|
|||||||
// Alarm Mask
|
// Alarm Mask
|
||||||
//============================================================
|
//============================================================
|
||||||
alde_alche,88,180,0 script Muscle Man#Alarm Mask 748,{
|
alde_alche,88,180,0 script Muscle Man#Alarm Mask 748,{
|
||||||
if (callfunc("F_CheckMaxCount") == 1) {
|
if (checkweight(1201,1) == 0) {
|
||||||
mes "[Muscle Man]";
|
mes "[Muscle Man]";
|
||||||
mes "Hmmm...";
|
mes "Hmmm...";
|
||||||
mes "It's seems you're carrying too much stuff for me to give anything to you.";
|
mes "It's seems you're carrying too much stuff for me to give anything to you.";
|
||||||
@ -2087,7 +2088,7 @@ OnAlarmState:
|
|||||||
// Drooping Cat, Smokie Leaf, Lazy Smokie, Blue Fish
|
// Drooping Cat, Smokie Leaf, Lazy Smokie, Blue Fish
|
||||||
//============================================================
|
//============================================================
|
||||||
morocc,273,79,4 script Educated Traveller 99,{
|
morocc,273,79,4 script Educated Traveller 99,{
|
||||||
if ((MaxWeight-Weight) < 5000 || callfunc("F_CheckMaxCount") == 1) {
|
if ((MaxWeight-Weight) < 5000 || checkweight(1201,1) == 0) {
|
||||||
mes "- Wait a minute! -";
|
mes "- Wait a minute! -";
|
||||||
mes "- Currently you're over weight -";
|
mes "- Currently you're over weight -";
|
||||||
mes "- to receive more items from this NPC. -";
|
mes "- to receive more items from this NPC. -";
|
||||||
@ -2523,7 +2524,7 @@ OnTouch:
|
|||||||
}
|
}
|
||||||
|
|
||||||
pay_dun03,48,84,4 script Nine Tails#Kitsune Man 762,{
|
pay_dun03,48,84,4 script Nine Tails#Kitsune Man 762,{
|
||||||
if (callfunc("F_CheckMaxCount") == 1) {
|
if (checkweight(1201,1) == 0) {
|
||||||
mes "- Wait a moment! -";
|
mes "- Wait a moment! -";
|
||||||
mes "- Currently you are carrying -";
|
mes "- Currently you are carrying -";
|
||||||
mes "- too many items with you. -";
|
mes "- too many items with you. -";
|
||||||
@ -2644,7 +2645,7 @@ OnMyMobDead2:
|
|||||||
//============================================================
|
//============================================================
|
||||||
in_orcs01,31,93,1 script Orc Warrior#1 1023,2,2,{
|
in_orcs01,31,93,1 script Orc Warrior#1 1023,2,2,{
|
||||||
OnTouch:
|
OnTouch:
|
||||||
if (callfunc("F_CheckMaxCount") == 1) {
|
if (checkweight(1201,1) == 0) {
|
||||||
mes "- Wait a minute !! -";
|
mes "- Wait a minute !! -";
|
||||||
mes "- Currently you're carrying -";
|
mes "- Currently you're carrying -";
|
||||||
mes "- too many items with you. -";
|
mes "- too many items with you. -";
|
||||||
@ -3514,7 +3515,7 @@ OnTouch:
|
|||||||
|
|
||||||
in_orcs01,162,33,1 script Orc Hero#1 1087,2,2,{
|
in_orcs01,162,33,1 script Orc Hero#1 1087,2,2,{
|
||||||
OnTouch:
|
OnTouch:
|
||||||
if (callfunc("F_CheckMaxCount") == 1) {
|
if (checkweight(1201,1) == 0) {
|
||||||
mes "- Wait a minute !! -";
|
mes "- Wait a minute !! -";
|
||||||
mes "- Currently you're carrying -";
|
mes "- Currently you're carrying -";
|
||||||
mes "- too many items with you. -";
|
mes "- too many items with you. -";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user