If I'm not mistaken they already exist.
this are the relational properties. (can be found on the Creature.lua or Jo3 post)
an example of using this variables would be.. (using Jo3 example)Code:Creature:isSelf() Creature:isTarget() Creature:isFollowed()
Again if im not mistaken.
If everything is fine then Jo3 will die.Code:local creature = Creature.GetByName("Jo3Bingham") if (creature:ID() ~= 0) then if (creature:isTarget() and creature:WarIcon()) then ----use spell or rune end end
Last edited by Efren; 01-04-2012 at 11:47 PM. Reason: changed the Creature:WarIcon() for creature:WarIcon()
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)
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.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
sirmate, try to point out what's happening on this script for me to understand your way of viewing this script.
But while you exp your target changes it's not always the same. If you used NeoBot then you should know how $target pointer works.
Here is my example.
Code:local Target = Creature.GetByID(getSelfTargetID()) if (Target:Name():lower() == 'wyrm' and Target:HealthPercent() >= 10 and Target:isAdjacent()) then --[[ CAST EXORI ICO ]]-- end
(๏̯͡๏ )
I don't use neo but I did, Was completely GUI-less, Not atractive.
Bot's are my baby bitches, Neo bot was ugly as hell, but was able to move very nice. (you know what I mean)
I don't know who is correct, me or you, or maybe both are, or maybe just you. (But I think Im wrong, for sure lmao xD)
I just can't wait for the scripter!
So I'm making non-sence scripts![]()
Last edited by Efren; 01-05-2012 at 01:36 AM. Reason: lol with the bold part
There is no fkn GetSelfId() or GetTargetId().
noob
No dude, this only checks if the creature pointer you have, is the target or you. If you wanted to find the target's pointer, you'd have to either loop through all creatures and check if isTarget() or have a pre-defined pointer assigned to it, which is what I'm asking for.
Last edited by Raphael; 01-05-2012 at 04:24 PM.
There will be pointers as such (self, target, etc.). The Creature class, and more, just allows you to have more control over your scripts.
They exist, Check the Creature.lua
Code:--------------------------------------------------- ----------- Relational Properties --------------- --------------------------------------------------- function Creature:isSelf() return self._id == getSelfID() end function Creature:isTarget() return self._id == getSelfTargetID() end function Creature:isFollowed() return self._id == getSelfFollowID() end