Thread: Making a starter only used once? z508

Results 1 to 10 of 10
  1. #1 Making a starter only used once? z508 
    im kablamo
    Guest
    I have a starter and im wondering if anyone can make it so it can only be used once. Espeon z508. Ill pay 3 bucks via paypal. Add me at [email protected]
    Reply With Quote  
     

  2. #2  
    BUUUUUUHHHHHHRGUR

    Maffchew's Avatar
    Join Date
    Aug 2009
    Age
    30
    Posts
    766
    Thanks given
    3
    Thanks received
    6
    Rep Power
    620
    Go to net>codec>RS2LoginProtocol and look for

    Code:
     if (p.teleportToX == -1 && p.teleportToY == -1)
    under ur setCoords thingo, add

    Code:
     Engine.playerItems.addItem(p, 995, amount);
    No money pls, rep will do rofl.
    Quote Originally Posted by somebodyy
    hey can you tell me what to look for in NpcCombat for the anti-leech thing cuase i have no idea
    Reply With Quote  
     

  3. #3  
    Registered Member
    Ninja assassin's Avatar
    Join Date
    Oct 2008
    Posts
    1,961
    Thanks given
    217
    Thanks received
    115
    Rep Power
    77
    Quote Originally Posted by MaffchewBro View Post
    Go to net>codec>RS2LoginProtocol and look for

    Code:
     if (p.teleportToX == -1 && p.teleportToY == -1)
    under ur setCoords thingo, add

    Code:
     Engine.playerItems.addItem(p, 995, amount);
    No money pls, rep will do rofl.

    lol!! lol!!....... nice code..
    btw, z508 already have starter once..
    Btc: 1tpWTbAznzWYh6YpoUJeQ3MDVK56GGJ
    Reply With Quote  
     

  4. #4  
    Registered Member
    Join Date
    Sep 2009
    Posts
    122
    Thanks given
    2
    Thanks received
    0
    Rep Power
    47
    so u want a starter command?
    █║▌│█│║▌║││█║▌│║▌║
    ORIGINAL PROFILE ®

    Reply With Quote  
     

  5. #5  
    Registered Member
    Marco's Avatar
    Join Date
    Aug 2009
    Posts
    160
    Thanks given
    1
    Thanks received
    19
    Rep Power
    104
    if (cmd[0].equals("starter") && p.starter == 0) {
    Engine.playerItems.addItem(p, 995, 500000);
    p.message("You've been given a Starter Pack, use it Wisely!");
    p.starter = 1;
    }
    ripped this out of a z508 source, all you have to do is add the variable when accounts are created.

    no money needed lol this is very easy.
    Reply With Quote  
     

  6. #6  
    Registered Member
    Join Date
    Sep 2009
    Posts
    52
    Thanks given
    0
    Thanks received
    0
    Rep Power
    1
    ha if you have the blank z508 source there is no starter... you have to add it..

    Working On A Server

    + Learning how to code doing it ^_^
    Reply With Quote  
     

  7. #7  
    Registered Member
    Marco's Avatar
    Join Date
    Aug 2009
    Posts
    160
    Thanks given
    1
    Thanks received
    19
    Rep Power
    104
    well its very easy to add... and i gave the command.. add this in player.java search or Player's index: or put it whereever the variables are assigned on account creation.

    /**
    * Player's starter.
    */
    public int starter = 0;
    Reply With Quote  
     

  8. #8  
    Registered Member

    Join Date
    Mar 2009
    Age
    29
    Posts
    312
    Thanks given
    0
    Thanks received
    4
    Rep Power
    77
    Quote Originally Posted by Marco View Post
    well its very easy to add... and i gave the command.. add this in player.java search or Player's index: or put it whereever the variables are assigned on account creation.
    Why not use a boolean?
    They are made for this kind of job after all.
    Reply With Quote  
     

  9. #9  
    Respected Donater

    Mario's Avatar
    Join Date
    Sep 2007
    Age
    30
    Posts
    1,255
    Thanks given
    32
    Thanks received
    15
    Rep Power
    778
    Quote Originally Posted by Marco View Post
    well its very easy to add... and i gave the command.. add this in player.java search or Player's index: or put it whereever the variables are assigned on account creation.
    and you got to declare these in filemanager to make it save to char file

    Code:
      stream.writeString("starter:" + p.starter);
    Code:
     else if (line.startsWith("starter:"))
                        p.starter = Integer.parseInt(line.substring(8));
    [rsimg]1042[/rsimg][rsimg]1044[/rsimg][rsimg]1046[/rsimg][rsimg]1038[/rsimg][rsimg]1048[/rsimg][rsimg]1040[/rsimg]Mario[rsimg]1040[/rsimg][rsimg]1048[/rsimg][rsimg]1038[/rsimg][rsimg]1046[/rsimg][rsimg]1044[/rsimg][rsimg]1042[/rsimg]

    Reply With Quote  
     

  10. #10  
    Registered Member

    Join Date
    Oct 2009
    Posts
    182
    Thanks given
    0
    Thanks received
    0
    Rep Power
    223
    Quote Originally Posted by Marco View Post
    well its very easy to add... and i gave the command.. add this in player.java search or Player's index: or put it whereever the variables are assigned on account creation.
    If you were to use a numeric data type for this, you should use a byte, otherwise you're wasting a lot of space. But the best way to go would be to use a boolean, like Project Serenity said.
    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

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