Jump to content

Mania-92

Members
  • Posts

    22
  • Joined

  • Last visited

Everything posted by Mania-92

  1. Mania-92

    Trivia Bot

    It is easy to make actually.
  2. Mania-92

    im lost

    i have v 6.16 i think mIRC Try this: on *:SIGNAL:mta.join:{ ;Parameters: ;$1 = Server ;$2 = ID ;$3 = Command ;$4- = Parameters mta.say $1 Events: %mta.event. [ $+ [ $1 ] ] }
  3. on *:SIGNAL:mta.command: { if ($3 == !alarm) { if (($mta.vehicle($1,$2).name == foot) || ($mta.vehicle($1,$2).name == Unknown)) mta.msg $1 $2 Error - you need to be in a car elseif ($4 == on) { mta.say $1 Alarm Activated !writeini " $+ $scriptdir $+ alarm.ini" alarm $mta.vehicle($1,$2) on } elseif ($4 == off) { mta.say $1 Alarm DeActivated !writeini " $+ $scriptdir $+ alarm.ini" alarm $mta.vehicle($1,$2) off } } } on *:SIGNAL:mta.enter:{ if ($readini($scriptdir $+ alarm.ini,alarm,$mta.vehicle($1,$2)) == on) { mta.msg $1 $2 You got 5 seconds to get out of the car or you'll die $+(.timer,$1,.,$2) 1 5 bla.kill $1 $2 } } on *:SIGNAL:mta.exit { $+(.timer,$1,.,$2) off } alias bla.kill .timer 5 0 mta.slap $1 $2 Here you go
  4. If it isn't done tomorrow around 3 o clock GMT +1 I will do it. on *:SIGNAL:mta.finish: { ;Parameters: ;$1 = Server ;$2 = ID var %rank = $mta.rank($1,$2) if (%rank == 1) { mta.text $1 $mta.nick($1,$2) came first, points earned: 5 !writeini -n " $+ $scriptdir $+ points.ini" POINTS $mta.ip($1,$2) $calc($iif($readini($scriptdir $+ points.ini,POINTS,$mta.ip($1,$2)),$readini($scriptdir $+ points.ini,POINTS,$mta.ip($1,$2)),0) + 5) } elseif (%rank == 2) { mta.text $1 $mta.nick($1,$2) came second, points earned: 4 !writeini -n " $+ $scriptdir $+ points.ini" POINTS $mta.ip($1,$2) $calc($iif($readini($scriptdir $+ points.ini,POINTS,$mta.ip($1,$2)),$readini($scriptdir $+ points.ini,POINTS,$mta.ip($1,$2)),0) + 4) } elseif (%rank == 3) { mta.text $1 $mta.nick($1,$2) came third, points earned: 3 !writeini -n " $+ $scriptdir $+ points.ini" POINTS $mta.ip($1,$2) $calc($iif($readini($scriptdir $+ points.ini,POINTS,$mta.ip($1,$2)),$readini($scriptdir $+ points.ini,POINTS,$mta.ip($1,$2)),0) + 3) } elseif (%rank == 4) { mta.text $1 $mta.nick($1,$2) came fourth, points earned: 2 !writeini -n " $+ $scriptdir $+ points.ini" POINTS $mta.ip($1,$2) $calc($iif($readini($scriptdir $+ points.ini,POINTS,$mta.ip($1,$2)),$readini($scriptdir $+ points.ini,POINTS,$mta.ip($1,$2)),0) + 2) } elseif (%rank == 5) { mta.text $1 $mta.nick($1,$2) came fifth, points earned: 1 !writeini -n " $+ $scriptdir $+ points.ini" POINTS $mta.ip($1,$2) $calc($iif($readini($scriptdir $+ points.ini,POINTS,$mta.ip($1,$2)),$readini($scriptdir $+ points.ini,POINTS,$mta.ip($1,$2)),0) + 1) } } on *:SIGNAL:mta.join: { if ($readini($scriptdir $+ points.ini,POINTS,$mta.ip($1,$2)) => 0 && $readini($scriptdir $+ points.ini,POINTS,$mta.ip($1,$2)) =< 49) { $mta.text $1 $mta.nick($1,$2) has the title of New User! } elseif ($readini($scriptdir $+ points.ini,POINTS,$mta.ip($1,$2)) => 50 && $readini($scriptdir $+ points.ini,POINTS,$mta.ip($1,$2)) =< 99) { $mta.text $1 $mta.nick($1,$2) has the title of User! } elseif ($readini($scriptdir $+ points.ini,POINTS,$mta.ip($1,$2)) => 100 && $readini($scriptdir $+ points.ini,POINTS,$mta.ip($1,$2)) =< 299) { $mta.text $1 $mta.nick($1,$2) has the title of Advanced User! } elseif ($readini($scriptdir $+ points.ini,POINTS,$mta.ip($1,$2)) => 300 && $readini($scriptdir $+ points.ini,POINTS,$mta.ip($1,$2)) =< 999) { $mta.text $1 $mta.nick($1,$2) has the title of Super User! } else { $mta.text $1 $mta.nick($1,$2) has the title of Ultimate User! } It isn't tested so i don't know if it works. But you can get some stuff from it.
  5. It might read entry number 451, try forcing it as a text with the 't'-switch, (/help $readini) Sorry what is the t-switch? Do you mean: if ($readini($scriptdir $+ vehicle.ini,VEHICLES,%a) == 1) { mta text $1 $mta.vehicle($1,$2) }
  6. Mania-92

    lastvisit

    Probably something like this: on *:SIGNAL:mta.disconnect:command: { ;Parameters: ;$1 = Server ;$2- = Reason var %time = $mta.time($1) !writeini -n " $+ $scriptdir $+ last.ini" LASTVISIT $mta.ip($1,$2) %time } on *:SIGNAL:mta.join:command: { ;Parameters: ;$1 = Server ;$2 = PlayerID mta.text $1 Last visit on $+ : $iif($readini($scriptdir $+ last.ini,LASTVISIT,$mta.ip($1,$2)),$readini($scriptdir $+ last.ini,LASTVISIT,$mta.ip($1,$2)),Not Found) } Or something similair, but i don't know if mta.time is ingame or outgame time.
  7. It might read entry number 451, try forcing it as a text with the 't'-switch, (/help $readini) Sorry what is the t-switch?
  8. var %a = $mta.vehicle($1,$2) if ($readini($scriptdir $+ vehicle.ini,VEHICLES,%a) == 1) { [VEHICLES] 451=1 And when in bullet (id 451 isn't it?) nothing happens. Under the if command there is a mta.text command.
  9. Why doesn't it work with me than.
  10. If for example joke 5 is the last one, it sticks on joke 5 isn't it?
  11. Where i need to put the mops in that code? PS, anyway thanx.
  12. I want on !mop to show a mop 1/5. But not on the same time for example: Test: !mop Admin: mop 1 Test1: !mop Admin: mop 2 Enz.
  13. I have a problem with my script. On !mop there is no mop1 but mop 1 till 5. if ($3 == !mop) { if ($readini($scriptdir $+ mop.ini,MOPS,1) == 1) { mta.text $1 mop 1 !writeini -n " $+ $scriptdir $+ mop.ini" MOPS 1 2 } else if ($readini($scriptdir $+ mop.ini,MOPS,2) == 1) { mta.text $1 mop 2 !writeini -n " $+ $scriptdir $+ mop.ini" MOPS 2 2 } else if ($readini($scriptdir $+ mop.ini,MOPS,3) == 1) { mta.text $1 mop 3 !writeini -n " $+ $scriptdir $+ mop.ini" MOPS 3 2 } else if ($readini($scriptdir $+ mop.ini,MOPS,4) == 1) { mta.text $1 mop 4 !writeini -n " $+ $scriptdir $+ mop.ini" MOPS 4 2 } else if ($readini($scriptdir $+ mop.ini,MOPS,5) == 1) { mta.text $1 mop 5 !writeini -n " $+ $scriptdir $+ mop.ini" MOPS 4 1 !writeini -n " $+ $scriptdir $+ mop.ini" MOPS 3 1 !writeini -n " $+ $scriptdir $+ mop.ini" MOPS 2 1 !writeini -n " $+ $scriptdir $+ mop.ini" MOPS 1 1 } } What's wrong?
  14. !players still doesn't work.
  15. It was ment to give with !players a number (1/20 or just 1 for example) . And on text brb it is doing well and ini is writin to 2 but on than on text f no message orso and ini stays on 2. [EDIT] I already see the problem, in mIRC * is being seen as some kind of char. But i ment a random sentence or word. So how?
  16. Now i have a script like this: on *:SIGNAL:mta.text: { if ($3 == brb) { if ($readini(bla.ini,TEST,$mta.nick($1,$2)) == 1) { mta.text $1 $mta.nick($1,$2) will be back soon! !remini " $+ $scriptdir $+ brb.ini" BRB $mta.ip($1,$2) !writeini -n " $+ $scriptdir $+ brb.ini" BRB $mta.ip($1,$2) 2 } } elseif ($3 == *) { if ($readini($scriptdir $+ brb.ini,BRB,$mta.ip($1,$2)) == 2) { !remini " $+ $scriptdir $+ brb.ini" BRB $mta.ip($1,$2) !writeini -n " $+ $scriptdir $+ brb.ini" BRB $mta.ip($1,$2) 1 mta.text $1 $mta.nick($1,$2) is back! } } } on *:SIGNAL:mta.join: { !writeini -n " $+ $scriptdir $+ brb.ini" BRB $mta.ip($1,$2) 1 } mta.join works because there is writen an ini "IP=1", but on text brb there is no text no text and on the ini line it's still 1. PS, the rest of my scrips works fine only this: elseif ($3 == !players) { mta.text $1 $mta.players($1,$2) Doesn't work eather Kind Regards, Mania
  17. If for example an ini is BLABLA=1, can write it back to 0 with !writeini? This for example?: on *:SIGNAL:mta.text: { if ($3 == brb) { mta.text $1 $mta.nick($1,$2) will be back soon! !writeini -n " $+ $scriptdir $+ brb.ini" BRB $mta.ip($1,$2) 1 } elseif ($3 == *) { if ($readini($scriptdir $+ brb.ini,BRB,$mta.ip($1,$2)) == 1) { !writeini -n " $+ $scriptdir $+ brb.ini" BRB $mta.ip($1,$2) 0 mta.text $1 $mta.nick($1,$2) is back! } } }
  18. Still doesn't work. This is my whole script: on *:SIGNAL:mta.command: { ;Parameters: ;$1 = Server ;$2 = ID ;$3 = Command ;$4- = Parameters /* if ($3 == !nice) { mta.text $1 $mta.nick($1,$2) thinks the victory of $4 was nice! } */ if ($3 == !nice) { mta.text $1 $mta.nick($1,$2) thinks the victory of $mta.nick($1,$mta.getid($1,$4)) was nice! } elseif ($3 == !warn2) { if ($mta.level($1,$2) == 5) { mta.text $1 $mta.nick($1,$2) warned $4! } else mta.pm $1 $2 Error - You need to be level 5 to use this command. } elseif ($3 == !warn) { if ($readini($scriptdir $+ test.ini,WARNS,$4) == 0) { !writeini -n " $+ $scriptdir $+ test.ini" WARNS $4 1 } } on *:SIGNAL:mta.text: { if ($3 == brb) { mta.text $1 $mta.nick($1,$2) will be right back! } } on *:SIGNAL:mta.join: { !writeini -n " $+ $scriptdir $+ test.ini" WARNS $mta.ip 0 } }
  19. elseif ($3 == !warn) { if ($readini(test.ini,WARNS,$4) == 0) { !writeini -n " $+ $scriptdir $+ test.ini" WARNS $4 1 } This doesn't works. Anyone some suggestions?
  20. And how do i check if it is 1 for example? if ($... ($1,$2) == 1) { Or what?
  21. How to read a ini? It looks like this: [TEST] Mania-92[NL]=1 How to read it in script? Kind regards, Mania
×
×
  • Create New...