Results 1 to 4 of 4

Thread: How to add Vampire Dust looted by using a BWS

  1. #1
    iBot User Digotsu's Avatar
    Join Date
    Jun 2013
    Posts
    33
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    5 Post(s)
    Reputation
    10
    Rep Power
    4

    How to add Vampire Dust looted by using a BWS

    Well the title pretty much says everything, anyone knows how to do it?
    I want to add the vamp dusts looted by using the blessed wooden stake in my HUD, I would love the person forever.

  2. #2
    iBot User Bosse101's Avatar
    Join Date
    Jul 2012
    Location
    Sweden
    Posts
    273
    Mentioned
    19 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    25 Post(s)
    Reputation
    185
    Rep Power
    6
    I agree, I would love the person forever.. I need this too!

  3. #3
    Normal User
    Join Date
    Mar 2013
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    10
    Rep Power
    4
    I came up with an idea... for my HUD it looks like this...

    Variables added:

    --fixed vamp dust count
    local countdust = itemcount("Vampire Dust") -- counter of how many dusts you have looted so far
    local valordust = 2000 -- price of vamp dust in ur world in GP
    local totalcomdust = 0 -- variable to fix your total + vamp dust

    ok.. now I did this to fix my HUD in order to add dust to my total balance !

    After all looting count routine(since routine has a loop routine [i] and would consider vamp dust count every single loop), but before the total function, I added this:

    y = y + 15 -- depending on the HUD you use you might need to remove this line to fix display
    setfontcolor("white")
    addtext("Vampire Dust", x, y)
    addtext("- "..countdust.." ("..(countdust*valordust / 1000).."k)", 120, y)
    y = y + 15 -- depending on the HUD you use you might need to remove this line to fix display

    Thats only for display purposes... not yet calculated total + dust, here it comes:

    -Usually the HUD looks like this

    y = y + 10
    addtext("Total", x, y)
    addtext("-", 120, y)
    addtext(totall.." GPs", 130, y)

    Now considering the Vamp Dust, I wrote like this:

    y = y + 10
    addtext("Total", x, y)
    addtext("-", 120, y)
    totalcomdust = totall + (countdust*valordust) -- extra variable to input dust profit into total
    addtext(totalcomdust.." GPs", 130, y) -- showing new variable value

    Hopefully I was helpfull )

    (Surely there's shorter/easier/better ways to write this code, but thats my first successfull try to make it work and since it does work it's good for now to me) )

  4. #4
    Normal User
    Join Date
    Mar 2013
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    10
    Rep Power
    4
    Oh... I noticed WASTE routine wasnt getting updated considering vamp dust

    Added this

    total = totalcomdust - totals
    if totalcomdust-totals > 0 then

    Instead of

    total = totall - totals
    if totall-totals > 0 then

    Now working 100% perfect

Posting Permissions

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