From 41e84b961446b5f3c64bcac387139a817d5c959b Mon Sep 17 00:00:00 2001 From: Jessica Tölke Date: Wed, 23 May 2012 13:18:52 +0200 Subject: Use newly defined constants for SKILL_EMOTE, SKILL_TRADE and SKILL_PARTY instead of local variables. --- world/map/npc/001-1/entertainer.txt | 6 ++---- world/map/npc/001-1/trader.txt | 8 +++----- world/map/npc/021-2/government_building.txt | 12 +++++------- 3 files changed, 10 insertions(+), 16 deletions(-) diff --git a/world/map/npc/001-1/entertainer.txt b/world/map/npc/001-1/entertainer.txt index 96e0527c..b7bbc9a7 100644 --- a/world/map/npc/001-1/entertainer.txt +++ b/world/map/npc/001-1/entertainer.txt @@ -1,8 +1,7 @@ // Emote NPC allows for players to learn the emote skill 001-1.gat,30,45,0|script|Entertainer|165,{ - set @EMOTE_SKILL, 1; - if (getskilllv(@EMOTE_SKILL) > 0) goto L_Has; + if (getskilllv(SKILL_EMOTE) > 0) goto L_Has; mes "[Entertainer]"; mes "\"Yes how can I help you?\""; @@ -21,7 +20,7 @@ L_Learn: goto L_Close; L_Learn2: - setskill @EMOTE_SKILL, 1; + setskill SKILL_EMOTE, 1; mes "[Entertainer]"; mes "\"All you have to do is press alt and a number."; mes "The number determines what emotion will be shown."; @@ -34,7 +33,6 @@ L_Has: goto L_Close; L_Close: - set @EMOTE_SKILL, 0; close; OnTimer3000: diff --git a/world/map/npc/001-1/trader.txt b/world/map/npc/001-1/trader.txt index 5976ffb9..b4157ab2 100644 --- a/world/map/npc/001-1/trader.txt +++ b/world/map/npc/001-1/trader.txt @@ -4,12 +4,11 @@ // Reviewed by: Wombat 001-1.gat,57,33,0|script|Trader|115,{ - set @TRADE_SKILL, 2; set @Ironprice, 1000; set @Sulphurprice, 1200; set @Potionprice, 500; - if ((getskilllv(@TRADE_SKILL) > 0) && BaseLevel >= 25) goto L_Trade; - if (getskilllv(@TRADE_SKILL) > 0) goto L_Later; + if ((getskilllv(SKILL_TRADE) > 0) && BaseLevel >= 25) goto L_Trade; + if (getskilllv(SKILL_TRADE) > 0) goto L_Later; mes "[Trader]"; mes "\"Hello. I came here to trade wares with the people of Tulimshar. Unfortunately for you, I've traded everything I had.\""; @@ -40,7 +39,7 @@ L_Except: L_Teach: if (Zeny < 5) goto L_NotEnoughMoney; set Zeny, Zeny - 5; - setskill @TRADE_SKILL, 1; + setskill SKILL_TRADE, 1; mes "[Trader]"; mes "\"You can initiate trade with someone by right-clicking on them and choosing trade."; mes "You'll both add the items and set the GP you're putting up then press propose trade."; @@ -160,7 +159,6 @@ L_No: goto L_Close; L_Close: - set @TRADE_SKILL, 0; set @Ironprice, 0; set @Sulphurprice, 0; set @Potionprice, 0; diff --git a/world/map/npc/021-2/government_building.txt b/world/map/npc/021-2/government_building.txt index dc2749b2..944efd09 100644 --- a/world/map/npc/021-2/government_building.txt +++ b/world/map/npc/021-2/government_building.txt @@ -144,18 +144,16 @@ S_give_rings: goto L_TrickOrTreat; L_Begin: - set @PARTY_SKILL, 3; - mes "[Tathin]"; mes "\"Hello what Can I do for you?\""; next; - if (getskilllv(@PARTY_SKILL) == 2 ) + if (getskilllv(SKILL_PARTY) == 2 ) goto L_Base_Menu; if (BaseLevel >= 15 - && getskilllv(@PARTY_SKILL) == 1) + && getskilllv(SKILL_PARTY) == 1) goto L_Can_Make_Party; - if (getskilllv(@PARTY_SKILL) == 1) + if (getskilllv(SKILL_PARTY) == 1) goto L_Base_Menu; if (BaseLevel >= 10) goto L_Can_Party; @@ -190,7 +188,7 @@ L_Give_Party: if (Zeny < 10) goto L_NotEnoughMoney; set Zeny, Zeny - 10; - setskill @PARTY_SKILL, 1; + setskill SKILL_PARTY, 1; mes "[Tathin]"; mes "\"Here's your permit. You'll need to be invited by an existing member of a party to join it.\""; next; @@ -211,7 +209,7 @@ L_Give_Make_Party: if (Zeny < 50) goto L_NotEnoughMoney; set Zeny, Zeny - 50; - setskill @PARTY_SKILL, 2; + setskill SKILL_PARTY, 2; mes "[Tathin]"; mes "\"Here's your permit. You can create parties with the 'new' or 'create' commands on the Party tab in the client. Parties need to have unique names.\""; close; -- cgit v1.2.3-60-g2f50