addnews()
Adds a news item for the current user.
addnews(string $text[, array<string|int, mixed> $params = [] ][, string $textDomain = 'partial_news' ][, bool $hideFromBio = null ]) : mixed
Parameters
-
$text
: string
-
-
$params
: array<string|int, mixed>
= []
-
-
$textDomain
: string
= 'partial_news'
-
-
$hideFromBio
: bool
= null
-
activate_buffs()
activate_buffs(mixed $tag) : mixed
Parameters
-
$tag
: mixed
-
process_lifetaps()
process_lifetaps(mixed $ltaps, mixed $damage) : mixed
Parameters
-
$ltaps
: mixed
-
-
$damage
: mixed
-
process_dmgshield()
process_dmgshield(mixed $dshield, mixed $damage) : mixed
Parameters
-
$dshield
: mixed
-
-
$damage
: mixed
-
expire_buffs()
expire_buffs() : mixed
expire_buffs_afterbattle()
expire_buffs_afterbattle() : mixed
prepare_data_battlebars()
Prepare all data for show battle bars.
prepare_data_battlebars(array<string|int, mixed> $enemies) : array<string|int, mixed>
Parameters
-
$enemies
: array<string|int, mixed>
-
prepare_fight()
This function prepares the fight, sets up options and gives hook a hook to change options on a per-player basis.
prepare_fight([array<string|int, mixed> $options = [] ]) : array<string|int, mixed>
Parameters
-
$options
: array<string|int, mixed>
= []
-
the options given by a module or basics
prepare_companions()
This functions prepares companions to be able to take part in a fight. Uses global copies.
prepare_companions() : mixed
suspend_companions()
Suspends companions on a given parameter.
suspend_companions(string $susp[, string $nomsg = null ]) : mixed
Parameters
-
$susp
: string
-
-
$nomsg
: string
= null
-
The message to be displayed upon suspending. If false, no message will be displayed.
unsuspend_companions()
Enables suspended companions.
unsuspend_companions(string $susp[, string $nomsg = null ]) : mixed
Parameters
-
$susp
: string
-
-
$nomsg
: string
= null
-
The message to be displayed upon unsuspending. If false, no message will be displayed.
autosettarget()
Automatically chooses the first still living enemy as target for attacks.
autosettarget(array<string|int, mixed> $localenemies) : array<string|int, mixed>
Parameters
-
$localenemies
: array<string|int, mixed>
-
the stack of enemies to find a valid one from
report_companion_move()
Based upon the type of the companion different actions are performed and the companion is marked as "used" after that.
report_companion_move(array<string|int, mixed> $companion[, string $activate = 'fight' ]) : array<string|int, mixed>
Parameters
-
$companion
: array<string|int, mixed>
-
-
$activate
: string
= 'fight'
-
The stage of activation. Can be one of these: "fight", "defend", "heal" or "magic".
rollcompaniondamage()
Based upon the companion's stats damage values are calculated.
rollcompaniondamage(array<string|int, mixed> $companion) : array<string|int, mixed>
Parameters
-
$companion
: array<string|int, mixed>
-
battle_spawn()
Adds a new creature to the badguy array.
battle_spawn(mixed $creature) : mixed
Parameters
-
$creature
: mixed
-
A standard badguy array. If numeric, the corresponding badguy will be loaded from the database.
battle_heal()
Allows creatures to heal themselves or another badguy.
battle_heal(int $amount[, mixed $target = false ]) : mixed
Parameters
-
$amount
: int
-
Amount of helath to be restored
-
$target
: mixed
= false
-
if false badguy will heal itself otherwise the enemy with this index
execute_ai_script()
Executes the given script or loads the script and then executes it.
execute_ai_script(string $script) : mixed
Parameters
-
$script
: string
-
the script to be executed
battle_player_attacks()
Battle: attack of player.
battle_player_attacks() : bool
battle_badguy_attacks()
Battle: attack of badguy.
battle_badguy_attacks() : bool
battlevictory()
Function to show result of victory battle.
battlevictory(array<string|int, mixed> $enemies[, bool $denyflawless = false ][, bool $forest = true ]) : mixed
Parameters
-
$enemies
: array<string|int, mixed>
-
-
$denyflawless
: bool
= false
-
-
$forest
: bool
= true
-
battlegainexperienceforest()
Process win experiencie in battle win in forest.
battlegainexperienceforest() : mixed
battlegainexperiencegraveyard()
Process win experiencie in battle win in graveyard.
battlegainexperiencegraveyard() : mixed
battledefeat()
Function to show result of defeated battle.
battledefeat(array<string|int, mixed> $enemies[, string|false $where = 'forest' ][, bool $candie = true ][, bool $lostexp = true ][, bool $lostgold = true ]) : mixed
Parameters
-
$enemies
: array<string|int, mixed>
-
-
$where
: string|false
= 'forest'
-
-
$candie
: bool
= true
-
-
$lostexp
: bool
= true
-
Lost exp when die in battle?
-
$lostgold
: bool
= true
-
Lost gold when die in battle?
battleshowresults()
Show result of.
battleshowresults(array<string|int, mixed> $lotgdBattleContent) : mixed
Parameters
-
$lotgdBattleContent
: array<string|int, mixed>
-
rolldamage()
rolldamage() : mixed
report_power_move()
report_power_move(mixed $crit, mixed $dmg) : mixed
Parameters
-
$crit
: mixed
-
-
$dmg
: mixed
-
suspend_buffs()
suspend_buffs([mixed $susp = false ][, mixed $msg = false ]) : mixed
Parameters
-
$susp
: mixed
= false
-
-
$msg
: mixed
= false
-
suspend_buff_by_name()
suspend_buff_by_name(mixed $name[, mixed $msg = false ]) : mixed
Parameters
-
$name
: mixed
-
-
$msg
: mixed
= false
-
unsuspend_buff_by_name()
unsuspend_buff_by_name(mixed $name[, mixed $msg = false ]) : mixed
Parameters
-
$name
: mixed
-
-
$msg
: mixed
= false
-
is_buff_active()
is_buff_active(mixed $name) : mixed
Parameters
-
$name
: mixed
-
unsuspend_buffs()
unsuspend_buffs([mixed $susp = false ][, mixed $msg = false ]) : mixed
Parameters
-
$susp
: mixed
= false
-
-
$msg
: mixed
= false
-
apply_bodyguard()
apply_bodyguard(mixed $level) : mixed
Parameters
-
$level
: mixed
-
apply_skill()
apply_skill(mixed $skill, mixed $l) : mixed
Parameters
-
$skill
: mixed
-
-
$l
: mixed
-
calculate_buff_fields()
calculate_buff_fields() : mixed
restore_buff_fields()
restore_buff_fields() : mixed
apply_buff()
apply_buff(mixed $name, mixed $buff) : mixed
Parameters
-
$name
: mixed
-
-
$buff
: mixed
-
apply_companion()
apply_companion(mixed $name, mixed $companion[, mixed $ignorelimit = false ]) : mixed
Parameters
-
$name
: mixed
-
-
$companion
: mixed
-
-
$ignorelimit
: mixed
= false
-
strip_buff()
strip_buff(mixed $name) : mixed
Parameters
-
$name
: mixed
-
strip_all_buffs()
strip_all_buffs() : mixed
has_buff()
has_buff(mixed $name) : mixed
Parameters
-
$name
: mixed
-
char_cleanup()
Delete an account and create a backup.
char_cleanup(int $accountId, int $type) : bool
In order to create a backup and delete the data, the EntityRepository of each table needs to have the following two methods:
- public function backupDeleteDataFromAccount(int $accountId): array }
- public function backupGetDataFromAccount(int $accountId): int }
Parameters
-
$accountId
: int
-
-
$type
: int
-
createBackupOfEntity()
Create backup of Entity in "logd_snapshots".
createBackupOfEntity(int $accountId, object $repository, string $entityName) : bool
Parameters
-
$accountId
: int
-
-
$repository
: object
-
-
$entityName
: string
-
createBackupBasicInfo()
Create a basic info backup of account.
createBackupBasicInfo(int $accountId, mixed $account) : bool
Parameters
-
$accountId
: int
-
-
$account
: mixed
-
checkban()
checkban([mixed $login = false ]) : mixed
Parameters
-
$login
: mixed
= false
-
process_post_save_data()
process_post_save_data(mixed $post, mixed $old, mixed &$flashMessages, mixed $module, mixed $textDomain) : mixed
Parameters
-
$post
: mixed
-
-
$old
: mixed
-
-
$flashMessages
: mixed
-
-
$module
: mixed
-
-
$textDomain
: mixed
-
lotgd_generate_creature_levels()
Generate a base creature stats
Can use for generated your own creatures in your modules.
lotgd_generate_creature_levels([false|int $level = null ]) : array<string|int, mixed>
Parameters
-
$level
: false|int
= null
-
lotgd_generate_doppelganger()
Generate a dummy creature Doppelganger.
lotgd_generate_doppelganger(int $level) : array<string|int, mixed>
Parameters
-
$level
: int
-
Transform creature to adapt to player.
lotgd_transform_creature(array<string|int, mixed> $badguy[, bool $debug = true ]) : array<string|int, mixed>
Parameters
-
$badguy
: array<string|int, mixed>
-
-
$debug
: bool
= true
-
Show or not debug of creature
lotgd_search_creature()
Search for creature in data base.
lotgd_search_creature(int $multi, int $targetlevel, int $mintargetlevel[, bool $packofmonsters = false ][, bool|null $forest = true ]) : array<string|int, mixed>
Parameters
-
$multi
: int
-
-
$targetlevel
: int
-
-
$mintargetlevel
: int
-
-
$packofmonsters
: bool
= false
-
For diferent or same creatures
-
$forest
: bool|null
= true
-
TRUE for creature of forest, FALSE for graveyard and NULL for none
get_creature_stats()
get_creature_stats(mixed $dk) : mixed
Parameters
-
$dk
: mixed
-
get_creature_hitpoints()
get_creature_hitpoints(mixed $attrs) : mixed
Parameters
-
$attrs
: mixed
-
get_creature_attack()
get_creature_attack(mixed $attrs) : mixed
Parameters
-
$attrs
: mixed
-
get_creature_defense()
get_creature_defense(mixed $attrs) : mixed
Parameters
-
$attrs
: mixed
-
get_creature_speed()
get_creature_speed(mixed $attrs) : mixed
Parameters
-
$attrs
: mixed
-
lotgd_show_debug_creature()
lotgd_show_debug_creature(iteratable<string|int, mixed> $badguy) : mixed
Parameters
-
$badguy
: iteratable<string|int, mixed>
-
checkday()
Check if is a new day.
checkday() : mixed
is_new_day()
is_new_day(int $now) : bool
Parameters
-
$now
: int
-
getgametime()
getgametime() : mixed
gametime()
Undocumented function.
gametime() : int
convertgametime()
convertgametime(int $intime[, mixed $debug = false ]) : mixed
Parameters
-
$intime
: int
-
-
$debug
: mixed
= false
-
gametimedetails()
gametimedetails() : mixed
secondstonextgameday()
secondstonextgameday([mixed $details = false ]) : mixed
Parameters
-
$details
: mixed
= false
-
select_deathmessage()
Select 1 death message.
select_deathmessage([string $zone = 'forest' ][, array<string|int, mixed> $extraParams = [] ]) : array<string|int, mixed>
Parameters
-
$zone
: string
= 'forest'
-
-
$extraParams
: array<string|int, mixed>
= []
-
debuglog()
Documentated by Catscradler
Add to the user's log
if $field $value and $consolidate have values, entry will be merged with existing line from today with identical $field.
debuglog(string $message[, int $target = false ][, int $user = false ][, string $field = false ][, int $value = false ][, bool $consolidate = true ]) : mixed
otherwise, a new line will be added to the log.
Parameters
-
$message
: string
-
-
$target
: int
= false
-
acctid of the user on the receiving end of the event eg. the user who did NOT initiate PvP, gold transfer recipient (optional)
-
$user
: int
= false
-
acctid of the user the log entry is about (optional, defaults to current user)
-
$field
: string
= false
-
the label for this line, appears as first word on this line in the log eg. healing, forestwin (optional)
-
$value
: int
= false
-
how much was gained or lost. Only useful if also using $field and $consolidate (optional)
-
$consolidate
: bool
= true
-
add $value to previous log lines with the same $field, keeping a running total for today (optional, defaults to true)
dump_item()
dump_item(mixed $item) : mixed
Parameters
-
$item
: mixed
-
dump_item_ascode()
dump_item_ascode(mixed $item[, mixed $indent = " " ]) : mixed
Parameters
-
$item
: mixed
-
-
$indent
: mixed
= " "
-
handle_event()
handle_event(mixed $location[, mixed $baseLink = false ]) : mixed
Parameters
-
$location
: mixed
-
-
$baseLink
: mixed
= false
-
exp_for_next_level()
Returns the experience needed to advance to the next level.
exp_for_next_level(int $curlevel, int $curdk) : int
Parameters
-
$curlevel
: int
-
the current level of the player
-
$curdk
: int
-
the current number of dragonkills
fightnav()
fightnav([mixed $allowspecial = true ][, mixed $allowflee = true ][, mixed $script = false ]) : mixed
Parameters
-
$allowspecial
: mixed
= true
-
-
$allowflee
: mixed
= true
-
-
$script
: mixed
= false
-
do_forced_nav()
do_forced_nav(mixed $anonymous, mixed $overrideforced) : mixed
Parameters
-
$anonymous
: mixed
-
-
$overrideforced
: mixed
-
buffbadguy()
Buff creature for optimize to character stats.
buffbadguy(mixed $badguy[, string $hook = 'buffbadguy' ]) : array<string|int, mixed>
Parameters
-
$badguy
: mixed
-
-
$hook
: string
= 'buffbadguy'
-
Hook to activate when buff badguy
gamelog()
gamelog(mixed $message[, mixed $category = 'general' ][, mixed $filed = false ]) : mixed
Parameters
-
$message
: mixed
-
-
$category
: mixed
= 'general'
-
-
$filed
: mixed
= false
-
holidayize()
holidayize(mixed $text[, mixed $type = 'unknown' ]) : mixed
Parameters
-
$text
: mixed
-
-
$type
: mixed
= 'unknown'
-
increment_specialty()
increment_specialty(mixed $colorcode[, mixed $spec = false ]) : mixed
Parameters
-
$colorcode
: mixed
-
-
$spec
: mixed
= false
-
lotgd_mail()
Function for send Mails to users
Has the same structure as the php "mail()" function, but this function checks if you want to send emails in html format or not.
lotgd_mail(mixed $to, mixed $subject, mixed $message[, mixed $additional_headers = '' ][, mixed $additional_parameters = '' ]) : mixed
Parameters
-
$to
: mixed
-
-
$subject
: mixed
-
-
$message
: mixed
-
-
$additional_headers
: mixed
= ''
-
-
$additional_parameters
: mixed
= ''
-
activate_module()
activate_module(mixed $module) : mixed
Parameters
-
$module
: mixed
-
deactivate_module()
deactivate_module(mixed $module) : mixed
Parameters
-
$module
: mixed
-
uninstall_module()
uninstall_module(mixed $module) : mixed
Parameters
-
$module
: mixed
-
install_module()
install_module(mixed $module[, mixed $force = true ]) : mixed
Parameters
-
$module
: mixed
-
-
$force
: mixed
= true
-
blockmodule()
blockmodule(mixed $modulename) : mixed
Parameters
-
$modulename
: mixed
-
unblockmodule()
unblockmodule(mixed $modulename) : mixed
Parameters
-
$modulename
: mixed
-
module_collect_events()
module_collect_events(mixed $type[, mixed $allowinactive = false ]) : mixed
Parameters
-
$type
: mixed
-
-
$allowinactive
: mixed
= false
-
module_events()
module_events(mixed $eventtype, mixed $basechance[, mixed $baseLink = false ]) : mixed
Parameters
-
$eventtype
: mixed
-
-
$basechance
: mixed
-
-
$baseLink
: mixed
= false
-
module_do_event()
module_do_event(mixed $type, mixed $module[, mixed $allowinactive = false ][, mixed $baseLink = false ]) : mixed
Parameters
-
$type
: mixed
-
-
$module
: mixed
-
-
$allowinactive
: mixed
= false
-
-
$baseLink
: mixed
= false
-
event_sort()
event_sort(mixed $a, mixed $b) : mixed
Parameters
-
$a
: mixed
-
-
$b
: mixed
-
module_display_events()
module_display_events(mixed $eventtype[, mixed $forcescript = false ]) : mixed
Parameters
-
$eventtype
: mixed
-
-
$forcescript
: mixed
= false
-
modulehook()
modulehook(mixed $hookname[, mixed $args = false ][, mixed $allowinactive = false ][, mixed $only = false ]) : mixed
Parameters
-
$hookname
: mixed
-
-
$args
: mixed
= false
-
-
$allowinactive
: mixed
= false
-
-
$only
: mixed
= false
-
module_wipehooks()
Delete hooks of module.
module_wipehooks(string $module) : mixed
Parameters
-
$module
: string
-
module_addeventhook()
module_addeventhook(mixed $type, mixed $chance) : mixed
Parameters
-
$type
: mixed
-
-
$chance
: mixed
-
module_drophook()
module_drophook(mixed $hookname[, mixed $functioncall = false ]) : mixed
Parameters
-
$hookname
: mixed
-
-
$functioncall
: mixed
= false
-
module_addhook()
Called by modules to register themselves for a game module hook point, with default priority.
module_addhook(string $hookname[, string $functioncall = false ][, string $whenactive = false ]) : mixed
Modules with identical priorities will execute alphabetically. Modules can only have one hook on a given hook name,
even if they call this function multiple times, unless they specify different values for the functioncall argument.
Parameters
-
$hookname
: string
-
The hook to receive a notification for
-
$functioncall
: string
= false
-
The function that should be called, if not specified, use {modulename}_dohook() as the function
-
$whenactive
: string
= false
-
an expression that should be evaluated before triggering the event, if not specified, none
module_addhook_priority()
Called by modules to register themselves for a game module hook point, with a given priority -- lower numbers execute first.
module_addhook_priority(string $hookname[, int $priority = 50 ][, string $functioncall = false ][, string $whenactive = false ]) : mixed
Modules with identical priorities will execute alphabetically. Modules can only have one hook on a given hook name,
even if they call this function multiple times, unless they specify different values for the functioncall argument.
Parameters
-
$hookname
: string
-
The hook to receive a notification for
-
$priority
: int
= 50
-
The priority for this hooking -- lower numbers execute first. < 50 means earlier-than-normal execution, > 50 means later than normal execution. Priority only affects execution order compared to other events registered on the same hook, all events on a given hook will execute before the game resumes execution.
-
$functioncall
: string
= false
-
The function that should be called, if not specified, use {modulename}_dohook() as the function
-
$whenactive
: string
= false
-
an expression that should be evaluated before triggering the event, if not specified, none
injectmodule()
injectmodule(mixed $modulename[, mixed $force = false ]) : mixed
Parameters
-
$modulename
: mixed
-
-
$force
: mixed
= false
-
module_status()
Returns the status of a module as a bitfield.
module_status(string $modulename[, string $version = null ]) : int
Parameters
-
$modulename
: string
-
-
$version
: string
= null
-
The version to check for (null for don't care)
is_module_active()
Determines if a module is activated.
is_module_active(string $modulename) : bool
Parameters
-
$modulename
: string
-
is_module_installed()
Determines if a module is installed.
is_module_installed(string $modulename[, string $version = false ]) : bool
Parameters
-
$modulename
: string
-
-
$version
: string
= false
-
get_module_install_status()
Get status of module.
get_module_install_status() : array<string|int, mixed>
module_delete_objprefs()
Delete all objtype for objid.
module_delete_objprefs(string $objtype, int $objid) : mixed
Parameters
-
$objtype
: string
-
-
$objid
: int
-
get_module_objpref()
Get value for a setting for a module, objtype and objid.
get_module_objpref(string $objtype, int $objid, string $name[, string $module = false ]) : mixed
Parameters
-
$objtype
: string
-
-
$objid
: int
-
-
$name
: string
-
-
$module
: string
= false
-
set_module_objpref()
Set value for a setting for a module, objtype and objid.
set_module_objpref(string $objtype, int $objid, string $name, mixed $value[, string $module = false ]) : mixed
Parameters
-
$objtype
: string
-
-
$objid
: int
-
-
$name
: string
-
-
$value
: mixed
-
-
$module
: string
= false
-
increment_module_objpref()
Increment value for a setting for a module, objtype and objid.
increment_module_objpref(string $objtype, int $objid, string $name[, float|int $value = 1 ][, string $module = false ]) : mixed
Parameters
-
$objtype
: string
-
-
$objid
: int
-
-
$name
: string
-
-
$value
: float|int
= 1
-
-
$module
: string
= false
-
load_module_objpref()
Load objpref of a module.
load_module_objpref(string $objtype, int $objid[, string $module = false ]) : array<string|int, mixed>
Parameters
-
$objtype
: string
-
-
$objid
: int
-
-
$module
: string
= false
-
module_delete_userprefs()
Delete all module user preferences.
module_delete_userprefs(int $user) : mixed
Parameters
-
$user
: int
-
get_all_module_prefs()
Get all module prefs of a user.
get_all_module_prefs([string $module = false ][, int $user = false ]) : array<string|int, mixed>
Parameters
-
$module
: string
= false
-
-
$user
: int
= false
-
get_module_pref()
Get pref of user for a given module and setting.
get_module_pref(string $name[, string $module = false ][, int $user = false ]) : mixed
Parameters
-
$name
: string
-
-
$module
: string
= false
-
-
$user
: int
= false
-
set_module_pref()
Set pref of user for a given module and setting.
set_module_pref(string $name, mixed $value[, string $module = false ][, int $user = false ]) : mixed
Parameters
-
$name
: string
-
-
$value
: mixed
-
-
$module
: string
= false
-
-
$user
: int
= false
-
increment_module_pref()
Increment pref of user for a given module and setting.
increment_module_pref(string $name[, int|float $value = 1 ][, string $module = false ][, int $user = false ]) : mixed
Parameters
-
$name
: string
-
-
$value
: int|float
= 1
-
-
$module
: string
= false
-
-
$user
: int
= false
-
clear_module_pref()
Clear a setting for a given module and user.
clear_module_pref(string $name[, string $module = false ][, int $user = false ]) : mixed
Parameters
-
$name
: string
-
-
$module
: string
= false
-
-
$user
: int
= false
-
load_module_prefs()
Load prefs of a module.
load_module_prefs(string $module[, int $user = false ]) : array<string|int, mixed>
Parameters
-
$module
: string
-
-
$user
: int
= false
-
get_all_module_settings()
An associative array of all the settings for the given module.
get_all_module_settings([string $module = false ]) : array<string|int, mixed>
Parameters
-
$module
: string
= false
-
get_module_setting()
Get value for setting of a module.
get_module_setting(mixed $name[, mixed $module = false ]) : mixed
Parameters
-
$name
: mixed
-
-
$module
: mixed
= false
-
set_module_setting()
Set value for setting of a module.
set_module_setting(string $name, mixed $value[, string $module = false ]) : mixed
Parameters
-
$name
: string
-
-
$value
: mixed
-
-
$module
: string
= false
-
increment_module_setting()
Increment value for a setting of module.
increment_module_setting(string $name[, float|int $value = 1 ][, string $module = false ]) : mixed
Parameters
-
$name
: string
-
-
$value
: float|int
= 1
-
-
$module
: string
= false
-
clear_module_settings()
Clear settings of a module.
clear_module_settings([string $module = false ]) : mixed
Parameters
-
$module
: string
= false
-
load_module_settings()
Load settings of a module.
load_module_settings(string $module) : array<string|int, mixed>
Parameters
-
$module
: string
-
module_check_requirements()
Checks if the module requirements are satisfied. Should a module require
other modules to be installed and active, then optionally makes them so.
module_check_requirements(array<string|int, mixed> $reqs[, mixed $forceinject = false ]) : bool
Parameters
-
$reqs
: array<string|int, mixed>
-
Requirements of a module from _getmoduleinfo()
-
$forceinject
: mixed
= false
-
mass_module_prepare()
Preloads data for multiple modules in one shot rather than
having to make SQL calls for each hook, when many of the hooks
are found on every page.
mass_module_prepare(array<string|int, mixed> $hooknames) : bool
Parameters
-
$hooknames
: array<string|int, mixed>
-
names of hooks whose attached modules should be preloaded
get_module_info()
get_module_info(mixed $shortname) : mixed
Parameters
-
$shortname
: mixed
-
module_editor_navs()
module_editor_navs(mixed $like, mixed $linkprefix) : mixed
Parameters
-
$like
: mixed
-
-
$linkprefix
: mixed
-
module_objpref_edit()
module_objpref_edit(mixed $type, mixed $module, mixed $id) : mixed
Parameters
-
$type
: mixed
-
-
$module
: mixed
-
-
$id
: mixed
-
module_compare_versions()
module_compare_versions(mixed $a, mixed $b) : mixed
Parameters
-
$a
: mixed
-
-
$b
: mixed
-
module_condition()
Evaluates a PHP Expression.
module_condition(string $condition) : bool
Parameters
-
$condition
: string
-
The PHP condition to evaluate
get_racename()
get_racename([mixed $thisuser = true ]) : mixed
Parameters
-
$thisuser
: mixed
= true
-
module_pref_filter()
module_pref_filter(mixed $a) : mixed
Parameters
-
$a
: mixed
-
getmountname()
getmountname() : mixed
getmount()
getmount(mixed $horse) : mixed
Parameters
-
$horse
: mixed
-
get_player_title()
get_player_title([mixed $old = false ]) : mixed
Parameters
-
$old
: mixed
= false
-
get_player_basename()
get_player_basename([mixed $old = false ]) : mixed
Parameters
-
$old
: mixed
= false
-
change_player_name()
change_player_name(mixed $newname[, mixed $old = false ]) : mixed
Parameters
-
$newname
: mixed
-
-
$old
: mixed
= false
-
change_player_ctitle()
change_player_ctitle(mixed $nctitle[, mixed $old = false ]) : mixed
Parameters
-
$nctitle
: mixed
-
-
$old
: mixed
= false
-
change_player_title()
change_player_title(mixed $ntitle[, mixed $old = false ]) : mixed
Parameters
-
$ntitle
: mixed
-
-
$old
: mixed
= false
-
wipe_charstats()
Resets the character stats array.
wipe_charstats() : mixed
addcharstat()
Add a attribute and/or value to the character stats display.
addcharstat(string $label[, string $value = null ]) : mixed
Parameters
-
$label
: string
-
-
$value
: string
= null
-
(optional) value to display
getcharstat()
Returns the character stat related to the category ($cat) and the label.
getcharstat(string $cat, string $label) : string
Parameters
-
$cat
: string
-
The relavent category for the stat
-
$label
: string
-
The label of the character stat
setcharstat()
Sets a value to the passed category & label for character stats.
setcharstat(string $cat, string $label, mixed $val) : mixed
Parameters
-
$cat
: string
-
The category for the char stat
-
$label
: string
-
The label associated with the value
-
$val
: mixed
-
The value of the attribute
getcharstat_value()
Is alias of getcharstat.
getcharstat_value(string $section, string $title) : string
Parameters
-
$section
: string
-
The character stat section
-
$title
: string
-
getcharstats()
Returns output formatted character stats.
getcharstats(array<string|int, mixed> $buffs) : string
Parameters
-
$buffs
: array<string|int, mixed>
-
charstats()
Returns the current character stats or (if the character isn't logged in) the currently online players
Hooks provided:
charstats.
charstats([bool $return = true ]) : array<string|int, mixed>
Parameters
-
$return
: bool
= true
-
get_partner()
get_partner([mixed $player = false ]) : mixed
Parameters
-
$player
: mixed
= false
-
killplayer()
killplayer([mixed $explossproportion = 0.1 ][, mixed $goldlossproportion = 1 ]) : mixed
Parameters
-
$explossproportion
: mixed
= 0.1
-
-
$goldlossproportion
: mixed
= 1
-
get_player_hitpoints()
get_player_hitpoints([mixed $player = false ]) : mixed
Parameters
-
$player
: mixed
= false
-
explained_get_player_hitpoints()
explained_get_player_hitpoints([mixed $player = false ][, mixed $colored = false ]) : mixed
Parameters
-
$player
: mixed
= false
-
-
$colored
: mixed
= false
-
get_player_attack()
get_player_attack([mixed $player = false ]) : mixed
Parameters
-
$player
: mixed
= false
-
explained_row_get_player_attack()
explained_row_get_player_attack([mixed $player = false ]) : mixed
Parameters
-
$player
: mixed
= false
-
explained_get_player_attack()
explained_get_player_attack([mixed $player = false ][, mixed $colored = false ]) : mixed
Parameters
-
$player
: mixed
= false
-
-
$colored
: mixed
= false
-
get_player_defense()
get_player_defense([mixed $player = false ]) : mixed
Parameters
-
$player
: mixed
= false
-
explained_row_get_player_defense()
explained_row_get_player_defense([mixed $player = false ]) : mixed
Parameters
-
$player
: mixed
= false
-
explained_get_player_defense()
explained_get_player_defense([mixed $player = false ][, mixed $colored = false ]) : mixed
Parameters
-
$player
: mixed
= false
-
-
$colored
: mixed
= false
-
get_player_speed()
get_player_speed([mixed $player = false ]) : mixed
Parameters
-
$player
: mixed
= false
-
get_player_physical_resistance()
get_player_physical_resistance([mixed $player = false ]) : mixed
Parameters
-
$player
: mixed
= false
-
setup_pvp_target()
This contains functions to support pvp.
setup_pvp_target(int $characterId) : bool|array<string|int, mixed>
Parameters
-
$characterId
: int
-
pvpvictory()
pvpvictory(mixed $badguy, mixed $killedloc) : mixed
Parameters
-
$badguy
: mixed
-
-
$killedloc
: mixed
-
pvpdefeat()
pvpdefeat(mixed $badguy, mixed $killedloc) : mixed
Parameters
-
$badguy
: mixed
-
-
$killedloc
: mixed
-
pvpwarning()
pvpwarning([mixed $dokill = false ]) : mixed
Parameters
-
$dokill
: mixed
= false
-
redirect()
redirect(mixed $location[, mixed $reason = false ]) : mixed
Parameters
-
$location
: mixed
-
-
$reason
: mixed
= false
-
saveuser()
saveuser([mixed $update_last_on = true ]) : mixed
Parameters
-
$update_last_on
: mixed
= true
-
savesetting()
savesetting(string $settingname, mixed $value) : mixed
Parameters
-
$settingname
: string
-
-
$value
: mixed
-
clearsettings()
clearsettings() : mixed
getsetting()
getsetting(string $settingname[, mixed $default = false ]) : mixed
Parameters
-
$settingname
: string
-
-
$default
: mixed
= false
-
getAllSettings()
getAllSettings() : mixed
Construct FORM LOTGD style.
lotgd_showform(mixed $layout, array<string|int, mixed> $row[, bool $nosave = false ][, false|pattern $keypref = false ][, bool $print = true ][, callable $callback = null ]) : mixed
Parameters
-
$layout
: mixed
-
-
$row
: array<string|int, mixed>
-
-
$nosave
: bool
= false
-
-
$keypref
: false|pattern
= false
-
-
$print
: bool
= true
-
-
$callback
: callable
= null
-
This can use for personalize the form used to show all inputs or for more process.
Can still use lotgd_show_form_field in your callable
Both functions get same parameters function($info, $row, $key, $keyout, $val, $extensions)
-
deprecated
-
4.1.0
lotgd_show_form_field(mixed $info, mixed $row, mixed $key, mixed $keyout, mixed $val, mixed $extensions) : mixed
Parameters
-
$info
: mixed
-
-
$row
: mixed
-
-
$key
: mixed
-
-
$keyout
: mixed
-
-
$val
: mixed
-
-
$extensions
: mixed
-
lotgd_showtabs()
Construct TABS Semantic UI style.
lotgd_showtabs(array<string|int, mixed> $tabs[, bool $print = true ][, callable $callback = null ][, bool $browse = false ]) : mixed
Parameters
-
$tabs
: array<string|int, mixed>
-
Format:
[
'title for tab 1' => 'Content of tab 1'
'title for tab 2' => 'Content of tab 2'
]
-
$print
: bool
= true
-
-
$callback
: callable
= null
-
If you need proccess de content of tab can pass a callback. Default no process content and only show.
callback recibe paraments $callback($content, $title)
-
$browse
: bool
= false
-
Indicate type of menu: tabular or browse menu
check_su_access()
check_su_access(mixed $level) : mixed
Parameters
-
$level
: mixed
-
checkSuPermission()
Check Superuser premission.
checkSuPermission(int $permission[, string|null $return = null ]) : bool|redirect
Just check and redirect if denied you have permission.
Parameters
-
$permission
: int
-
-
$return
: string|null
= null
-
substitute()
substitute(mixed $string[, mixed $extra = false ][, mixed $extrarep = false ]) : mixed
Parameters
-
$string
: mixed
-
-
$extra
: mixed
= false
-
-
$extrarep
: mixed
= false
-
substitute_array()
substitute_array(mixed $string[, mixed $extra = false ][, mixed $extrarep = false ]) : mixed
Parameters
-
$string
: mixed
-
-
$extra
: mixed
= false
-
-
$extrarep
: mixed
= false
-
systemmail()
systemmail(mixed $to, mixed $subject, mixed $body, mixed $from[, mixed $noemail = false ]) : mixed
Parameters
-
$to
: mixed
-
-
$subject
: mixed
-
-
$body
: mixed
-
-
$from
: mixed
-
-
$noemail
: mixed
= false
-
select_taunt()
Select 1 taunt.
select_taunt([array<string|int, mixed> $extraParams = [] ]) : array<string|int, mixed>
Parameters
-
$extraParams
: array<string|int, mixed>
= []
-
apply_temp_stat()
apply_temp_stat(mixed $name, mixed $value[, mixed $type = 'add' ]) : mixed
Parameters
-
$name
: mixed
-
-
$value
: mixed
-
-
$type
: mixed
= 'add'
-
check_temp_stat()
check_temp_stat(mixed $name[, mixed $color = false ]) : mixed
Parameters
-
$name
: mixed
-
-
$color
: mixed
= false
-
suspend_temp_stats()
suspend_temp_stats() : mixed
restore_temp_stats()
restore_temp_stats() : mixed
valid_dk_title()
valid_dk_title(mixed $title, mixed $dks, mixed $gender) : mixed
Parameters
-
$title
: mixed
-
-
$dks
: mixed
-
-
$gender
: mixed
-
get_dk_title()
get_dk_title(mixed $dks, mixed $gender[, mixed $ref = false ]) : mixed
Parameters
-
$dks
: mixed
-
-
$gender
: mixed
-
-
$ref
: mixed
= false
-
e_rand()
Alias of mt_rand with some improvements.
e_rand([int|float $min = null ][, int|float $max = null ]) : int
Parameters
-
$min
: int|float
= null
-
-
$max
: int|float
= null
-
r_rand()
Same as e_rand but $min and $max are multiplied by 1000.
r_rand([int|float $min = null ][, int|float $max = null ]) : int|float
Parameters
-
$min
: int|float
= null
-
-
$max
: int|float
= null
-
is_email()
Check if given email is valid.
is_email(string $email) : bool
Parameters
-
$email
: string
-
arraytourl()
Turns an array into an URL argument string.
arraytourl(array<string|int, mixed> $array) : string
Takes an array and encodes it in key=val&key=val form.
Does not add starting ?
Parameters
-
$array
: array<string|int, mixed>
-
The array to turn into an URL
urltoarray()
Takes an array and returns its arguments in an array.
urltoarray(string $url) : array<string|int, mixed>
Parameters
-
$url
: string
-
createstring()
Turns the given parameter into a string.
createstring(mixed $array) : string
If the given parameter is an array or object,
it is serialized, and the serialized string is
return.
Otherwise, the parameter is cast as a string
and returned.
Parameters
-
$array
: mixed
-
myDefine()
myDefine(mixed $name, mixed $value) : mixed
Parameters
-
$name
: mixed
-
-
$value
: mixed
-
list_files()
list_files(mixed $ruta, mixed $sort) : mixed
Parameters
-
$ruta
: mixed
-
-
$sort
: mixed
-
_curl()
_curl(mixed $url) : mixed
Parameters
-
$url
: mixed
-
_sock()
_sock(mixed $url) : mixed
Parameters
-
$url
: mixed
-
pullurl()
pullurl(mixed $url) : mixed
Parameters
-
$url
: mixed
-
safeescape()
safeescape(mixed $input) : mixed
Parameters
-
$input
: mixed
-
nltoappon()
nltoappon(mixed $in) : mixed
Parameters
-
$in
: mixed
-
bell_rand()
bell_rand([mixed $min = false ][, mixed $max = false ]) : mixed
Parameters
-
$min
: mixed
= false
-
-
$max
: mixed
= false
-