mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Jul 2006
Posts: 13
A
Pikka bird
OP Offline
Pikka bird
A
Joined: Jul 2006
Posts: 13
Here I am again, with another request, this time it's harder then what I've been requesting :P

I'm making a bot, a bot for a game.

http://www.outwar.com

Is the game that my bot is gonna be.
Soo it's called an Outwar bot, anyways.
What I've been wondering if there is a script that can show "Display only victorious raids" from the game.

Maybe it is easier for you guys if you actually see the game.

http://fabar.outwar.com/raidresults.php?crewid=32034&most_recent=1

That link displays most recently made so-called "Raids"
And if you look on the top, in the middle, there should be a button called "Display only victorious raids", which of course only displays raids that, that crew has won.

I've done a look through the pages and stuff, and it doesn't seem like you can search by name, soo you have to search by "Crew Id", every crew has its own ID, ie a number, which shows what number their crew is. Example, nr 1 = first crew name, nr 2 = second crew made and soo on...

Soo after I've explained that, the script should display 5 latest raids won, when commanded, example:

Quote:
!raid won 42775

Where the number is just taken from a random crew.

And the bot goes:
My Lolly Pop's Raid Results

07-09-07 12:59 pm Leet Commander 5 WIN View
07-09-07 12:57 pm Special Agent Sakor 5 WIN View
07-09-07 11:58 am Special Agent Sakor 5 WIN View
07-09-07 11:57 am Leet Commander 5 WIN View
07-09-07 11:39 am Leet Commander 5 WIN View

It displays the 5 latest raids won into the chat.

My Lolly Pop = Crew's name if you wondered.


Now that I've explained all that, it should make it easier.
I've gotten this idea from another script I got from a friend, which displays in chat your account stats.
I'll post the script here aswell, which will hopefully make it easier.

Code:
/*
Outwar.com Stats Script
--
Usage:
!outwar <Sigil/Torax/Fabar/ZIMBOB> <User's name>
--
*/

on *:TEXT:!outwar*:#: {
  if (!$regex($2,(S|s)igil|(T|t)orax|(F|f)abar|(Z|z)imbob)) || (!$3) { halt }
  sockopen outwar $+($lower($regml(1)),.outwar.com) 80
  sockmark outwar $2- $chan
}
on *:SOCKOPEN:outwar: {
  var %s = sockwrite -n $sockname
  %s GET $+(/profile.php?transnick=,$gettok($sock($sockname).mark,2,32)) HTTP/1.1
  %s Host: $+($gettok($sock($sockname).mark,1,32),.outwar.com)
  %s Connection: close
  %s $crlf
}
on *:SOCKREAD:outwar: {
  var %a
  sockread -f %a
  if ($+(%s.exp,%s.cl,%s.gr,%s.pa,%s.un,%s.skills)) {
    var %r = $iif(%s.pa,$gettok(%a,5,60),$gettok(%a,4,60))
    var %r = $gettok(%r,2,62)
    set %s $+(%s,$chr(42),$+(%s.exp,%s.cl,%s.gr,%s.pa,%s.un) %r)
    unset %s.*
  }
  else {
    if (*size="1">SKILLS</font>* iswm %a) {
      set %s.skills Correctly effected :
    }
    if (*size="1">EXPERIENCE</font>* iswm %a) {
      set %s.exp Experience :
    }
    if (*size="1">CLASS</font>* iswm %a) {
      set %s.cl Class :
    }
    if (*size="1">Growth Yesterday</font>* iswm %a) {
      set %s.gr Growth :
    }
    if (*size="1">PARENT</font>* iswm %a) {
      set %s.pa Parent :
    }
    if (*href="followers.php?id=4">UNDERLINGS</a>* iswm %a) {
      set %s.un UNDERLINGS
    }
    if (*<a href="crewprofile.php?id=* iswm %a) {
      var %r = $gettok(%a,4,60)
      %r = $gettok(%r,2,62)
      set %s $+(%s,$chr(42),$gettok($sock($sockname).mark,2,32) is a %r)
    }
    if (*</b> Trophy Points</b>* iswm %a) {
      var %r = $gettok(%a,4,60)
      %r = $gettok(%r,2,62)
      set %s $+(%s,$chr(42),TROPHY POINTS %r)
    }
    if (%s.sn) {
      if (*<td width="50%" bgcolor="#666666"><font size="2">* iswm %a) { halt }
      var %r = $gettok(%a,3,60)
      %r = $replace($gettok(%r,2,62),<,<,&tl;,>)
      set %s $+(%s,$chr(42),%s.sn %r)
      unset %s.sn
    } 
  }
}
on *:SOCKCLOSE:outwar: {
  var %x = $numtok(%s,42),%y = 1
  msg $gettok($sock($sockname).mark,3,32) 4- Stats for $gettok($sock($sockname).mark,2,32) on $gettok($sock($sockname).mark,1,32) 4-
  while (%y <= %x) {
    .timer 1 1 msg $gettok($sock($sockname).mark,3,32) $gettok(%s,%y,42)
    inc %y
  }
  .timer 1 1 msg $gettok($sock($sockname).mark,3,32) 4- End of Stats 4-
  unset %s
}


Soo if anyone was able to make such a script, you would be my hero.

Any further questions, please do not hesitate to ask smile

Last edited by Aragonfire; 09/07/07 06:20 PM.
Joined: Mar 2006
Posts: 47
C
Ameglian cow
Offline
Ameglian cow
C
Joined: Mar 2006
Posts: 47
It says I have to log in in order to view that page. Can't view the page, so it's up to you.

Here's a script that logs into the Pageaday site in order to get information. It's missing some key code to make it work, but maybe you can adapt it to your needs.

Joined: Jul 2006
Posts: 13
A
Pikka bird
OP Offline
Pikka bird
A
Joined: Jul 2006
Posts: 13
Hmm.. I don't understand much of that script, scripting is not my strongest side.

But, if you would register, that would be great.
It doesn't take more then 1 - 2 mil to register yourself smile


Link Copied to Clipboard