taultunleashed logoProgramming question about Megabot 2.7 GlobalVar File : EverQuest 2 Premium Discussions
newtopic  postreply
 [ 4 posts ] 
blue large dot

Programming question about Megabot 2.7 GlobalVar File : EverQuest 2 Premium Discussions

Posted: October 21st, 2005, 12:33 pm
 
loraik
loraik's Reps:
User avatar
What is the purpose of numbering the "const" like the following:

(!empty($user->lang['CODE'])) ? $user->lang['CODE'] : ucwords(strtolower(str_replace('_', ' ', 'CODE'))):
const g_CON_GRAY=12
const g_CON_GREEN=13
const g_CON_BLUE=14
const g_CON_WHITE=15
const g_CON_YELLOW=16
const g_CON_ORANGE=17
const g_CON_RED=18

const g_FIGHTPARTNER=19
const g_HEALPARTNER=20
const g_BOTHPARTNERS=21
const g_OUTLOUD=22
const g_TOGROUP=23


What to the numbers that the var equals represent?

Loraik


Reply with quote
Posted: October 30th, 2005, 10:56 am
 
richyrich
richyrich's Reps:
User avatar
Only that the constants have to have a unique number that reference.

The reason is to make the script easier to read, that's all, the numbers are meaningless, just unique.

It's better then saying:
Concolor = 16

Means nothing when you read it, but if it says
Concolor = g_COn_YELLOW - ahh - now I know what that means!

Make sense?


Reply with quote
Posted: October 31st, 2005, 6:32 am
 
loraik
loraik's Reps:
User avatar
So you can just call "16" instead of "g_COn_YELLOW"? But as you look thru the code you see that 16 is the code for yellow con?

LOL hope I said that right.. Trying to learn :shock:

Is there a VB for total ID10T'5?

Loraik


Reply with quote
Posted: October 31st, 2005, 2:11 pm
 
richyrich
richyrich's Reps:
User avatar
It's purely for easier to read code.

I need to assign and TEST variables to see what state they are in. You can compare to meaningless integers, or to a meaningul constant that represents an integer...


Reply with quote
Want Advertisements After The Last Post Removed? Create A Free Account!

blue large dot Who is online
Users browsing this forum: No registered users and 73 guests

Popular Sections
SWTOR Cheats
Guild Wars 2 Cheats
Guild Wars 2 Hacks
Guild Wars 2 Bots
Diablo 3 Cheats
Guild Wars 2 Mods

Popular Sections
WoW Cataclysm Cheats & Exploits
WoW Cataclysm Hacks & Bots
Star Wars The Old Republic Cheats
SWTOR Mods
Torchlight 2 Cheats
SWTOR Space Mission Bots
Site Nav and RSS
RSS Feed of EverQuest 2 Premium Discussions RSS Feed 
Sitemap of EverQuest 2 Premium Discussions Sitemap 
SitemapIndex SitemapIndex
RSS Feed RSS Feed
Channel list Channel list
left bottom corner Site and Contents Copyright 2001-2012 All Rights Reserved TaultUnleashed.com bottom corner
top left
top right
createaccount
Username:   Password:   Remember Me?