Thread: Help [Rep+ & Thanks Given]

Results 1 to 2 of 2
  1. #1 Help [Rep+ & Thanks Given] 
    Registered Member
    Join Date
    Feb 2012
    Posts
    384
    Thanks given
    43
    Thanks received
    10
    Rep Power
    15
    How can i make it so warriors guild tokens are pk points?
    Reply With Quote  
     

  2. #2  
    Registered Member blastashes's Avatar
    Join Date
    Apr 2012
    Age
    26
    Posts
    175
    Thanks given
    3
    Thanks received
    4
    Rep Power
    17
    unless you add a custom to override the warrior token

    its going to stay a warrior token

    however, if you wanted to make them pk points.

    look for something like

    c.pkpoints += 5

    or similar to that, it would be under when a player kills another player they get that
    as a reward, and a message as well.

    you can add like

    c.getItems().addItem(Warriorguildtokenid, amount);

    so for example

    mystery box

    c.getItems().addItem(6199, 1);

    6199 = mystery box
    1 = amount to add to the inventory.

    if you add this under the pk points it gives.
    then that gives it to players when they kill someone

    ........................

    now,

    you want the tokens to be accounted for.

    so. edit the method where players get the tokens or pk points to

    add a value in the char file

    you can make a playersave like

    warriortokens = ####

    So every time they kill someone
    it ads +5 tokens to the inventory, and to the char file

    like so.

    c.getItems().addItem(tokenid, 5);
    c.warriortokens += 5);

    this gives 5 to inventory of player
    and adds 5 to the char file.

    lastly.

    you'll need to make a shop that requires tokens as money.

    so when you click an item lets say a "blue whip"

    and lets say it's item id is 50,000

    when you click the item it should say.

    Blue whip currently costs 50 warriorstokens.

    Ex:

    in the shop assistant is the switch for item id's.

    you would need to copy the entire price method + the switch

    and change it to use tokens as the currency.

    so an item(Blue whip) would cost whatever value you wanted it to cost in tokens
    and for the specific shop.


    And/or you could just use arrays if you know what those are.
    so you don't have a bunch of case numbers in the switch.

    So alltogether, you should just make a new shop.

    find a shop that's empty, try like.

    :hop 20 or whatever number gives an empty shop

    make an npc open that shop with the actionhandler class

    With this shop now made you'll need to add it into shophandler just like the other ones.

    And make it so when you open the shop it tells you in the chatbox the # of warriortokens u have(it will get this value from the char file - EX: +c.warriortokens+)

    Lastly, when you buy items, you'll need it to remove the value of the item from the char file, as well as tokens.

    so for the item "Blue-whip"

    You'll want it to be like this

    c.getItems().deleteItems(tokenid, amount) to remove 5 or the item cost.
    c.warriortokens -= ammount)

    whatever amounts for tokens in the inventory and char file.

    ___

    Notes: Now what i said is a bit scraggly and probably 50% wrong. However, It should give you a general idea for how to go about making the tokens rewarded upon a player kill. as well as give you a general idea for the shop.

    Heres the main scope.

    The player kills a player

    it gives 5 tokens to the inventory
    and the char file value

    then the player goes to the shop(new one you'll make)

    He buys a blue whip or whatever item he wants.

    it costs 5 tokens.

    upon buying it the shop takes away the amount of tokens the item costs.
    as well as takes the amount the item costs out of the char file value for warrior tokens.

    And therefore is how the tokens would be useable as a currency for pking..

    However, pk points is and/are really enough. if your having trouble with them, remove or re-add them. and maybe, you can just make a global point system for the server.

    so pvm/pvp gives points to be used in shop for pvp/pvm.


    if you want a little help, find a source with a working warriors guild. in there when you enter the cyclops area, it should remove the tokens. and/or should take some upon the time you spend in the cyclops area.
    that might pose some usefull stuff you can use towards your goal.

    however, it's kind of pointless.

    But goodluck. I'm not entirely sure on making the shop handle the items with token prices.
    and taking the tokens

    but I can help in making players get tokens when they kill someone if you wanted that.

    and i can also help add the char file playersave value if you wanted.

    just msn or skype me

    msn: [Only registered and activated users can see links. ]
    skype: blastashes

    hope i helped m8
    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. Replies: 5
    Last Post: 02-18-2012, 09:18 AM
  2. Replies: 22
    Last Post: 11-24-2010, 12:34 AM
  3. Replies: 5
    Last Post: 08-28-2010, 05:45 AM
  4. Replies: 6
    Last Post: 06-21-2010, 11:46 PM
  5. Few Commands... Rep && $5+
    By «I Gf I» ©£ in forum Help
    Replies: 4
    Last Post: 12-12-2009, 01:38 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
  •