Lineage 2 Tower Forum

Full Version: farries script
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
(09-16-2014 11:45 AM)midnightkite89 Wrote: [ -> ]I get a lot of crit errors with the #12 script, #13 doesn't run.

Im using feoh wizard with targetfix, castingfix and pick up scripts

use 9 it works for me
any 1 know how to faster opened coccons in #fairy12. My char open only cocons after all dead mobs... i use wynn +iss only for buffs
I tried 13 and I am vip but it does not open the cocoons now 12 works for me but after a short time the client starts crashing and it is only when this script is running, none of the other clients crash and it has something to do with the graphics card I guess but it is only effected by this script.

Any ideas?
Bump

Anyone? any idea at all as to why this one crashes after awhile?
this is the error I keep getting and only with this script.

Version: EP10_Global,BLS,V2110409,59835335
BuildDate: Wed Aug 27 02:14:28 2014

Time: 2014.9.23 16:16:13 [GTick=420428,LGTicks=70419]
PosCode: 202904:71505:664
OS: Windows 8(64) 6.2 (Build: 9200), Service Pack 0.0
CPU: GenuineIntel Intel® Core™ i7-4790S CPU @ 3.20GHz @ 3195 MHz
RAM : 4095MB RAM
CPUInfo: 8,4,8,1
Video: NVIDIA GeForce GTX 750 (4411)
VideoResources: 105 MB
MAC: 10-c3-7b-46-3e-59
LANG: ENGLISH
IME: ???

Error: History: AdvanceGFxFlashObj::Invoke[7] <- GFxFlashObj::AdvanceAndRender <- Flash Name: ContainerHUD Tick Count: 66A6B <= GFxFlashWnd::Invoke[7] <- GFxUIManager::RenderFlash <= GFxFlashWnd::CallGFxFunction[7] <- GFxFlashWnd::OnPaint <- NCVirtualWndMain::DrawChildWindow <= UUIScript::execCallGFxFunction[7] <- NCVirtualWndMain::DrawChildWindow <- WM_PAINT <= UObject::ProcessEvent[7] <- NCVirtualWndMain::DispatchWndMsg <= (ChatWnd Transient.ChatWnd, Function Interface.ChatWnd.OnEvent, 0x150624F0, 0x2971EA78, 16, 16)[7] <- NConsoleWnd::ConsolePostRender <- ConsolePostRender <- Draw <- UGameEngine::Draw <- GRenDev = fd320000 <- UWindowsViewport::Repaint <- UWindowsClient::Tick <- ClientTick <- UGameEngine::Tick <- UpdateWorld <- CMainLoop::UpdateTheWorld <- MainLoop

Exception:
Code [EXCEPTION_READ_VIOLATION DataAddress:0x00000000]
Address [0x119DA8E4]
SegCs [0x0023]

NWindow.DLL [0x117D0000] Offset [0x0020A8E4]

Come on guys no one can help? I got it all working and did what I was suppose to do and the script works for an hour or so and then I get that error which I posted above.

Please let me know if you know how to fix it thank you.
low count Of MOBS TO KILL, low dd who farm solo, and papper
    LUA Programming
ShowToClient("FAIRY","FAIRY COCON FARM ON");
 
 
--------------------------------------------------------------------------------
-- BASIC CONFIG
--------------------------------------------------------------------------------
NpcName1 = "Large Cocoon";
NpcName2 = "Cocoon";
CocconId1 = 32919;
CocconId2 = 32920;
NpcName3 = "Contaminated Cocoon";
NpcName4 = "Large Contaminated Cocoon";
CocconId3 = 19394;
CocconId4 = 19395;
CocconId5 = 19396;
GlimmerId = 17374;
 
----------Distance related settings-----------------------
rangeMobe = 1200;	--range from you to check for mobes
rangeMobe2 = 1200;	--range from you to check for Contaminated Cocoons
rangeMobe3 = 500;	--range to check for mobes when not attacking to force toon to move
rangeCoco = 1200;	--if some mobes up and range to target cocons
CoordinateDeviationFromTarget = 100;-- will move between -100 and 100 on x and y axis when mobs in area. but you are not attacking
monZ=800; --Z Range to check for monsters
monZ2=600; --Z Range to check for Contaminated Cocoons
 
monZ3=600; --Z Range to check for Large and regular cocoons
 
---------
--------------------------
---How to attack cocoons section 
useGlimmer="no";-- set to yes or no if you want to use Glimmer when you have it must be yes or no and not Yes/No
 
useAction="yes";-- set yes if you want to use an action to force attack cocoon/set no if u do not want to use an action
 
useMagic="no"; -- set yes if you want to use a skill to force attack cocoon/ set no if u do not want to use a skill
 
SkillId=10763;--set skill id here
 
-----------------------------
-------these fields below are for when you have target but cannot see bot will move close to monster
DistanceToGoClose = 1100;  -- set here the minimum distance from target that would make bot try to go near target.
CoordinateDeviationFromTarget2 = 1100; -- set here the max range that could be picked by bot randomly when trying go near target. 
MinimumMPPercentCheck = 65; -- dont go near target if ur mp is less than this.
-----------------------------------
--------------------------------------------------------------------------------
-- FUNCTIONS -- dont change nothing under this line
--------------------------------------------------------------------------------
MakeCancel = false;
--------------------------------------------------------------------------------
function WhatClassAmI()
	if(GetMe() ~= nil)then
		if(GetMe():GetClass() == 176) or (GetMe():GetClass() == 177) or (GetMe():GetClass() == 178) then
			return 22;
		end;
	end;
	return 2;
end;
--------------------------------------------------------------------------------
function GetItemsNumber(ItemId)
    local a = 0;
    invList = GetInventory();
    for item in invList.list do
        if (item.displayId == ItemId)  then
            a = item.ItemNum;
 
        end;
    end;
    if(a ~= nil)then
        return a;
    end
    if (a == nil)then
        return 0;
    end;
end;
 
 
--------------------------------------------------------------------------------
function CountMonstersInRange(r,r2)
	local l = GetMonsterList();
	local c = 0;
        local g = nil;
 
	for user in l.list do 
 
		if ((user:IsAlikeDeath() == false)  and (user:GetRangeTo(GetMe()) < r) and (user:GetLocation().Z <= monZ) and not ( (user:GetName() == NpcName1) or (user:GetName() == NpcName2) or (user:GetNpcId() == CocconId1) or (user:GetNpcId() == CocconId2) )  ) then
			c = c + 1;
 
                   end;
 
                if ( (user:IsAlikeDeath() == false) and (user:GetRangeTo(GetMe()) < r2) and (user:GetLocation().Z <= monZ2) and ( (user:GetName() == NpcName3) or (user:GetName() == NpcName4) or (user:GetNpcId() == CocconId3) or (user:GetNpcId() == CocconId4) or (user:GetNpcId() == CocconId5) ) ) then
			g = user:GetId();
		end;
 
 
	end;
 
	return g,c;
end; 
--------------------------------------------------------------------------------
function GetCocon&reg;
	local NpcL = GetNpcList();
	local a = {};
	local r1 = r;
 
	for user in NpcL.list do 
		r2 = GetMe():GetRangeTo(user);
 
		if(r2 <= r) and (r2 <= r1) then
			if ( (user:GetLocation().Z <= monZ3) and (user:GetName() == NpcName1) or (user:GetName() == NpcName2) or (user:GetNpcId() == CocconId1)or (user:GetNpcId() == CocconId2)) then
				r1 = r2;
				a[0] = user:GetId();
 
			end;
		end;
	end;
	return a;
end;
--------------------------------------------------------------------------------
-- Main loop
--------------------------------------------------------------------------------
repeat
	if(IsPaused() == false)  then
 
if (GetCocon(rangeCoco)[0] ~= nil)  then
MyTr = GetTarget();	
monsterId,rangeCount =  CountMonstersInRange(rangeMobe,rangeMobe2);
 
	if ( (MyTr == nil) and (rangeCount <= 2 ) )then -- do not set lower that 2
			Target(GetCocon(rangeCoco)[0]);		--Target fouded cocon
 
	repeat
		if (useGlimmer == "yes")then
			if (GetItemsNumber(GlimmerId) ==0) then 
				if (GetTarget()~=nil and GetTarget():IsPlayer() == false and GetTarget():IsPetOrSummon() == false ) then
                                       if(useMagic == "yes")then
						UseSkillRaw(SkillId, true, false);
                                       elseif(useAction == "yes")then
						Action(WhatClassAmI(), false, true);
                                       end;
				end;  
			elseif (GetItemsNumber(GlimmerId) > 0) then 
				UseItem(GlimmerId);
			end;
                 elseif (useGlimmer == "no") then
                                if (GetTarget()~=nil and GetTarget():IsPlayer() == false and GetTarget():IsPetOrSummon() == false ) then
                                        if(useMagic == "yes")then    
						UseSkillRaw(SkillId, true, false);	
                                        elseif(useAction == "yes")then
						Action(WhatClassAmI(), false, true);
					end;
                                 end;  	
                  end;
	Sleep(500);
 
	until GetTarget()~= nil and GetTarget():GetHp() == 0;
		ClearTargets();
		CancelTarget(false);
	end;
 
 
        if ( (MyTr ~= nil) and ( (MyTr:GetName() == NpcName1) or (MyTr:GetName() == NpcName2) or (MyTr:GetNpcId() == CocconId1) or (MyTr:GetNpcId() == CocconId2) )   )then
		Target(GetCocon(rangeCoco)[0]);		--Target found cocon			
 
	repeat
		if (useGlimmer == "yes")then
			if (GetItemsNumber(GlimmerId) ==0) then 
				if (GetTarget()~=nil and GetTarget():IsPlayer() == false and GetTarget():IsPetOrSummon() == false ) then
					if(useMagic == "yes")then    
						UseSkillRaw(SkillId, true, false);
					elseif(useAction == "yes")then
						Action(WhatClassAmI(), false, true);
					end;
				end;
			elseif (GetItemsNumber(GlimmerId) > 0) then 
				UseItem(GlimmerId);
			end;
		elseif (useGlimmer == "no") then
			if (GetTarget()~=nil and GetTarget():IsPlayer() == false and GetTarget():IsPetOrSummon() == false ) then
				if(useMagic == "yes")then    
					UseSkillRaw(SkillId, true, false);
				elseif(useAction == "yes")then
					Action(WhatClassAmI(), false, true);
				end;
			end;  	
		end;
 
	Sleep(500);         
	until GetTarget()~= nil and GetTarget():GetHp() == 0;
		ClearTargets();
		CancelTarget(false);
	end;
		if(MyTr ~= nil) and (MyTr:GetHp() == 0)then
			ClearTargets();
			CancelTarget(false);
			Sleep(500);
		end;
end;
 
 
monsterId,rangeCount = CountMonstersInRange(rangeMobe,rangeMobe2);
MyTr3 = GetTarget();
 
if  monsterId ~=nil and MyTr3 == nil and rangeCount <= 2  then
Target(monsterId);	
Sleep(500);
 
	if(GetTarget() ~= nil) and (GetTarget():GetHp() == 0)then
		ClearTargets();
		CancelTarget(false);
		Sleep(500);
	end;
 
 
end;
 
 
me= GetMe();
MyTr2 = GetTarget();
monsterId,rangeCount = CountMonstersInRange(rangeMobe3,rangeMobe2);
 
if (  MyTr2 == nil and not me:IsInCombat() and rangeCount > 2 )then
         loc= me:GetLocation();
         lX= loc.X + math.random(-CoordinateDeviationFromTarget, CoordinateDeviationFromTarget);
         lY= loc.Y + math.random(-CoordinateDeviationFromTarget, CoordinateDeviationFromTarget);
         MoveToNoWait(lX, lY , loc.Z);
	Sleep(500);
end;
 
 
if (IsPaused() == false) and (GetTarget() ~= nil) and (GetTarget():IsAlikeDeath() == false or ( ((GetTarget():GetName() == NpcName1) or (GetTarget():GetName() == NpcName2) or (GetTarget():GetNpcId() == CocconId1)or (GetTarget():GetNpcId() == CocconId2) ) and not GetTarget():GetHp() == 0) ) and (GetMe() ~= nil) and (GetMe():GetMpPercent() > MinimumMPPercentCheck) and (GetDistanceVector(GetTarget():GetLocation(),GetMe():GetLocation()) < 8000) and (GetDistanceVector(GetTarget():GetLocation(),GetMe():GetLocation()) > DistanceToGoClose) then
	loc =  GetTarget():GetLocation();
	lX = loc.X + math.random(-CoordinateDeviationFromTarget2, CoordinateDeviationFromTarget2);
	lY = loc.Y + math.random(-CoordinateDeviationFromTarget2, CoordinateDeviationFromTarget2);
	MoveToNoWait(lX, lY, loc.Z);
end;
 
Sleep(800);
end;
 
Sleep(1000);
until false;




LOT Of MOBS TO KILL, good dd who farm aeo
    LUA Programming
ShowToClient("FAIRY","FAIRY COCON FARM ON");
--------------------------------------------------------------------------------
-- BASIC CONFIG
--------------------------------------------------------------------------------
NpcName1 = "Large Cocoon";
NpcName2 = "Cocoon";
CocconId1 = 32919;
CocconId2 = 32920;
NpcName3 = "Contaminated Cocoon";
NpcName4 = "Large Contaminated Cocoon";
CocconId3 = 19394;
CocconId4 = 19395;
CocconId5 = 19396;
GlimmerId = 17374;
 
----------Distance related settings-----------------------
rangeMobe = 100;	--range from you to check for mobes
rangeMobe2 = 800;	--range from you to check for Contaminated Cocoons
rangeMobe3 = 800;	--range to check for mobes when not attacking to force toon to move
rangeCoco = 800;	--if some mobes up and range to target cocons
CoordinateDeviationFromTarget = 100;-- will move between -100 and 100 on x and y axis when mobs in area. but you are not attacking
monZ=450; --Z Range to check for monsters
monZ2=450; --Z Range to check for Contaminated Cocoons
 
monZ3=450; --Z Range to check for Large and regular cocoons
 
 
---------
--------------------------
---How to attack cocoons section 
useGlimmer="no";-- set to yes or no if you want to use Glimmer when you have it must be yes or no and not Yes/No
 
useAction="yes";-- set yes if you want to use an action to force attack cocoon/set no if u do not want to use an action
 
useMagic="no"; -- set yes if you want to use a skill to force attack cocoon/ set no if u do not want to use a skill
 
SkillId=10763;--set skill id here
 
-----------------------------
-------these fields below are for when you have target but cannot see bot will move close to monster
DistanceToGoClose = 1100;  -- set here the minimum distance from target that would make bot try to go near target.
CoordinateDeviationFromTarget2 = 1100; -- set here the max range that could be picked by bot randomly when trying go near target. 
MinimumMPPercentCheck = 65; -- dont go near target if ur mp is less than this.
-----------------------------------
--------------------------------------------------------------------------------
-- FUNCTIONS -- dont change nothing under this line
--------------------------------------------------------------------------------
MakeCancel = false;
--------------------------------------------------------------------------------
function WhatClassAmI()
	if(GetMe() ~= nil)then
		if(GetMe():GetClass() == 176) or (GetMe():GetClass() == 177) or (GetMe():GetClass() == 178) then
			return 22;
		end;
	end;
	return 2;
end;
--------------------------------------------------------------------------------
function GetItemsNumber(ItemId)
    local a = 0;
    invList = GetInventory();
    for item in invList.list do
        if (item.displayId == ItemId)  then
            a = item.ItemNum;
 
        end;
    end;
    if(a ~= nil)then
        return a;
    end
    if (a == nil)then
        return 0;
    end;
end;
 
 
--------------------------------------------------------------------------------
function CountMonstersInRange(r,r2)
	local l = GetMonsterList();
	local c = 0;
        local g = nil;
 
	for user in l.list do 
 
		if ((user:IsAlikeDeath() == false)  and (user:GetRangeTo(GetMe()) < r) and (user:GetLocation().Z <= monZ) and not ( (user:GetName() == NpcName1) or (user:GetName() == NpcName2) or (user:GetNpcId() == CocconId1) or (user:GetNpcId() == CocconId2) )  ) then
			c = c + 1;
 
                   end;
 
                if ( (user:IsAlikeDeath() == false) and (user:GetRangeTo(GetMe()) < r2) and (user:GetLocation().Z <= monZ2) and ( (user:GetName() == NpcName3) or (user:GetName() == NpcName4) or (user:GetNpcId() == CocconId3) or (user:GetNpcId() == CocconId4) or (user:GetNpcId() == CocconId5) ) ) then
			g = user:GetId();
		end;
 
 
	end;
 
	return g,c;
end; 
--------------------------------------------------------------------------------
function GetCocon&reg;
	local NpcL = GetNpcList();
	local a = {};
	local r1 = r;
 
	for user in NpcL.list do 
		r2 = GetMe():GetRangeTo(user);
 
		if(r2 <= r) and (r2 <= r1) then
			if ( (user:GetLocation().Z <= monZ3) and (user:GetName() == NpcName1) or (user:GetName() == NpcName2) or (user:GetNpcId() == CocconId1)or (user:GetNpcId() == CocconId2)) then
				r1 = r2;
				a[0] = user:GetId();
 
			end;
		end;
	end;
	return a;
end;
--------------------------------------------------------------------------------
-- Main loop
--------------------------------------------------------------------------------
repeat
	if(IsPaused() == false)  then
 
if (GetCocon(rangeCoco)[0] ~= nil)  then
MyTr = GetTarget();	
monsterId,rangeCount =  CountMonstersInRange(rangeMobe,rangeMobe2);
 
--	if ( (MyTr == nil) and (rangeCount <= 0 ) )then -- do not set lower that 2
			Target(GetCocon(rangeCoco)[0]);		--Target fouded cocon
 
	repeat
		if (useGlimmer == "yes")then
			if (GetItemsNumber(GlimmerId) ==0) then 
				if (GetTarget()~=nil and GetTarget():IsPlayer() == false and GetTarget():IsPetOrSummon() == false ) then
                                       if(useMagic == "yes")then
						UseSkillRaw(SkillId, true, false);
                                       elseif(useAction == "yes")then
						Action(WhatClassAmI(), false, true);
                                       end;
				end;  
			elseif (GetItemsNumber(GlimmerId) > 0) then 
				UseItem(GlimmerId);
			end;
                 elseif (useGlimmer == "no") then
                                if (GetTarget()~=nil and GetTarget():IsPlayer() == false and GetTarget():IsPetOrSummon() == false ) then
                                        if(useMagic == "yes")then    
						UseSkillRaw(SkillId, true, false);	
                                        elseif(useAction == "yes")then
						Action(WhatClassAmI(), false, true);
					end;
                                 end;  	
                  end;
	Sleep(500);
 
	until GetTarget()~= nil and GetTarget():GetHp() == 0;
		ClearTargets();
		CancelTarget(false);
--	end;
 
 
        if ( (MyTr ~= nil) and ( (MyTr:GetName() == NpcName1) or (MyTr:GetName() == NpcName2) or (MyTr:GetNpcId() == CocconId1) or (MyTr:GetNpcId() == CocconId2) )   )then
		Target(GetCocon(rangeCoco)[0]);		--Target found cocon			
 
	repeat
		if (useGlimmer == "yes")then
			if (GetItemsNumber(GlimmerId) ==0) then 
				if (GetTarget()~=nil and GetTarget():IsPlayer() == false and GetTarget():IsPetOrSummon() == false ) then
					if(useMagic == "yes")then    
						UseSkillRaw(SkillId, true, false);
					elseif(useAction == "yes")then
						Action(WhatClassAmI(), false, true);
					end;
				end;
			elseif (GetItemsNumber(GlimmerId) > 0) then 
				UseItem(GlimmerId);
			end;
		elseif (useGlimmer == "no") then
			if (GetTarget()~=nil and GetTarget():IsPlayer() == false and GetTarget():IsPetOrSummon() == false ) then
				if(useMagic == "yes")then    
					UseSkillRaw(SkillId, true, false);
				elseif(useAction == "yes")then
					Action(WhatClassAmI(), false, true);
				end;
			end;  	
		end;
 
	Sleep(500);         
	until GetTarget()~= nil and GetTarget():GetHp() == 0;
		ClearTargets();
		CancelTarget(false);
	end;
		if(MyTr ~= nil) and (MyTr:GetHp() == 0)then
			ClearTargets();
			CancelTarget(false);
			Sleep(500);
		end;
end;
 
 
monsterId,rangeCount = CountMonstersInRange(rangeMobe,rangeMobe2);
MyTr3 = GetTarget();
 
if  monsterId ~=nil and MyTr3 == nil and rangeCount <= 0  then
Target(monsterId);	
Sleep(500);
 
	if(GetTarget() ~= nil) and (GetTarget():GetHp() == 0)then
		ClearTargets();
		CancelTarget(false);
		Sleep(500);
	end;
 
 
end;
 
 
me= GetMe();
MyTr2 = GetTarget();
monsterId,rangeCount = CountMonstersInRange(rangeMobe3,rangeMobe2);
 
if (  MyTr2 == nil and not me:IsInCombat() and rangeCount > 2 )then
         loc= me:GetLocation();
         lX= loc.X + math.random(-CoordinateDeviationFromTarget, CoordinateDeviationFromTarget);
         lY= loc.Y + math.random(-CoordinateDeviationFromTarget, CoordinateDeviationFromTarget);
         MoveToNoWait(lX, lY , loc.Z);
	Sleep(500);
end;
 
 
if (IsPaused() == false) and (GetTarget() ~= nil) and (GetTarget():IsAlikeDeath() == false or ( ((GetTarget():GetName() == NpcName1) or (GetTarget():GetName() == NpcName2) or (GetTarget():GetNpcId() == CocconId1)or (GetTarget():GetNpcId() == CocconId2) ) and not GetTarget():GetHp() == 0) ) and (GetMe() ~= nil) and (GetMe():GetMpPercent() > MinimumMPPercentCheck) and (GetDistanceVector(GetTarget():GetLocation(),GetMe():GetLocation()) < 8000) and (GetDistanceVector(GetTarget():GetLocation(),GetMe():GetLocation()) > DistanceToGoClose) then
	loc =  GetTarget():GetLocation();
	lX = loc.X + math.random(-CoordinateDeviationFromTarget2, CoordinateDeviationFromTarget2);
	lY = loc.Y + math.random(-CoordinateDeviationFromTarget2, CoordinateDeviationFromTarget2);
	MoveToNoWait(lX, lY, loc.Z);
end;
 
Sleep(800);
end;
 
Sleep(1000);
until false;

Code:
NpcName1 = "Large Cocoon"
NpcName2 = "Cocoon"
NpcName3 = "Contaminated Cocoon"
NpcName4 = "Large Contaminated Cocoon"
CocconId1 = 32919
CocconId2 = 32920
CocconId3 = 19393
CocconId4 = 19394

-- id 5 dont exist 3 and 4 change.

function GetCocon(r) -- in line 100 error forum html code
@theqqmaster not sure what you mean

@13dk13 do you mean I should delete cocconid5 & change id3 & id4 to those new numbers?
(09-24-2014 18:23 PM)banj36 Wrote: [ -> ]@theqqmaster not sure what you mean

@13dk13 do you mean I should delete cocconid5 & change id3 & id4 to those new numbers?

I have retired from updating the script, it has not been tested against the new update. If someone wants to take over for me that is fine.
Pages: 1 2 3
Reference URL's