diff options
author | Jesusaves <cpntb1@ymail.com> | 2020-02-25 22:31:17 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2020-02-25 22:31:17 -0300 |
commit | e55b349d9e3c89369e70326db8c8ef8b49758ef5 (patch) | |
tree | 2f038b12d46d62db1fa4f702324421451e52a6d3 /npc/018-1/george.txt | |
parent | 1b2a1f299552a0a02d8c748fb87e67ce7346e0c0 (diff) | |
download | serverdata-e55b349d9e3c89369e70326db8c8ef8b49758ef5.tar.gz serverdata-e55b349d9e3c89369e70326db8c8ef8b49758ef5.tar.bz2 serverdata-e55b349d9e3c89369e70326db8c8ef8b49758ef5.tar.xz serverdata-e55b349d9e3c89369e70326db8c8ef8b49758ef5.zip |
Notes on Lua + Refactor how and when you learn about shovels and maps.
Digging treasures is now entirely optional, and George can sell you a shovel.
Diffstat (limited to 'npc/018-1/george.txt')
-rw-r--r-- | npc/018-1/george.txt | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/npc/018-1/george.txt b/npc/018-1/george.txt index 004d6a3dd..63b0f0b4f 100644 --- a/npc/018-1/george.txt +++ b/npc/018-1/george.txt @@ -48,6 +48,7 @@ L_Main: rif(.@q == 2, l("About the items you asked me to collect...")), L_ProgressOne, rif(.@q == 3 && 0, l("Do you need any more help?")), L_RequestTwo, rif(.@q == 4 && 0, l("About the items you asked me to collect...")), L_ProgressTwo, + rif(.@showShovel, l("Could you sell me a treasure map and a shovel?")), L_Shop, l("Nothing I guess"), L_Close; // Context menu @@ -61,6 +62,7 @@ L_Explain: mesn l("George the Pirate"); mesq l("It is a pirate treasure hideout, yarr arr! If you have a @@ and a @@, you may get luck, yarr!", getitemlink(PirateTreasureMap), getitemlink(IronShovel)); next; + .@showShovel=true; goto L_Main; @@ -163,6 +165,32 @@ L_NotEnoughTwo: mesq l("Remember, I need 100 @@, 50 @@, and something interesting to read.", getitemlink(WarlordPlate), getitemlink(CorsairHat)); goto L_Close; +L_Shop: + mesn; + mesq l("Arr ha ha ha arr!"); + next; + mesn; + mesq l("If I had a map, I would be digging the treasures, not selling it, arr!"); + next; + mesn; + .@price=getiteminfo(IronShovel, ITEMINFO_SELLPRICE); + mesq l("But I can sell ya a %s for %d GP. Interested?", getitemlink(IronShovel), .@price); + if (Zeny < .@price) { + mesc l("You do not have enough money."); + next; + goto L_Menu; + } + if (askyesno() == ASK_YES) { + inventoryplace IronShovel, 1; + Zeny-=.@price; + getitem IronShovel, 1; + mesn; + mesq l("Arr! Here you go, matey!"); + next; + } + .@showShovel=false; + goto L_Menu; + L_Close: sailortalk; closedialog; |