Bosses and GP.

Results 1 to 12 of 12
  1. #1
    Valued Member jasonguns is offline
    MemberRank
    Jul 2014 Join Date
    139Posts

    Bosses and GP.

    Veille and Mastarius / Ingg / Gelk Bosses should be giving GP after they died but the player just get AP.

    How can i add GP to these bosses??

    Thx already for any help!

    Imgur: The most awesome images on the Internet


  2. #2
    Valued Member podpol is offline
    MemberRank
    Mar 2015 Join Date
    136Posts

    Re: Bosses and GP.

    you shoul make ai

    some code and

    Code:
    handleDied() {
                        AbyssPointsService.addGp(player, 1000);
                                   }

  3. #3
    Valued Member jasonguns is offline
    MemberRank
    Jul 2014 Join Date
    139Posts

    Re: Bosses and GP.

    Thx for this i'll try to make one.

    Can you post a full code with the mob ID? just that i can see. thx

  4. #4
    Valued Member podpol is offline
    MemberRank
    Mar 2015 Join Date
    136Posts

    Re: Bosses and GP.

    mmm)

    take some ai of some mob where you will find "AbyssPointsService" make a search through ai...and check how that already done
    take that ai redone for your mob. AbyssPointsService - already give ap it means it will give GP.

    like that AbyssPointsService.addGp(player, 1000);
    1000 - gp

  5. #5
    Valued Member jasonguns is offline
    MemberRank
    Jul 2014 Join Date
    139Posts

    Re: Bosses and GP.

    thx yayaya awesome work.

  6. #6
    Valued Member podpol is offline
    MemberRank
    Mar 2015 Join Date
    136Posts

    Re: Bosses and GP.

    search through the npc ai "handleDied"
    under "handleDied" post
    AbyssPointsService.addGp(player, 1000);

    put ai at npc_templates.xml finito

  7. #7
    Valued Member jasonguns is offline
    MemberRank
    Jul 2014 Join Date
    139Posts

    Re: Bosses and GP.

    Can you show me a full example i'm kind of a noob programmer.

    If is not much with the npc and all the codes thx.

  8. #8
    Valued Member podpol is offline
    MemberRank
    Mar 2015 Join Date
    136Posts

    Re: Bosses and GP.

    \scripts\system\handlers\ai
    create folder yayaya_ai
    put there


    yayaya_ai.java
    Code:
    package ai.yayaya_ai;
    
    
    import ai.AggressiveNpcAI2;
    
    
    import com.aionemu.gameserver.ai2.AIName;
    import com.aionemu.gameserver.ai2.NpcAI2;
    import com.aionemu.gameserver.model.gameobjects.Creature;
    import com.aionemu.gameserver.model.gameobjects.Npc;
    import com.aionemu.gameserver.services.abyss.AbyssPointsService;
    import com.aionemu.gameserver.utils.PacketSendUtility;
    
     @ainame("yayaya_ai") 
    public class yayaya_ai extends AggressiveNpcAI2
    {
    	
    	@Override
    	protected void handleDied() {
    		AbyssPointsService.addGp(player, 1000);
    		super.handleDied();
    		
    }
    }
    ggg) should work!?))))

  9. #9
    Valued Member jasonguns is offline
    MemberRank
    Jul 2014 Join Date
    139Posts

    Re: Bosses and GP.

    i'll test it thx bud

    - - - Updated - - -

    I get this error making your way and making mine. http://imgur.com/a/icGh6

    if u can check this file: https://mega.nz/#!79IFUbyS!u7qPfEQuPW88Q9Jdo-CWXZ13wg4XZ_JnG23rj_jC1MY

  10. #10
    Valued Member podpol is offline
    MemberRank
    Mar 2015 Join Date
    136Posts

    Re: Bosses and GP.

    Code:
    package ai.yayaya_ai;
    
    
    
    
    import ai.AggressiveNpcAI2;
    
    
    
    
    import com.aionemu.gameserver.ai2.AIName;
    import com.aionemu.gameserver.ai2.NpcAI2;
    import com.aionemu.gameserver.model.gameobjects.Creature;
    import com.aionemu.gameserver.model.gameobjects.player.Player;
    import com.aionemu.gameserver.model.gameobjects.Npc;
    import com.aionemu.gameserver.services.abyss.AbyssPointsService;
    import com.aionemu.gameserver.utils.PacketSendUtility;
    import com.aionemu.gameserver.world.World;
    import com.aionemu.gameserver.world.WorldMapType;
    import com.aionemu.gameserver.world.knownlist.Visitor;
    
    
    
    
     @ainame("yayaya_ai") 
    public class yayaya_ai extends AggressiveNpcAI2
    {
        
        @Override
        protected void handleDied() {
            giveRewardPlayers();
            super.handleDied();
        }
    
    
    
    
           protected void giveRewardPlayers() {
            World.getInstance().doOnAllPlayers(new Visitor<Player>() {
                @Override
                public void visit(Player player) {
                                AbyssPointsService.addGp(player, 1500);
                        }
                    
                
            });
        }
    
    
    }


    - - - Updated - - -

    but that will make all people that in the world gets GP))) if you kill all received!!!

    Code:
    WorlgetInstance().doOnAllPlayers(new Visitor<Player>()
    rest of that you may check in the sieges... how there are rewarding system works.
    Last edited by podpol; 30-12-16 at 10:23 PM.

  11. #11
    Valued Member jasonguns is offline
    MemberRank
    Jul 2014 Join Date
    139Posts

    Re: Bosses and GP.

    I did this and get this error.

    I put in this folder C:\Users\PC\Desktop\DB 4.7.5\AC-Game\data\scripts\system\handlers\ai\yayaya

    Imgur: The most awesome images on the Internet

    Imgur: The most awesome images on the Internet

  12. #12
    Valued Member podpol is offline
    MemberRank
    Mar 2015 Join Date
    136Posts

    Re: Bosses and GP.

    name of folder "yayaya_ai" not "yayaya"



Advertisement