PDA

View Full Version : Reset KillCounter.



Basiq
12-08-2015, 02:26 AM
Is there anyway to reset it?
Cause im trying to make Task Maker, but it always count 700+ Creatures and always makes to give task when its not done...

-- Task Maker
elseif (labelName == "CheckTask") then
local killed_creatures = Self.GetCreatureKills("Medusa")
if killed_creatures >= 700 then
gotoLabel("GrizzlyTask")
print("You have killed enough creatures to complete the task.")
else
print("You haven't killed enough creatures to complete the task.")
gotoLabel("GrizzlyTaskNo")
end
elseif (LabelName == "ResetTask") then
Self.ResetCreatureKills("Medusa")
I've been using this, but it doesnt seems to work.

shadowart
12-08-2015, 03:23 AM
If Self.ResetCreatureKills doesn't work for some reason (an OT issue maybe?), you can work around that like this:

-- Somewhere outside of the label handler
local reportedKills = Self.GetCreatureKills("Medusa")

-- Inside of the label handler
elseif (labelName == "CheckTask") then
Walker.ConditionalGoto(Self.GetCreatureKills("Medusa") - reportedKills >= 700, "GrizzlyTask", "GrizzlyTaskNo")
elseif (LabelName == "ResetTask") then
reportedKills = Self.GetCreatureKills("Medusa")

martintokio
12-08-2015, 11:34 AM
Doesnt seem to work either this way ;/ RIP My try of task makers...
any other idea guys?

shadowart
12-08-2015, 11:58 AM
I changed it slightly so that it only considers creature kills made after the script was started.

martintokio
12-08-2015, 12:26 PM
Still not working, I guess its OT issue or something ;s
I have tried even adding the creature name to the HUD List but nothing ;/

Aint there some kind of module that reset the whole HUD? I dont really care if all creature gets to 0 xD

shadowart
12-08-2015, 12:29 PM
If Self.GetCreatureKills() doesn't work, then you need to count loot messages to make a tasker. But if it does, as it seems to be the case for op, then my code should make sure you don't keep going Grizzly on every check after you first hit the kill threshold - if you interweave it with the rest of your script correctly.

martintokio
12-08-2015, 12:40 PM
Alright I give up... This is so annoying cant make this work ;/ Ty anyways ;/
Good luck Basiq trying make this work man

martintokio
12-08-2015, 01:23 PM
If Self.GetCreatureKills() doesn't work, then you need to count loot messages to make a tasker. But if it does, as it seems to be the case for op, then my code should make sure you don't keep going Grizzly on every check after you first hit the kill threshold - if you interweave it with the rest of your script correctly.

Is there someway to contact you? ;/ Im working on the HUD Tasker but need some tips xD