
Originally Posted by
sirmate
Nope, you're a little wrong.
By using those functions you currently only check if creature is you itself, your target or creature that you follow.
He had in mind something like $self, $target, $attacked, $followed in neobot. Those variables was returning creature pointers.
Also I want to know if there will be some variable or loop like in neobot that would be returning all creatures (players/monsters/npc's) from screen (all floors)?
Atm i think I'm correct.
I'll use the same script but with line comments to point out what's happening. (on my opinion)
Code:
local creature = Creature.GetByName("Jo3Bingham") -- creature = Jo3Bingham
-- first If statement is checking the "creature:ID" which means Jo3Bingham ID's, example: Jo3Bingham:ID()
if (creature:ID() ~= 0) then
-- sencond If statement is cheking that , Jo3Bingham:isTarget() and Jo3Bingham:WarIcon()
if (creature:isTarget() and Creature:WarIcon()) then
----use spell or rune
end
end
I personally thing that way, I might be wrong but, for undestranding always a new lengauge I need an script with comment lines that's pointing out what's happening, I have used LUA on Ot's and on Neobot but those " : " are confusing me alot.
sirmate, try to point out what's happening on this script for me to understand your way of viewing this script.