Ok since you guys cant benefit from my YVDA snippet, this one is something you guys can see and use (maybe idk) this manages decks "Doesnt auto load decks you select a file and it assumes its your deck, hell you could use LOLZORS.TXT as your deck file and it wont effect the script" it manages wins/loss's threw a hash table and also allows you to display your record. anyways hope you enjoy.
P.S:
Screw your rating system PATX >;[
also, http://pastebin.com/f38419efc is the "YVD" Version, that also displays deck lists :P.
also stopped used findfile cause people have pr0blems with it me shrugs
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;Deck Keeper Record Tracker---------;;
;;Coded By HeatedHeart---------------;;
;;For Use With XeroChat3-------------;;
;;All Rights Reserved:XeroChat Team--;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;#### Startup
on *:LOAD:{
hmake DKRT 50
}
on *:START:{
hmake DKRT 50
hload DKRT DKRT.txt
}
on *:EXIT:{
hsave DKRT DKRT.txt
}
on *:DIALOG:DKRT:close:*: {
hsave DKRT DKRT.txt
}
on *:DIALOG:DKRT:init:*: {
ShowDecks
}
;#### Popups
menu * {
DKRT
.Deck Record Keeper Tracker: dialog -vmd DKRT DKRT
}
;#### Alias
alias StatRefresh {
var %x 7 15 16 17 18
var %loop 1
while (%loop <= 5) {
did -r $dname $Gettok(%x,%Loop,32)
inc %Loop
}
did -a $dname 7 $Gettok($Hget(DKRT,$did(1).seltext),1,34)
did -a $dname 15 $did(1).seltext
did -a $dname 16 $Gettok($asctime($file($Gettok($Hget(DKRT,$did(1).seltext),1,34)).ctime),1-3,32)
did -a $dname 17 $Gettok($Hget(DKRT,$did(1).seltext),2,124)
did -a $dname 18 $Gettok($Hget(DKRT,$did(1).seltext),3,124)
}
alias ShowDecks {
did -r $dname 1
var %x $hget(DKRT,0).item
var %loop 1
while (%Loop <= %X) {
did -a $dname 1 $Hget(DKRT,%Loop).item
inc %loop
}
}
;#### Dialog
dialog DKRT {
title "Deck Record Tracker"
size -1 -1 429 359
option pixels notheme
box "Control", 10, 186 146 239 123
box "", 8, 6 320 422 27
list 1, 5 22 174 316
box "Infromation", 2, 185 17 242 100
text "Wins:", 3, 193 61 26 17
text "Loss's:", 4, 193 75 32 16
text "Created:", 5, 192 47 43 17
text "Name:", 6, 192 32 31 17
text "", 7, 11 328 410 17
button "Add Win", 9, 192 165 65 25
button "Add Loss", 11, 352 165 65 25
button "Add Deck", 13, 193 195 65 25
button "Delete Deck", 14, 352 197 65 25
button "Reset Deck Keeper", 12, 192 234 228 25
text "", 15, 223 32 101 17
text "", 16, 237 47 100 17
text "", 17, 221 62 100 17
text "", 18, 226 75 100 17
link "www.XeroCreative.com", 19, 25 2 120 17
button "Display", 20, 274 181 65 25
}
;#### Coding
on *:dialog:DKRT:SCLICK:*: {
if ($did == 11) {
var %dir $Gettok($Hget(DKRT,$did(1).seltext),1,34)
var %win $Gettok($Hget(DKRT,$did(1).seltext),2,124)
var %loss $Gettok($Hget(DKRT,$did(1).seltext),3,124)
inc %loss
hadd DKRT $did(1).seltext $qt(%dir) $chr(124) $+ %win $+ $chr(124) $+ %loss $+ $chr(124)
statrefresh
}
if ($did == 9) {
var %dir $Gettok($Hget(DKRT,$did(1).seltext),1,34)
var %loss $Gettok($Hget(DKRT,$did(1).seltext),3,124)
var %win $Gettok($Hget(DKRT,$did(1).seltext),2,124)
inc %win
hadd DKRT $did(1).seltext $qt(%dir) $chr(124) $+ %win $+ $chr(124) $+ %loss $+ $chr(124)
statrefresh
}
if ($did == 20) {
msg $active 0(4 $+ $did(1).seltext $+ 0)14 W15ins4: 0(4 $+ $Gettok($Hget(DKRT,$did(1).seltext),2,124) $+ 0) 14L15oss's4: 0(4 $+ $Gettok($Hget(DKRT,$did(1).seltext),3,124) $+ 0)
}
if ($did == 1) {
statrefresh
}
if ($did == 12) {
hfree DKRT
hmake DKRT 50
showdecks
statrefresh
}
if ($did == 13) {
var %x $sfile(dir)
hadd DKRT $gettok(%x,$numtok(%x,92),92) $qt(%x) |0|0|
showdecks
statrefresh
}
if ($did == 14) {
hdel DKRT $did(1).seltext
showdecks
statrefresh
}
}
;#### End DRT