feeksed mi ox-box

Moderator: EUO Moderators

Post Reply
User avatar
EmoMage
Girls only want boyfriends who have great skills.
Posts: 772
Joined: Tue Aug 06, 2013 10:10 am

feeksed mi ox-box

Post by EmoMage »

I see this on part of your auxbox script. I can match some of the beginning to of LordMortiferus's, but not all.
__________ __________ __________ __________ __________

Code: Select all

-- XP array by LordMortiferus 2013/01/28, rehashed by Brentoboy
-- snip snip
-- beginning of XP-array
req_xp = {}
req_xp[1] = 0 -- fixed XP value
req_xp[2] = 200 -- fixed XP value
req_xp[26] = 93000 -- fixed XP value

for i=3,25 do -- adds XP for lvl 3 to 25 to array
  req_xp[i] = math.floor(req_xp[i-1]+1.2*(req_xp[i-1]-req_xp[i-2]))
end

for i=27,1000 do -- adds XP for lvl 27 to 1000 to array
  req_xp[i] = req_xp[i-1]+(i-26)*1000*4+15000
end

-- snip snip
-- end of XP-array

ched_xp_init=true
ched_xp_arr={}

function ched_xp_initfunc()
	if ched_xp_init then
		ched_xp=me.xp
		ched_xp_currentlvl=me.lvl-(me.remort_level*75)
		ched_lastxp=0
		ched_xp_next_level = 0
		ched_xp_p_fmin = 0
		ched_xp_p_tmin = 0
		ched_xp_lasttickxp = me.xp
		ched_xp_lastname=me.name
		ched_xp_init=false

		for i=1,600 do
			ched_xp_arr[i]=0
		end
	end
end

function ched_xp_xppmin()
	if ched_xp_init then
		ched_xp_initfunc()
	end
	if ched_xp<me.xp then
		ched_lastxp=me.xp-ched_xp
		ched_xp=me.xp
	end
	if ched_lastxp == me.xp
	or ched_xp_lastname ~= me.name then
		ched_xp_init=true
		ched_xp_initfunc()
	end

	if (OPS) then --Only run this once per second
		ched_xp_next_level = (req_xp[(ched_xp_currentlvl+1)]-me.xp)
		if ched_xp_next_level < 0 then --To account for non-meditated levels
			ched_xp_currentlvl = ched_xp_currentlvl + 1
		end

		local xpperminuteftotal = 0
		local xpperminutettotal = 0
		for i=1,300 do --5 to 10 minutes back
			ched_xp_arr[(600-(i-1))]=ched_xp_arr[(600-i)]
			xpperminutettotal=xpperminutettotal+ched_xp_arr[(600-(i-1))]
		end
		for i=1,299 do --0 to 5 minutes back
			ched_xp_arr[(300-(i-1))]=ched_xp_arr[(300-i)]
			xpperminuteftotal=xpperminuteftotal+ched_xp_arr[(300-(i-1))]
		end
		ched_xp_arr[1]=me.xp-ched_xp_lasttickxp
		xpperminuteftotal=xpperminuteftotal+ched_xp_arr[1]
		xpperminutettotal=xpperminutettotal+xpperminuteftotal
		ched_xp_p_fmin = math.floor(xpperminuteftotal/5)
		ched_xp_p_tmin = math.floor(xpperminutettotal/10)
		ched_xp_lasttickxp = me.xp
	end

end
__________ __________ __________ __________ __________

but on your alt+m menu, I don't see a CURRENT LEVEL part that you can add. LordMortiferus (hashed by Brentoboy) made one where it calculates your level, even when you have meditated. (below)
__________ __________ __________ __________ __________

Code: Select all

-- XP by LordMortiferus 2013/01/28, rehashed by Brentoboy

session_start_xp = me.xp -- var to calculate xp gain per session
session_start_age = me.age -- var to calculate time played per session
session_time = 0
current_level = 0

-- beginning of XP-array
req_xp = {}
req_xp[1] = 0 -- fixed XP value
req_xp[2] = 200 -- fixed XP value
req_xp[26] = 93000 -- fixed XP value

for i=3,25 do -- adds XP for lvl 3 to 25 to array
  req_xp[i] = math.floor(req_xp[i-1]+1.2*(req_xp[i-1]-req_xp[i-2]))
end

for i=27,1000 do -- adds XP for lvl 27 to 1000 to array
  req_xp[i] = req_xp[i-1]+(i-26)*1000*4+15000
end

if me.xp >= req_xp[1000] then
	current_level = 1000
