Thread: ::banker

Results 1 to 5 of 5
  1. #1 ::banker 
    Banned

    Join Date
    Mar 2011
    Posts
    657
    Thanks given
    105
    Thanks received
    75
    Rep Power
    0
    How would I make a command that lets people have a banker follow them as a summoning familiar I suppose.


    All they have to do is type

    ::banker
    Reply With Quote  
     

  2. #2  
    Banned

    Join Date
    Mar 2011
    Posts
    657
    Thanks given
    105
    Thanks received
    75
    Rep Power
    0
    Buamp
    Reply With Quote  
     

  3. #3  
    ಠ_ಠ

    Joshua's Avatar
    Join Date
    May 2010
    Posts
    1,903
    Thanks given
    397
    Thanks received
    708
    Rep Power
    803
    I think Hybrid pvp had a base for that in it. Just rip it from there, but remember to fix it up because that source is fucking horribly coded.
    Reply With Quote  
     

  4. #4  
    Boom Boom

    Kakapo's Avatar
    Join Date
    Aug 2010
    Posts
    1,030
    Thanks given
    358
    Thanks received
    218
    Rep Power
    365
    Just allow ::bank lol?


    Reply With Quote  
     

  5. #5  
    Donator
    Ed17's Avatar
    Join Date
    Jun 2011
    Posts
    296
    Thanks given
    42
    Thanks received
    14
    Rep Power
    10
    Here:
    if (playerCommand.equalsIgnoreCase("banker")) {
    c.sendMessage("Banker following...");
    Server.npcHandler.spawnNpc3(c, 1036, c.absX, c.absY-1, c.heightLevel, 0, 120, 25, 200, 200, true, false, true);
    }
    Just change the NPC id, which is 1036.
    You may need this, put it in NPCHandller.java.
    You will have to edit this a bit.
    public void spawnNpc3(Client c, int npcType, int x, int y, int heightLevel, int WalkingType, int HP, int maxHit, int attack, int defence, boolean attackPlayer, boolean headIcon, boolean summonFollow) {
    int slot = -1;
    for (int i = 1; i < maxNPCs; i++) {
    if (npcs[i] == null) {
    slot = i;
    break;
    }
    }
    if(slot == -1) {
    return; // no free slot found
    }
    NPC newNPC = new NPC(slot, npcType);
    newNPC.absX = x;
    newNPC.absY = y;
    newNPC.makeX = x;
    newNPC.makeY = y;
    newNPC.heightLevel = heightLevel;
    newNPC.walkingType = WalkingType;
    newNPC.HP = HP;
    newNPC.MaxHP = HP;
    newNPC.maxHit = maxHit;
    newNPC.attack = attack;
    newNPC.defence = defence;
    newNPC.spawnedBy = c.getId();
    newNPC.underAttack = true;
    newNPC.pet = true;
    newNPC.facePlayer(c.playerId);
    if(headIcon)
    c.getPA().drawHeadicon(1, slot, 0, 0);
    if (summonFollow) {
    newNPC.summoner = true;
    newNPC.summonedBy = c.playerId;
    c.summonId = npcType;
    c.hasPet = true;
    }
    if(attackPlayer) {
    newNPC.underAttack = true;
    if(c != null) {
    newNPC.killerId = c.playerId;
    }
    }
    npcs[slot] = newNPC;
    }

    Fun stuff 8D
    Reply With Quote  
     


Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Similar Threads

  1. Personal Banker?
    By artist in forum Requests
    Replies: 1
    Last Post: 05-24-2011, 05:08 AM
  2. Banker Dialog
    By Fraddy in forum Help
    Replies: 17
    Last Post: 10-23-2010, 10:47 PM
  3. Banker
    By alexismyman in forum Help
    Replies: 1
    Last Post: 06-06-2010, 11:40 AM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •