![]() |
| |||||||
| Home | GzP Upload | GzP Arcade | Register | vbBux / vbPlaza | All Albums | FAQ | Donate | Members List | Calendar | Mark Forums Read |
![]() |
| | Thread Tools | Display Modes |
| | #1 |
| Registered User | My Heal Function Ok, I missed the release of the latest wtfux script and I cannot find it anywhere, so i decided i would try it myself. I tried to make a heal function, and this is what i got. Code: function wtfux.heal ( Arguments )
local wtfuxtarget = GetTarget()
if(wtfuxtarget ~= nil) then
Actor = wtfuxtarget
else
Actor = GetPlayer()
end
if("..Actor:Get( 'Health' )" <= 0."..Arguments.." * "..Actor:Get( MaxHealth )")
loadstring("UseSkill(Actor, Skills.Assist.Heal)")()
end
loadstring("UseSKill(Actor, "..Arguments..")")()
Log("Starting to heal "..Actor:Get( 'Name' )" whenever his/her health is below "..Arguments.."")
end What I am asking is for someone to tell me how I can test the actor's health. Oh and by the way, I copied and pasted some of it from other functions by wtfux so they probably aren't used in the right spot. Thanks. |
| | |
| Sponsored Links |
| |
| | #2 |
| Registered User | Re: My Heal Function check out your code Code: function wtfux.heal ( Arguments )
local wtfuxtarget = GetTarget()
if(wtfuxtarget ~= nil) then
Actor = wtfuxtarget
else
Actor = GetPlayer()
end
if("..Actor:Get( 'Health' )" <= 0."..Arguments.." * "..Actor:Get( MaxHealth )")
loadstring("UseSkill(Actor, Skills.Assist.Heal)")()
end
loadstring("UseSKill(Actor, "..Arguments..")")()
Log("Starting to heal "..Actor:Get( 'Name' )" whenever his/her health is below "..Arguments.."")
end Last edited by joojoobee; 06-21-2008 at 11:59 AM. |
| | |
| | #3 |
| Registered User | Re: My Heal Function Lol oops SKill. I fixed the capitals, but it still doesn't work. Thanks for your help joojoobee. EDIT: Ok I opened up my FlyFF Automaton.log file and found this: Code: [18:14:50] Log: Log file open, Thu Jun 19 18:14:50 2008
[18:14:50] Init: Name subsystem initialized.
[18:14:50] Init: Object subsystem initialized.
[18:14:50] Init: Aerospace Engine (V0.0.0.1)
[18:14:50] Init: Copyright © 2008 dBased. All rights reserved.
[18:14:50] Init: Built on Jun 16 2008 02:01:15
[18:14:50] Init: Compiled with Visual C++
[18:14:50] Init: Starting up...
[18:14:50] Storage: Selected profile: Standard
[18:14:50] Automaton: FlyFF Automaton (V1.0.0.0)
[18:14:50] Automaton: Copyright © 2008 dBased. All rights reserved.
[18:14:50] Automaton: System initialized and ready.
[18:14:50] Automaton: Setting up interface Automaton.Logger!
[18:14:50] Automaton: Setting up interface Automaton.Scripting!
[18:14:50] Scripting: Lua 5.1.3
[18:14:50] Scripting: Copyright (C) 1994-2008 Lua.org, PUC-Rio
[18:14:50] Scripting: Loading standard Lua libraries...
[18:14:50] Scripting: Loaded library: package
[18:14:50] Scripting: Loaded library: table
[18:14:50] Scripting: Loaded library: io
[18:14:50] Scripting: Loaded library: os
[18:14:50] Scripting: Loaded library: string
[18:14:50] Scripting: Loaded library: math
[18:14:59] Scripting: Loaded script file: resource://101
[18:14:59] Scripting: Registered script Example.
[18:14:59] Scripting: Loaded script file: Scripts\Example.atmt
[18:14:59] Automaton: Setting up interface Automaton.LegacyUI!
[18:14:59] Automaton: Waiting for game to startup...
[18:15:00] Automaton: Caught game startup completion event.
[18:15:00] Automaton: Trying offset template: resource://103
[18:15:03] Automaton: Loaded offsets using template: resource://103
[18:15:03] Automaton: Launching GameGuard Sandbox...
[18:15:03] GGS: GameGuard Sandbox v1.0.0
[18:15:03] GGS: Copyright (C) 2008 dBased. All rights reserved.
[18:15:04] GGS: Launched server process successfully!
[18:15:04] GGS: Startup completed!
[18:15:04] Automaton: Setting up client library hooks.
[10:57:18] Log: Log file open, Sat Jun 21 10:57:18 2008
[10:57:18] Init: Name subsystem initialized.
[10:57:18] Init: Object subsystem initialized.
[10:57:18] Init: Aerospace Engine (V0.0.0.1)
[10:57:18] Init: Copyright © 2008 dBased. All rights reserved.
[10:57:18] Init: Built on Jun 16 2008 02:01:15
[10:57:18] Init: Compiled with Visual C++
[10:57:18] Init: Starting up...
[10:57:18] Storage: Selected profile: Standard
[10:57:18] Automaton: FlyFF Automaton (V1.0.0.0)
[10:57:18] Automaton: Copyright © 2008 dBased. All rights reserved.
[10:57:18] Automaton: System initialized and ready.
[10:57:18] Automaton: Setting up interface Automaton.Logger!
[10:57:18] Automaton: Setting up interface Automaton.Scripting!
[10:57:18] Scripting: Lua 5.1.3
[10:57:18] Scripting: Copyright (C) 1994-2008 Lua.org, PUC-Rio
[10:57:18] Scripting: Loading standard Lua libraries...
[10:57:18] Scripting: Loaded library: package
[10:57:18] Scripting: Loaded library: table
[10:57:18] Scripting: Loaded library: io
[10:57:18] Scripting: Loaded library: os
[10:57:18] Scripting: Loaded library: string
[10:57:18] Scripting: Loaded library: math
[10:57:28] Scripting: Loaded script file: resource://101
[10:57:28] Scripting: Execution of script file Scripts\wtfux.atmt failed: [string "..."]:584: ')' expected (to close '(' at line 583) near 'end'
[10:57:28] Automaton: Setting up interface Automaton.LegacyUI!
[10:57:28] Automaton: Waiting for game to startup...
[10:57:30] Automaton: Caught game startup completion event.
[10:57:30] Automaton: Trying offset template: resource://103
[10:57:32] Automaton: Loaded offsets using template: resource://103
[10:57:32] Automaton: Launching GameGuard Sandbox...
[10:57:32] GGS: GameGuard Sandbox v1.0.0
[10:57:32] GGS: Copyright (C) 2008 dBased. All rights reserved.
[10:57:34] GGS: Launched server process successfully!
[10:57:34] GGS: Startup completed!
[10:57:34] Automaton: Setting up client library hooks.
[11:01:19] Automaton: Exiting...
[11:01:19] Log: Log file closed, Sat Jun 21 11:01:19 2008
[11:02:45] Log: Log file open, Sat Jun 21 11:02:45 2008
[11:02:45] Init: Name subsystem initialized.
[11:02:45] Init: Object subsystem initialized.
[11:02:45] Init: Aerospace Engine (V0.0.0.1)
[11:02:45] Init: Copyright © 2008 dBased. All rights reserved.
[11:02:45] Init: Built on Jun 16 2008 02:01:15
[11:02:45] Init: Compiled with Visual C++
[11:02:45] Init: Starting up...
[11:02:45] Storage: Selected profile: Standard
[11:02:45] Automaton: FlyFF Automaton (V1.0.0.0)
[11:02:45] Automaton: Copyright © 2008 dBased. All rights reserved.
[11:02:45] Automaton: System initialized and ready.
[11:02:45] Automaton: Setting up interface Automaton.Logger!
[11:02:45] Automaton: Setting up interface Automaton.Scripting!
[11:02:45] Scripting: Lua 5.1.3
[11:02:45] Scripting: Copyright (C) 1994-2008 Lua.org, PUC-Rio
[11:02:45] Scripting: Loading standard Lua libraries...
[11:02:45] Scripting: Loaded library: package
[11:02:45] Scripting: Loaded library: table
[11:02:45] Scripting: Loaded library: io
[11:02:45] Scripting: Loaded library: os
[11:02:45] Scripting: Loaded library: string
[11:02:45] Scripting: Loaded library: math
[11:02:54] Scripting: Loaded script file: resource://101
[11:02:54] Scripting: Execution of script file Scripts\wtfux.atmt failed: [string "..."]:584: ')' expected (to close '(' at line 583) near 'end'
[11:02:54] Automaton: Setting up interface Automaton.LegacyUI!
[11:02:54] Automaton: Waiting for game to startup...
[11:02:56] Automaton: Caught game startup completion event.
[11:02:56] Automaton: Trying offset template: resource://103
[11:02:58] Automaton: Loaded offsets using template: resource://103
[11:02:58] Automaton: Launching GameGuard Sandbox...
[11:02:58] GGS: GameGuard Sandbox v1.0.0
[11:02:58] GGS: Copyright (C) 2008 dBased. All rights reserved.
[11:02:59] GGS: Launched server process successfully!
[11:02:59] GGS: Startup completed!
[11:02:59] Automaton: Setting up client library hooks.
[12:00:23] Log: Log file open, Sat Jun 21 12:00:23 2008
[12:00:23] Init: Name subsystem initialized.
[12:00:23] Init: Object subsystem initialized.
[12:00:23] Init: Aerospace Engine (V0.0.0.1)
[12:00:23] Init: Copyright © 2008 dBased. All rights reserved.
[12:00:23] Init: Built on Jun 16 2008 02:01:15
[12:00:23] Init: Compiled with Visual C++
[12:00:23] Init: Starting up...
[12:00:23] Storage: Selected profile: Standard
[12:00:23] Automaton: FlyFF Automaton (V1.0.0.0)
[12:00:23] Automaton: Copyright © 2008 dBased. All rights reserved.
[12:00:23] Automaton: System initialized and ready.
[12:00:23] Automaton: Setting up interface Automaton.Logger!
[12:00:23] Automaton: Setting up interface Automaton.Scripting!
[12:00:23] Scripting: Lua 5.1.3
[12:00:23] Scripting: Copyright (C) 1994-2008 Lua.org, PUC-Rio
[12:00:23] Scripting: Loading standard Lua libraries...
[12:00:23] Scripting: Loaded library: package
[12:00:23] Scripting: Loaded library: table
[12:00:23] Scripting: Loaded library: io
[12:00:23] Scripting: Loaded library: os
[12:00:23] Scripting: Loaded library: string
[12:00:23] Scripting: Loaded library: math
[12:00:31] Scripting: Loaded script file: resource://101
[12:00:31] Scripting: Registered script wtfux.
[12:00:31] Scripting: [Script] wtfux scripts loaded (Version 0.7)
[12:00:31] Scripting: [Script] wtfux scripts by wtfux from www.automaton.pl.am
[12:00:31] Scripting: [Script] Please note: This script is made to improve your gameplay. It is not ment to disturb other players!
[12:00:31] Scripting: [Script] wtfux scripts: Have fun!
[12:00:31] Scripting: Loaded script file: Scripts\wtfux.atmt
[12:00:31] Automaton: Setting up interface Automaton.LegacyUI!
[12:00:31] Automaton: Waiting for game to startup...
[12:00:32] Automaton: Caught game startup completion event.
[12:00:32] Automaton: Trying offset template: resource://103
[12:00:34] Automaton: Loaded offsets using template: resource://103
[12:00:34] Automaton: Launching GameGuard Sandbox...
[12:00:34] GGS: GameGuard Sandbox v1.0.0
[12:00:34] GGS: Copyright (C) 2008 dBased. All rights reserved.
[12:00:35] GGS: Launched server process successfully!
[12:00:35] GGS: Startup completed!
[12:00:35] Automaton: Setting up client library hooks.
[12:05:45] Automaton: Logging player into the service!
[12:08:37] Log: Garbage collector invoked, collected and purged 16 unreferenced objects.
[14:51:31] Log: Log file open, Sat Jun 21 14:51:31 2008
[14:51:31] Init: Name subsystem initialized.
[14:51:31] Init: Object subsystem initialized.
[14:51:31] Init: Aerospace Engine (V0.0.0.1)
[14:51:31] Init: Copyright © 2008 dBased. All rights reserved.
[14:51:31] Init: Built on Jun 16 2008 02:01:15
[14:51:31] Init: Compiled with Visual C++
[14:51:31] Init: Starting up...
[14:51:31] Storage: Selected profile: Standard
[14:51:31] Automaton: FlyFF Automaton (V1.0.0.0)
[14:51:31] Automaton: Copyright © 2008 dBased. All rights reserved.
[14:51:31] Automaton: System initialized and ready.
[14:51:31] Automaton: Setting up interface Automaton.Logger!
[14:51:31] Automaton: Setting up interface Automaton.Scripting!
[14:51:31] Scripting: Lua 5.1.3
[14:51:31] Scripting: Copyright (C) 1994-2008 Lua.org, PUC-Rio
[14:51:31] Scripting: Loading standard Lua libraries...
[14:51:31] Scripting: Loaded library: package
[14:51:31] Scripting: Loaded library: table
[14:51:31] Scripting: Loaded library: io
[14:51:31] Scripting: Loaded library: os
[14:51:31] Scripting: Loaded library: string
[14:51:31] Scripting: Loaded library: math
[14:51:44] Scripting: Loaded script file: resource://101
[14:51:44] Scripting: Execution of script file Scripts\wtfux.atmt failed: [string "..."]:582: ')' expected near '"..Arguments.."'
[14:51:44] Automaton: Setting up interface Automaton.LegacyUI!
[14:51:44] Automaton: Waiting for game to startup...
[14:51:46] Automaton: Caught game startup completion event.
[14:51:46] Automaton: Trying offset template: resource://103
[14:51:48] Automaton: Loaded offsets using template: resource://103
[14:51:48] Automaton: Launching GameGuard Sandbox...
[14:51:48] GGS: GameGuard Sandbox v1.0.0
[14:51:48] GGS: Copyright (C) 2008 dBased. All rights reserved.
[14:51:50] GGS: Launched server process successfully!
[14:51:50] GGS: Startup completed!
[14:51:50] Automaton: Setting up client library hooks.
[15:00:31] Automaton: Exiting...
[15:00:31] Log: Log file closed, Sat Jun 21 15:00:31 2008
[15:05:26] Log: Log file open, Sat Jun 21 15:05:26 2008
[15:05:26] Init: Name subsystem initialized.
[15:05:26] Init: Object subsystem initialized.
[15:05:26] Init: Aerospace Engine (V0.0.0.1)
[15:05:26] Init: Copyright © 2008 dBased. All rights reserved.
[15:05:26] Init: Built on Jun 16 2008 02:01:15
[15:05:26] Init: Compiled with Visual C++
[15:05:26] Init: Starting up...
[15:05:26] Storage: Selected profile: Standard
[15:05:26] Automaton: FlyFF Automaton (V1.0.0.0)
[15:05:26] Automaton: Copyright © 2008 dBased. All rights reserved.
[15:05:26] Automaton: System initialized and ready.
[15:05:26] Automaton: Setting up interface Automaton.Logger!
[15:05:26] Automaton: Setting up interface Automaton.Scripting!
[15:05:26] Scripting: Lua 5.1.3
[15:05:26] Scripting: Copyright (C) 1994-2008 Lua.org, PUC-Rio
[15:05:26] Scripting: Loading standard Lua libraries...
[15:05:26] Scripting: Loaded library: package
[15:05:26] Scripting: Loaded library: table
[15:05:26] Scripting: Loaded library: io
[15:05:26] Scripting: Loaded library: os
[15:05:26] Scripting: Loaded library: string
[15:05:26] Scripting: Loaded library: math
[15:05:34] Scripting: Loaded script file: resource://101
[15:05:34] Scripting: Execution of script file Scripts\wtfux.atmt failed: [string "..."]:582: ')' expected near '"..Arguments.."'
[15:05:34] Automaton: Setting up interface Automaton.LegacyUI!
[15:05:34] Automaton: Waiting for game to startup...
[15:05:35] Automaton: Caught game startup completion event.
[15:05:35] Automaton: Trying offset template: resource://103
[15:05:38] Automaton: Loaded offsets using template: resource://103
[15:05:38] Automaton: Launching GameGuard Sandbox...
[15:05:38] GGS: GameGuard Sandbox v1.0.0
[15:05:38] GGS: Copyright (C) 2008 dBased. All rights reserved.
[15:05:39] GGS: Launched server process successfully!
[15:05:39] GGS: Startup completed!
[15:05:39] Automaton: Setting up client library hooks.
[15:21:34] Log: Log file open, Sat Jun 21 15:21:34 2008
[15:21:34] Init: Name subsystem initialized.
[15:21:34] Init: Object subsystem initialized.
[15:21:34] Init: Aerospace Engine (V0.0.0.1)
[15:21:34] Init: Copyright © 2008 dBased. All rights reserved.
[15:21:34] Init: Built on Jun 16 2008 02:01:15
[15:21:34] Init: Compiled with Visual C++
[15:21:34] Init: Starting up...
[15:21:34] Storage: Selected profile: Standard
[15:21:34] Automaton: FlyFF Automaton (V1.0.0.0)
[15:21:34] Automaton: Copyright © 2008 dBased. All rights reserved.
[15:21:34] Automaton: System initialized and ready.
[15:21:34] Automaton: Setting up interface Automaton.Logger!
[15:21:34] Automaton: Setting up interface Automaton.Scripting!
[15:21:34] Scripting: Lua 5.1.3
[15:21:34] Scripting: Copyright (C) 1994-2008 Lua.org, PUC-Rio
[15:21:34] Scripting: Loading standard Lua libraries...
[15:21:34] Scripting: Loaded library: package
[15:21:34] Scripting: Loaded library: table
[15:21:34] Scripting: Loaded library: io
[15:21:34] Scripting: Loaded library: os
[15:21:34] Scripting: Loaded library: string
[15:21:34] Scripting: Loaded library: math
[15:21:42] Scripting: Loaded script file: resource://101
[15:21:42] Scripting: Execution of script file Scripts\wtfux.atmt failed: [string "..."]:582: ')' expected near '"..Arguments.."'
[15:21:42] Automaton: Setting up interface Automaton.LegacyUI!
[15:21:42] Automaton: Waiting for game to startup...
[15:21:43] Automaton: Caught game startup completion event.
[15:21:43] Automaton: Trying offset template: resource://103
[15:21:45] Automaton: Loaded offsets using template: resource://103
[15:21:45] Automaton: Launching GameGuard Sandbox...
[15:21:45] GGS: GameGuard Sandbox v1.0.0
[15:21:45] GGS: Copyright (C) 2008 dBased. All rights reserved.
[15:21:46] GGS: Launched server process successfully!
[15:21:46] GGS: Startup completed!
[15:21:46] Automaton: Setting up client library hooks. Last edited by Nini; 06-21-2008 at 12:28 PM. |
| | |
| | #4 |
| Registered User | Re: My Heal Function This is really a stab in the dark but try this: Code: loadstring("UseSkill(Actor, '"..Arguments.."')")() |
| | |
| | #5 |
| Registered User | Re: My Heal Function But then wouldn't there need to be single quotes around all the "..Arguments.."? The script works if I just get rid of the second if statement, it just doesn't do anything. Oh yeah, how would I create a function that would StopHealing? Last edited by Nini; 06-21-2008 at 12:43 PM. |
| | |
| | #6 |
| Registered User | Re: My Heal Function Code: local multiplier = Arguments * 0.1 if(Actor:Get( "Health" ) <= multiplier * Actor:Get( "MaxHealth" )) rofl I also just noticed that you can do this instead: instead of loadstring to heal, just do" Code: ExecuteCommand ( "skill Skills.Assist.Heal") Just set a variable to turn your healing on and off Code: local doHealing = false Last edited by joojoobee; 06-21-2008 at 12:57 PM. |
| | |
| The Following User Says Thank You to joojoobee For This Useful Post: | Nini (06-21-2008) |
| | #7 |
| Registered User | Re: My Heal Function Thanks for all your help joojoobee Last edited by Nini; 06-21-2008 at 01:06 PM. |
| | |
| | #8 |
| Registered User | Re: My Heal Function hrmms try putting the second comparison in parenthsis Code: if(Actor:Get( "Health" ) <= (multiplier * Actor:Get( "MaxHealth" ))) |
| | |
| | #9 |
| Registered User | Re: My Heal Function I don't really understand what i am supposed to put in the OnTick. Lol i just started this today. Nevermind, I found a wtfux script with heal on it. Thanks though. Last edited by Nini; 06-21-2008 at 01:29 PM. |
| | |
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
| |