diff options
author | jesusalva <cpntb1@ymail.com> | 2018-02-27 00:25:01 -0300 |
---|---|---|
committer | jesusalva <cpntb1@ymail.com> | 2018-02-27 00:25:01 -0300 |
commit | f428e6a888e5940b2f01a82a3b347bb58058c937 (patch) | |
tree | ce8bc2b393c68a385e8339ec5553eb84de2dceb2 | |
parent | fce8f5fba72e508fb6b8bd9fc8956806c23c3d13 (diff) | |
download | serverdata-f428e6a888e5940b2f01a82a3b347bb58058c937.tar.gz serverdata-f428e6a888e5940b2f01a82a3b347bb58058c937.tar.bz2 serverdata-f428e6a888e5940b2f01a82a3b347bb58058c937.tar.xz serverdata-f428e6a888e5940b2f01a82a3b347bb58058c937.zip |
NPC GM Event Item Trader
-rw-r--r-- | db/re/item_db.conf | 4 | ||||
-rw-r--r-- | npc/001-1/_import.txt | 1 | ||||
-rw-r--r-- | npc/001-1/portal.txt | 6 | ||||
-rw-r--r-- | npc/001-1/rewards.txt | 54 |
4 files changed, 63 insertions, 2 deletions
diff --git a/db/re/item_db.conf b/db/re/item_db.conf index a2ded9059..fc6840eba 100644 --- a/db/re/item_db.conf +++ b/db/re/item_db.conf @@ -6109,8 +6109,8 @@ item_db: ( Name: "Strange Coin" Type: "IT_ETC" Buy: 100000 - Sell: 10000 - Weight: 3 + Sell: 100 + Weight: 0 Atk: 0 Matk: 0 Def: 0 diff --git a/npc/001-1/_import.txt b/npc/001-1/_import.txt index aba3f649d..87e80b62a 100644 --- a/npc/001-1/_import.txt +++ b/npc/001-1/_import.txt @@ -2,3 +2,4 @@ // This file is generated automatically. All manually added changes will be removed when running the Converter. "npc/001-1/mapflags.txt", "npc/001-1/portal.txt", +"npc/001-1/rewards.txt", diff --git a/npc/001-1/portal.txt b/npc/001-1/portal.txt index 5c98e3f1a..72c0d7eda 100644 --- a/npc/001-1/portal.txt +++ b/npc/001-1/portal.txt @@ -1,3 +1,9 @@ +// TMW2 Script +// Author: +// Jesusalva +// Description: +// Manages warps at Aeros + 001-1,235,25,0 script Soul Menhir NPC_HIDDEN,1,0,{ OnTouch: diff --git a/npc/001-1/rewards.txt b/npc/001-1/rewards.txt new file mode 100644 index 000000000..915c58f7d --- /dev/null +++ b/npc/001-1/rewards.txt @@ -0,0 +1,54 @@ +// TMW2 Script +// Author: +// Jesusalva +// Description: +// Trades Strange Coins for useful items + +001-1,243,26,0 script Aeros Trader NPC_M_SHOPKEEPER,0,0,{ + mesn; + mesq l("Oh, hello there! Welcome to the Mana Plain Of Existence!"); + next; + mesn; + mesq l("In this wonderful realm, you can find and earn many @@, our currency!", getitemlink(StrangeCoin)); + next; + mesn; + mesq l("You can then trade these coins for items with me!"); + next; + openshop; + close; + +OnInit: + .@npcId = getnpcid(0, .name$); + setunitdata(.@npcId, UDT_HEADTOP, 2935); + setunitdata(.@npcId, UDT_HEADMIDDLE, 1329); + setunitdata(.@npcId, UDT_WEAPON, 2204); + setunitdata(.@npcId, UDT_HEADBOTTOM, 1801); + setunitdata(.@npcId, UDT_HAIRSTYLE, 25); + setunitdata(.@npcId, UDT_HAIRCOLOR, 4); + + .sex = G_MALE; + .distance = 5; + + tradertype(NST_CUSTOM); + + sellitem ThunderStaff,2000; + sellitem Grenade,3; + sellitem ElixirOfLife,2; + sellitem Curshroom,1; + end; + +/* set currency to be item 828 */ +OnCountFunds: + setcurrency(countitem(StrangeCoin)); + end; + +/* @price is total cost. @points is if we accept two items as currency. */ +OnPayFunds: + //dispbottom "Hi: price="+@price+" and points="+@points; + if( countitem(StrangeCoin) < @price ) + end; + delitem StrangeCoin,@price; + purchaseok(); + end; + +} |