else
	for i = 1,999 do -- getting current player level based on array 
		if req_xp[i] <= me.xp 
		and req_xp[i + 1] > me.xp 
		then
			current_level = i
			break
		end
	end
end

-- end of XP-array

function lordmort_xp_level()
	if current_level <= 1000 then
		local xptolvl_float = ((me.xp - req_xp[current_level]))/(req_xp[current_level+1]-req_xp[current_level]) -- % needed for next level
		local lvl_float = current_level + me.remort_level * 75 + xptolvl_float -- combines actual lvl with the % needed for next lvl

		 -- checks if player leveled or remorted
		if xptolvl_float >= 1 or xptolvl_float < 0 then
			for i = 1,999 do
				if req_xp[i] <= me.xp 
				and req_xp[i + 1] > me.xp 
				then
					current_level = i
					break
				end
			end
		end
		
		if os.difftime(os.time(), session_start) > session_time then -- just to reduce the script to every second
			session_time = os.difftime(os.time(), session_start)
			session_d_float = session_time / 60 / 60 / 24
			session_d = math.floor(session_d_float)
			session_h = math.floor((session_d_float - session_d)*24)
			session_m = math.floor(((session_d_float - session_d)*24 - session_h) * 60)
			session_s = math.floor((((session_d_float - session_d)*24 - session_h) * 60 - session_m) * 60)

			xpgain = me.xp - session_start_xp  
			xps = xpgain/session_time

			if me.age-session_start_age > 0  then
			  xpmin = xpgain/(me.age-session_start_age)
			else 
			  xpmin = 0
			end

			xptolvl = req_xp[current_level + 1] - me.xp
			xpto1k = req_xp[1000] - me.xp

			if xps > 0 then
			  timetolvl = xptolvl / xps 
			  timeto1k = xpto1k / xps
			else 
			  timetolvl = 0
			  timeto1k = 0
			end

			timetolvl_d_float = timetolvl / 60 / 60 / 24
			timetolvl_d = math.floor(timetolvl_d_float)
			timetolvl_h = math.floor((timetolvl_d_float - timetolvl_d)*24)
			timetolvl_m = math.floor(((timetolvl_d_float - timetolvl_d)*24 - timetolvl_h) * 60)
			timetolvl_s = math.floor((((timetolvl_d_float - timetolvl_d)*24 - timetolvl_h) * 60 - timetolvl_m) * 60)

			timeto1k_d_float = timeto1k / 60 / 60 / 24
			timeto1k_d = math.floor(timeto1k_d_float)
			timeto1k_h = math.floor((timeto1k_d_float - timeto1k_d)*24)
			timeto1k_m = math.floor(((timeto1k_d_float - timeto1k_d)*24 - timeto1k_h) * 60)
			timeto1k_s = math.floor((((timeto1k_d_float - timeto1k_d)*24 - timeto1k_h) * 60 - timeto1k_m) * 60)
		end
		
		
		--auxbox_prop_line("Level" ,string.format("%.4f",lvl_float))
		--auxbox_prop_line("Time" ,string.format("%02.f:%02.f:%02.f:%02.f", session_d, session_h, session_m, session_s))
  
		--auxbox_prop_line("Current XP", string.format("%d", me.xp))
		--auxbox_prop_line("Before Level", string.format("%d", xptolvl))
		--auxbox_prop_line("XPgain" ,string.format("%d", xpgain))
		--auxbox_prop_line("XP/s" ,string.format("%d", xps))
		--auxbox_prop_line("XP/min" ,string.format("%d", xpmin))
  
		--auxbox_prop_line("TimetoLvl" ,string.format("%02.f:%02.f:%02.f:%02.f", timetolvl_d, timetolvl_h, timetolvl_m, timetolvl_s))
		--auxbox_prop_line("Timeto1k" ,string.format("%02.f:%02.f:%02.f:%02.f", timeto1k_d, timeto1k_h, timeto1k_m, timeto1k_s))		
	end
end
__________ __________ __________ __________ __________

now, I have messed around with it as much as I possibly can, and I have successfully added a "Current Lvl" addon to the menu, but it doesn't work. I have looked it over many times, but I just can't figure out how to make it work. I've added this and added that, and nothing.

I'd like to get this look/feel using the "alt+m" menu.
__________ __________ __________ __________ __________
auxbox2.png
__________ __________ __________ __________ __________

as you see the in the picture, I can see my full level all the way out to the millionths place. I like being able to see this. the current xp, before level, xp/s, and xp/m is already in the menu and that's fine. I just want to be able to see my current level.

