Search found 32 matches

by CNKTHoward
Wed Jul 18, 2012 6:21 am
Forum: Runes of Magic
Topic: Not attacking mobs due to: "check if aggro before attacking"
Replies: 2
Views: 1055

Not attacking mobs due to: "check if aggro before attacking"

Hi As the topic subject says, there is a problem with a character not attacking a mob (that is f.e. spawning next to us and attacking us). If the mob spawns, we get immediate aggro, the mob runs to us and is attacking us. The following code (in the player.lua) PREVENTS us from killing the mob before...
by CNKTHoward
Tue Jul 17, 2012 6:01 am
Forum: Runes of Magic
Topic: updating player position when "pushed" by a mob
Replies: 10
Views: 2691

Re: updating player position when "pushed" by a mob

What rombot version are you using? latest If current version then why is your player.lua different? It's slightly edited to disable PvPing that's why line 2307 is local angle = math.atan2(waypoint.Z - self.Z, waypoint.X - self.X); for me. Since it's a mistake in the table definition [color=#FF0000]p...
by CNKTHoward
Mon Jul 16, 2012 11:53 am
Forum: Runes of Magic
Topic: Targetting NPCs in a zone
Replies: 10
Views: 2705

Re: Targetting NPCs in a zone

works perfectly, thanks rock5!
by CNKTHoward
Mon Jul 16, 2012 11:20 am
Forum: Runes of Magic
Topic: Targetting NPCs in a zone
Replies: 10
Views: 2705

Re: Targetting NPCs in a zone

aggroed mobs excluded That's the problem. local _enemy = player:findEnemy() if _enemy then player:target(_enemy) player:fight() end gets any enemy, either in- or outside the killzone. As stated before, the problem is that the character isn't attacking anything without the code above because he is i...
by CNKTHoward
Mon Jul 16, 2012 11:13 am
Forum: Runes of Magic
Topic: Targetting NPCs in a zone
Replies: 10
Views: 2705

Re: Targetting NPCs in a zone

rock5 wrote:Maybe use a kill zone?

Code: Select all

<onLoad>
		__WPL:setKillZone("schaukampf_zone");
I did, but it doesn't work properly. He is still running out of the zone and trying to attack the unattackable mob
by CNKTHoward
Mon Jul 16, 2012 10:36 am
Forum: Runes of Magic
Topic: Targetting NPCs in a zone
Replies: 10
Views: 2705

Re: Targetting NPCs in a zone

I know there is a function to check if a quest is of the type dailyquest, but I don't know how to use it properly. http://www.theromwiki.com/API:GetQuestInfo Returns a number of fields about a quest in the quest log This requires me to know the index of the quest though, which I don't. There is this...
by CNKTHoward
Mon Jul 16, 2012 10:09 am
Forum: Runes of Magic
Topic: Targetting NPCs in a zone
Replies: 10
Views: 2705

Re: Targetting NPCs in a zone

Well he is not the one to be killed, that's the problem. He gives us the quest. And with

Code: Select all

ChoiceOptionByName("(Meldet Euch freiwillig für die Demonstration.)")
I can spawn the mob needed for the quest. The name of that mob is more or less random (I think 3 possible names) :/
by CNKTHoward
Mon Jul 16, 2012 9:48 am
Forum: Runes of Magic
Topic: Targetting NPCs in a zone
Replies: 10
Views: 2705

Targetting NPCs in a zone

Hi As the topic says, I'm looking for a way to only target NPCs in a loaded zone file. I have the following issue: I need to kill a mob that is spawned by a dailyquest. censored The player should fight any mobs in the zone when he enters the repeat-until loop. I change the combat distance to 500, so...
by CNKTHoward
Mon Jul 16, 2012 9:44 am
Forum: Runes of Magic
Topic: loadPath Problem
Replies: 1
Views: 732

Re: loadPath Problem

you could check your events in your profile, the profile might call a waypoint as well.
by CNKTHoward
Sun Jul 15, 2012 3:59 pm
Forum: Runes of Magic
Topic: updating player position when "pushed" by a mob
Replies: 10
Views: 2691

Re: updating player position when "pushed" by a mob

