(!empty($user->lang['CODE'])) ? $user->lang['CODE'] : ucwords(strtolower(str_replace('_', ' ', 'CODE'))):
Constants
//Gambling Stakes Level - 1 = low stakes, 2 = mid stakes, 3 = high stakes, 4 = Pack Dolls
stakes_level = 3
// Misc Variables
Casino_owner, Packman = Mi Gan-Zo
Packdoll = Pack Drudge
Gamesmaster = Sho High-Stakes Gamesmaster
Token = Gambling Token
Casino = Sho
Stakes = High
token_cost = 1
//secondary pack stacking variables
usepacks = 1 //set to 1 to use secondary packs, 0 to not use them
packcalc = 2
//stats tracking
datacount = 1
total_items = 1
ratio = 1
total_cost = 1
End
DataSet stats
item = String 100
count = Integer
End
procedure determine_casino
Select Monty the Munificent //are we at the Aluvian Den?
IF _selected = Monty the Munificent
setconst Casino_owner = Monty
setconst casino = Aluvian
setconst Packman = Monty the Munificent
setconst Packdoll = Pack Scarecrow
exit
end
Select Mi Gan-Zo //are we at the Sho Den?
If _selected = Mi Gan-Zo
setconst Casino_owner = Gan-Zo
setconst casino = Sho
setconst Packman = Mi Gan-Zo
setconst Packdoll = Pack Drudge
exit
end
Select Arshid al-Qiyid //are we at the Gharundim Den?
If _selected = Arshid al-Qiyid
setconst Casino_owner = Arshid
setconst casino = Gharu'ndim
setconst Packman = Arshid al-Qiyid
setconst Packdoll = Pack Golem
exit
exit
end
//are we even at a Den?
Sendtext 8, Are you sure that you are at a casino?
Stop
End
Procedure GiveToken
delay 75
SelectMine $Token
Delay 75
StackItem _selected, $Gamesmaster
call givedelay
Call StackItems
End
Procedure StackItems
delay 250
MousePos $R1C1
LeftClick
call trackit
If _selected contains Mnemo or _selected contains Pack or _selected contains Treated or _selected contains Golden or _selected contains Peerless
exit
end
if $usepacks = 1
call Unstackables
end
delay 250
End
procedure setvariables
if $stakes_level = 1
setconst stakes = Low-Stakes
setconst token_cost = 5000
end
if $stakes_level = 2
setconst stakes = Mid-Stakes
setconst token_cost = 25000
end
if $stakes_level = 3
setconst stakes = High-Stakes
setconst token_cost = 50000
end
if $stakes_level = 4
setconst Token = $packdoll
setconst Gamesmaster = $Packman
exit
end
SetConst TOKEN = $Casino_owner + 's + $stakes + Gambling Token
Setconst Gamesmaster = $casino + $stakes + Gamesmaster
end
Procedure givedelay //wait max 10 seconds before continuing
ClearPluginVar _servertext
Loop 200
Delay 50
If _servertext contains gives you
Break
End
End
End
procedure time2gamble
SelectNearest $Gamesmaster
setconst Gamesmaster = _selectedguid
haveitem $token
while {PluginResult} = OK //only gamble while we have tokens
call GiveToken
packslots 1
if {PluginResult} <= 0
SendText 3, NO FREE SPOTS IN OUR MAIN PACK
exit
end
haveitem $token
end
end
Procedure Unstackables
// Calculate which pack position to drag the item into
call determinestackpack
Delay 333
MoveAllItem _selected, $packcalc, 0 , 0 , 1
//waitforcursor
end
procedure determinestackpack
PackSlots $packcalc
while {pluginresult} <= 0 or {PluginResult} = No Pack
inc packcalc
PackSlots $packcalc
if $packcalc >= 8
SendText 3, no more free packs
setconst usepacks = 0
break
end
end
end
procedure trackit
DSLocate stats, item, _selected
if EOF stats
dsappend stats
setconst stats[item] = _selected
setconst stats[count] = 1
else
DSEdit stats
inc stats[count]
end
dspost stats
end
procedure report_stats
//get total items received
DSCount stats, datacount
dsfirst stats
setconst total_items = 0
loop $datacount
compute total_items = $total_items + stats[count]
dsnext stats
end
if $stakes_level = 4
setconst total_cost = nothing, we gambled pack dolls
else
compute total_cost = $token_cost * $total_items
formatnumber total_cost, $total_cost, #,##0
end
sendtext 2, we gambled for $total_items items at a cost of $total_cost.
//now report the %
dsfirst stats
loop $datacount
compute ratio = stats[count] / $total_items * 100
FormatNumber ratio = $ratio, 0.00%
sendtext 2, stats[count] or $ratio of them were stats[item]
dsnext stats
end
end
///////////////////////////////////////////////////////////////////////////////
// MAIN LOOP
///////////////////////////////////////////////////////////////////////////////
INCLUDE incUI.mac
Call SetUI
SetActiveWindow Asheron's Call
SendText 1, Vellus' Cash Sinking Gambling Macro V 6.0
SendText 1, Written by Art of Crafting of Morningthaw
CastSpellTimeout 15000
//find out which casino we are at
call determine_casino
SendText 3, We are at the $casino casino
timestamp We are at the $casino casino
//set up our gambling variables
call setvariables
SendText 3, We are gambling $token tonight
timestamp We are gambling $token tonight
//now gamble
call time2gamble
//now give out the results of gambling
call report_stats
SendText 3, ALL DONE GAMBLING
SendText 3, THANKS FOR USING VELLUS' GAMBLING MACRO
Timestamp ALL DONE GAMBLING
For they people that still play AC its for AC 1