[FSOD] Gold Drops From Enemies

Posts 1–15 of 38 · Page 1 of 3
[FSOD] Gold Drops From Enemies
 
Final Product





1. In LootDefs.cs Paste This

Code:
public class GoldLoot : ILootDef
    {
        private static readonly ILog log = LogManager.GetLogger(typeof(LootState));
        public string Lootstate { get; set; }
        private readonly int maxGold;
        private readonly int minGold;

        public GoldLoot(int minGold, int maxGold)
        {
            this.maxGold = maxGold;
            this.minGold = minGold;
        }

        public void Populate(RealmManager manager, Enemy enemy, Tuple<Player, int> playerDat,
            Random rand, string lootState, IList<LootDef> lootDefs)
        {
            if (playerDat == null)
                return;
            for (int i = 0; i < 3; i++)
                playerDat.Item1.Owner.BroadcastPacket(new ShowEffectPacket()
                {
                    EffectType = EffectType.Flow,
                    Color = new ARGB(0xccac00),
                    TargetId = playerDat.Item1.Id,
                    PosA = new Position() { X = enemy.X, Y = enemy.Y }
                }, null);
            manager.Database.DoActionAsync(db =>
            {
                playerDat.Item1.Credits =
                    playerDat.Item1.Client.Account.Credits =
                        db.UpdateCredit(playerDat.Item1.Client.Account,
                            rand.Next(minGold, maxGold + 1));
            });
            playerDat.Item1.UpdateCount++;
        }
    }
Now you might be wondering ???? i got errors wtf

replace regions with this
Code:
using System;
using System.Collections.Generic;
using System.Linq;
using wServer.networking.svrPackets;
using db.data;
using wServer.realm;
using wServer.realm.entities;
using wServer.realm.entities.player;
using log4net;
Then in Your Monsters Behavior Add This

Code:
new GoldLoot(10, 50),
change 10 and 50 to wut ever


 
thanks to

@Wojtasowy1234
for the code, i just made it work for FSOD, since most nubs use it
and who ever he thanked


sidenote: his was for SD, so i thought why not for FSOD....
it's not his code, it's project b's, and while we're at that it's just a slightly edited version of soulloot from seraphs.
Quote Originally Posted by FlutterM4rk View Post
it's not his code, it's project b's, and while we're at that it's just a slightly edited version of soulloot from seraphs.
oh ;p

thanks for the information
This doesn't seem to work on my Server (FSoD).
Quote Originally Posted by damian007 View Post
This doesn't seem to work on my Server (FSoD).
let me see the errors
Quote Originally Posted by Demon View Post
let me see the errors
There aren't any, just no gold and no golden effect whatsoever.
Quote Originally Posted by damian007 View Post
There aren't any, just no gold and no golden effect whatsoever.
if you didn't change ur gold name to something else than it should work

make sure u add new GoldLoot(10, 50), above threshold in monsters behavior

when you kill a monster it should give you
Quote Originally Posted by Demon View Post
if you didn't change ur gold name to something else than it should work

make sure u add new GoldLoot(10, 50), above threshold in monsters behavior

when you kill a monster it should give you
Thanks, Putting it over threshold helped, i had it under it.
What do you mean by replace regions with this
Code:
using System;
using System.Collections.Generic;
using System.Linq;
using wServer.networking.svrPackets;
using db.data;
using wServer.realm;
using wServer.realm.entities;
using wServer.realm.entities.player;
using log4net;

Where is regions?
Quote Originally Posted by XxNooooooobsxX View Post
What do you mean by replace regions with this
Code:
using System;
using System.Collections.Generic;
using System.Linq;
using wServer.networking.svrPackets;
using db.data;
using wServer.realm;
using wServer.realm.entities;
using wServer.realm.entities.player;
using log4net;

Where is regions?
at the very top
Instructions unclear, System Corruption
Quote Originally Posted by Kithio View Post
Instructions unclear, System Corruption
Throw your computer out the window

+ i thought u died from pserver world
Quote Originally Posted by Demon View Post
Throw your computer out the window

+ i thought u died from pserver world
And I thought people were better then copying others code to release as their own
Quote Originally Posted by Kithio View Post


And I thought people were better then copying others code to release as their own
please use your eyes next time, i clearly have something on the bottom of the post that clearly says thanks to...
I don't claim peoples Source codes, and never have i even tried to in the slightest bit, maybe i forgot to give proper credit, but thats about it

+ i should mention the owner of project B, doesn't give a **** about people copying his source codes // using his source





Posts 1–15 of 38 · Page 1 of 3

Post a Reply

Similar Threads

Tags for this Thread

None

Need help?