Hi all,
I have made a plugin for my mud that shows my xp rate in a graph form. This was done more as a learning experience than anything but you can see what it looks like here: http://discworld.imaginary-realities.com/garrion/Graph.jpg
The issue I have is my code is very messy and I was wondering if there was an easier way to deal with my tables than what I have done. The code for the tables is below.
This code is in a function that fires every minute to update the graph:
Hopefully you can see what I am talking about here. I didn't want to post the whole plugin and spam up the screen.
I have made a plugin for my mud that shows my xp rate in a graph form. This was done more as a learning experience than anything but you can see what it looks like here: http://discworld.imaginary-realities.com/garrion/Graph.jpg
The issue I have is my code is very messy and I was wondering if there was an easier way to deal with my tables than what I have done. The code for the tables is below.
This code is in a function that fires every minute to update the graph:
-- This moves the graph points along one tick when the timer fires
t59 = t58
t58 = t57
t57 = t56
t56 = t55
t55 = t54
t54 = t53
t53 = t52
t52 = t51
t51 = t50
t50 = t49
t49 = t48
t48 = t47
t47 = t46
t46 = t45
t45 = t44
t44 = t43
t43 = t42
t42 = t41
t41 = t40
t40 = t39
t39 = t38
t38 = t37
t37 = t36
t36 = t35
t35 = t34
t34 = t33
t33 = t32
t32 = t31
t31 = t30
t30 = t29
t29 = t28
t28 = t27
t27 = t26
t26 = t25
t25 = t24
t24 = t23
t23 = t22
t22 = t21
t21 = t20
t20 = t19
t19 = t18
t18 = t17
t17 = t16
t16 = t15
t15 = t14
t14 = t13
t13 = t12
t12 = t11
t11 = t10
t10 = t9
t9 = t8
t8 = t7
t7 = t6
t6 = t5
t5 = t4
t4 = t3
t3 = t2
t2 = t1
t1 = t0
Hopefully you can see what I am talking about here. I didn't want to post the whole plugin and spam up the screen.