Back Reply to topic
Kebra 
(started thread)
Blue-Ribbon Chicken 
Topics: 4
Posts: 10
Playing:  AOC
Ingame:  Anarchie
Years registered: * * * * * * * * * * * * * * * * *
Raid Readycheck plugin Posted: Post 11:24 Mon - Aug 18, 2008

Im developing a plugin that is suppose to help on raids.
Provide a list of attendees
Provide the RL with a readycheck script to see who's there and who's AFK.

It uses XML

The structure of the XML is quite simple:
Code:
<raiders>
   <raider>
      <name></name>
      <ready></ready>
   </raider>
</raiders>


Each member of the raid "signs in" with the bot thus making a list of all the people in the raid. This is working fine.
Ready is by default "?"

Using scripts members of the raid get a link to tell the bot "!raidready yes"

When the bot recieves this it changes the ready value for the sender to "yes"

This however is causing some problems.

Code:
         if($pluginwords[2]=="yes")
         {      
            $doc = new DomDocument();
            $doc->load($DataDir."/raid.bot/raid.xml");
            
            
            $xp = new DomXPath($doc);
            $results = $xp->query("//raiders/raider/name[.  ='".$sender."']");
            foreach ($results as $result)
            {
               $result = $result->parent_node();
               $result = $result->last_child();
               $result->set_content("yes");
            }
            $doc->save($DataDir."/raid.bot/raid.xml");
            send_reply("Updated status to ready");
         }

It gets ONE hit on the sender name (which its suppose to)
But gives an error when i try to get the parent node.
Code:
PHP Fatal error:  Call to undefined method DOMElement::parent_node() in F:\Games
\guildBot\plugins\tell\raid.bot\index.php on line 88


any ideas?
Reply with quote


Lilith 
Blue-Ribbon Chicken 
Topics: 1
Posts: 2
Playing:  Age of Conan
Ingame:  Lilith
Years registered: * * * * * * * * * * * * * * * * *
Posted: Post 03:12 Mon - Aug 18, 2008

This doesnt help to solve your problem, but i wrote a readycheck plugin for the raid/dkp module i wrote (http://odins-zorn.de/viewtopic.php?t=2098). it is not this threads version, but i could upload the most recent version if needed.
the readycheck doesnt save raids/players to files though.
Reply with quote



_________________

Lilith
- 80
Back Reply to topic