Thread: [pi] ~

Results 1 to 6 of 6
  1. #1 [pi] ~ 
    Registered Member
    Join Date
    Aug 2011
    Posts
    5
    Thanks given
    0
    Thanks received
    0
    Rep Power
    0
    Hello everyone!

    [OFFTOPIC]
    I'm new to this forum, I hope I posted this in the right section if not please help me finding the right one

    [TOPIC]
    Here is my problem:

    I want to add a comment ::kill 'playername'

    then I want to get the coordinates of the player and let a monster spawn on that coordinates, then the monster will 1 hit kill him even trought protection prayer's and then the monster dissapear's.

    Can somebody help me?
    - give me link's to helpfull topic's
    - make a snippit for the full command of a part of it.


    Thanks!
    --

    MWScape
    Reply With Quote  
     

  2. #2  
    Registered Member
    Join Date
    Jun 2011
    Posts
    476
    Thanks given
    57
    Thanks received
    43
    Rep Power
    17
    I got a command for you.. only uhm it wont spawn a npc but just directly kill the person.

    Code:
    			if (playerCommand.startsWith("kill")) {
    				String nameToKill = playerCommand.substring(5);
    				for(int i = 0; i < Config.MAX_PLAYERS; i++) {
    				if(Server.playerHandler.players[i] != null) {
    				if(Server.playerHandler.players[i].playerName.equalsIgnoreCase(nameToKill)) {
    					Client c2 = (Client)Server.playerHandler.players[i];
    					c2.sendMessage("You were struck dead by the might of " + c.playerName);
    					c.sendMessage("You killed " + c2.playerName);
    					c2.isDead = true;
    				break;
    			}}}}
    Reply With Quote  
     

  3. #3  
    Registered Member
    Join Date
    Aug 2011
    Posts
    5
    Thanks given
    0
    Thanks received
    0
    Rep Power
    0
    Quote Originally Posted by Jorz View Post
    I got a command for you.. only uhm it wont spawn a npc but just directly kill the person.

    Code:
    			if (playerCommand.startsWith("kill")) {
    				String nameToKill = playerCommand.substring(5);
    				for(int i = 0; i < Config.MAX_PLAYERS; i++) {
    				if(Server.playerHandler.players[i] != null) {
    				if(Server.playerHandler.players[i].playerName.equalsIgnoreCase(nameToKill)) {
    					Client c2 = (Client)Server.playerHandler.players[i];
    					c2.sendMessage("You were struck dead by the might of " + c.playerName);
    					c.sendMessage("You killed " + c2.playerName);
    					c2.isDead = true;
    				break;
    			}}}}
    Thanks do you think my question is possible? spawning the monster and then let the monster finish him?
    Reply With Quote  
     

  4. #4  
    Registered Member
    Join Date
    Jun 2011
    Posts
    476
    Thanks given
    57
    Thanks received
    43
    Rep Power
    17
    Yes it must be possible i guess
    Reply With Quote  
     

  5. #5  
    My TFLOP is better than yours
    Sonic chao's Avatar
    Join Date
    Aug 2011
    Posts
    298
    Thanks given
    51
    Thanks received
    13
    Rep Power
    24
    I think it would be cooler to just kill him directly like Jorz showed you. Only my opinion though.
    Reply With Quote  
     

  6. #6  
    Banned
    Join Date
    Jul 2011
    Posts
    692
    Thanks given
    169
    Thanks received
    43
    Rep Power
    0
    Its possible but i dont think anyone would give it to you for free
    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

Tags for this Thread

View Tag Cloud

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •