Hellgate: Global API

11/20/2011 13:02 defragger#1
Hi,

we just released the first version of our hellgate globlal lua api dll injection addon.
The api is designed to control the game through lua. I would
like to ask some hellgate players to test it

Features:
- player movement, attack(inclusive skills on bar) and aiming
- inventory interaction(item move in inventory, dismantle, delete item, pickup)
- events like monster move and monster attack, collision detection (for movement)
- autologin and character selection

Some example script snippets are also included, so starting the development of
own scripts should be easy. Look at our page for the complete Lua doc.

Heres the link:
[Only registered and activated users can see links. Click Here To Register...]

feel free to ask for features or ideas we should add.

I would also like to get all information about current bugs

Greetz Defragger
11/20/2011 21:51 SKiLLsSoLon#2
Here is my pickit script:

This is in my config.lua

Code:
--- pickit and auto dissmantler
-- @param quality the quality uppon to grab items. others are dismantled
function pickit(quality)
   if pickit_handle then
      unregister(pickit_handle);
      pickit_handle = nil;
   end


   if not quality then
      quality = 3;   -- grab rare+ items
   end

   local text = "UNKOWN";
   if quality == 1 then text = "NORMAL" end
   if quality == 2 then text = "ENHANCED" end
   if quality == 3 then text = "RARE" end
   if quality == 4 then text = "LEGENDARY" end
   if quality == 5 then text = "UNIQUE" end
   if quality == 6 then text = "LEGENDARY" end
   if quality == 6 then text = "SET" end
   if quality == 6 then text = "MYTHIC" end
   printf("pickit itemqualit(%i): %s", quality, text);

   pickit_handle = register(event.ITEMDROP,
      function(e)
      
			local obj = e.obj;
	        local pkItemQty = obj.quality;

			 if obj.model == "cube_ingredient_02" or obj.model == "gold" then
			    pkItemQty = 6;
			 end

			 if string.find(obj.model,"blueprint")  then
			    pkItemQty = 0;
			 end

	         if pkItemQty > 1 then

	         	printf("picked up(%i): %s", obj.quality, obj.model);
	         	 -- only dismantle bigger items with known quality
		         if obj.quality >= 1 and pkItemQty < quality then
		            --hell_env_dismantleObj_C(obj.id);
		            --printf("auto dismantle(%i): %s", obj.quality, obj.model);
		            pickit_delay = pickit_delay + 1000;
                    splashMessage("auto dismantled "..obj.model);
                    delay(pickit_delay,
						function(e)
                        dismantleID(obj);
					end);
					
					
				else
					hell_env_grabItem_C(obj.id);
		         end
	        else
	         	printf("Seen (%i): %s", obj.quality, obj.model);
	         end


   end);
end

config.pickit(3)

function dismantleID(obj)
 	hell_env_grabItem_C(obj.id);
 	printf(os.time().."auto dismantle(%i): %s", obj.quality, obj.model);
	hell_env_dismantleObj_C(obj.id);
    pickit_delay = pickit_delay - 1000;
end
11/23/2011 15:10 defragger#3
Hi,

release Version 1.1 was made: [Only registered and activated users can see links. Click Here To Register...]

key features of V1.1:
- ingame gold/palladium SPAM-FILTER
- windows installer added
- bugfixes

check project site for details:
[Only registered and activated users can see links. Click Here To Register...]

cheers,
defragger

... attached the improved pickit code for auto dismantling. insert this in config.lua
Code:
--
-- PICKIT
--
local pickit_handle = nil;

--- pickit and auto dissmantler
-- @param quality the quality uppon to grab items. others are dismantled
function pickit(quality)
    if pickit_handle then
        unregister(pickit_handle);
        pickit_handle = nil;
    end

    if not quality then
        quality = 3;    -- grab rare+ items
    end

    printf("PICKIT[%i] activated", quality);

    pickit_handle = register(event.ITEMDROP,
        function(e)
            local obj = e.obj;
            hell_env_grabItem_C(obj.id);

            -- skip some items at all
            if obj.model == "gold" or obj.model == "analyzer" or string.find(obj.model, "medpack") or string.find(obj.model, "powerpack") then
                return;
            end

            -- trash low budget blueprints
            if string.find(obj.model, "_blueprint") and obj.quality >= 1 and obj.quality < quality then
                printf("PICKIT[%i]: delete %s", obj.quality, obj.model);
                hell_env_deleteObj_C(obj.id);
                return;
            end

            -- only dismantle bigger items with known quality
            if obj.quality >= 1 and obj.quality < quality then
                printf("PICKIT[%i]: dismantle %s", obj.quality, obj.model);
                hell_env_dismantleObj_C(obj.id);
                return;
            end

            -- identify remaining unidentified objects
            if not obj.getTats("identified") or not obj.getTats("identified") == 1 then
                printf("PICKIT[%i]: identify %s", obj.quality, obj.model);
                hell_env_identifyObj_C(obj.id);
            end
        end
    );
end

-- delay initial activation of pickit
delay(1000, function()
     pickit()
end);
11/24/2011 18:49 defragger#4
---
12/01/2011 14:29 defragger#5
Again another update of the client,
please visit for update
[Only registered and activated users can see links. Click Here To Register...]

new features:
- set difficulty
- md5sum check for the binary
- removed winject from the project (no false virus warning now :) )
- reset instance
- windows vista should work now
- improved spamfilter regex set
- astar routing module

greetz defragger
01/30/2012 18:20 loki-d2#6
hi can someone help me with the setup of this program?
the spamfilter works well but i have no clue about the
other plugins.

thx for help loki
05/29/2012 07:08 defragger#7
---
06/05/2012 10:59 Madonis#8
I understand this how to use this "tool" ?
Can you make a german tutorial? or english tutorial?