summaryrefslogtreecommitdiff
path: root/npc/functions/main.txt
diff options
context:
space:
mode:
Diffstat (limited to 'npc/functions/main.txt')
-rw-r--r--npc/functions/main.txt15
1 files changed, 9 insertions, 6 deletions
diff --git a/npc/functions/main.txt b/npc/functions/main.txt
index 6a19e3a7..763a1c40 100644
--- a/npc/functions/main.txt
+++ b/npc/functions/main.txt
@@ -808,13 +808,16 @@ function script DelItemFromEveryPlayer {
debugmes "Deleting item %d", getarg(0);
// Del items which SQL can't reach
- .@c = getunits(BL_PC, .@players, MAX_CYCLE_PC);
+ // @4200 NOT IMPLEMENTED (Moubootaur Legends customization)
+ /*
+ .@c = getunits(BL_PC, .@players, 300);
for (.@i = 0; .@i < .@c; .@i++) {
.@am=countitem(getarg(0), .@players[.@i]);
if (.@am) debugmes "DELETE %d items from ACC %d", .@am, .@players[.@i];
if (.@am)
delitem(getarg(0), .@am, .@players[.@i]);
}
+ */
return;
}
@@ -832,7 +835,7 @@ function script DelAccRegFromEveryPlayer {
detachrid();
// Del variables which SQL can't reach
- .@c = getunits(BL_PC, .@players, MAX_CYCLE_PC);
+ .@c = getunits(BL_PC, .@players, 300);
for (.@i = 0; .@i < .@c; .@i++) {
attachrid(.@players[.@i]);
if (compare(getarg(0), "$"))
@@ -855,7 +858,7 @@ function script DelChrRegFromEveryPlayer {
query_sql("DELETE FROM `char_reg_str_db` WHERE `key`='"+getarg(0)+"'");
// Del variables which SQL can't reach
- .@c = getunits(BL_PC, .@players, MAX_CYCLE_PC);
+ .@c = getunits(BL_PC, .@players, 300);
for (.@i = 0; .@i < .@c; .@i++) {
if (compare(getarg(0), "$"))
setd(getarg(0), "");
@@ -877,7 +880,7 @@ function script DelQuestFromEveryPlayer {
// Del quests which SQL can't reach
.@a=playerattached();
if (.@a) detachrid();
- .@c = getunits(BL_PC, .@players, MAX_CYCLE_PC);
+ .@c = getunits(BL_PC, .@players, 300);
for (.@i = 0; .@i < .@c; .@i++) {
attachrid(.@players[.@i]);
setq(getarg(0), 0, 0, 0, 0);
@@ -890,7 +893,7 @@ function script DelQuestFromEveryPlayer {
// Transforms an item in something else.
// ReplaceItemFromEveryPlayer( OldID, NewID )
function script ReplaceItemFromEveryPlayer {
- if (getarg(0, -1) < 0)
+ if (getarg(1, -1) < 0)
return;
debugmes("* Server update: %d item was replaced by %d", getarg(0), getarg(1));
query_sql("UPDATE `inventory` SET `nameid`='"+getarg(1)+"' WHERE `nameid`="+getarg(0));
@@ -905,7 +908,7 @@ function script ReplaceItemFromEveryPlayer {
// Replaces a skill with another ID.
// ReplaceSkillFromEveryPlayer( OldID, NewID )
function script ReplaceSkillFromEveryPlayer {
- if (getarg(0, -1) < 0)
+ if (getarg(1, -1) < 0)
return;
debugmes("* Server update: skill %d was replaced by %d", getarg(0), getarg(1));
// If new ID already exists, it will skip