UniEpic Armor Merchant

Share files with other Dawn of Light users

Moderator: Support Team

UniEpic Armor Merchant

Postby deathwish » Sat Apr 07, 2012 9:09 pm

UniEpic Armor Merchant - By Deathwish

Epic Armor merchant that selects the clients Class and sends out the classes Epic Armor in a trade window.
UniEpicNPC.cs = GameNPC
EpicArmor MerchantItems.sql = Installs all the merchants items needed.
Items are already installed in dolpubdbV3.0.
Attachments
UniEpic Armor Merchant.rar
(3.57 KiB) Downloaded 481 times
- Terry - terryammon
User avatar
deathwish
Database Team
 
Posts: 483
Joined: Sun Jul 05, 2009 10:15 pm
Location: England / Essex

Re: UniEpic Armor Merchant

Postby geshi » Sat Apr 07, 2012 9:14 pm

Nice.. now we just need updated Epic Armor... since the current stuff in the public db is the really old stuff afaik..

Argain updated it all, dunno if the owner is still around and can contribute :/
geshi
Contributor
 
Posts: 1826
Joined: Tue Oct 21, 2008 9:16 pm

Re: UniEpic Armor Merchant

Postby deathwish » Sat Apr 07, 2012 9:20 pm

Hmm, i never checked to see if it was uptoday i must say, when i got some more free item, i will check it out and update them, if needed
- Terry - terryammon
User avatar
deathwish
Database Team
 
Posts: 483
Joined: Sun Jul 05, 2009 10:15 pm
Location: England / Essex

Re: UniEpic Armor Merchant

Postby deathwish » Sat Apr 07, 2012 9:46 pm

Do you want the same thing added for Champ weapons too?
- Terry - terryammon
User avatar
deathwish
Database Team
 
Posts: 483
Joined: Sun Jul 05, 2009 10:15 pm
Location: England / Essex

Re: UniEpic Armor Merchant

Postby stephenxpimentel » Sun Apr 08, 2012 11:55 pm

@Geshi - i already updated epic armor and posted it here :)

Edit: Didnt post them in user files, but should be in public DB.

Page 3.
http://www.dolserver.net/viewtopic.php? ... 8&start=30
Lets have some fun.
stephenxpimentel
Contributor
 
Posts: 1300
Joined: Wed Sep 19, 2007 5:09 pm

Re: UniEpic Armor Merchant

Postby svartson » Tue Jan 15, 2013 7:02 pm

I have a problem with this script. I created an UniEpicNPC and it gives the items to all classes except for those whose names change into suffix "ress", like enchant(e)ress, blademistress, sorceress.

Is there any fix for that?

I am not yet familiar with the objects/methods in DOL but i am searching for something like this (pseudocode):
Code: Select all
if player.gender is female { change dbquery string to female name }
or I need some explanation where a potential female class name can be reached.
Aurora Admin(R.I.P.), Argain GM
User avatar
svartson
DOL Novice
 
Posts: 71
Joined: Fri Aug 15, 2008 7:35 am
Location: RLP, Germany

Re: UniEpic Armor Merchant

Postby Tolakram » Tue Jan 15, 2013 7:32 pm

Actual code will be very close.

if (player.Gender == eGender.Female)



^^ I think, without actually looking it up.
- Mark
User avatar
Tolakram
Storm / Storm-D2 Admin
 
Posts: 9189
Joined: Tue Jun 13, 2006 1:49 am
Location: Kentucky, USA

Re: UniEpic Armor Merchant

Postby svartson » Tue Jan 15, 2013 8:21 pm

Yeah, but what other values than .Name can player.ClassName have? player.CharacterClass.Id or ClassId or what?
Aurora Admin(R.I.P.), Argain GM
User avatar
svartson
DOL Novice
 
Posts: 71
Joined: Fri Aug 15, 2008 7:35 am
Location: RLP, Germany

Re: UniEpic Armor Merchant

Postby svartson » Wed Jan 16, 2013 12:52 pm

I changed the script so that players need to be level 50 to get it and it also fixed the female classes, although this is a very dirty workaround, I want to share this:
Code: Select all
public override bool Interact(GamePlayer player) { if (player.Level == 50) { if (player.CharacterClass.Name == "Enchantress") { TradeItems = new MerchantTradeItems("" + "Enchanter" + "Epic"); } else if (player.CharacterClass.Name == "Sorceress") { TradeItems = new MerchantTradeItems("" + "Sorcerer" + "Epic"); } else if (player.CharacterClass.Name == "Armswoman") { TradeItems = new MerchantTradeItems("" + "Armsman" + "Epic"); } else if (player.CharacterClass.Name == "Blademistress") { TradeItems = new MerchantTradeItems("" + "Blademaster" + "Epic"); } else if (player.CharacterClass.Name == "Heroine") { TradeItems = new MerchantTradeItems("" + "Hero" + "Epic"); } else if (player.CharacterClass.Name == "Huntress") { TradeItems = new MerchantTradeItems("" + "Hunter" + "Epic"); } else { TradeItems = new MerchantTradeItems("" + player.CharacterClass.Name + "Epic"); } player.Out.SendMerchantWindow(TradeItems, eMerchantWindowType.Bp); } else { SayTo(player, "You must be level 50 to be eligibile for your free Epic Armor!"); } return true;
Aurora Admin(R.I.P.), Argain GM
User avatar
svartson
DOL Novice
 
Posts: 71
Joined: Fri Aug 15, 2008 7:35 am
Location: RLP, Germany

Re: UniEpic Armor Merchant

Postby Tolakram » Wed Jan 16, 2013 2:51 pm

That works, and thanks for sharing your changes! :)
- Mark
User avatar
Tolakram
Storm / Storm-D2 Admin
 
Posts: 9189
Joined: Tue Jun 13, 2006 1:49 am
Location: Kentucky, USA

Re: UniEpic Armor Merchant

Postby svartson » Wed Jan 16, 2013 3:49 pm

As I said: If I have the time to read through the important parts of the DOL core, we can rewrite this part properly. The classnames like "Sorceress" must be saved somewhere in there (obviously they are displayed ingame) and if this is true we can just use the attributes and insert it into this patch (method will consist of max. 5 lines afterwards).
Aurora Admin(R.I.P.), Argain GM
User avatar
svartson
DOL Novice
 
Posts: 71
Joined: Fri Aug 15, 2008 7:35 am
Location: RLP, Germany

Re: UniEpic Armor Merchant

Postby Tolakram » Wed Jan 16, 2013 6:20 pm

That part of the name is also local language (stored as part of language support), which is why you can't find it. Using classid plus gender is probably a better way.
- Mark
User avatar
Tolakram
Storm / Storm-D2 Admin
 
Posts: 9189
Joined: Tue Jun 13, 2006 1:49 am
Location: Kentucky, USA

Re: UniEpic Armor Merchant

Postby svartson » Wed Jan 16, 2013 7:55 pm

Another question: RunemasterEpicVest is missing in the merchantwindow. The item exists in db and can be created with
Code: Select all
/item create RunemasterEpicVest
The item has the same stats in db like the other RunemasterEpic items. Where is the mistake? O.o
Aurora Admin(R.I.P.), Argain GM
User avatar
svartson
DOL Novice
 
Posts: 71
Joined: Fri Aug 15, 2008 7:35 am
Location: RLP, Germany


Return to “%s” User Files

Who is online

Users browsing this forum: No registered users and 1 guest