diff options
author | The Kandiman <kandiman@kandiman.(none)> | 2011-09-10 20:15:17 -0400 |
---|---|---|
committer | The Kandiman <kandiman@kandiman.(none)> | 2011-09-11 16:48:18 -0400 |
commit | 1cb0e75cbd356485ebe35bb3f5af10e1454e57a5 (patch) | |
tree | 594bbf4a1bb428ef527f6ce6ec79e4eb3e478607 | |
parent | a9868851cfe19c503cc72b0289889c564b41dd20 (diff) | |
download | serverdata-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.
21 files changed, 1246 insertions, 1109 deletions
diff --git a/world/map/npc/functions/banker.txt b/world/map/npc/functions/banker.txt index 3c060071..4b9e7050 100644 --- a/world/map/npc/functions/banker.txt +++ b/world/map/npc/functions/banker.txt @@ -1,228 +1,249 @@ // -function script Banker { +function|script|Banker|{ - if (BankAccount > 0) callsub S_MoveAccount; + if (BankAccount > 0) callsub S_MoveAccount; L_Start: - mes "[" + @npcname$ + "]"; - mes "\"Welcome to the bank!"; - mes "How can I help you?\""; - next; - menu - "Deposit", L_Dep, - "Withdraw", L_With, - "Check my balance", L_Balance, - "Open my storage", L_Storage, - "Change Bank Options", L_Change, - "Nevermind", L_Nev; - - close; + mes "[" + @npcname$ + "]"; + mes "\"Welcome to the bank!"; + mes "How can I help you?\""; + next; + menu + "Deposit", L_Dep, + "Withdraw", L_With, + "Check my balance", L_Balance, + "Open my storage", L_Storage, + "Change Bank Options", L_Change, + "Nevermind", L_Nev; + close; // need to close window before opening storage. L_Storage: - if (#BankOptions & OPT_STORAGE_CLOSE) close2; - openstorage; - if (#BankOptions & OPT_STORAGE_CLOSE) end; - goto L_Start; + if (#BankOptions & OPT_STORAGE_CLOSE) close2; + openstorage; + if (#BankOptions & OPT_STORAGE_CLOSE) end; + goto L_Start; L_Dep: - mes "[" + @npcname$ + "]"; - mes "\"How much would you like to deposit?\""; - next; - menu - "Other", L_Dep_Input, - "5,000 GP", L_Dep_5k, - "10,000 GP", L_Dep_10k, - "25,000 GP", L_Dep_25k, - "50,000 GP", L_Dep_50k, - "100,000 GP", L_Dep_100k, - "250,000 GP", L_Dep_250k, - "500,000 GP", L_Dep_500k, - "1,000,000 GP", L_Dep_1kk, - "All of my money", L_Dep_All, - "I've changed my mind", L_Start, - "Quit", -; - return; + mes "[" + @npcname$ + "]"; + mes "\"How much would you like to deposit?\""; + next; + menu + "Other", L_Dep_Input, + "5,000 GP", L_Dep_5k, + "10,000 GP", L_Dep_10k, + "25,000 GP", L_Dep_25k, + "50,000 GP", L_Dep_50k, + "100,000 GP", L_Dep_100k, + "250,000 GP", L_Dep_250k, + "500,000 GP", L_Dep_500k, + "1,000,000 GP", L_Dep_1kk, + "All of my money", L_Dep_All, + "I've changed my mind", L_Start, + "Quit", -; + return; L_Dep_Input: - input @Amount; - if (@Amount >= 0) goto L_Dep_Continue; - mes "[" + @npcname$ + "]"; - mes "\"I need a positive amount. What would you like to do?\""; - menu - "Go back", L_Start, - "Try again", L_Dep_Input, - "Deposit all", L_Dep_All, - "Nevermind", -; - goto L_Nev; + input @Amount; + if (@Amount >= 0) + goto L_Dep_Continue; + mes "[" + @npcname$ + "]"; + mes "\"I need a positive amount. What would you like to do?\""; + menu + "Go back", L_Start, + "Try again", L_Dep_Input, + "Deposit all", L_Dep_All, + "Nevermind", -; + goto L_Nev; L_Dep_5k: - if (zeny<5000) goto L_NoMoney; - set @Amount, 5000; - goto L_Dep_Continue; + if (zeny<5000) + goto L_NoMoney; + set @Amount, 5000; + goto L_Dep_Continue; L_Dep_10k: - if (zeny<10000) goto L_NoMoney; - set @Amount, 10000; - goto L_Dep_Continue; + if (zeny<10000) + goto L_NoMoney; + set @Amount, 10000; + goto L_Dep_Continue; L_Dep_25k: - if (zeny<25000) goto L_NoMoney; - set @Amount, 25000; - goto L_Dep_Continue; + if (zeny<25000) + goto L_NoMoney; + set @Amount, 25000; + goto L_Dep_Continue; L_Dep_50k: - if (zeny<50000) goto L_NoMoney; - set @Amount, 50000; - goto L_Dep_Continue; + if (zeny<50000) + goto L_NoMoney; + set @Amount, 50000; + goto L_Dep_Continue; L_Dep_100k: - if (zeny<100000) goto L_NoMoney; - set @Amount, 100000; - goto L_Dep_Continue; + if (zeny<100000) + goto L_NoMoney; + set @Amount, 100000; + goto L_Dep_Continue; L_Dep_250k: - if (zeny<250000) goto L_NoMoney; - set @Amount, 250000; - goto L_Dep_Continue; + if (zeny<250000) + goto L_NoMoney; + set @Amount, 250000; + goto L_Dep_Continue; L_Dep_500k: - if (zeny<500000) goto L_NoMoney; - set @Amount, 500000; - goto L_Dep_Continue; + if (zeny<500000) + goto L_NoMoney; + set @Amount, 500000; + goto L_Dep_Continue; L_Dep_1kk: - if (zeny<1000000) goto L_NoMoney; - set @Amount, 1000000; - goto L_Dep_Continue; + if (zeny<1000000) + goto L_NoMoney; + set @Amount, 1000000; + goto L_Dep_Continue; L_Dep_All: - if (zeny<1) goto L_NoMoney; - set @Amount, zeny; + if (zeny<1) + goto L_NoMoney; + set @Amount, zeny; L_Dep_Continue: - if (zeny < @Amount) goto L_NoMoney; - set zeny, zeny - @Amount; - set #BankAccount, #BankAccount + @Amount; - goto L_Balance; + if (zeny < @Amount) + goto L_NoMoney; + set zeny, zeny - @Amount; + set #BankAccount, #BankAccount + @Amount; + goto L_Balance; L_With: - mes "[" + @npcname$ + "]"; - mes "\"How much would you like to withdraw?\""; - menu - "Other", L_With_Input, - "5,000 GP", L_With_5k, - "10,000 GP", L_With_10k, - "25,000 GP", L_With_25k, - "50,000 GP", L_With_50k, - "100,000 GP", L_With_100k, - "250,000 GP", L_With_250k, - "500,000 GP", L_With_500k, - "1,000,000 GP", L_With_1kk, - "All of my money", L_With_All, - "I've changed my mind", L_Start, - "Quit", -; - return; + mes "[" + @npcname$ + "]"; + mes "\"How much would you like to withdraw?\""; + menu + "Other", L_With_Input, + "5,000 GP", L_With_5k, + "10,000 GP", L_With_10k, + "25,000 GP", L_With_25k, + "50,000 GP", L_With_50k, + "100,000 GP", L_With_100k, + "250,000 GP", L_With_250k, + "500,000 GP", L_With_500k, + "1,000,000 GP", L_With_1kk, + "All of my money", L_With_All, + "I've changed my mind", L_Start, + "Quit", -; + return; L_With_Input: - input @Amount; - if (@Amount >= 0) goto L_With_Continue; - mes "[" + @npcname$ + "]"; - mes "\"I need a positive amount. What would you like to do?\""; - menu - "Go back", L_Start, - "Try again", L_With_Input, - "Withdraw all", L_With_All, - "Nevermind", -; - goto L_Nev; + input @Amount; + if (@Amount >= 0) + goto L_With_Continue; + mes "[" + @npcname$ + "]"; + mes "\"I need a positive amount. What would you like to do?\""; + menu + "Go back", L_Start, + "Try again", L_With_Input, + "Withdraw all", L_With_All, + "Nevermind", -; + goto L_Nev; L_With_5k: - if (#BankAccount < 5000) goto L_NoMoney; - set @Amount, 5000; - goto L_With_Continue; + if (#BankAccount < 5000) + goto L_NoMoney; + set @Amount, 5000; + goto L_With_Continue; L_With_10k: - if (#BankAccount < 10000) goto L_NoMoney; - set @Amount, 10000; - goto L_With_Continue; + if (#BankAccount < 10000) + goto L_NoMoney; + set @Amount, 10000; + goto L_With_Continue; L_With_25k: - if (#BankAccount < 25000) goto L_NoMoney; - set @Amount, 25000; - goto L_With_Continue; + if (#BankAccount < 25000) + goto L_NoMoney; + set @Amount, 25000; + goto L_With_Continue; L_With_50k: - if (#BankAccount < 50000) goto L_NoMoney; - set @Amount, 50000; - goto L_With_Continue; + if (#BankAccount < 50000) + goto L_NoMoney; + set @Amount, 50000; + goto L_With_Continue; L_With_100k: - if (#BankAccount < 100000) goto L_NoMoney; - set @Amount, 100000; - goto L_With_Continue; + if (#BankAccount < 100000) + goto L_NoMoney; + set @Amount, 100000; + goto L_With_Continue; L_With_250k: - if (#BankAccount < 250000) goto L_NoMoney; - set @Amount, 250000; - goto L_With_Continue; + if (#BankAccount < 250000) + goto L_NoMoney; + set @Amount, 250000; + goto L_With_Continue; L_With_500k: - if (#BankAccount < 500000) goto L_NoMoney; - set @Amount, 500000; - goto L_With_Continue; + if (#BankAccount < 500000) + goto L_NoMoney; + set @Amount, 500000; + goto L_With_Continue; L_With_1kk: - if (#BankAccount < 1000000) goto L_NoMoney; - set @Amount, 1000000; - goto L_With_Continue; + if (#BankAccount < 1000000) + goto L_NoMoney; + set @Amount, 1000000; + goto L_With_Continue; L_With_All: - if (#BankAccount < 0) goto L_NoMoney; - set @Amount, #BankAccount; + if (#BankAccount < 0) + goto L_NoMoney; + set @Amount, #BankAccount; L_With_Continue: - if (#BankAccount < @Amount) goto L_NoMoney; - set zeny, zeny + @Amount; - set #BankAccount, #BankAccount - @Amount; - goto L_Balance; + if (#BankAccount < @Amount) + goto L_NoMoney; + set zeny, zeny + @Amount; + set #BankAccount, #BankAccount - @Amount; + goto L_Balance; L_Balance: - mes "[" + @npcname$ + "]"; - mes "\"Your current bank balance is:"; - mes #BankAccount + " GP\""; - if (#BankOptions & OPT_BANK_CLOSE) close; - goto L_Start; + mes "[" + @npcname$ + "]"; + mes "\"Your current bank balance is:"; + mes #BankAccount + " GP\""; + if (#BankOptions & OPT_BANK_CLOSE) close; + goto L_Start; L_Nev: - mes "[" + @npcname$ + "]"; - mes "\"Goodbye then.\""; - return; + mes "[" + @npcname$ + "]"; + mes "\"Goodbye then.\""; + return; L_NoMoney: - mes "[" + @npcname$ + "]"; - mes "\"Oh dear, it seems that you don't have enough money.\""; - goto L_Start; + mes "[" + @npcname$ + "]"; + mes "\"Oh dear, it seems that you don't have enough money.\""; + goto L_Start; S_MoveAccount: - set #BankAccount, #BankAccount + BankAccount; - set BankAccount, 0; - return; + set #BankAccount, #BankAccount + BankAccount; + set BankAccount, 0; + return; L_Change: - setarray @menuitems$, "Keep the current settings", "Close NPC dialog after selecting storage option", "Close NPC dialog after checking your balance"; - if (#BankOptions & OPT_STORAGE_CLOSE) set @menuitems$[1], "Return to main menu after leaving storage"; - if (#BankOptions & OPT_BANK_CLOSE) set @menuitems$[2], "Return to main menu after leaving bank"; - menu - @menuitems$[0], L_Start, - @menuitems$[1], L_Change_Storage, - @menuitems$[2], L_Change_Bank; + setarray @menuitems$, "Keep the current settings", "Close NPC dialog after selecting storage option", "Close NPC dialog after checking your balance"; + if (#BankOptions & OPT_STORAGE_CLOSE) set @menuitems$[1], "Return to main menu after leaving storage"; + if (#BankOptions & OPT_BANK_CLOSE) set @menuitems$[2], "Return to main menu after leaving bank"; + menu + @menuitems$[0], L_Start, + @menuitems$[1], L_Change_Storage, + @menuitems$[2], L_Change_Bank; L_Change_Storage: - set #BankOptions, (#BankOptions ^ OPT_STORAGE_CLOSE); - goto L_Start; + set #BankOptions, (#BankOptions ^ OPT_STORAGE_CLOSE); + goto L_Start; L_Change_Bank: - set #BankOptions, (#BankOptions ^ OPT_BANK_CLOSE); - goto L_Start; + set #BankOptions, (#BankOptions ^ OPT_BANK_CLOSE); + goto L_Start; } diff --git a/world/map/npc/functions/clear_vars.txt b/world/map/npc/functions/clear_vars.txt index 62eada3d..04af3e40 100644 --- a/world/map/npc/functions/clear_vars.txt +++ b/world/map/npc/functions/clear_vars.txt @@ -1,126 +1,128 @@ // Clears old variables -function script ClearVariables { - // Halloween 2006 - set HWQUEST1, 0; - set HWQUEST2, 0; - set HWQUEST3, 0; - set HWQUEST4, 0; - set HWQUEST5, 0; - set HWQUEST6, 0; - set HWQUEST7, 0; - set HWQUEST8, 0; - set HWQUEST9, 0; - set HWQUEST10, 0; - set HWQUEST11, 0; - set HWQUEST12, 0; - set HWQUEST13, 0; - set HWQUEST14, 0; - set HWQUEST15, 0; - set HWQUEST16, 0; - set HWQUEST17, 0; - set HWQUEST18, 0; - set HWQUEST18, 0; - set HWQUEST19, 0; - set HWQUEST20, 0; - - // Christmas 2006 - set XMASQUEST1, 0; - set XMASQUEST2, 0; - set XMASQUEST3, 0; - set XMASQUEST4, 0; - set XMASQUEST5, 0; - set XMASQUEST6, 0; - set XMASQUEST7, 0; - set XMASQUEST8, 0; - set XMASQUEST9, 0; - set XMASQUEST10, 0; - set XMASQUEST11, 0; - set XMASQUEST12, 0; - set XMASQUEST13, 0; - set XMASQUEST14, 0; - set XMASQUEST15, 0; - set XMASQUEST16, 0; - set XMASQUEST17, 0; - set XMASQUEST18, 0; - set XMASQUEST19, 0; - set XMASQUEST20, 0; - - set QUEST_xmas07_state, 0; - set QUEST_xmas07_milk, 0; - set QUEST_xmas07_cookies, 0; - set QUEST_xmas07_presents, 0; - - set QUEST_Easter08_state, 0; - - set Halloween08, 0; - - set QUEST_xmas08_state, 0; - - set QUEST_Easter09, 0; - - set Candyman, 0; // Halloween 2009 - - set QUEST_Christmas09_state, 0; - - set QUEST_Easter09_slots, 0; - - // easter 2010 - // This must not be cleared: since some people would like to go to the easter island! - // set Easter_2010_QuestState, 0; - set Easter_2010_EggState1, 0; - set Easter_2010_EggState2, 0; - set Easter_2010_EggState3, 0; - set Easter_2010_EggState4, 0; - set Easter_2010_EggState5, 0; - - // halloween 2010 - set hween10, 0; - set hween10_collect_canpump, 0; - set hween10_credits, 0; - set hween10_collect, 0; - set hween10_collect_mmallow, 0; - set hween10_collect_jelskul, 0; - set hween10_bonecount, 0; - set hween10_collect_tondel, 0; - set hween10_paid, 0; - - // Xmas 2010: - set Count_Yellow, 0; - set Count_White, 0; - set Maze, 0; - set Yellow, 0; - set White, 0; - set Xmas2010, 0; - set Golbenez_Inn_Cost, 0; - - - //These lines are needed to migrate stuff from variables to flags - if (Open_Underground_Palace_Barrier) set FLAGS, FLAGS | FLAG_OPENED_UNDERGROUND; - set Open_Underground_Palace_Barrier, 0; - - if (Naem_Quest_Done) set FLAGS, FLAGS | FLAG_GOT_NAEM_GLOVES; - set Naem_Quest_Done, 0; - - if (#BankAccount < 0) goto FixBank; - - return; +function|script|ClearVariables|{ + // Halloween 2006 + set HWQUEST1, 0; + set HWQUEST2, 0; + set HWQUEST3, 0; + set HWQUEST4, 0; + set HWQUEST5, 0; + set HWQUEST6, 0; + set HWQUEST7, 0; + set HWQUEST8, 0; + set HWQUEST9, 0; + set HWQUEST10, 0; + set HWQUEST11, 0; + set HWQUEST12, 0; + set HWQUEST13, 0; + set HWQUEST14, 0; + set HWQUEST15, 0; + set HWQUEST16, 0; + set HWQUEST17, 0; + set HWQUEST18, 0; + set HWQUEST18, 0; + set HWQUEST19, 0; + set HWQUEST20, 0; + + // Christmas 2006 + set XMASQUEST1, 0; + set XMASQUEST2, 0; + set XMASQUEST3, 0; + set XMASQUEST4, 0; + set XMASQUEST5, 0; + set XMASQUEST6, 0; + set XMASQUEST7, 0; + set XMASQUEST8, 0; + set XMASQUEST9, 0; + set XMASQUEST10, 0; + set XMASQUEST11, 0; + set XMASQUEST12, 0; + set XMASQUEST13, 0; + set XMASQUEST14, 0; + set XMASQUEST15, 0; + set XMASQUEST16, 0; + set XMASQUEST17, 0; + set XMASQUEST18, 0; + set XMASQUEST19, 0; + set XMASQUEST20, 0; + + set QUEST_xmas07_state, 0; + set QUEST_xmas07_milk, 0; + set QUEST_xmas07_cookies, 0; + set QUEST_xmas07_presents, 0; + + set QUEST_Easter08_state, 0; + + set Halloween08, 0; + + set QUEST_xmas08_state, 0; + + set QUEST_Easter09, 0; + + set Candyman, 0; // Halloween 2009 + + set QUEST_Christmas09_state, 0; + + set QUEST_Easter09_slots, 0; + + // easter 2010 + // This must not be cleared: since some people would like to go to the easter island! + // set Easter_2010_QuestState, 0; + set Easter_2010_EggState1, 0; + set Easter_2010_EggState2, 0; + set Easter_2010_EggState3, 0; + set Easter_2010_EggState4, 0; + set Easter_2010_EggState5, 0; + + // halloween 2010 + set hween10, 0; + set hween10_collect_canpump, 0; + set hween10_credits, 0; + set hween10_collect, 0; + set hween10_collect_mmallow, 0; + set hween10_collect_jelskul, 0; + set hween10_bonecount, 0; + set hween10_collect_tondel, 0; + set hween10_paid, 0; + + // Xmas 2010: + set Count_Yellow, 0; + set Count_White, 0; + set Maze, 0; + set Yellow, 0; + set White, 0; + set Xmas2010, 0; + set Golbenez_Inn_Cost, 0; + + + //These lines are needed to migrate stuff from variables to flags + if (Open_Underground_Palace_Barrier) set FLAGS, FLAGS | FLAG_OPENED_UNDERGROUND; + set Open_Underground_Palace_Barrier, 0; + + if (Naem_Quest_Done) set FLAGS, FLAGS | FLAG_GOT_NAEM_GLOVES; + set Naem_Quest_Done, 0; + + if (#BankAccount < 0) + goto FixBank; + + return; FixBank: - if (zeny >= -#BankAccount) goto L_Fix_Full; + if (zeny >= -#BankAccount) + goto L_Fix_Full; - // Partial fix - set #BankAccount, #BankAccount + zeny; - set zeny, 0; - return; + // Partial fix + set #BankAccount, #BankAccount + zeny; + set zeny, 0; + return; L_Fix_Full: - set zeny, zeny + #BankAccount; - set #BankAccount, 0; - return; + set zeny, zeny + #BankAccount; + set #BankAccount, 0; + return; //Tulimshar and Mine Variables - set Scorp, 0; - set Bugleg, 0; - set ChestQuest, 0; + set Scorp, 0; + set Bugleg, 0; + set ChestQuest, 0; } diff --git a/world/map/npc/functions/dailyquest.txt b/world/map/npc/functions/dailyquest.txt index dc56895b..b984050e 100644 --- a/world/map/npc/functions/dailyquest.txt +++ b/world/map/npc/functions/dailyquest.txt @@ -2,11 +2,11 @@ // Variables returned: // @dq_return - Code of what happend -// 0 = Low level -// 1 = Ignored NPC -// 2 = Not enough points -// 3 = Not enough items -// 4 = Success +// 0 = Low level +// 1 = Ignored NPC +// 2 = Not enough points +// 3 = Not enough items +// 4 = Success // Variables to set: // @dq_level - Minimal level needed to use the quest @@ -27,73 +27,81 @@ // (DailyQuestBonus makes a good reward from non-daily quests) -function script DailyQuest { - set @dq_earliest, gettimetick(2) - 86400; - if (DailyQuestTime < @dq_earliest) set DailyQuestTime, @dq_earliest; +function|script|DailyQuest|{ + set @dq_earliest, gettimetick(2) - 86400; + if (DailyQuestTime < @dq_earliest) set DailyQuestTime, @dq_earliest; - //how many whole daily quest points the player has earned - //we increment DailyQuestTime by the number of seconds in that many increments - set @dq_increments, (gettimetick(2) - DailyQuestTime)*BaseLevel / 86400; - set DailyQuestTime, DailyQuestTime+@dq_increments*86400/BaseLevel; + //how many whole daily quest points the player has earned + //we increment DailyQuestTime by the number of seconds in that many increments + set @dq_increments, (gettimetick(2) - DailyQuestTime)*BaseLevel / 86400; + set DailyQuestTime, DailyQuestTime+@dq_increments*86400/BaseLevel; - //player can't regenerate any quest points, but might have a bonus - if (DailyQuestPoints >= BaseLevel) goto L_Bonus; + //player can't regenerate any quest points, but might have a bonus + if (DailyQuestPoints >= BaseLevel) goto L_Bonus; + + //normal recharging case - increment, but don't let it recharge more than a day's worth + set DailyQuestPoints, DailyQuestPoints + @dq_increments; + if (DailyQuestPoints > BaseLevel) set DailyQuestPoints, BaseLevel; + //fallthrough to bonus, which *is* allowed to push DailyQuestPoints above BaseLevel - //normal recharging case - increment, but don't let it recharge more than a day's worth - set DailyQuestPoints, DailyQuestPoints + @dq_increments; - if (DailyQuestPoints > BaseLevel) set DailyQuestPoints, BaseLevel; - //fallthrough to bonus, which *is* allowed to push DailyQuestPoints above BaseLevel L_Bonus: - if (DailyQuestBonus != 0) set DailyQuestPoints, DailyQuestPoints + DailyQuestBonus; - set DailyQuestBonus, 0; + if (DailyQuestBonus != 0) set DailyQuestPoints, DailyQuestPoints + DailyQuestBonus; + set DailyQuestBonus, 0; - if (BaseLevel < @dq_level) goto L_Low_Level; - if (DailyQuestPoints < @dq_cost) goto L_Not_Enough_Points; + if (BaseLevel < @dq_level) + goto L_Low_Level; + if (DailyQuestPoints < @dq_cost) + goto L_Not_Enough_Points; - mes "\"If you bring me " + @dq_count + " " + @dq_friendly_name$ + ", I will give you a reward.\""; - menu "I have what you want.", L_Trade, - "Ok, I'll get to work.", -, - "Nah, I'm not going to help you.", -; + mes "\"If you bring me " + @dq_count + " " + @dq_friendly_name$ + ", I will give you a reward.\""; + menu "I have what you want.", L_Trade, + "Ok, I'll get to work.", -, + "Nah, I'm not going to help you.", -; - set @dq_return, 1; - goto L_Exit; + set @dq_return, 1; + goto L_Exit; L_Trade: - if (countitem(@dq_name$) < @dq_count) goto L_Not_Enough; - delitem @dq_name$, @dq_count; + if (countitem(@dq_name$) < @dq_count) + goto L_Not_Enough; + delitem @dq_name$, @dq_count; + + set zeny, zeny + @dq_money; + getexp @dq_exp, 0; - set zeny, zeny + @dq_money; - getexp @dq_exp, 0; + set DailyQuestPoints, DailyQuestPoints - @dq_cost; - set DailyQuestPoints, DailyQuestPoints - @dq_cost; + if (@dq_handle_return) + goto L_Exit_Good; - if (@dq_handle_return) goto L_Exit_Good; - - mes "\"Thank you!\""; - mes ""; - mes "[" + @dq_money + " money]"; - mes "[" + @dq_exp + " experience points]"; + mes "\"Thank you!\""; + mes ""; + mes "[" + @dq_money + " money]"; + mes "[" + @dq_exp + " experience points]"; L_Exit_Good: - set @dq_return, 4; - goto L_Exit; + set @dq_return, 4; + goto L_Exit; L_Not_Enough: - if (!@dq_handle_return) mes "\"I said " + @dq_count + " " + @dq_friendly_name$ + "; you should learn to count.\""; - set @dq_return, 3; - goto L_Exit; + if (!@dq_handle_return) + mes "\"I said " + @dq_count + " " + @dq_friendly_name$ + "; you should learn to count.\""; + set @dq_return, 3; + goto L_Exit; L_Low_Level: - if (!@dq_handle_return) mes "\"Hey, you should go kill some things to get stronger first.\""; - set @dq_return, 0; - goto L_Exit; + if (!@dq_handle_return) + mes "\"Hey, you should go kill some things to get stronger first.\""; + set @dq_return, 0; + goto L_Exit; L_Not_Enough_Points: - if (!@dq_handle_return) mes "\"You look exhausted, maybe you should rest a bit.\""; - set @dq_return, 2; - goto L_Exit; + if (!@dq_handle_return) + mes "\"You look exhausted, maybe you should rest a bit.\""; + set @dq_return, 2; + goto L_Exit; L_Exit: - set @dq_handle_return, 0; // Incase they forget - return; + set @dq_handle_return, 0; // Incase they forget + return; } diff --git a/world/map/npc/functions/debug.txt b/world/map/npc/functions/debug.txt index fe72eb72..2a5aadd4 100644 --- a/world/map/npc/functions/debug.txt +++ b/world/map/npc/functions/debug.txt @@ -19,9 +19,12 @@ L_Level: mes "Which level do you want to be? (min: 1 - max: 255)"; next; input @lvl; - if (@lvl > 255) goto L_Leveltoohigh; - if (@lvl < 1) goto L_Leveltoolow; - if (Baselevel == @lvl) goto L_Samelvl; + if (@lvl > 255) + goto L_Leveltoohigh; + if (@lvl < 1) + goto L_Leveltoolow; + if (Baselevel == @lvl) + goto L_Samelvl; set BaseLevel, @lvl; resetstatus; message strcharinfo(0), "New level: " + Baselevel; @@ -63,11 +66,14 @@ L_Unfocus: cleararray @skilllist_name$[0], "", 8; cleararray @skilllist_id[0], 0, 8; cleararray @skilllist_count[0], 0, 8; - if (getskilllv(SKILL_POOL) == 0) setskill SKILL_POOL, 1; + if (getskilllv(SKILL_POOL) == 0) + setskill SKILL_POOL, 1; getactivatedpoolskilllist; - if (@skilllist_count == 0) goto L_Focus; + if (@skilllist_count == 0) + goto L_Focus; getactivatedpoolskilllist; - if (@skilllist_count != 0) goto L_Askunfocus; + if (@skilllist_count != 0) + goto L_Askunfocus; mes "You aren't focused on a skill at the moment"; goto L_Skills; @@ -84,7 +90,8 @@ L_Focus: cleararray @skilllist_id[0], 0, 8; cleararray @skilllist_count[0], 0, 8; getunactivatedpoolskilllist; - if (@skilllist_count == 0) goto L_Noskills; + if (@skilllist_count == 0) + goto L_Noskills; set @skilllist_id[@skilllist_count], 0; set @skilllist_name$[@skilllist_count], "Back to skills menu"; mes "You don't have any skill focused right now. Which one do you want to focus?"; @@ -110,8 +117,10 @@ L_Seeskills: cleararray @skilllist_id[0], 0, 8; cleararray @skilllist_count[0], 0, 8; getactivatedpoolskilllist; - if (@skilllist_count == 0) goto L_Focusmessage; - if (@skilllist_count != 0) mes "You are focused on " + @skilllist_name$[@skilllist_count-1] + " skill."; + if (@skilllist_count == 0) + goto L_Focusmessage; + if (@skilllist_count != 0) + mes "You are focused on " + @skilllist_name$[@skilllist_count-1] + " skill."; L_Skillsoverview: mes "You level in mallards eye skill is " + @mallard; @@ -148,42 +157,48 @@ L_Badskilllvl: L_Changemallard: mes "Enter the lvl you want to be in this skill(min: 1 - max: 9):"; input @lvl; - if (@lvl < 1 || @lvl > 9) goto L_Badskilllvl; + if (@lvl < 1 || @lvl > 9) + goto L_Badskilllvl; setskill SKILL_MALLARDS_EYE, @lvl; goto L_Skills; L_Changebrawling: mes "Enter the lvl you want to be in this skill(min: 1 - max: 9):"; input @lvl; - if (@lvl < 1 || @lvl > 9) goto L_Badskilllvl; + if (@lvl < 1 || @lvl > 9) + goto L_Badskilllvl; setskill SKILL_BRAWLING, @lvl; goto L_Skills; L_Changespeed: mes "Enter the lvl you want to be in this skill(min: 1 - max: 9):"; input @lvl; - if (@lvl < 1 || @lvl > 9) goto L_Badskilllvl; + if (@lvl < 1 || @lvl > 9) + goto L_Badskilllvl; setskill SKILL_SPEED, @lvl; goto L_Skills; L_Changepoison: mes "Enter the lvl you want to be in this skill(min: 1 - max: 9):"; input @lvl; - if (@lvl < 1 || @lvl > 9) goto L_Badskilllvl; + if (@lvl < 1 || @lvl > 9) + goto L_Badskilllvl; setskill SKILL_RESIST_POISON, @lvl; goto L_Skills; L_Changeastralsoul: mes "Enter the lvl you want to be in this skill(min: 1 - max: 9):"; input @lvl; - if (@lvl < 1 || @lvl > 9) goto L_Badskilllvl; + if (@lvl < 1 || @lvl > 9) + goto L_Badskilllvl; setskill SKILL_ASTRAL_SOUL, @lvl; goto L_Skills; L_Changeraging: mes "Enter the lvl you want to be in this skill(min: 1 - max: 9):"; input @lvl; - if (@lvl < 1 || @lvl > 9) goto L_Badskilllvl; + if (@lvl < 1 || @lvl > 9) + goto L_Badskilllvl; setskill SKILL_WARRIOR_RAGING, @lvl; goto L_Skills; @@ -225,7 +240,7 @@ L_Magic: L_Nomagicskills: mes "You can't have magic experience, since you have no magic skills."; - goto L_Magic; + goto L_Magic; L_GetAllMagic: setskill SKILL_MAGIC, 2; @@ -254,13 +269,26 @@ L_Wrongexp: L_Magicexp: mes "Your current magic experience is " + @mexp; - if (@general == 0 && @life == 0 && @war == 0 && @trans == 0 && @nature == 0 && @astral == 0) goto L_Nomagicskills; - if (@general == 2 || @life == 2 || @war == 2 || @trans == 2 || @nature == 2 || @astral == 2) goto L_Magicexp2; + if (@general == 0 + && @life == 0 + && @war == 0 + && @trans == 0 + && @nature == 0 + && @astral == 0) + goto L_Nomagicskills; + if (@general == 2 + || @life == 2 + || @war == 2 + || @trans == 2 + || @nature == 2 + || @astral == 2) + goto L_Magicexp2; L_Magicexp1: mes "Set the desired magic experience (min: 1 - max: 100)"; input @value; - if (@value < 1 || @value > 100) goto L_Wrongexp; + if (@value < 1 || @value > 100) + goto L_Wrongexp; set @mexp, @value; callsub S_Update_Mask; goto L_Magic; @@ -268,7 +296,8 @@ L_Magicexp1: L_Magicexp2: mes "Set the desired magic experience (min: 100 - max: 1200)"; input @value; - if (@value < 100 || @value > 1200) goto L_Wrongexp; + if (@value < 100 || @value > 1200) + goto L_Wrongexp; set @mexp, @value; callsub S_Update_Mask; goto L_Magic; @@ -302,12 +331,14 @@ L_Changegeneral: "Get Level one", -, "Get Level two", L_Generallvl2, "Back to magic menu", L_Magic; - if (@menu == 1) setskill SKILL_MAGIC, 1; + if (@menu == 1) + setskill SKILL_MAGIC, 1; goto L_Magic; L_Generallvl2: setskill SKILL_MAGIC, 2; - if (@mexp < 100) set @mexp, 100; + if (@mexp < 100) + set @mexp, 100; callsub S_Update_Mask; goto L_Magic; @@ -317,12 +348,14 @@ L_Changelife: "Get Level one", -, "Get Level two", L_Lifelvl2, "Back to magic menu", L_Magic; - if (@menu == 1) setskill SKILL_MAGIC_LIFE, 1; + if (@menu == 1) + setskill SKILL_MAGIC_LIFE, 1; goto L_Magic; L_Lifelvl2: setskill SKILL_MAGIC_LIFE, 2; - if (@mexp < 100) set @mexp, 100; + if (@mexp < 100) + set @mexp, 100; callsub S_Update_Mask; goto L_Magic; @@ -332,12 +365,14 @@ L_Changewar: "Get Level one", -, "Get Level two", L_Warlvl2, "Back to magic menu", L_Magic; - if (@menu == 1) setskill SKILL_MAGIC_WAR, 1; + if (@menu == 1) + setskill SKILL_MAGIC_WAR, 1; goto L_Magic; L_Warlvl2: setskill SKILL_MAGIC_WAR, 2; - if (@mexp < 100) set @mexp, 100; + if (@mexp < 100) + set @mexp, 100; callsub S_Update_Mask; goto L_Magic; @@ -347,12 +382,14 @@ L_Changetrans: "Get Level one", -, "Get Level two", L_Translvl2, "Back to magic menu", L_Magic; - if (@menu == 1) setskill SKILL_MAGIC_TRANSMUTE, 1; + if (@menu == 1) + setskill SKILL_MAGIC_TRANSMUTE, 1; goto L_Magic; L_Translvl2: setskill SKILL_MAGIC_TRANSMUTE, 2; - if (@mexp < 100) set @mexp, 100; + if (@mexp < 100) + set @mexp, 100; callsub S_Update_Mask; goto L_Magic; @@ -362,12 +399,14 @@ L_Changenature: "Get Level one", -, "Get Level two", L_Naturelvl2, "Back to magic menu", L_Magic; - if (@menu == 1) setskill SKILL_MAGIC_NATURE, 1; + if (@menu == 1) + setskill SKILL_MAGIC_NATURE, 1; goto L_Magic; L_Naturelvl2: setskill SKILL_MAGIC_NATURE, 2; - if (@mexp < 100) set @mexp, 100; + if (@mexp < 100) + set @mexp, 100; callsub S_Update_Mask; close; @@ -377,12 +416,14 @@ L_Changeastral: "Get Level one", -, "Get Level two", L_Astrallvl2, "Back to magic menu", L_Magic; - if (@menu == 1) setskill SKILL_MAGIC_ASTAL, 1; + if (@menu == 1) + setskill SKILL_MAGIC_ASTAL, 1; goto L_Magic; L_Astrallvl2: setskill SKILL_MAGIC_ASTRAL, 2; - if (@mexp < 100) set @mexp, 100; + if (@mexp < 100) + set @mexp, 100; callsub S_Update_Mask; goto L_Magic; @@ -391,8 +432,8 @@ L_Status: goto L_Begin; S_Update_Mask: - set MAGIC_EXPERIENCE, - (MAGIC_EXPERIENCE & ~(@debug_mask)) - | (@mexp << @debug_shift); - return; + set MAGIC_EXPERIENCE, + (MAGIC_EXPERIENCE & ~(@debug_mask)) + | (@mexp << @debug_shift); + return; } diff --git a/world/map/npc/functions/evil_obelisk.txt b/world/map/npc/functions/evil_obelisk.txt index 4de46eb9..d7373bae 100644 --- a/world/map/npc/functions/evil_obelisk.txt +++ b/world/map/npc/functions/evil_obelisk.txt @@ -1,70 +1,85 @@ -function script EvilObelisk { - mes "[Evil Obelisk]"; - mes "(A mystical aura surrounds this stone. It seems to crave money.)"; - next; +function|script|EvilObelisk|{ + mes "[Evil Obelisk]"; + mes "(A mystical aura surrounds this stone. It seems to crave money.)"; + next; - menu - "Pay it 200,000 gold", L_JACKO, - "Pay it 100,000 gold", L_GRAVEYARD1, - "Pay it 75,000 gold", L_GRAVEYARD2, - "Pay it 50,000 gold", L_SKULL, - "Pay it 25,000 gold", L_SNAKE, - "Don't pay it anything.", -; - close; - return; + menu + "Pay it 200,000 gold", L_JACKO, + "Pay it 100,000 gold", L_GRAVEYARD1, + "Pay it 75,000 gold", L_GRAVEYARD2, + "Pay it 50,000 gold", L_SKULL, + "Pay it 25,000 gold", L_SNAKE, + "Don't pay it anything.", -; + close; + return; L_JACKO: - if (zeny < 200000) goto L_NotEnough; - set zeny, zeny - 200000; - set @mob_id, 1022; - set @mob_count, rand(2) + 1; - goto L_Summon; + if (zeny < 200000) + goto L_NotEnough; + set zeny, zeny - 200000; + set @mob_id, 1022; + set @mob_count, rand(2) + 1; + goto L_Summon; L_GRAVEYARD1: - if (zeny < 100000) goto L_NotEnough; - set @temp, rand(2); - if(@temp == 0) set @mob_id, 1036; // Zombie - if(@temp == 1) set @mob_id, 1045; // Fallen - set @mob_count, rand(2) + 1; - set zeny, zeny - 100000; - goto L_Summon; + if (zeny < 100000) + goto L_NotEnough; + set @temp, rand(2); + if(@temp == 0) + set @mob_id, 1036; // Zombie + if(@temp == 1) + set @mob_id, 1045; // Fallen + set @mob_count, rand(2) + 1; + set zeny, zeny - 100000; + goto L_Summon; L_GRAVEYARD2: - if (zeny < 75000) goto L_NotEnough; - set @temp, rand(2); - if(@temp == 0) set @mob_id, 1044; // Lady Skelly - if(@temp == 1) set @mob_id, 1043; // Normal Skelly - set @mob_count, rand(2) + 1; - set zeny, zeny - 75000; - goto L_Summon; + if (zeny < 75000) + goto L_NotEnough; + set @temp, rand(2); + if(@temp == 0) + set @mob_id, 1044; // Lady Skelly + if(@temp == 1) + set @mob_id, 1043; // Normal Skelly + set @mob_count, rand(2) + 1; + set zeny, zeny - 75000; + goto L_Summon; L_SKULL: - if (zeny < 50000) goto L_NotEnough; - set @temp, rand(2); - if(@temp == 0) set @mob_id, 1024; // Poison - if(@temp == 1) set @mob_id, 1023; // Fire - set @mob_count, rand(4) + 1; - set zeny, zeny - 50000; - goto L_Summon; + if (zeny < 50000) + goto L_NotEnough; + set @temp, rand(2); + if(@temp == 0) + set @mob_id, 1024; // Poison + if(@temp == 1) + set @mob_id, 1023; // Fire + set @mob_count, rand(4) + 1; + set zeny, zeny - 50000; + goto L_Summon; L_SNAKE: - if (zeny < 25000) goto L_NotEnough; - set @temp, rand(4); - if(@temp == 0) set @mob_id, 1034; // Grass - if(@temp == 1) set @mob_id, 1026; // Mnt. - if(@temp == 2) set @mob_id, 1010; // Normal - if(@temp == 3) set @mob_id, 1021; // Cave - set @mob_count, rand(4) + 1; - set zeny, zeny - 25000; - goto L_Summon; + if (zeny < 25000) + goto L_NotEnough; + set @temp, rand(4); + if(@temp == 0) + set @mob_id, 1034; // Grass + if(@temp == 1) + set @mob_id, 1026; // Mnt. + if(@temp == 2) + set @mob_id, 1010; // Normal + if(@temp == 3) + set @mob_id, 1021; // Cave + set @mob_count, rand(4) + 1; + set zeny, zeny - 25000; + goto L_Summon; L_Summon: - monster @map$, @x, @y, "Evil", @mob_id, @mob_count; - close; - return; + monster @map$, @x, @y, "Evil", @mob_id, @mob_count; + close; + return; L_NotEnough: - mes "You don't have that much money"; - close; - return; + mes "You don't have that much money"; + close; + return; } diff --git a/world/map/npc/functions/ferry.txt b/world/map/npc/functions/ferry.txt index 95a176ec..50ad9038 100644 --- a/world/map/npc/functions/ferry.txt +++ b/world/map/npc/functions/ferry.txt @@ -1,73 +1,75 @@ // The ferry system -function script Ferry { - if (BaseLevel < 20) goto L_LowerCost; - set @cost_tulimshar, 500; - set @cost_hurnscald, 500; +function|script|Ferry|{ + if (BaseLevel < 20) + goto L_LowerCost; + set @cost_tulimshar, 500; + set @cost_hurnscald, 500; L_Start: - set @cost_candor, 1500; - mes "Where would you like to go?"; - next; - if (BaseLevel < 40) goto L_PlainMenu; - goto L_MenuWithCandor; + set @cost_candor, 1500; + mes "Where would you like to go?"; + next; + if (BaseLevel < 40) + goto L_PlainMenu; + goto L_MenuWithCandor; L_PlainMenu: - menu - "Tulimshar (" + @cost_tulimshar + "GP)", L_Tulimshar, - "Hurnscald (" + @cost_hurnscald + "GP)", L_Hurnscald, - "Nevermind", -; - close; + menu + "Tulimshar (" + @cost_tulimshar + "GP)", L_Tulimshar, + "Hurnscald (" + @cost_hurnscald + "GP)", L_Hurnscald, + "Nevermind", -; + close; L_MenuWithCandor: - menu - "Tulimshar (" + @cost_tulimshar + "GP)", L_Tulimshar, - "Hurnscald (" + @cost_hurnscald + "GP)", L_Hurnscald, - "Candor (" + @cost_candor + "GP)", L_Candor, - "Nevermind", -; - close; + menu + "Tulimshar (" + @cost_tulimshar + "GP)", L_Tulimshar, + "Hurnscald (" + @cost_hurnscald + "GP)", L_Hurnscald, + "Candor (" + @cost_candor + "GP)", L_Candor, + "Nevermind", -; + close; L_Tulimshar: - if (@loc == DOCK_tulimshar) - goto L_AlreadyThere; - if (zeny < @cost_tulimshar) - goto L_NotEnoughGP; - - set zeny, zeny - @cost_tulimshar; - warp "022-1.gat", 76, 72; - close; + if (@loc == DOCK_tulimshar) + goto L_AlreadyThere; + if (zeny < @cost_tulimshar) + goto L_NotEnoughGP; + + set zeny, zeny - @cost_tulimshar; + warp "022-1.gat", 76, 72; + close; L_Hurnscald: - if (@loc == DOCK_hurnscald) - goto L_AlreadyThere; - if (zeny < @cost_hurnscald) - goto L_NotEnoughGP; - - set zeny, zeny - @cost_hurnscald; - warp "008-1.gat", 137, 64; - close; + if (@loc == DOCK_hurnscald) + goto L_AlreadyThere; + if (zeny < @cost_hurnscald) + goto L_NotEnoughGP; + + set zeny, zeny - @cost_hurnscald; + warp "008-1.gat", 137, 64; + close; L_Candor: - if (@loc == DOCK_candor) - goto L_AlreadyThere; - if (zeny < @cost_candor) - goto L_NotEnoughGP; - - set zeny, zeny - @cost_candor; - warp "029-1.gat", 25, 37; - close; + if (@loc == DOCK_candor) + goto L_AlreadyThere; + if (zeny < @cost_candor) + goto L_NotEnoughGP; + + set zeny, zeny - @cost_candor; + warp "029-1.gat", 25, 37; + close; L_AlreadyThere: - mes "You're already here!"; - close; + mes "You're already here!"; + close; L_NotEnoughGP: - mes "You don't have enough money to go there!"; - close; + mes "You don't have enough money to go there!"; + close; L_LowerCost: - set @cost_tulimshar, 250; - set @cost_hurnscald, 250; - goto L_Start; + set @cost_tulimshar, 250; + set @cost_hurnscald, 250; + goto L_Start; } diff --git a/world/map/npc/functions/game_rules.txt b/world/map/npc/functions/game_rules.txt index d67887f3..863ff89e 100644 --- a/world/map/npc/functions/game_rules.txt +++ b/world/map/npc/functions/game_rules.txt @@ -1,155 +1,155 @@ // -function script GameRules { - set @read, 0; +function|script|GameRules|{ + set @read, 0; - menu - "English", L_English, - "Deutsch (German)", L_German, - "Nederlands (Dutch)", L_Dutch, - "Dansk (Danish)", L_Danish, - "Francais (French)", L_French, - "Castellano (Spanish)", L_Spanish, - "Svenska (Swedish)", L_Swedish, - "Portugues (Portuguese)", L_Portuguese, - "Polski (Polish)", L_Polish, - "Italiano (Italian)", L_Italian; - if (@canSkip) return; + menu + "English", L_English, + "Deutsch (German)", L_German, + "Nederlands (Dutch)", L_Dutch, + "Dansk (Danish)", L_Danish, + "Francais (French)", L_French, + "Castellano (Spanish)", L_Spanish, + "Svenska (Swedish)", L_Swedish, + "Portugues (Portuguese)", L_Portuguese, + "Polski (Polish)", L_Polish, + "Italiano (Italian)", L_Italian; + if (@canSkip) return; L_English: - mes "Players breaking the following rules may be banned (up to and including a permanent ban) or have their characters reset at the GM's discretion:"; - mes "1. Do not abuse other players (insults, swearing, and the like directed to a particular person or persons)"; - mes "2. No bots (and botting means ANY activity while away from keyboard)"; - mes "3. No spamming / flooding (including trade spam)"; - mes "4. No begging"; - mes "5. Speak English on public chat"; - mes "6. Treat others the same way you would like to be treated"; - next; - mes "Botting will be determined by talking to players who are moving and/or attacking."; - next; - goto L_End; + mes "Players breaking the following rules may be banned (up to and including a permanent ban) or have their characters reset at the GM's discretion:"; + mes "1. Do not abuse other players (insults, swearing, and the like directed to a particular person or persons)"; + mes "2. No bots (and botting means ANY activity while away from keyboard)"; + mes "3. No spamming / flooding (including trade spam)"; + mes "4. No begging"; + mes "5. Speak English on public chat"; + mes "6. Treat others the same way you would like to be treated"; + next; + mes "Botting will be determined by talking to players who are moving and/or attacking."; + next; + goto L_End; L_German: - mes "Wir bitten um das Einhalten der folgenden Regeln:"; - mes "1. Keine Beleidigungen, Schimpfwoerter, Schmaehungen oder Rufmord."; - mes "2. Keine 'bots' (automatisierte Spieler). Dies beinhaltet JEGLICHE Teilnahme am Spiel waehrend der Abwesenheit des Spielers."; - mes "3. Kein 'spamming' oder 'flooding' (schnelles Wiederholen von Nachrichten oder Aufforderungen zum Warenhandel)."; - mes "4. Kein Betteln."; - mes "5. Englisch ist die einzige zulaessige Sprache im oeffentlichen Raum."; - mes "6. Behandelt andere so, wie Ihr behandelt werden wollt."; - mes "Jegliche Regelverstoesse koennen bestraft werden, entweder durch ein Zuruecksetzen der Charaktereigenschaften und -besitztuemer auf den Ausgangszustand, oder durch einen temporaeren oder permanenten Ausschluss aus dem Spiel."; - next; - mes "Automatisiertes Spielverhalten liegt vor, wenn ein sich bewegender/kaempfender Spieler nicht intelligent auf Gespraechsaufforderungen reagiert."; - next; - goto L_End; + mes "Wir bitten um das Einhalten der folgenden Regeln:"; + mes "1. Keine Beleidigungen, Schimpfwoerter, Schmaehungen oder Rufmord."; + mes "2. Keine 'bots' (automatisierte Spieler). Dies beinhaltet JEGLICHE Teilnahme am Spiel waehrend der Abwesenheit des Spielers."; + mes "3. Kein 'spamming' oder 'flooding' (schnelles Wiederholen von Nachrichten oder Aufforderungen zum Warenhandel)."; + mes "4. Kein Betteln."; + mes "5. Englisch ist die einzige zulaessige Sprache im oeffentlichen Raum."; + mes "6. Behandelt andere so, wie Ihr behandelt werden wollt."; + mes "Jegliche Regelverstoesse koennen bestraft werden, entweder durch ein Zuruecksetzen der Charaktereigenschaften und -besitztuemer auf den Ausgangszustand, oder durch einen temporaeren oder permanenten Ausschluss aus dem Spiel."; + next; + mes "Automatisiertes Spielverhalten liegt vor, wenn ein sich bewegender/kaempfender Spieler nicht intelligent auf Gespraechsaufforderungen reagiert."; + next; + goto L_End; L_Dutch: - mes "Spelers die de volgende regels overtreden lopen het risico gebanned te worden (oplopend tot een permanente ban) of een reset te krijgen:"; - mes "1. Misbruik geen andere spelers (vloeken, groftaal gebruik, enzovoort tegen een bepaalde persoon of personen)"; - mes "2. Geen 'bots' (geautomatiseerde speler) en botten betekend ELKE activiteit terwijl je van je toetsenboord weg bent"; - mes "3. Verboden te 'spammen' (inclusief het spammen van ruilaanvragen)"; - mes "4. Verboden te bedelen"; - mes "5. Spreek Engels op de publieke chat"; - mes "6. Behandel andere zoals ook jij behandeld wilt worden"; - next; - mes "Botten word bepaald door te praten tegen spelers die aan het bewegen en/of aanvallen zijn."; - next; - goto L_End; + mes "Spelers die de volgende regels overtreden lopen het risico gebanned te worden (oplopend tot een permanente ban) of een reset te krijgen:"; + mes "1. Misbruik geen andere spelers (vloeken, groftaal gebruik, enzovoort tegen een bepaalde persoon of personen)"; + mes "2. Geen 'bots' (geautomatiseerde speler) en botten betekend ELKE activiteit terwijl je van je toetsenboord weg bent"; + mes "3. Verboden te 'spammen' (inclusief het spammen van ruilaanvragen)"; + mes "4. Verboden te bedelen"; + mes "5. Spreek Engels op de publieke chat"; + mes "6. Behandel andere zoals ook jij behandeld wilt worden"; + next; + mes "Botten word bepaald door te praten tegen spelers die aan het bewegen en/of aanvallen zijn."; + next; + goto L_End; L_Danish: - mes "Spillere der ikke overholder de foelgende regner, kan risikere at blive banned (op til et permanent ban) eller faa deres bruger nulstillet af en spilmester (GM)."; - mes "1. Misbrug ikke medspillere (fornaerm dem ikke, svaerg ikke og mobning er forbudt)"; - mes "2. Det er forbudt at bruge bots (Botting betyder at man er aktiv inde i spillet, imens man er vaek fra ens keyboard)"; - mes "3. Det er forbudt at spamme i chatten, eller lave trade spam (spamme betyder at man sender mange beskeder efter hinanden)"; - mes "4. Det er forbudt at tigge (for eksempel: Maa jeg ikke nok faa dit svaerd, kom nu, vaer nu soed... og saa videre)"; - mes "5. Det er forbudt at snakke andre sprog end Engelsk, i den aabne chat. (Dog er det lovligt ved at bruge foelgende kommandoen /whisper)"; - mes "6. Husk at goere mod andre, som du vil have de skal goere imod dig (opfoer dig ordenligt!)"; - next; - mes "Botting bliver fastlagt paa grundlag af, at man snakker til andre spillere, der gaar rundt og/eller der angriber og de ikke svare igen."; - next; - goto L_End; + mes "Spillere der ikke overholder de foelgende regner, kan risikere at blive banned (op til et permanent ban) eller faa deres bruger nulstillet af en spilmester (GM)."; + mes "1. Misbrug ikke medspillere (fornaerm dem ikke, svaerg ikke og mobning er forbudt)"; + mes "2. Det er forbudt at bruge bots (Botting betyder at man er aktiv inde i spillet, imens man er vaek fra ens keyboard)"; + mes "3. Det er forbudt at spamme i chatten, eller lave trade spam (spamme betyder at man sender mange beskeder efter hinanden)"; + mes "4. Det er forbudt at tigge (for eksempel: Maa jeg ikke nok faa dit svaerd, kom nu, vaer nu soed... og saa videre)"; + mes "5. Det er forbudt at snakke andre sprog end Engelsk, i den aabne chat. (Dog er det lovligt ved at bruge foelgende kommandoen /whisper)"; + mes "6. Husk at goere mod andre, som du vil have de skal goere imod dig (opfoer dig ordenligt!)"; + next; + mes "Botting bliver fastlagt paa grundlag af, at man snakker til andre spillere, der gaar rundt og/eller der angriber og de ikke svare igen."; + next; + goto L_End; L_French: - mes "Les joueurs ne respectant pas les regles suivantes pourront, a la discretion des moderateurs (GM), etre bannis (jusqu'au banissement eternel inclus) ou avoir leur personnage reinitialise :"; - mes "1. Ne manquez pas de respect envers les autres joueurs (insultes, language grossier, et autres choses du meme genre a l'intention d'un(e) joueur(se) en particulier ou d'un groupe de joueurs(ses))"; - mes "2. N'utilisez pas de \"bot\" (ceci inclus n'importe quelle activite dans le jeu en etant loin du clavier, dont poser un objet sur le clavier pour attaquer automatiquement les monstres)"; - mes "3. Ne faites pas de publicite inadequate (spam) et de repetitions intempestives (flood) (ceci inclus la repetition de demande de troc (trade))"; - mes "4. Ne demandez pas d'items ou d'argent (les echanges doivent se faire de preference sur forums.themanaworld.org)"; - mes "5. Parlez anglais dans les salons de discussions publics (principalement en ville)"; - mes "6. Traitez les autres de la meme maniere que vous voudriez etre traite(e)"; - next; - mes "L'utilisation de \"bot\" sera determinee en parlant aux joueurs(ses) en train de bouger et/ou d'attaquer."; - next; - goto L_End; + mes "Les joueurs ne respectant pas les regles suivantes pourront, a la discretion des moderateurs (GM), etre bannis (jusqu'au banissement eternel inclus) ou avoir leur personnage reinitialise :"; + mes "1. Ne manquez pas de respect envers les autres joueurs (insultes, language grossier, et autres choses du meme genre a l'intention d'un(e) joueur(se) en particulier ou d'un groupe de joueurs(ses))"; + mes "2. N'utilisez pas de \"bot\" (ceci inclus n'importe quelle activite dans le jeu en etant loin du clavier, dont poser un objet sur le clavier pour attaquer automatiquement les monstres)"; + mes "3. Ne faites pas de publicite inadequate (spam) et de repetitions intempestives (flood) (ceci inclus la repetition de demande de troc (trade))"; + mes "4. Ne demandez pas d'items ou d'argent (les echanges doivent se faire de preference sur forums.themanaworld.org)"; + mes "5. Parlez anglais dans les salons de discussions publics (principalement en ville)"; + mes "6. Traitez les autres de la meme maniere que vous voudriez etre traite(e)"; + next; + mes "L'utilisation de \"bot\" sera determinee en parlant aux joueurs(ses) en train de bouger et/ou d'attaquer."; + next; + goto L_End; L_Spanish: - mes "Los jugadores que infringan las normas siguientes pueden ser censurados( incluso de forma permanente) o se podran resetear sus cuentas a la discrecion de los administradores:"; - mes "1. No abuse de otros jugadores (incluye insultos, palabras mal sonantes , y demas dirigidos a una o varias personas en particular)"; - mes "2. No utilizar programas automaticos ( se entiende por esto cualquier actividad realizada sin que el jugador este tocando el teclado fisicamente)"; - mes "3. No envie mensajes publicitarios o inunde el chat de mensajes (incluyendo los mensajes referidos al comercio en el juego)"; - mes "4. Esta prohibida cualquier forma de mendicidad"; - mes "5. Hable solamente en Ingles en el chat publico"; - mes "6. Trata a los demas de la misma manera que te gustaria ser tratado"; - next; - mes "El uso de programas automaticos se investigara hablando con jugadores que esten moviendose y/o atacando."; - next; - goto L_End; + mes "Los jugadores que infringan las normas siguientes pueden ser censurados( incluso de forma permanente) o se podran resetear sus cuentas a la discrecion de los administradores:"; + mes "1. No abuse de otros jugadores (incluye insultos, palabras mal sonantes , y demas dirigidos a una o varias personas en particular)"; + mes "2. No utilizar programas automaticos ( se entiende por esto cualquier actividad realizada sin que el jugador este tocando el teclado fisicamente)"; + mes "3. No envie mensajes publicitarios o inunde el chat de mensajes (incluyendo los mensajes referidos al comercio en el juego)"; + mes "4. Esta prohibida cualquier forma de mendicidad"; + mes "5. Hable solamente en Ingles en el chat publico"; + mes "6. Trata a los demas de la misma manera que te gustaria ser tratado"; + next; + mes "El uso de programas automaticos se investigara hablando con jugadores que esten moviendose y/o atacando."; + next; + goto L_End; L_Swedish: - mes "Spelare som bryter mot dessa regler riskerar att helt sonika bli utkastade (antingen under kort period eller permanent), den som kastats ut kan be en GM om att starta om sitt konto."; - mes "1. Skymfa inte andra (svordomar och annat riktat till att skada en eller flera individer)"; - mes "2. Inga bottar (med bottande avses ALLA aktiviteter som sker bortom tangentbordet)"; - mes "3. Inget spammande/floodande (inklusive meddelanden om byteshandel)"; - mes "4. Tigg inte"; - mes "5. Prata bara engelska i den offentliga chatten"; - mes "6. Behandla andra som du vill bli behandlad"; - next; - mes "Hysta misstankar om bottande kontrolleras genom att prata med spelaren under dess kringvandrande eller attackerande."; - next; - goto L_End; + mes "Spelare som bryter mot dessa regler riskerar att helt sonika bli utkastade (antingen under kort period eller permanent), den som kastats ut kan be en GM om att starta om sitt konto."; + mes "1. Skymfa inte andra (svordomar och annat riktat till att skada en eller flera individer)"; + mes "2. Inga bottar (med bottande avses ALLA aktiviteter som sker bortom tangentbordet)"; + mes "3. Inget spammande/floodande (inklusive meddelanden om byteshandel)"; + mes "4. Tigg inte"; + mes "5. Prata bara engelska i den offentliga chatten"; + mes "6. Behandla andra som du vill bli behandlad"; + next; + mes "Hysta misstankar om bottande kontrolleras genom att prata med spelaren under dess kringvandrande eller attackerande."; + next; + goto L_End; L_Portuguese: - mes "Jogadores que quebrarem as regras que se seguem serao banidos (temporariamente ou permanentemente), ou a possibilidade dos caracteres serem limpos a descricao do Mestre do Jogo (GM)."; - mes "1. Nao tratar mal os outros jogadores (isto, insultar, dizer palavroes ou chamar nomes a pessoas em particular, etc.)"; - mes "2. Proibido \"botting\", que quer dizer qualquer actividade do caracter enquanto o jogador estiver longe do teclado."; - mes "3. Nao abusar da caixa de texto com mensagens repetitivas, ou abusar da funcao de trocar com outros jogadores."; - mes "4. Pedintes serao ignorados, ou banidos."; - mes "5. Fale ingles em lugares publicos."; - mes "6. Trate os outros da mesma maneira que quer ser tratado(a)."; - next; - mes "O \"botting\" sera determinado, falando com os jogadores que se movem e/ou atacam."; - next; - goto L_End; + mes "Jogadores que quebrarem as regras que se seguem serao banidos (temporariamente ou permanentemente), ou a possibilidade dos caracteres serem limpos a descricao do Mestre do Jogo (GM)."; + mes "1. Nao tratar mal os outros jogadores (isto, insultar, dizer palavroes ou chamar nomes a pessoas em particular, etc.)"; + mes "2. Proibido \"botting\", que quer dizer qualquer actividade do caracter enquanto o jogador estiver longe do teclado."; + mes "3. Nao abusar da caixa de texto com mensagens repetitivas, ou abusar da funcao de trocar com outros jogadores."; + mes "4. Pedintes serao ignorados, ou banidos."; + mes "5. Fale ingles em lugares publicos."; + mes "6. Trate os outros da mesma maneira que quer ser tratado(a)."; + next; + mes "O \"botting\" sera determinado, falando com os jogadores que se movem e/ou atacam."; + next; + goto L_End; L_Polish: - mes "Konta graczy lamiacych nastepujace zasady moga zostac zablokowane (w niektorych przypadkach nawet nieodwolalnie) lub zresetowane przez GM:"; - mes "1. Nie wykorzystuj innych graczy (wymuszenia, przeklinanie, itp.)"; - mes "2. Zabrania sie korzystania z botow (przez boty rozumiemy kazda aktywnosc gdy gracz przebywa z dala od klawiatury)"; - mes "3. Zabrania sie spamowania / flodowania (wliczajac takze natarczywe oferty handlowe)"; - mes "4. Zabrania sie zebrania"; - mes "5. Na publicznym kanale rozmawiamy po angielsku"; - mes "6. Traktuj innych tak jak sam chcesz byc traktowany"; - next; - mes "Uzywanie botow zostanie okreslone na podstawie rozmow z innymi graczami podczas aktywnosci gracza."; - next; - goto L_End; + mes "Konta graczy lamiacych nastepujace zasady moga zostac zablokowane (w niektorych przypadkach nawet nieodwolalnie) lub zresetowane przez GM:"; + mes "1. Nie wykorzystuj innych graczy (wymuszenia, przeklinanie, itp.)"; + mes "2. Zabrania sie korzystania z botow (przez boty rozumiemy kazda aktywnosc gdy gracz przebywa z dala od klawiatury)"; + mes "3. Zabrania sie spamowania / flodowania (wliczajac takze natarczywe oferty handlowe)"; + mes "4. Zabrania sie zebrania"; + mes "5. Na publicznym kanale rozmawiamy po angielsku"; + mes "6. Traktuj innych tak jak sam chcesz byc traktowany"; + next; + mes "Uzywanie botow zostanie okreslone na podstawie rozmow z innymi graczami podczas aktywnosci gracza."; + next; + goto L_End; L_Italian: - mes "I giocatori che infrangeranno le seguenti regole saranno bannati (anche permanentemente) o saranno resettati, a discrezione dei Game Masters:"; - mes "1. Vietato abusare degli altri giocatori (insulti, imprecazioni e simili, diretti verso una particolare persona o gruppi di persone)"; - mes "2. Vietato usare bot (ossia effettuare QUALSIASI attività quando non si è presenti alla tastiera)"; - mes "3. Vietato spammare / postare ripetutamente messaggi inutili (incluso spam di richieste di scambio)"; - mes "4. Vietato implorare"; - mes "5. Parlare solo inglese nella chat pubblica"; - mes "6. Tratta gli altri giocatori come vuoi che gli altri trattino te."; - next; - mes "I bot saranno determinati in base alle risposte e ai movimenti dei giocatori esaminati."; - next; - goto L_End; + mes "I giocatori che infrangeranno le seguenti regole saranno bannati (anche permanentemente) o saranno resettati, a discrezione dei Game Masters:"; + mes "1. Vietato abusare degli altri giocatori (insulti, imprecazioni e simili, diretti verso una particolare persona o gruppi di persone)"; + mes "2. Vietato usare bot (ossia effettuare QUALSIASI attività quando non si è presenti alla tastiera)"; + mes "3. Vietato spammare / postare ripetutamente messaggi inutili (incluso spam di richieste di scambio)"; + mes "4. Vietato implorare"; + mes "5. Parlare solo inglese nella chat pubblica"; + mes "6. Tratta gli altri giocatori come vuoi che gli altri trattino te."; + next; + mes "I bot saranno determinati in base alle risposte e ai movimenti dei giocatori esaminati."; + next; + goto L_End; L_End: - set @read, 1; - if (TUT_var == 0) - set TUT_var, gettimetick(2); - return; + set @read, 1; + if (TUT_var == 0) + set TUT_var, gettimetick(2); + return; } diff --git a/world/map/npc/functions/inn.txt b/world/map/npc/functions/inn.txt index 810dbd1d..b778669f 100644 --- a/world/map/npc/functions/inn.txt +++ b/world/map/npc/functions/inn.txt @@ -1,29 +1,29 @@ // INN -function script Inn { - mes "[" + @npcname$ + "]"; - mes "\"Would you like to rest? It's only " + @cost + " gp.\""; - next; - - menu - "Yes", -, - "No", L_No; - - if (zeny < @cost) goto L_NoMoney; - set zeny, zeny - @cost; - heal 10000, 10000; +function|script|Inn|{ + mes "[" + @npcname$ + "]"; + mes "\"Would you like to rest? It's only " + @cost + " gp.\""; + next; + menu + "Yes", -, + "No", L_No; + + if (zeny < @cost) + goto L_NoMoney; + set zeny, zeny - @cost; + heal 10000, 10000; + + mes "[" + @npcname$ + "]"; + mes "\"Sleep well!\""; + close; - mes "[" + @npcname$ + "]"; - mes "\"Sleep well!\""; - close; - L_No: - mes "[" + @npcname$ + "]"; - mes "\"See you.\""; - close; - + mes "[" + @npcname$ + "]"; + mes "\"See you.\""; + close; + L_NoMoney: - mes "[" + @npcname$ + "]"; - mes "\"You don't have enough money to stay here.\""; - close; + mes "[" + @npcname$ + "]"; + mes "\"You don't have enough money to stay here.\""; + close; } diff --git a/world/map/npc/functions/magic.txt b/world/map/npc/functions/magic.txt index c4abcab6..bbd242c8 100644 --- a/world/map/npc/functions/magic.txt +++ b/world/map/npc/functions/magic.txt @@ -10,27 +10,27 @@ // ------------------------------------------------------------ // Gain initial magic skill // ------------------------------------------------------------ -function script MagicGainBasic { +function|script|MagicGainBasic|{ - set MAGIC_FLAGS, MAGIC_FLAGS | MFLAG_DRANK_POTION; - close; + set MAGIC_FLAGS, MAGIC_FLAGS | MFLAG_DRANK_POTION; + close; } // ------------------------------------------------------------ // Initialise Menu for selecting a choice of things to ask about // ------------------------------------------------------------ -function script MagicTalkOptionsSetup { - set @QQ_ELANORE, 1; - set @QQ_MANASEED, 2; - set @QQ_MANAPOTION, 4; - set @QQ_WYARA, 8; - set @QQ_SAGATHA, 16; - set @QQ_AULDSBEL, 32; - set @QQ_IMP, 64; - set @QQ_OLDWIZ, 128; - set @QQ_ASTRALSOUL, 256; - return; +function|script|MagicTalkOptionsSetup|{ + set @QQ_ELANORE, 1; + set @QQ_MANASEED, 2; + set @QQ_MANAPOTION, 4; + set @QQ_WYARA, 8; + set @QQ_SAGATHA, 16; + set @QQ_AULDSBEL, 32; + set @QQ_IMP, 64; + set @QQ_OLDWIZ, 128; + set @QQ_ASTRALSOUL, 256; + return; } // ------------------------------------------------------------ @@ -40,114 +40,115 @@ function script MagicTalkOptionsSetup { // ------------------------------------------------------------ -function script MagicTalkMenu { - setarray @choice$, "", "", "", "", "", "", "", "", "", ""; - set @choices_nr, 0; - setarray @choice_idx, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0; +function|script|MagicTalkMenu|{ + setarray @choice$, "", "", "", "", "", "", "", "", "", ""; + set @choices_nr, 0; + setarray @choice_idx, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0; + + if (@ignore & @QQ_ELANORE) + goto L_Q_post_elanore; + set @choice$[@choices_nr], "...Elanore the Healer?"; + set @choice_idx[@choices_nr], @QQ_ELANORE; + set @choices_nr, @choices_nr + 1; - if (@ignore & @QQ_ELANORE) - goto L_Q_post_elanore; - set @choice$[@choices_nr], "...Elanore the Healer?"; - set @choice_idx[@choices_nr], @QQ_ELANORE; - set @choices_nr, @choices_nr + 1; L_Q_post_elanore: + if (@ignore == @QQ_MANASEED) + goto L_Q_post_manaseed; + if (!(MAGIC_FLAGS & (MFLAG_KNOWS_MANASEED | MFLAG_MANASEED_RUMOUR))) + goto L_Q_post_manaseed; + set @choice$[@choices_nr], "...the Mana Seed?"; + set @choice_idx[@choices_nr], @QQ_MANASEED; + set @choices_nr, @choices_nr + 1; - if (@ignore == @QQ_MANASEED) - goto L_Q_post_manaseed; - if (!(MAGIC_FLAGS & (MFLAG_KNOWS_MANASEED | MFLAG_MANASEED_RUMOUR))) - goto L_Q_post_manaseed; - set @choice$[@choices_nr], "...the Mana Seed?"; - set @choice_idx[@choices_nr], @QQ_MANASEED; - set @choices_nr, @choices_nr + 1; L_Q_post_manaseed: + if (@ignore & @QQ_MANAPOTION) + goto L_Q_post_manapotion; + if (!(MAGIC_FLAGS & MFLAG_KNOWS_MANAPOTION)) + goto L_Q_post_manapotion; + set @choice$[@choices_nr], "...Mana Potions?"; + set @choice_idx[@choices_nr], @QQ_MANAPOTION; + set @choices_nr, @choices_nr + 1; - if (@ignore & @QQ_MANAPOTION) - goto L_Q_post_manapotion; - if (!(MAGIC_FLAGS & MFLAG_KNOWS_MANAPOTION)) - goto L_Q_post_manapotion; - set @choice$[@choices_nr], "...Mana Potions?"; - set @choice_idx[@choices_nr], @QQ_MANAPOTION; - set @choices_nr, @choices_nr + 1; L_Q_post_manapotion: + if (@ignore & @QQ_WYARA) + goto L_Q_post_wyara; + if (!(MAGIC_FLAGS & MFLAG_KNOWS_WYARA)) + goto L_Q_post_wyara; + set @choice$[@choices_nr], "...Wyara the Witch?"; + set @choice_idx[@choices_nr], @QQ_WYARA; + set @choices_nr, @choices_nr + 1; - if (@ignore & @QQ_WYARA) - goto L_Q_post_wyara; - if (!(MAGIC_FLAGS & MFLAG_KNOWS_WYARA)) - goto L_Q_post_wyara; - set @choice$[@choices_nr], "...Wyara the Witch?"; - set @choice_idx[@choices_nr], @QQ_WYARA; - set @choices_nr, @choices_nr + 1; L_Q_post_wyara: + if (@ignore & @QQ_SAGATHA) + goto L_Q_post_sagatha; + if (!(MAGIC_FLAGS & MFLAG_KNOWS_SAGATHA)) + goto L_Q_post_sagatha; + set @choice$[@choices_nr], "...Sagatha the Witch?"; + set @choice_idx[@choices_nr], @QQ_SAGATHA; + set @choices_nr, @choices_nr + 1; - if (@ignore & @QQ_SAGATHA) - goto L_Q_post_sagatha; - if (!(MAGIC_FLAGS & MFLAG_KNOWS_SAGATHA)) - goto L_Q_post_sagatha; - set @choice$[@choices_nr], "...Sagatha the Witch?"; - set @choice_idx[@choices_nr], @QQ_SAGATHA; - set @choices_nr, @choices_nr + 1; L_Q_post_sagatha: + if (@ignore & @QQ_AULDSBEL) + goto L_Q_post_auldsbel; + if (!(MAGIC_FLAGS & MFLAG_KNOWS_AULDSBEL)) + goto L_Q_post_auldsbel; + set @choice$[@choices_nr], "...Auldsbel the Wizard?"; + set @choice_idx[@choices_nr], @QQ_AULDSBEL; + set @choices_nr, @choices_nr + 1; - if (@ignore & @QQ_AULDSBEL) - goto L_Q_post_auldsbel; - if (!(MAGIC_FLAGS & MFLAG_KNOWS_AULDSBEL)) - goto L_Q_post_auldsbel; - set @choice$[@choices_nr], "...Auldsbel the Wizard?"; - set @choice_idx[@choices_nr], @QQ_AULDSBEL; - set @choices_nr, @choices_nr + 1; L_Q_post_auldsbel: + if (@ignore & @QQ_OLDWIZ) + goto L_Q_post_oldwiz; + if (!(MAGIC_FLAGS & MFLAG_KNOWS_OLD_WIZARD)) + goto L_Q_post_oldwiz; + set @choice$[@choices_nr], "...the Old Wizard?"; + set @choice_idx[@choices_nr], @QQ_OLDWIZ; + set @choices_nr, @choices_nr + 1; - if (@ignore & @QQ_OLDWIZ) - goto L_Q_post_oldwiz; - if (!(MAGIC_FLAGS & MFLAG_KNOWS_OLD_WIZARD)) - goto L_Q_post_oldwiz; - set @choice$[@choices_nr], "...the Old Wizard?"; - set @choice_idx[@choices_nr], @QQ_OLDWIZ; - set @choices_nr, @choices_nr + 1; L_Q_post_oldwiz: + if (@ignore & @QQ_IMP) + goto L_Q_post_imp; + if (!(MAGIC_FLAGS & MFLAG_KNOWS_IMP)) + goto L_Q_post_imp; + set @choice$[@choices_nr], "...the Earth Spirit in the desert well?"; + set @choice_idx[@choices_nr], @QQ_IMP; + set @choices_nr, @choices_nr + 1; - if (@ignore & @QQ_IMP) - goto L_Q_post_imp; - if (!(MAGIC_FLAGS & MFLAG_KNOWS_IMP)) - goto L_Q_post_imp; - set @choice$[@choices_nr], "...the Earth Spirit in the desert well?"; - set @choice_idx[@choices_nr], @QQ_IMP; - set @choices_nr, @choices_nr + 1; L_Q_post_imp: + if (@ignore & @QQ_ASTRALSOUL) + goto L_Q_post_astralsoul; + if (!(getskilllv(SKILL_MAGIC))) + goto L_Q_post_astralsoul; + if (!(getskilllv(SKILL_POOL))) + goto L_Q_post_astralsoul; + set @choice$[@choices_nr], "...ways to improve my magic?"; + set @choice_idx[@choices_nr], @QQ_ASTRALSOUL; + set @choices_nr, @choices_nr + 1; - if (@ignore & @QQ_ASTRALSOUL) - goto L_Q_post_astralsoul; - if (!(getskilllv(SKILL_MAGIC))) - goto L_Q_post_astralsoul; - if (!(getskilllv(SKILL_POOL))) - goto L_Q_post_astralsoul; - set @choice$[@choices_nr], "...ways to improve my magic?"; - set @choice_idx[@choices_nr], @QQ_ASTRALSOUL; - set @choices_nr, @choices_nr + 1; L_Q_post_astralsoul: - - set @choice$[@choices_nr], "...never mind."; - set @choice_idx[@choices_nr], 0; - set @choices_nr, @choices_nr + 1; - - menu @choice$[0], -, - @choice$[1], -, - @choice$[2], -, - @choice$[3], -, - @choice$[4], -, - @choice$[5], -, - @choice$[6], -, - @choice$[7], -, - @choice$[8], -, - @choice$[9], -; - - set @menu, @menu - 1; - - if (@menu >= @choices_nr) - set @menu, 0; - - set @c, @choice_idx[@menu]; - return; + set @choice$[@choices_nr], "...never mind."; + set @choice_idx[@choices_nr], 0; + set @choices_nr, @choices_nr + 1; + + menu + @choice$[0], -, + @choice$[1], -, + @choice$[2], -, + @choice$[3], -, + @choice$[4], -, + @choice$[5], -, + @choice$[6], -, + @choice$[7], -, + @choice$[8], -, + @choice$[9], -; + + set @menu, @menu - 1; + + if (@menu >= @choices_nr) + set @menu, 0; + + set @c, @choice_idx[@menu]; + return; } @@ -158,19 +159,19 @@ L_Q_post_astralsoul: // @SUP_name$ name of the skill to level up // @SUP_xp # of experience points to award if the level up succeeds // ------------------------------------------------------------ -function script SkillUp { - if (getskilllv(@SUP_id) >= @SUP_lvl) - goto L_shortcut; - - misceffect sfx_skillup, strcharinfo(0); - setskill @SUP_id, @SUP_lvl; - getexp @SUP_xp, 0; - if (@SUP_xp) - mes "[" + @SUP_xp + " experience points]"; - mes "[Level " + @SUP_lvl + " in " + @SUP_name$ + "]"; - return; +function|script|SkillUp|{ + if (getskilllv(@SUP_id) >= @SUP_lvl) + goto L_shortcut; + + misceffect sfx_skillup, strcharinfo(0); + setskill @SUP_id, @SUP_lvl; + getexp @SUP_xp, 0; + if (@SUP_xp) + mes "[" + @SUP_xp + " experience points]"; + mes "[Level " + @SUP_lvl + " in " + @SUP_name$ + "]"; + return; L_shortcut: - mes "[You already have level " + getskilllv(@SUP_id) + " in " + @SUP_name$ + "]"; - return; + mes "[You already have level " + getskilllv(@SUP_id) + " in " + @SUP_name$ + "]"; + return; } diff --git a/world/map/npc/functions/mob_points.txt b/world/map/npc/functions/mob_points.txt index a84e24a5..c37bdd25 100644 --- a/world/map/npc/functions/mob_points.txt +++ b/world/map/npc/functions/mob_points.txt @@ -1,126 +1,131 @@ // Mob points -function script MobPoints { - if (@mobID < 1002) return; +function|script|MobPoints|{ + if (@mobID < 1002) return; - setarray @points, - 1, // Maggot - 2, // Scorpion - 20, // Red Scorpion - 40, // Green Slime - 30, // Giant Maggot - 15, // Yellow Slime - 25, // Red Slime - 45, // Black Scorpion - 50, // Snake - 6, // Fire Goblin - 55, // Spider - 35, // Evil Mushroom - 35, // Pink Flower - 40, // Santa Slime - 15, // Rudolph Slime - 2, // Bat - 16, // Pinkie - 10, // Spiky Mushroom - 14, // Fluffy - 25, // Cave Snake - 200, // Jack O - 85, // Fire Skull - 85, // Poison Skull - 20, // Log Head - 70, // Mountain Snake - 15, // Easter Fluffy - 40, // Mouboo - 0, // Mauve Plant - 0, // Cobalt Plant - 0, // Gamboge Plant - 0, // Alizarin Plant - 20, // Sea Slime - 75, // Grass Snake - 0, // Silk Worm - 125, // Zombie - 0, // Clover Patch - 5, // Squirrel - 0, // Fire Lizard - 80, // Wisp - 15, // Snail - 80, // Spectre - 100, // Skeleton - 100, // Lady Skeleton - 150, // Fallen - 0, // Snake Lord - 80, // Poltergeist - 0, // Duck - 15, // Bee - 0, // Larvespa - 0, // Vespa - 0, // Hivespa - 0, // Froad - 0, // Troll - 15, // Butterfly - 2, // Cave Maggot - 10, // Angry Scorpion - 6, // Ice Goblin - 20, // Archant - 40, // Giant Cave Maggot - 35, // Moggun - 100, // Terranite - 10, // Pumpkin - 10, // Bandit - 20, // Bandit Lord - 30, // Vampire Bat - 20, // Reaper - 100, // Reaper 2 - 100, // Scythe - 20, // Ball Lightning - 60, // Ice Element - 80, // Yeti - 100, // The Lost - 0, // Red Bone - 0, // Stalker - 0, // Dreadwing - 100, // Drunken Skeleton - 100, // Tipsy Skeleton - 100, // Drunken Lady Skeleton - 60, // BlueSpark - 60, // RedSpark - 0, // Serqet - // Add more here - 0; // END + setarray @points, + 1, // Maggot + 2, // Scorpion + 20, // Red Scorpion + 40, // Green Slime + 30, // Giant Maggot + 15, // Yellow Slime + 25, // Red Slime + 45, // Black Scorpion + 50, // Snake + 6, // Fire Goblin + 55, // Spider + 35, // Evil Mushroom + 35, // Pink Flower + 40, // Santa Slime + 15, // Rudolph Slime + 2, // Bat + 16, // Pinkie + 10, // Spiky Mushroom + 14, // Fluffy + 25, // Cave Snake + 200, // Jack O + 85, // Fire Skull + 85, // Poison Skull + 20, // Log Head + 70, // Mountain Snake + 15, // Easter Fluffy + 40, // Mouboo + 0, // Mauve Plant + 0, // Cobalt Plant + 0, // Gamboge Plant + 0, // Alizarin Plant + 20, // Sea Slime + 75, // Grass Snake + 0, // Silk Worm + 125, // Zombie + 0, // Clover Patch + 5, // Squirrel + 0, // Fire Lizard + 80, // Wisp + 15, // Snail + 80, // Spectre + 100, // Skeleton + 100, // Lady Skeleton + 150, // Fallen + 0, // Snake Lord + 80, // Poltergeist + 0, // Duck + 15, // Bee + 0, // Larvespa + 0, // Vespa + 0, // Hivespa + 0, // Froad + 0, // Troll + 15, // Butterfly + 2, // Cave Maggot + 10, // Angry Scorpion + 6, // Ice Goblin + 20, // Archant + 40, // Giant Cave Maggot + 35, // Moggun + 100, // Terranite + 10, // Pumpkin + 10, // Bandit + 20, // Bandit Lord + 30, // Vampire Bat + 20, // Reaper + 100, // Reaper 2 + 100, // Scythe + 20, // Ball Lightning + 60, // Ice Element + 80, // Yeti + 100, // The Lost + 0, // Red Bone + 0, // Stalker + 0, // Dreadwing + 100, // Drunken Skeleton + 100, // Tipsy Skeleton + 100, // Drunken Lady Skeleton + 60, // BlueSpark + 60, // RedSpark + 0, // Serqet + // Add more here + 0; // END - if (MPQUEST == 1) set Mobpt, Mobpt + @points[@mobID - 1002]; + if (MPQUEST == 1) + set Mobpt, Mobpt + @points[@mobID - 1002]; // Scorpion, Red Scorpion, Black Scorpion, Angry Scorpion - if ((@mobID == 1003) || (@mobID == 1004) || (@mobID == 1008) || (@mobID == 1057)) - goto L_good; + if ((@mobID == 1003) + || (@mobID == 1004) + || (@mobID == 1008) + || (@mobID == 1057)) + goto L_good; - // Attitude adjustment for the witch (can we refactor this to another function? Not sure about max. recursion depth) + // Attitude adjustment for the witch (can we refactor this to another function? Not sure about max. recursion depth) - set @value, 0; + set @value, 0; // Fluffy - if (@mobID == 1020) - set @value, 3; + if (@mobID == 1020) + set @value, 3; // Easter Fluffy - if (@mobID == 1027) - set @value, 3; + if (@mobID == 1027) + set @value, 3; // Mouboo - if (@mobID == 1028) - set @value, 4; + if (@mobID == 1028) + set @value, 4; // Squirrel - if (@mobID == 1038) - set @value, 2; + if (@mobID == 1038) + set @value, 2; - if (@value == 0) - goto L_end; + if (@value == 0) + goto L_end; - callfunc "QuestSagathaAnnoy"; - goto L_end; + callfunc "QuestSagathaAnnoy"; + goto L_end; L_good: - set @value, 1; - callfunc "QuestSagathaHappy"; + set @value, 1; + callfunc "QuestSagathaHappy"; + L_end: - set @value, 0; + set @value, 0; } diff --git a/world/map/npc/functions/process_equip.txt b/world/map/npc/functions/process_equip.txt index 6a56dcbc..b8da56e8 100644 --- a/world/map/npc/functions/process_equip.txt +++ b/world/map/npc/functions/process_equip.txt @@ -1,27 +1,27 @@ // -function script ProcessEquip { - set @head, getequipid(equip_head); - set @torso, getequipid(equip_torso); - set @legs, getequipid(equip_legs); +function|script|ProcessEquip|{ + set @head, getequipid(equip_head); + set @torso, getequipid(equip_torso); + set @legs, getequipid(equip_legs); - set @torsoB, @torso; - if (@torsoB >= 2050 && @torsoB <= 2059) set @torsoB, 1202; // Cotton shirt - if (@torsoB >= 2060 && @torsoB <= 2069) set @torsoB, 624; // V Neck - if (@torsoB >= 2070 && @torsoB <= 2079) set @torsoB, 564; // T Neck - if (@torsoB >= 2080 && @torsoB <= 2089) set @torsoB, 720; // Silk Robe - if (@torsoB >= 2090 && @torsoB <= 2099) set @torsoB, 688; // Tanktop - if (@torsoB >= 2120 && @torsoB <= 2129) set @torsoB, 689; // Short tanktop - set @torsoC, cNone; - if (@torso == 1202 || @torso == 624 || @torso == 564 || @torso == 688 || @torso == 689 || @torso == 720) set @torsoC, cWhite; - if (@torso >= 2050) set @torsoC, @torso % 10; + set @torsoB, @torso; + if (@torsoB >= 2050 && @torsoB <= 2059) set @torsoB, 1202; // Cotton shirt + if (@torsoB >= 2060 && @torsoB <= 2069) set @torsoB, 624; // V Neck + if (@torsoB >= 2070 && @torsoB <= 2079) set @torsoB, 564; // T Neck + if (@torsoB >= 2080 && @torsoB <= 2089) set @torsoB, 720; // Silk Robe + if (@torsoB >= 2090 && @torsoB <= 2099) set @torsoB, 688; // Tanktop + if (@torsoB >= 2120 && @torsoB <= 2129) set @torsoB, 689; // Short tanktop + set @torsoC, cNone; + if (@torso == 1202 || @torso == 624 || @torso == 564 || @torso == 688 || @torso == 689 || @torso == 720) set @torsoC, cWhite; + if (@torso >= 2050) set @torsoC, @torso % 10; - set @legsB, @legs; - if (@legsB >= 2100 && @legsB <= 2109) set @legsB, 632; // Cotton skirt - if (@legsB >= 2110 && @legsB <= 2119) set @legsB, 586; // Cotton shorts - set @legsC, cNone; - if (@legs == 632 || @legs == 586) set @legsC, cWhite; - if (@legs >= 2050) set @legsC, @legs % 10; + set @legsB, @legs; + if (@legsB >= 2100 && @legsB <= 2109) set @legsB, 632; // Cotton skirt + if (@legsB >= 2110 && @legsB <= 2119) set @legsB, 586; // Cotton shorts + set @legsC, cNone; + if (@legs == 632 || @legs == 586) set @legsC, cWhite; + if (@legs >= 2050) set @legsC, @legs % 10; - return; + return; } diff --git a/world/map/npc/functions/slot_machine.txt b/world/map/npc/functions/slot_machine.txt index 8f4482cc..a8ab7224 100644 --- a/world/map/npc/functions/slot_machine.txt +++ b/world/map/npc/functions/slot_machine.txt @@ -1,35 +1,39 @@ // -function script SlotMachine { - mes "Pull the lever..."; - next; - menu - "Pull", L_Play, - "Maybe later", -; - close; +function|script|SlotMachine|{ + mes "Pull the lever..."; + next; + menu + "Pull", L_Play, + "Maybe later", -; + close; L_Play: - if(countitem("CasinoCoins") < 1) goto L_NoCoin; - delitem "CasinoCoins", 1; - set @Temp1,rand(7); - set @Temp2,rand(7); - set @Temp3,rand(7); - mes "Numbers: " + @Temp1 + "/" + @Temp2 + "/" + @Temp3 + "."; - next; - - if(@Temp1 != @Temp2) goto L_Lost; - if(@Temp2 != @Temp3) goto L_Lost; - if(@Temp1 != @Temp3) goto L_Lost; - mes "Congratulations! You won!"; - mes "You get 10 casino coins"; - getitem "CasinoCoins", 10; - close; - + if(countitem("CasinoCoins") < 1) + goto L_NoCoin; + delitem "CasinoCoins", 1; + set @Temp1,rand(7); + set @Temp2,rand(7); + set @Temp3,rand(7); + mes "Numbers: " + @Temp1 + "/" + @Temp2 + "/" + @Temp3 + "."; + next; + + if(@Temp1 != @Temp2) + goto L_Lost; + if(@Temp2 != @Temp3) + goto L_Lost; + if(@Temp1 != @Temp3) + goto L_Lost; + mes "Congratulations! You won!"; + mes "You get 10 casino coins"; + getitem "CasinoCoins", 10; + close; + L_Lost: - mes "You lost!"; - close; - + mes "You lost!"; + close; + L_NoCoin: - mes "Insert coin"; - close; + mes "Insert coin"; + close; } diff --git a/world/map/npc/functions/soul_menhir.txt b/world/map/npc/functions/soul_menhir.txt index a98681c6..607a737e 100644 --- a/world/map/npc/functions/soul_menhir.txt +++ b/world/map/npc/functions/soul_menhir.txt @@ -1,47 +1,49 @@ -function script SoulMenhir { - mes "[Soul Menhir]"; - mes "(A mystical aura surrounds this stone. You feel mysteriously attracted to it. Something tells you to touch it. What do you do?)"; - next; +function|script|SoulMenhir|{ + mes "[Soul Menhir]"; + mes "(A mystical aura surrounds this stone. You feel mysteriously attracted to it. Something tells you to touch it. What do you do?)"; + next; - menu - "Touch it", -, - "Leave it alone", L_Return; + menu + "Touch it", -, + "Leave it alone", L_Return; - if (Menhir_Activated == 1) goto L_Shortversion; + if (Menhir_Activated == 1) + goto L_Shortversion; - mes "[Soul Menhir]"; - mes "(You touch the mysteriouse stone. Somehow it feels warm and cold at the same time.)"; - next; + mes "[Soul Menhir]"; + mes "(You touch the mysteriouse stone. Somehow it feels warm and cold at the same time.)"; + next; - mes "[Soul Menhir]"; - mes "(Suddenly a strange sensation flows through you. It feels like your soul leaves your body and becomes one with the stone.)"; - next; + mes "[Soul Menhir]"; + mes "(Suddenly a strange sensation flows through you. It feels like your soul leaves your body and becomes one with the stone.)"; + next; - mes "[Soul Menhir]"; - mes "(As suddenly as the feeling started it stops. The strange attraction is away from one moment to the next and the menhir feels like just an ordinary stone.)"; - next; + mes "[Soul Menhir]"; + mes "(As suddenly as the feeling started it stops. The strange attraction is away from one moment to the next and the menhir feels like just an ordinary stone.)"; + next; - set Menhir_Activated, 1; - goto L_Save; + set Menhir_Activated, 1; + goto L_Save; L_Shortversion: - mes "[Soul Menhir]"; - mes "(A strange sensation flows through you. It feels like your soul leaves your body and becomes one with the stone. as suddenly as the feeling started it stops.)"; - next; + mes "[Soul Menhir]"; + mes "(A strange sensation flows through you. It feels like your soul leaves your body and becomes one with the stone. as suddenly as the feeling started it stops.)"; + next; L_Save: - if (@x == 0 && @y == 0) goto L_FindPoint; + if (@x == 0 && @y == 0) + goto L_FindPoint; L_Do_Save: - savepoint @map$, @x, @y; - goto L_Return; + savepoint @map$, @x, @y; + goto L_Return; L_FindPoint: - set @n, rand(getarraysize(@Xs)); - set @x, @Xs[@n]; - set @y, @Ys[@n]; - goto L_Do_Save; + set @n, rand(getarraysize(@Xs)); + set @x, @Xs[@n]; + set @y, @Ys[@n]; + goto L_Do_Save; L_Return: - return; + return; } diff --git a/world/map/npc/functions/strangerquiz.txt b/world/map/npc/functions/strangerquiz.txt index 28fc6887..4901ca81 100644 --- a/world/map/npc/functions/strangerquiz.txt +++ b/world/map/npc/functions/strangerquiz.txt @@ -1,7 +1,7 @@ -function script StrangerQuiz { - // param @quizparam$$ - // return in @quizanswer$ - set @quizanswer$, getspellinvocation(@quizparam$); - return; -} +function|script|StrangerQuiz|{ + // param @quizparam$$ + // return in @quizanswer$ + set @quizanswer$, getspellinvocation(@quizparam$); + return; +}
\ No newline at end of file diff --git a/world/map/npc/functions/water_bottle.txt b/world/map/npc/functions/water_bottle.txt index c2d9a1e0..02dc35b2 100644 --- a/world/map/npc/functions/water_bottle.txt +++ b/world/map/npc/functions/water_bottle.txt @@ -1,34 +1,40 @@ // Fills empty bottles with water -function script WaterBottle { - set @COST_PER_BOTTLE, 150; - - mes "How many empty bottles do you want to fill with water? It costs " + @COST_PER_BOTTLE + "gp per bottle."; - input @count; - - if (@count == 0) close; - set @cost, @count * @COST_PER_BOTTLE; - set @empty, countitem("EmptyBottle"); - - if (@empty < @count) goto L_NotEnoughBottles; - if (zeny < @cost) goto L_NotEnoughMoney; - getinventorylist; - if (@inventorylist_count == 100 && countitem("BottleOfWater") == 0 && @empty > @count) goto L_NotEnoughSlots; - - set zeny, zeny - @cost; - delitem "EmptyBottle", @count; - getitem "BottleOfWater", @count; - close; +function|script|WaterBottle|{ + set @COST_PER_BOTTLE, 150; + + mes "How many empty bottles do you want to fill with water? It costs " + @COST_PER_BOTTLE + "gp per bottle."; + input @count; + + if (@count == 0) + close; + set @cost, @count * @COST_PER_BOTTLE; + set @empty, countitem("EmptyBottle"); + + if (@empty < @count) + goto L_NotEnoughBottles; + if (zeny < @cost) + goto L_NotEnoughMoney; + getinventorylist; + if (@inventorylist_count == 100 + && countitem("BottleOfWater") == 0 + && @empty > @count) + goto L_NotEnoughSlots; + + set zeny, zeny - @cost; + delitem "EmptyBottle", @count; + getitem "BottleOfWater", @count; + close; L_NotEnoughBottles: - mes "You don't have that many empty bottles!"; - close; + mes "You don't have that many empty bottles!"; + close; L_NotEnoughMoney: - mes "You don't have enough gp! You need " + @cost + "gp."; - close; + mes "You don't have enough gp! You need " + @cost + "gp."; + close; L_NotEnoughSlots: - mes "You don't have room for these bottles!"; - close; -} + mes "You don't have room for these bottles!"; + close; +} 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; } |