summaryrefslogtreecommitdiff
path: root/world/map/npc/items
diff options
context:
space:
mode:
authorThe Kandiman <kandiman@kandiman.(none)>2011-09-10 20:15:17 -0400
committerThe Kandiman <kandiman@kandiman.(none)>2011-09-11 16:48:18 -0400
commit1cb0e75cbd356485ebe35bb3f5af10e1454e57a5 (patch)
tree594bbf4a1bb428ef527f6ce6ec79e4eb3e478607 /world/map/npc/items
parenta9868851cfe19c503cc72b0289889c564b41dd20 (diff)
downloadserverdata-1cb0e75cbd356485ebe35bb3f5af10e1454e57a5.tar.gz
serverdata-1cb0e75cbd356485ebe35bb3f5af10e1454e57a5.tar.bz2
serverdata-1cb0e75cbd356485ebe35bb3f5af10e1454e57a5.tar.xz
serverdata-1cb0e75cbd356485ebe35bb3f5af10e1454e57a5.zip
Tab conversion and formatting project.
npc/functions and npc/items complete.
Diffstat (limited to 'world/map/npc/items')
-rw-r--r--world/map/npc/items/purification_potion.txt36
-rw-r--r--world/map/npc/items/restricted_item.txt24
-rw-r--r--world/map/npc/items/scissors.txt20
-rw-r--r--world/map/npc/items/shock_sweet.txt22
-rw-r--r--world/map/npc/items/unreleased_item.txt12
-rw-r--r--world/map/npc/items/warpTowels.txt230
6 files changed, 187 insertions, 157 deletions
diff --git a/world/map/npc/items/purification_potion.txt b/world/map/npc/items/purification_potion.txt
index 09a854bd..59c55eb1 100644
--- a/world/map/npc/items/purification_potion.txt
+++ b/world/map/npc/items/purification_potion.txt
@@ -1,28 +1,28 @@
// This is the function to use the PurificationPotion
-function script usePurificationPotion {
- if (isat("011-1.gat", 88,67))
- goto L_Wyara_Pond;
+function|script|usePurificationPotion|{
+ if (isat("011-1.gat", 88,67))
+ goto L_Wyara_Pond;
L_NoUse:
- message strcharinfo(0), "You don't know what to do with this.";
- getitem "PurificationPotion", 1;
- return;
+ message strcharinfo(0), "You don't know what to do with this.";
+ getitem "PurificationPotion", 1;
+ return;
L_Wyara_Pond:
- set @Q_MASK, NIBBLE_2_MASK;
- set @Q_SHIFT, NIBBLE_2_SHIFT;
- set @Q_status, (QUEST_MAGIC2 & @Q_MASK) >> @Q_SHIFT;
+ set @Q_MASK, NIBBLE_2_MASK;
+ set @Q_SHIFT, NIBBLE_2_SHIFT;
+ set @Q_status, (QUEST_MAGIC2 & @Q_MASK) >> @Q_SHIFT;
- if (@Q_status < 1)
- goto L_NoUse;
- if (@Q_status <= 2)
- set @Q_status, @Q_status + 1;
+ if (@Q_status < 1)
+ goto L_NoUse;
+ if (@Q_status <= 2)
+ set @Q_status, @Q_status + 1;
- message strcharinfo(0), "You pour the potion into the pond.";
+ message strcharinfo(0), "You pour the potion into the pond.";
- set QUEST_MAGIC2,
- (QUEST_MAGIC2 & ~(@Q_MASK)
- | (@Q_status << @Q_SHIFT));
- return;
+ set QUEST_MAGIC2,
+ (QUEST_MAGIC2 & ~(@Q_MASK)
+ | (@Q_status << @Q_SHIFT));
+ return;
}
diff --git a/world/map/npc/items/restricted_item.txt b/world/map/npc/items/restricted_item.txt
index 365c690f..eddce38d 100644
--- a/world/map/npc/items/restricted_item.txt
+++ b/world/map/npc/items/restricted_item.txt
@@ -1,18 +1,18 @@
// ------------------------------------------------------------
// Identical to unreleased_item except for the message.
// Variables passed to this script:
-// @slotId The slot in which the item would have been equipped in. This is passed automagically when called in an equip script.
-// @itemId The ID of the item currently being equipped. This is passed automagically when called in an equip script.
-// @minLvl The minimum required GM level to equip this item. When not set or set to 0, it is set to 60 as a default.
+// @slotId The slot in which the item would have been equipped in. This is passed automagically when called in an equip script.
+// @itemId The ID of the item currently being equipped. This is passed automagically when called in an equip script.
+// @minLvl The minimum required GM level to equip this item. When not set or set to 0, it is set to 60 as a default.
// ------------------------------------------------------------
-function script RestrictedItem {
- if (!@minLvl) set @minLvl, 60;
- if (debug || getgmlevel() >= @minLvl) return; // If the active character is staff, do nothing.
- message strcharinfo(0), "This item repells you with extreme force. It does not seem to be meant for you.";
- unequipbyid @slotId;
- if (getgmlevel()) return;
- gmcommand "@wgm Restricted item '" + @itemId + "' used by character '" + strcharinfo(0) + "'.";
- gmcommand "@l Restricted item '" + @itemId + "' used by character '" + strcharinfo(0) + "'.";
- end;
+function|script|RestrictedItem|{
+ if (!@minLvl) set @minLvl, 60;
+ if (debug || getgmlevel() >= @minLvl) return; // If the active character is staff, do nothing.
+ message strcharinfo(0), "This item repells you with extreme force. It does not seem to be meant for you.";
+ unequipbyid @slotId;
+ if (getgmlevel()) return;
+ gmcommand "@wgm Restricted item '" + @itemId + "' used by character '" + strcharinfo(0) + "'.";
+ gmcommand "@l Restricted item '" + @itemId + "' used by character '" + strcharinfo(0) + "'.";
+ end;
}
diff --git a/world/map/npc/items/scissors.txt b/world/map/npc/items/scissors.txt
index b806bb33..7b64ce61 100644
--- a/world/map/npc/items/scissors.txt
+++ b/world/map/npc/items/scissors.txt
@@ -1,13 +1,13 @@
-function script useScissors {
- if (rand(3))
- goto L_Change;
- message strcharinfo(0), "Whoops!";
- itemheal -20 - rand(Hp >> 1), 0;
- getitem "Scissors", 1;
- end;
+function|script|useScissors|{
+ if (rand(3))
+ goto L_Change;
+ message strcharinfo(0), "Whoops!";
+ itemheal -20 - rand(Hp >> 1), 0;
+ getitem "Scissors", 1;
+ end;
L_Change:
- setlook LOOK_HAIR_STYLE, rand(20);
- getitem "Scissors", 1;
- end;
+ setlook LOOK_HAIR_STYLE, rand(20);
+ getitem "Scissors", 1;
+ end;
}
diff --git a/world/map/npc/items/shock_sweet.txt b/world/map/npc/items/shock_sweet.txt
index 8255ee9b..a9226c39 100644
--- a/world/map/npc/items/shock_sweet.txt
+++ b/world/map/npc/items/shock_sweet.txt
@@ -1,14 +1,14 @@
-function script useShockSweet {
- if (rand(5))
- goto L_Change;
- message strcharinfo(0), "Yuck, this tastes like earwax!";
- itemheal -20 - (Hp >> 2), 0;
- end;
+function|script|useShockSweet|{
+ if (rand(5))
+ goto L_Change;
+ message strcharinfo(0), "Yuck, this tastes like earwax!";
+ itemheal -20 - (Hp >> 2), 0;
+ end;
L_Change:
- setlook LOOK_HAIR_COLOR, HC_WHITE;
- message strcharinfo(0), "Gah! That was some strong stuff!";
- sc_start sc_poison, 1, 20;
- misceffect 15, strcharinfo(0);
- end;
+ setlook LOOK_HAIR_COLOR, HC_WHITE;
+ message strcharinfo(0), "Gah! That was some strong stuff!";
+ sc_start sc_poison, 1, 20;
+ misceffect 15, strcharinfo(0);
+ end;
}
diff --git a/world/map/npc/items/unreleased_item.txt b/world/map/npc/items/unreleased_item.txt
index cac699f9..64072484 100644
--- a/world/map/npc/items/unreleased_item.txt
+++ b/world/map/npc/items/unreleased_item.txt
@@ -1,11 +1,11 @@
// ------------------------------------------------------------
// Variables passed to this script:
-// @slotId The slot in which the item would have been equipped in. This is passed automagically when called in an equip script.
+// @slotId The slot in which the item would have been equipped in. This is passed automagically when called in an equip script.
// ------------------------------------------------------------
-function script UnreleasedItem {
- if (debug || getgmlevel()) end; // If the server allows equipping unreleased items or if the active character is staff, do nothing.
- message strcharinfo(0), "You have difficulties equipping this item, as if it is not yet fully in this world.";
- unequipbyid @slotId;
- end;
+function|script|UnreleasedItem|{
+ if (debug || getgmlevel()) end; // If the server allows equipping unreleased items or if the active character is staff, do nothing.
+ message strcharinfo(0), "You have difficulties equipping this item, as if it is not yet fully in this world.";
+ unequipbyid @slotId;
+ end;
}
diff --git a/world/map/npc/items/warpTowels.txt b/world/map/npc/items/warpTowels.txt
index 1c39b98b..6438c223 100644
--- a/world/map/npc/items/warpTowels.txt
+++ b/world/map/npc/items/warpTowels.txt
@@ -1,130 +1,160 @@
-function script useWhiteWarpTowel {
- if (isin("botcheck.gat",8,11,32,29)) goto L_Botcheck;
- warp "020-1.gat",66,91; // Nivalis
- if (rand(15))
- goto L_Keep;
- getitem "GreyWarpTowel", 1;
- end;
+function|script|useWhiteWarpTowel|{
+ if (isin("botcheck.gat",8,11,32,29))
+ goto L_Botcheck;
+ warp "020-1.gat",66,91; // Nivalis
+ if (rand(15))
+ goto L_Keep;
+ getitem "GreyWarpTowel", 1;
+ end;
+
L_Botcheck:
- message strcharinfo(0), "You must be warped by a GM to leave the bot check area.";
+ message strcharinfo(0), "You must be warped by a GM to leave the bot check area.";
+
L_Keep:
- getitem "WhiteWarpTowel", 1;
- end;
+ getitem "WhiteWarpTowel", 1;
+ end;
}
-function script useRedWarpTowel {
- if (isin("botcheck.gat",8,11,32,29)) goto L_Botcheck;
- warp "009-1.gat",51,40; // Hurnscald
- if (rand(15))
- goto L_Keep;
- getitem "GreyWarpTowel", 1;
- end;
+function|script|useRedWarpTowel|{
+ if (isin("botcheck.gat",8,11,32,29))
+ goto L_Botcheck;
+ warp "009-1.gat",51,40; // Hurnscald
+ if (rand(15))
+ goto L_Keep;
+ getitem "GreyWarpTowel", 1;
+ end;
+
L_Botcheck:
- message strcharinfo(0), "You must be warped by a GM to leave the bot check area.";
+ message strcharinfo(0), "You must be warped by a GM to leave the bot check area.";
+
L_Keep:
- getitem "RedWarpTowel", 1;
- end; end;
+ getitem "RedWarpTowel", 1;
+ end; end;
}
-function script useGreenWarpTowel {
- if (isin("botcheck.gat",8,11,32,29)) goto L_Botcheck;
- warp "003-1.gat",35,25;
- if (rand(15))
- goto L_Keep;
- getitem "GreyWarpTowel", 1;
- end;
+function|script|useGreenWarpTowel|{
+ if (isin("botcheck.gat",8,11,32,29))
+ goto L_Botcheck;
+ warp "003-1.gat",35,25;
+ if (rand(15))
+ goto L_Keep;
+ getitem "GreyWarpTowel", 1;
+ end;
+
L_Botcheck:
- message strcharinfo(0), "You must be warped by a GM to leave the bot check area.";
+ message strcharinfo(0), "You must be warped by a GM to leave the bot check area.";
+
L_Keep:
- getitem "GreenWarpTowel", 1;
- end; end;
+ getitem "GreenWarpTowel", 1;
+ end; end;
}
-function script useBlueWarpTowel {
- if (isin("botcheck.gat",8,11,32,29)) goto L_Botcheck;
- warp "003-1.gat",35,25;
- if (rand(15))
- goto L_Keep;
- getitem "GreyWarpTowel", 1;
- end;
+function|script|useBlueWarpTowel|{
+ if (isin("botcheck.gat",8,11,32,29))
+ goto L_Botcheck;
+ warp "003-1.gat",35,25;
+ if (rand(15))
+ goto L_Keep;
+ getitem "GreyWarpTowel", 1;
+ end;
+
L_Botcheck:
- message strcharinfo(0), "You must be warped by a GM to leave the bot check area.";
+ message strcharinfo(0), "You must be warped by a GM to leave the bot check area.";
+
L_Keep:
- getitem "BlueWarpTowel", 1;
- end; end;
+ getitem "BlueWarpTowel", 1;
+ end; end;
}
-function script useYellowWarpTowel {
- if (isin("botcheck.gat",8,11,32,29)) goto L_Botcheck;
- warp "001-1.gat",40,71; // Tulimshar
- if (rand(15))
- goto L_Keep;
- getitem "GreyWarpTowel", 1;
- end;
+function|script|useYellowWarpTowel|{
+ if (isin("botcheck.gat",8,11,32,29))
+ goto L_Botcheck;
+ warp "001-1.gat",40,71; // Tulimshar
+ if (rand(15))
+ goto L_Keep;
+ getitem "GreyWarpTowel", 1;
+ end;
+
L_Botcheck:
- message strcharinfo(0), "You must be warped by a GM to leave the bot check area.";
+ message strcharinfo(0), "You must be warped by a GM to leave the bot check area.";
+
L_Keep:
- getitem "YellowWarpTowel", 1;
- end; end;
+ getitem "YellowWarpTowel", 1;
+ end; end;
}
-function script usePurpleWarpTowel {
- if (isin("botcheck.gat",8,11,32,29)) goto L_Botcheck;
- warp "003-1.gat",35,25;
- if (rand(15))
- goto L_Keep;
- getitem "GreyWarpTowel", 1;
- end;
+function|script|usePurpleWarpTowel|{
+ if (isin("botcheck.gat",8,11,32,29))
+ goto L_Botcheck;
+ warp "003-1.gat",35,25;
+ if (rand(15))
+ goto L_Keep;
+ getitem "GreyWarpTowel", 1;
+ end;
+
L_Botcheck:
- message strcharinfo(0), "You must be warped by a GM to leave the bot check area.";
+ message strcharinfo(0), "You must be warped by a GM to leave the bot check area.";
+
L_Keep:
- getitem "PurpleWarpTowel", 1;
- end; end;
+ getitem "PurpleWarpTowel", 1;
+ end; end;
}
-function script useOrangeWarpTowel {
- if (isin("botcheck.gat",8,11,32,29)) goto L_Botcheck;
- warp "027-1.gat",70,100; // Graveyard
- if (rand(15))
- goto L_Keep;
- getitem "GreyWarpTowel", 1;
- end;
+function|script|useOrangeWarpTowel|{
+ if (isin("botcheck.gat",8,11,32,29))
+ goto L_Botcheck;
+ warp "027-1.gat",70,100; // Graveyard
+ if (rand(15))
+ goto L_Keep;
+ getitem "GreyWarpTowel", 1;
+ end;
+
L_Botcheck:
- message strcharinfo(0), "You must be warped by a GM to leave the bot check area.";
+ message strcharinfo(0), "You must be warped by a GM to leave the bot check area.";
+
L_Keep:
- getitem "OrangeWarpTowel", 1;
- end; end;
+ getitem "OrangeWarpTowel", 1;
+ end; end;
}
-function script usePinkWarpTowel {
- if (isin("botcheck.gat",8,11,32,29)) goto L_Botcheck;
- warp "012-3.gat",448,66; // Terranite Cave
- if (rand(15))
- goto L_Keep;
- getitem "GreyWarpTowel", 1;
- end;
+function|script|usePinkWarpTowel|{
+ if (isin("botcheck.gat",8,11,32,29))
+ goto L_Botcheck;
+ warp "012-3.gat",448,66; // Terranite Cave
+ if (rand(15))
+ goto L_Keep;
+ getitem "GreyWarpTowel", 1;
+ end;
+
L_Botcheck:
- message strcharinfo(0), "You must be warped by a GM to leave the bot check area.";
+ message strcharinfo(0), "You must be warped by a GM to leave the bot check area.";
+
L_Keep:
- getitem "PinkWarpTowel", 1;
- end; end;
+ getitem "PinkWarpTowel", 1;
+ end; end;
}
-function script useTealWarpTowel {
- if (isin("botcheck.gat",8,11,32,29)) goto L_Botcheck;
- warp "003-1.gat",35,25;
- if (rand(15))
- goto L_Keep;
- getitem "GreyWarpTowel", 1;
- end;
+function|script|useTealWarpTowel|{
+ if (isin("botcheck.gat",8,11,32,29))
+ goto L_Botcheck;
+ warp "003-1.gat",35,25;
+ if (rand(15))
+ goto L_Keep;
+ getitem "GreyWarpTowel", 1;
+ end;
+
L_Botcheck:
- message strcharinfo(0), "You must be warped by a GM to leave the bot check area.";
+ message strcharinfo(0), "You must be warped by a GM to leave the bot check area.";
+
L_Keep:
- getitem "TealWarpTowel", 1;
- end; end;
+ getitem "TealWarpTowel", 1;
+ end; end;
}
-function script useLimeWarpTowel {
- if (isin("botcheck.gat",8,11,32,29)) goto L_Botcheck;
- warp "003-1.gat",35,25;
- if (rand(15))
- goto L_Keep;
- getitem "GreyWarpTowel", 1;
- end;
+function|script|useLimeWarpTowel|{
+ if (isin("botcheck.gat",8,11,32,29))
+ goto L_Botcheck;
+ warp "003-1.gat",35,25;
+ if (rand(15))
+ goto L_Keep;
+ getitem "GreyWarpTowel", 1;
+ end;
+
L_Botcheck:
- message strcharinfo(0), "You must be warped by a GM to leave the bot check area.";
+ message strcharinfo(0), "You must be warped by a GM to leave the bot check area.";
+
L_Keep:
- getitem "LimeWarpTowel", 1;
- end; end;
+ getitem "LimeWarpTowel", 1;
+ end; end;
}