SHOW:
|
|
- or go back to the newest paste.
| 1 | - | <?xml version="1.0" encoding="ISO-8859-1" ?> |
| 1 | + | function levelreport(level,channel) |
| 2 | - | <cmud> |
| 2 | + | -- |
| 3 | - | <class name="leveldisplay" copy="yes"> |
| 3 | + | if channel == nil then |
| 4 | - | <alias name="LevelReport" autoappend="true" copy="yes"> |
| 4 | + | channel = "gt" |
| 5 | - | <value>#local $msg $lvl $time $gains $stats |
| 5 | + | end |
| 6 | - | //#echo @EXPTracker_DB |
| 6 | + | |
| 7 | - | $lvl=%gmcp.char.status.level |
| 7 | + | if levelinfo.mytimeyear ~= 0 then |
| 8 | - | // level stuff .. year,month,day,hour,min,sec |
| 8 | + | report.time = "@GY:@R"..levelinfo.mytimeyear.."," |
| 9 | - | $time=%if(%db(@EXPTracker_DB,year)!=0,%concat("@GY:@R",%db(@EXPTracker_DB,year)," "))
|
| 9 | + | else |
| 10 | - | $time=%concat($time,%if(%db(@EXPTracker_DB,month)!=0,%concat("@GM:@R",%db(@EXPTracker_DB,month)," ")))
|
| 10 | + | report.time = "" |
| 11 | - | $time=%concat($time,%if(%db(@EXPTracker_DB,day)!=0,%concat("@GD:@R",%db(@EXPTracker_DB,day)," ")))
|
| 11 | + | end |
| 12 | - | $time=%concat($time,"@GH:@W",%db(@EXPTracker_DB,hour)," ") |
| 12 | + | |
| 13 | - | $time=%concat($time,"@GM:@W",%db(@EXPTracker_DB,min)," ") |
| 13 | + | if levelinfo.mytimemonth ~= 0 then |
| 14 | - | $time=%concat($time,"@GS:@W",%db(@EXPTracker_DB,sec)) |
| 14 | + | report.time = report.time .. "@GM:@R"..levelinfo.mytimemonth.."," |
| 15 | - | $gains=%concat("@GH@gP@R(@w",%db(@ExpTracker_DB,HpsThisLevel),"@R)")
|
| 15 | + | else |
| 16 | - | $gains=%concat($gains,"@GM@gn@R(@w",%db(@ExpTracker_DB,ManaThisLevel),"@R)") |
| 16 | + | report.time = "" |
| 17 | - | $gains=%concat($gains,"@GM@gv@R(@w",%db(@ExpTracker_DB,MovesThisLevel),"@R)") |
| 17 | + | end |
| 18 | - | $gains=%if(%db(@ExpTracker_DB,PracsThisLevel)>0,%concat($gains,"@GP@gr@R(@w",%db(@ExpTracker_DB,PracsThisLevel),"@R)")) |
| 18 | + | |
| 19 | - | $gains=%if(%db(@ExpTracker_DB,TrainsThisLevel)>0,%concat($gains,"@GT@gr@R(@w",%db(@ExpTracker_DB,TrainsThisLevel)%if(%db(@ExpTracker_DB,BonusTrainsThisLevel)>0,"@W+@w"%db(@ExpTracker_DB,BonusTrainsThisLevel)),"@R)")) |
| 19 | + | if levelinfo.day ~= 0 then |
| 20 | - | $msg="@GL@gevel@R(@w"$lvl"@R) @GT@gook:@w["$time"@w] "$gains%if(%db(@ExpTracker_DB,BonusStat)!=%null," @G+@gStats:@w"%db(@ExpTracker_DB,BonusStat)) |
| 20 | + | report.time = report.time .. "@GD:@R" .. "," |
| 21 | - | #if (%1) {#send %1 $msg} {#send %if(%db(@allchan_report,all)!="off",echo,gt) $msg}</value>
|
| 21 | + | else |
| 22 | - | </alias> |
| 22 | + | report.time = "" |
| 23 | - | <func name="mylevelepoch" language="Lua" copy="yes"> |
| 23 | + | end |
| 24 | - | <value>local pname = "ExpTracker_DB" |
| 24 | + | |
| 25 | - | local oname = os.time() |
| 25 | + | report.time = report.time .. "@GH:@W" .. levelinfo.hour .. " " |
| 26 | - | zs.cmd.addkey(pname,"epochtime",oname)</value> |
| 26 | + | report.time = report.time .. "@GM:@W" .. levelinfo.min .. " " |
| 27 | - | </func> |
| 27 | + | report.time = report.time .. "@GS:@W" .. levelinfo.sec |
| 28 | - | <func name="mylevelconvert" language="Lua" copy="yes"> |
| 28 | + | |
| 29 | - | <value>local pname = "ExpTracker_DB" |
| 29 | + | report.gains = "@GH@gP@R(@w"..levelinfo.hp.."@R)@w" |
| 30 | - | zs.cmd.addkey(pname,"epochexpand",os.date("%Y|%m|%d|%H|%M|%S",zs.param(1)))</value>
|
| 30 | + | report.gains = report.gains.."@GM@gn@R(@w"..levelinfo.mana.."@R)@w" |
| 31 | - | </func> |
| 31 | + | report.gains = report.gains.."@GM@gv@R(@w"..levelinfo.moves.."@R)@w" |
| 32 | - | <alias name="leveltest" copy="yes"> |
| 32 | + | |
| 33 | - | <value>#echo "You gain 25 hit points, 17 mana, 22 moves, 7 practices and 2 trains." |
| 33 | + | if levelinfo.prac > 0 then |
| 34 | - | #echo "Lucky! You gain an extra 2 training sessions!" |
| 34 | + | report.gains = report.gains.."@GP@gr@R(@w"..levelinfo.prac.."@R)" |
| 35 | - | #echo "You gain a bonus Constitution point!" |
| 35 | + | end |
| 36 | - | //#echo "You gain a bonus Luck point!" |
| 36 | + | |
| 37 | - | //#echo "You gain a bonus Wisdom point!"</value> |
| 37 | + | if levelinfo.trains > 0 then |
| 38 | - | </alias> |
| 38 | + | if levelinfo.bonustrain > 0 then |
| 39 | - | <alias name="levelreportchan" copy="yes"> |
| 39 | + | report.gains = report.gains .. "@GT@gr@R(@w" .. levelinfo.trains .. "@W+@w" .. levelinfo.bonustrain .. "@R)" |
| 40 | - | <value>#addkey ExpTracker_DB ReportChan %1</value> |
| 40 | + | else |
| 41 | - | </alias> |
| 41 | + | report.gains = report.gains .. "@GT@gr@R(@w" .. levelinfo.trains .. "@R)" |
| 42 | - | <trigger name="orig_bonustrain2" priority="39550" enabled="false" copy="yes"> |
| 42 | + | end |
| 43 | - | <pattern>^You gain (%d) extra train? daily blessing bonus</pattern> |
| 43 | + | |
| 44 | - | <value>#addkey ExpTracker_DB BonusTrainsThisLevel (@ExpTracker_DB.BonusTrainsThisLevel+%1)</value> |
| 44 | + | end |
| 45 | - | </trigger> |
| 45 | + | |
| 46 | - | <trigger priority="1420" language="Lua" copy="yes"> |
| 46 | + | if levelinfo.bonusstat ~= nil then |
| 47 | - | <pattern>^You gain (%n) hit points, (%n) mana, (%n) moves, (%n) practices and (%n) trains.</pattern> |
| 47 | + | report.message = "@GL@gevel@R(@w" .. level .."@R) @GT@gook:@w[" .. report.time .. "@w] " .. report.gains .. " @G+@gStats:@w" .. levelinfo.bonusstat |
| 48 | - | <value>print(kjdffdsfjksld) |
| 48 | + | else |
| 49 | - | mylevelconvert() |
| 49 | + | report.message = "@GL@gevel@R(@w" .. level .."@R) @GT@gook:@w[" .. report.time .. "@w] " .. report.gains |
| 50 | - | statadd(zs.param(1),zs.param(2),zs.param(3),zs.param(4),zs.param(5)) |
| 50 | + | end |
| 51 | - | print(fired levelgain) |
| 51 | + | return channel .. " " .. report.message |
| 52 | - | zs.cmd.wait(300) |
| 52 | + | -- |