(not worried about the skills. my auxbox isn't that big with a 800x600 res anyway)

PLEASE HELP IF YOU CAN!!
You do not have the required permissions to view the files attached to this post.
Last edited by EmoMage on Tue May 01, 2018 8:54 am, edited 3 times in total.
eggmceye wrote:
ParadoxOfChoice wrote: Zombie using bow/sling probably shouldn't give disease.

the zombies are pulling the arrows out of their ass
Chedich
on lolpatrol
Posts: 254
Joined: Wed Jan 14, 2004 12:51 am

Re: TO CHEDICH OR LORDMORTIFERUS OR SEVERIAN

Post by Chedich »

Would you mind posting your "current level-addon"?
User avatar
EmoMage
Girls only want boyfriends who have great skills.
Posts: 772
Joined: Tue Aug 06, 2013 10:10 am

Re: TO CHEDICH OR LORDMORTIFERUS OR SEVERIAN

Post by EmoMage »

where can I find that? I don't understand the "add-on" you're asking for.
eggmceye wrote:
ParadoxOfChoice wrote: Zombie using bow/sling probably shouldn't give disease.

the zombies are pulling the arrows out of their ass
User avatar
EmoMage
Girls only want boyfriends who have great skills.
Posts: 772
Joined: Tue Aug 06, 2013 10:10 am

Re: TO CHEDICH OR LORDMORTIFERUS OR SEVERIAN

Post by EmoMage »

This??

Code: Select all

ched_addon_register("Current Lvl" , "Chedich", "2013-06-20", "lordmord_xp_level_1", "auxbox_lordmort_xp_level()", "lordmort_xp_level()")
I added LordMortiferus's full "XP" section that I posted above, and I failed. X-D


it was a copy from yours that didn't work. lmao.
eggmceye wrote:
ParadoxOfChoice wrote: Zombie using bow/sling probably shouldn't give disease.

the zombies are pulling the arrows out of their ass
Chedich
on lolpatrol
Posts: 254
Joined: Wed Jan 14, 2004 12:51 am

Re: TO CHEDICH OR LORDMORTIFERUS OR SEVERIAN

Post by Chedich »

While I have to commend you for trying, I do recommend reading up a bit more on LUA. The last function in the register call shouldn't print anything, it's only intended for "background" functions. Furthermore the functions should both exist, although it would fail quietly if they don't.

If I understand you correctly the following script would do what you're after, but I can't promise anything since I haven't tested it. It might be full of typos.
I've cut out some unnecessary stuff and given all variables prefixes to make sure they're unique.
If it doesn't work, don't hesitate to tell me and I'll try to fix it.

Code: Select all

-- XP by LordMortiferus 2013/08/28, rehashed by Brentoboy
-- surgically altered by Chedich

ched_addon_register("Current Lvl Decimal" , "LordMortiferus", "2013-08-28", "lordmort_xp_level_1_mod", "auxbox_lordmort_xp_level()")

lm_xp_current_level = 0

-- beginning of XP-array
lm_xp_req_xp = {}
lm_xp_req_xp[1] = 0 -- fixed XP value
lm_xp_req_xp[2] = 200 -- fixed XP value
lm_xp_req_xp[26] = 93000 -- fixed XP value

for i=3,25 do -- adds XP for lvl 3 to 25 to array
  lm_xp_req_xp[i] = math.floor(lm_xp_req_xp[i-1]+1.2*(lm_xp_req_xp[i-1]-lm_xp_req_xp[i-2]))
end

for i=27,1000 do -- adds XP for lvl 27 to 1000 to array
  lm_xp_req_xp[i] = lm_xp_req_xp[i-1]+(i-26)*1000*4+15000
end

if me.xp >= lm_xp_req_xp[1000] then
   lm_xp_current_level = 1000
else
   for i = 1,999 do -- getting current player level based on array 
      if lm_xp_req_xp[i] <= me.xp 
      and lm_xp_req_xp[i + 1] > me.xp 
      then
         lm_xp_current_level = i
         break
      end
   end
end

-- end of XP-array

function auxbox_lordmort_xp_level()
    if lm_xp_current_level <= 1000 then
        local lm_xp_xptolvl_float = ((me.xp - lm_xp_req_xp[lm_xp_current_level]))/(lm_xp_req_xp[lm_xp_current_level+1]-lm_xp_req_xp[lm_xp_current_level]) -- % needed for next level
        local lm_xp_lvl_float = lm_xp_current_level + me.remort_level * 75 + lm_xp_xptolvl_float -- combines actual lvl with the % needed for next lvl

        -- checks if player leveled or remorted
        if OPS then
            if lm_xp_xptolvl_float >= 1 or lm_xp_xptolvl_float < 0 then
                for i = 1,999 do
                    if lm_xp_req_xp[i] <= me.xp 
                    and lm_xp_req_xp[i + 1] > me.xp 
                    then
                        lm_xp_current_level = i
                        break
                    end
                end
            end
        end

    auxbox_prop_line("Level" ,string.format("%.4f",lm_xp_lvl_float))

    end
end
User avatar
EmoMage
Girls only want boyfriends who have great skills.
Posts: 772
Joined: Tue Aug 06, 2013 10:10 am

Re: TO CHEDICH OR LORDMORTIFERUS OR SEVERIAN

Post by EmoMage »

where do I need to add this?
eggmceye wrote:
ParadoxOfChoice wrote: Zombie using bow/sling probably shouldn't give disease.

the zombies are pulling the arrows out of their ass
User avatar
EmoMage
Girls only want boyfriends who have great skills.
Posts: 772
Joined: Tue Aug 06, 2013 10:10 am

Re: TO CHEDICH OR LORDMORTIFERUS OR SEVERIAN

Post by EmoMage »

You're not bad at this! xD

thank you! works like a charm. :P
eggmceye wrote:
ParadoxOfChoice wrote: Zombie using bow/sling probably shouldn't give disease.

the zombies are pulling the arrows out of their ass
User avatar
EmoMage
Girls only want boyfriends who have great skills.
Posts: 772
Joined: Tue Aug 06, 2013 10:10 am

Re: feecksd

Post by EmoMage »

Chedich, i feel like we've had this talk more recently. haha. i didn't know we talked about this before.
eggmceye wrote:
ParadoxOfChoice wrote: Zombie using bow/sling probably shouldn't give disease.

the zombies are pulling the arrows out of their ass
User avatar
1[WoWz]
MACRO > me
Posts: 841
Joined: Wed Apr 21, 2004 6:48 pm
Location: Southern California, USA

Re: feecksd

Post by 1[WoWz] »

Hijacking this thread. I edited my auxbox to include xp, xp to next level, etc, but then it got ride of real world time, server time, etc. I don't know much about auxbox scripting, can anyone help me out or post the code so I can edit to include the xp stuff without getting rid of the default stuff (time, etc)?
IGN: 1
Chedich
on lolpatrol
Posts: 254
Joined: Wed Jan 14, 2004 12:51 am

Re: feecksd

Post by Chedich »

EmoMage wrote:Chedich, i feel like we've had this talk more recently. haha. i didn't know we talked about this before.
I don't remember this at all... :lesson:

1: You should try out this collection of auxbox scripts: https://drive.google.com/file/d/0ByGxjO ... sp=sharing
To get it to work you have to empty out your clientscripts folder(remember to backup whatever you want to keep) and put all the lua files contained in the zip archive into the folder instead. Then you can press alt+m in game to get a menu where you select which scripts you want to use, in the order you want them shown. It should contain most stuff that you'd need. If nothing else there's lots of stuff that you can copy-paste from if you want to roll your own.
User avatar
EmoMage
Girls only want boyfriends who have great skills.
Posts: 772
Joined: Tue Aug 06, 2013 10:10 am

Re: feecksd

Post by EmoMage »

can you post your current .lua 1? or e-mail it to me? kevin.abernathy1026@gmail.com
eggmceye wrote:
ParadoxOfChoice wrote: Zombie using bow/sling probably shouldn't give disease.

the zombies are pulling the arrows out of their ass
User avatar
EmoMage
Girls only want boyfriends who have great skills.
Posts: 772
Joined: Tue Aug 06, 2013 10:10 am

Re: feecksd

Post by EmoMage »

Chedich wrote:I don't remember this at all... :lesson:
me neither!! LAUGHING OUT LOUD LIKE A MORON. i dunno where this thread even came from. i just some how came across it and thought it was funny cause like 2 or 3 months ago, we just had this talk. and apparently, also had this talk 5 years ago
eggmceye wrote:
ParadoxOfChoice wrote: Zombie using bow/sling probably shouldn't give disease.

the zombies are pulling the arrows out of their ass
Chedich
on lolpatrol
Posts: 254
Joined: Wed Jan 14, 2004 12:51 am

Re: feeksed mi ox-box

Post by Chedich »

I'll mark down 2023 in my calendar then for the next time. :LAUGHING OUT LOUD LIKE A MORON:
Post Reply