View/Edit #6161:streak

Switch to edit mode.

Name(s): streak
1:  "if (!(caller in #7575.trusted))"
2:  "  raise(E_PERM)"
3:  "elseif (!is_player(args[1]))"
4:  "  raise(E_PERM)"
5:  "endif"
6:  {x, y, z} = {args[1], 7, args[2]}
7:  if (y < 2 || y > this.infolength)
8:    return 0
9:  endif
10: "{x=player,y=stat,z=modifier}"
11: pos = x in $list_utils:slice(this.info)
12: if (!pos)
13:   this.info = {@this.info, {x, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}
14:   pos = length(this.info)
15: endif
16: try
17:   if (!z)
18:     this.info[pos][y] = 0
19:   else
20:     this.info[pos][y] = this.info[pos][y] + 1
21:   endif
22:   if (this.info[pos][y] > this.info[pos][8])
23:     this.info[pos][8] = this.info[pos][7]
24:   endif
25:   return 1
26: except (ANY)
27:   return 0
28: endtry
29: "Last modified by James (#6397) on Thu Mar 15 00:04:13 2007 EDT."

Verb arguments: this none this
Verb perms: Readable eXecutable NOT-Debug
Verb owned by: James (#6397)

You are not logged in.

[home | help | who | search | setup | code]