Jump to content


  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About damnet007

  • Rank


  • Gang
  1. lol i'm still not 100% sure what you want, but how about this: if ($chr(33) isin $4) !return $remove($4,$chr(33)) but that won't work well if the ! isnt at the start- if someone typed ... !blah!kjd
  2. If you're trying to do what I think, use "isin" if (... isin $4) or if (... isin $4-)
  3. i sorted this a while ago by using a different while loop and a snippet from toady's mta.longsay alias, works perfectly now and squall if you don't understand it or don't have anything useful to say, keep out; i posted for help and that's what i got.
  4. damnet007

    !rank script

    I have a massive script and I use these $iif statements quite a bit, they don't slow anything down. I read your previous post and changed the alias names
  5. damnet007

    !rank script

    i can say that it works, it works fast on my pc, and as long as it works i dont care about any criticism made, i like my $iif statements as they don't make a lot of difference when processing and the script still works perfectly, the only thing someone might find a headache is when scripting the statement as there are so many brackets, but that's also not hard.
  6. damnet007

    !rank script

    Here's something I tried, I don't really script for mta:sa so don't know if I've converted it right, try it if you want on *:SIGNAL:mta.join:{ !writeini -n " $+ $scriptdir $+ ranks.ini" ranks $mta.nick($1,$2) $calc($joinamt($1,$2) + 1) } on *:SIGNAL:mta.command:{ var %a = $iif($4,$iif($mta.nick($1,$4) != $null,$4,$iif($mta.getid($1,$4),$v1,-1)),$2) if ($3 == !rank) { if (%a == -1) mta.pm $1 $2 Error - Absent Nick/ID else mta.text $1 $mta.nick($1,%a) > Rank: $playerrank($1,%a) ( $+ $joinamt($1,%a) $+ pts) } } alias playerrank !return $iif($joinamt($1,$2) <= 4,Newbie,$iif($j
  7. !writeini -n " $+ $scriptdir $+ bla.ini" bla bla $calc($readini(bla.ini,bla,bla) + 1)
  8. Sorry, didn't see your post until now. Basically, you can hold an unlimited amount of items. These items are made by other users who own factories, etc. When a factory owner produces an item, they specify which category the item goes into. These item categories are stored in things.ini and everything has already been scripted. The reason I posted here was because I needed a script to find all items owned by a person, which are in the 'food' category- all my scripting attempts worked fine on my pc but kept causing mtama to time out on the scripts host pc when someone typed !food - i think the
  9. thanks for the script toady, but I had an error in the line assigning %c and the last mta.say line. I've done this and it seems to work although it won't show any food items which don't fit into the first mta.say line (if this makes sense): alias showfood { var %a = 0,%b,%c if (!$ini(rpg.ini,$mta.name($1,$2),1)) mta.say $1 $mta.name($1,$2) has no food. else { while (%a <= $ini(rpg.ini,$mta.name($1,$2),0)) { %b = $ini(rpg.ini,$mta.name($1,$2),%a) if ($readini(rpg.ini,$mta.name($1,$2),%b) > 0) { if ($readini(things.ini,food,%b) == 1) { %c = $iif(%c,%c $+
  10. I'm trying to optimize this script/find another, more efficient way of doing this: - A person's item data is stored in an ini file, eg rpg.ini : [name] item1=amount item2=amount ... - All the items are classified into different categories, in another ini, eg. things.ini: [food] item=1 item2=1 item3=1 ... [drinks] item1=1 item2=1 ... The script checks all of the user's items and if an item from rpg.ini is in the food section of things.ini, it adds them to the list of food items they have. I made this a little while ago and it seems to work perfectly on my PC, but not on the PC w
  11. %a is a variable, $4 is a parameter. you have to assign value(s) to a variable in most cases, and most common variables are only present within specific functions/aliases, eg: if you have a script to count from 'x' to 0, you could use a variable (name it whatever you want), and do it like this: on *:SIGNAL:mta.command:{ if ($3 == !count) { if ($4) && ($4 isnum) && ($4 > 1) { <-- $4 is the 2nd word a person would say in a sentence. If i typed '!count 200' then $4 would be '200' var %x = $4 <-- Assign variable x - it has been made equal to $4 as this i
  12. remove the 'if (%a != -1)' line and the bracket which goes with it. if u want, add me on msn i'll help you out
  13. something like this: on *:SIGNAL:mta.command:{ if $readini(bla.ini,admin,$mta.name($1,$2)) == 1 { var %a = $iif($4 == $null,$2,$iif($mta.name($1,$4) != Unknown,$4,$mta.getid($1,$4))) if (%a != -1) { if ($3 == !slap) mta.slap $1 %a elseif ($3 == !kick) mta.kick $1 %a etc... } else mta.msg $1 $2 Error - Absent Nick/ID } } bla.ini: [admin] name=1 name2=1 etc.
  • Create New...