I get this MM error when using the code. player.lua:2307 attempt to perform arithmetic on field 'Z' (a nil value) if target.HP/target.MaxHP*100 > 10 then if distance(player.X, player.Z, partymemberpawn[i].X, partymemberpawn[i].Z) > 150 then player:moveTo({partymemberpawn[i].X, partymemberpawn[i].Z},...
by CNKTHoward
Sun Jul 15, 2012 9:54 am
Forum: Runes of Magic
Topic: Scanning for NPCs in range
Replies: 16
Views: 4192

Re: Scanning for NPCs in range

Code: Select all

Houses_GetServantInfo(1)
Best command EVAR
by CNKTHoward
Sun Jul 15, 2012 9:31 am
Forum: Runes of Magic
Topic: Scanning for NPCs in range
Replies: 16
Views: 4192

Re: Scanning for NPCs in range

My code right now: for k, v in ipairs(housemaids) do for i = 1, 4 do cprintf(cli.yellow, housemaids[k] .. "\n") player:target_NPC(housemaids[k]); ChoiceOptionByName("Handwerk") end yrest(100) end This gets the potions 4 times from all the housemaids found. for k = 1, 4 do local D...
by CNKTHoward
Sun Jul 15, 2012 9:26 am
Forum: Runes of Magic
Topic: party.lua bugs
Replies: 57
Views: 9921

Re: party.lua bugs

Why does the checkparty have to use adresses anyway? Can't one check if a partymember is in range with

Code: Select all

TargetUnit("party#");
If you get a target, the partymember is there - then clear the target with

Code: Select all

TargetUnit(nil);
and check for the next one.
by CNKTHoward
Sun Jul 15, 2012 8:14 am
Forum: Runes of Magic
Topic: Scanning for NPCs in range
Replies: 16
Views: 4192

Re: Scanning for NPCs in range

Ah nice, works like a charm. I have another question though. I'm using this WP for getting the potions - no problem. I do this 4 times in a row (then the exhaustion of a housemaid is at 100%). Can I somehow check if the housemaid has an exhaustion of 100% or can I surveil the chat if they tell me th...
by CNKTHoward
Sun Jul 15, 2012 7:50 am
Forum: Runes of Magic
Topic: Scanning for NPCs in range
Replies: 16
Views: 4192

Re: Scanning for NPCs in range

Hm I got it working that the character is targeting the NPC and then opening the dialog window, but the character isn't doing anything with the options, although I call choiceoption for k, v in ipairs(housemaids) do for variable = 1, 4 do cprintf(cli.yellow, housemaids[k] .. "\n") player:t...
by CNKTHoward
Sun Jul 15, 2012 5:49 am
Forum: Runes of Magic
Topic: updating player position when "pushed" by a mob
Replies: 10
Views: 2691

Re: updating player position when "pushed" by a mob

Thx! I'll try this later. I use the player:moveTo function for now, since I don't have the teleport userfunction.
by CNKTHoward
Sun Jul 15, 2012 5:46 am
Forum: Runes of Magic
Topic: Scanning for NPCs in range
Replies: 16
Views: 4192

Scanning for NPCs in range

Hey again. I'm looking for a way to scan for NPCs in range of my character. Zone: House I want the bot to scan all my housemaids, and get all the potions from them. It's no problem to get the potions, but since the names of the housemaids is variable, I wanted to find a generic solution for any char...
by CNKTHoward
Sun Jul 15, 2012 5:29 am
Forum: Runes of Magic
Topic: updating player position when "pushed" by a mob
Replies: 10
Views: 2691

Re: updating player position when "pushed" by a mob

Code: Select all

if (not player.Battling) then
	player:moveTo({X=2282,Z=2418},true)
	return
end	
Hm, that makes my character move back to the WP AFTER the fight. I need him to be in range for healing the other partymembers though.
by CNKTHoward
Sun Jul 15, 2012 5:12 am
Forum: Runes of Magic
Topic: updating player position when "pushed" by a mob
Replies: 10
Views: 2691

Re: updating player position when "pushed" by a mob

Waypoint code:

Code: Select all

censored
BossFightHeal():

Code: Select all

censored
by CNKTHoward
Sat Jul 14, 2012 7:44 pm
Forum: Runes of Magic
Topic: Invite by Name function?
Replies: 5
Views: 1664

Re: Invite by Name function?

This will invite your character: RoMScript("InviteByName('charactername');"); I use the addon Auto Accept Invitations for the char to accept the party. This gets the number of partymembers: RoMScript("GetNumPartyMembers()") If you know how many members you'll have, f.e. you are g...