Iris2.de http://iris2.de/forum/ |
|
hotkey plugins http://iris2.de/forum/viewtopic.php?f=21&t=1362 |
Page 1 of 2 |
Author: | buddy [ Mon Mar 09, 2009 8:17 pm ] |
Post subject: | hotkey plugins |
i am working on better casting spells hotkey plugin, i had a problem for example when trying to autoheal with mymacros.lua, i need to click everytime the hotkey, if not i fizzles my spells cuz it recast the spell before getting first target... i want to create a plugin to let me cast spell and autolasttarget/selftarget, while holding pressed a hotkey, for example, i want to do this action: SetMacro("1", function() MacroCmd_MiniHealCureSelf()end)) any suggestion on how to do this... i am kinda new to lua. |
Author: | ghoulsblade [ Tue Mar 10, 2009 12:37 am ] |
Post subject: | |
so you want to make a plugin that sets a few hotkeys automatically at startup ? what happens if you just write SetMacro("1", function() MacroCmd_MiniHealCureSelf()end)) in your plugin file ? i think that should work without any additional work |
Author: | buddy [ Tue Mar 10, 2009 1:10 am ] |
Post subject: | |
well yes it works, but i am trying to script something so if i hold down "1" it will run the script one time, when finished, and while still holding the key it will keep runing the script / macro, right now, there is a huge delay after key strokes send if i hold anykey, is there a way to reduce this delay ?, i tried in chat even, i pressed and hold down the key "J" it just wrote one J in the chat window :) |
Author: | ghoulsblade [ Tue Mar 10, 2009 1:33 pm ] |
Post subject: | |
try Code: RegisterStepper(function ()
if (gKeyPressed[key_a]) then -- ... your code here ... end end) |
Author: | buddy [ Tue Mar 10, 2009 5:58 pm ] |
Post subject: | |
it worked tx a lot :) |
Author: | buddy [ Wed Mar 11, 2009 5:56 pm ] |
Post subject: | |
another question, is there any way to select a target and show their healthbar without the plugin already set in iris2,in the normal client when u set a macro for this it popup the healthbar of that mobile. i was trying to use if (gKeyPressed[key_a]) then SelectNextMobile() end but it is not working correctly... seems like select next mobile is not active in the server,same as MacroCmd_AttackSelectedMobile() |
Author: | buddy [ Thu Mar 12, 2009 12:01 am ] |
Post subject: | |
is there any variable that is active while casting any spell, for example while castingspell do variablex = true end variablex = false |
Author: | ghoulsblade [ Thu Mar 12, 2009 2:46 am ] |
Post subject: | |
if you want a variable to be true while a spell is being cast, this should work most of the time : RegisterListener("Hook_SendSpell",function (spellid) gMySpellIsCasting = true end) RegisterListener("Hook_TargetMode_Start",function () gMySpellIsCasting = false end) RegisterListener("Hook_Spell_Interrupt",function () gMySpellIsCasting = false end) however, there is no generic way to detect the end of a spell that affects yourself, like nightvision. in Hook_SendSpell : you can use GetSpellNameByID(spellid) to transform the spellid into the name of the spell, e.g. for use by print(spellid,GetSpellNameByID(spellid)) (shows up in the black console window) |
Author: | buddy [ Thu Mar 12, 2009 8:56 am ] |
Post subject: | |
those three lines worked, but i had to add a wait line after those three because it was crashing cuz memory problems it said in the console, spell macro is almost done, at least for healing/and few attacking, sorry for bothering but i have some more questions, i noticed that when i try to cast while frozen or paralyzed a spell i get into a infinite loop, my question is: is there any way to get check if my character is paralyzed with parablow or paralyze spell? is this stat different than the froze u get while casting a spell? |
Author: | ghoulsblade [ Thu Mar 12, 2009 2:11 pm ] |
Post subject: | |
Maybe one of the unknown flags in the playermobile, but it might also be impossible to tell if the player is frozen. Code: local bPoisoned = TestBit(GetPlayerMobile().flag,kMobileFlag_Poisoned)
kMobileFlag_Unknown1 = hex2num("0x01") kMobileFlag_Unknown2 = hex2num("0x02") -- either CanAlterPaperdoll (necro) or Female (jerrit) kMobileFlag_Poisoned = hex2num("0x04") kMobileFlag_GoldenHealth = hex2num("0x08") -- = YellowHits , healthbar gets yellow (bleed attack, caused by troglodytes for example, can't healt then) kMobileFlag_FactionShip = hex2num("0x10") -- unsure why client needs to know kMobileFlag_Movable = hex2num("0x20") -- Movable if normally not kMobileFlag_WarMode = hex2num("0x40") kMobileFlag_Hidden = hex2num("0x80") -- probably self while hiding/stealth-walking, displayed as gray in original client |
Author: | buddy [ Thu Mar 12, 2009 3:40 pm ] |
Post subject: | |
wow, u are like wikipedia :) tx for the answers, i can get mortal status from this too :), i will post plugins as soon as i finish all spells and enable/disable in game hotkey. i like iris2 so far, is kinda user friendly, maybe u guys could develop a less graphical engine too for pvp in servers like Pre-AOS, i was checking some files to edit the animations, so far i am improving it by disabling some animations, any suggestion about this ? one more question, can i smooth walk/run in iris 2d? |
Author: | ghoulsblade [ Thu Mar 12, 2009 7:29 pm ] |
Post subject: | |
you're welcome =) for pvp try those : ToggleMultiOnlyShowFloor() (for 2d mode, look through walls, also improves performance a bit) MacroCmd_GetSmartTargetForLastSpell() (the blue indicator in the moblist on the right, good for heal/cure in party and dumping spells on the selected (red line) enemy, i play with this as my main trigger : Code: SetMacro("wheeldown", function() MacroCmd_SendTargetSerial(MacroCmd_GetSmartTargetForLastSpell(),gSpellCastRange) end)
local mob = MacroCmd_FindNearestNonFriendlyPlayer() (nonfriendly = not in party, prefers players to monsters) MobListSetMainTargetSerial(mob and mob.serial or 0) (i'm no pvp expert though *g*) tilefree walk in 2d is not possible currently. how do you mean less graphical ? to save performance ? or do you mean the moblist and stuff are unfair for pvp ? |
Author: | buddy [ Thu Mar 12, 2009 7:44 pm ] |
Post subject: | |
Well atm i was trying both clients, normal + easyuo and iris, with iris i can create scripts as good as in easyuo, problem is with iris when i run around houses it lags more than normal client, i tried to change grafic settings, for example in pvp we can disable animations, or make simple trees to compare to normal client in performance, even i like iris much more than normal client cuz it has a lot of +++, and u can change easily from 2d to 3r with hotkey. i am going to give a try to those lines u send :) btw: i love to pvp with mage :) |
Author: | ghoulsblade [ Fri Mar 13, 2009 10:26 am ] |
Post subject: | |
what you can also try to improve speed in pvp : gDisableCompassDynamics = true that prevents dynamics, especially in houses, showing up in the compass. |
Author: | animehorror [ Sat Mar 21, 2009 8:37 pm ] |
Post subject: | |
What would be the command macro for attack(or auto attack)? Razor won't import it and I couldn't find it in macros.lua. |
Page 1 of 2 | All times are UTC |
Powered by phpBB® Forum Software © phpBB Group http://www.phpbb.com/ |