- Folders:​​
- GOS_DIR --> GoS Directory
SCRIPT_PATH --> GoS Scripts Path
COMMON_PATH --> GoS Common Path
SPRITE_PATH --> GoS Sprites Path
SOUNDS_PATH --> GoS Sounds Path- Events:​
OnDraw --> Trigger every frame
OnDrawMinimap --> Trigger every frame (you can use only : DrawText, WorldToMinimap, DrawCircleMinimap
OnLoad --> Trigger once every object is loaded
OnUnLoad --> Trigger Exactly Before Unloading(F6) Takes Action
OnBugSplat --> Trigger Exactly Before the BugSplat Takes Action
OnWndMsg(msg,wParam) --> Trigger When You Click on Mouse/Keyboard with msg and keys
OnObjectLoop(Object, myHero) --> NOT RECOMMENDED, Loop through every object in game every frame
OnObjectLoad(Object) --> Trigger Once You Load LUA engine, returning every object for 1 Tick (more like ObjectManager)
OnCreateObj(Object) --> Trigger everytime a new object is Created
OnDeleteObj(Object) --> Trigger everytime an object is Deleted
OnProcessRecall(unit, recall) --> Trigger when someone Recall (even on FOW), Check Constants
OnProcessSpell(unit, spell) --> Trigger when Someone Cast Anything, Check Constants
OnProcessSpellCast(unit, spell) --> Trigger when someone Cast Spells Only (no AA), Check Constants
OnProcessSpellAttack(unit, spell) --> Trigger when someone AA only (no spells), Check Constants
OnProcessSpellComplete(unit, spell) --> Trigger when the Spell Cast is done (after windup), Check Constants
OnProcessWaypoint(unit, waypoint) --> Trigger Everytime someone Move/Stop, Check Constants
OnAnimation(unit, animation) --> Trigger Everytime when someone make an animation (Channel, Idle..)
OnUpdateBuff(unit, buff) --> Trigger Everytime a buff is Updated, Check Constants
OnRemoveBuff(unit, buff) --> Trigger Everytime a buff is Removed, Check Constants
OnGainVision(unit) --> Trigger Everytime we Gain Vision on someone
OnLoseVision(unit) --> Trigger Everytime we Lose Vision on someone
OnIssueOrder(Order) --> Trigger Everytime we send an order (Attack/Move/Hold), Check Constants
OnSpellCast(Spell) --> Trigger Everytime we send spell order, Check Constants
OnDamage(unit, target, dmg) --> Trigger Everytime when unit deal damage to target
OnAggro(unit, flag) --> Trigger Everytime when someone Make/Stop Aggro on you
OnProcessPacket(Packet) --> Trigger Everytime a packet is sent/received, Check Constants- Globals:​​
MessageBox(0,text,0) --> Send a Message Box
KeyIsDown(key) --> return true/false if key is down
GetObjectType(Obj) --> return Object Type, Check Constants
IsObjectAlive(Obj) --> return true/false if Object Is Alive
GetObjectName(Obj) --> return string holding the Object Name ex: "Azir"
GetObjectBaseName(Obj) --> return string holding the Object Base Name (often used on objects) ex: "Seed"
IsDead(Obj) --> return true/false if Object Is Dead
IsTargetable(Obj) --> return true/false if Object is targetable
GetNetworkID(Obj) --> return netID
GetTeam(Obj) --> return team, Check Constants
GetOrigin(Obj) --> return x,y,z
GetRange(Obj) --> return Range
GetHitBox(Obj) --> return HitBox
GetLevel(Obj) --> return level (1-18)
GetExperience(Obj) --> return total Experience
IsVisible(Obj) --> return true/false if the object is Visible
GetMoveSpeed(Obj) --> return MoveSpeed
GetCurrentHP(Obj) --> return Current Health
GetMaxHP(Obj) --> return Max Health
GetCurrentMana(Obj) --> return Current Mana
GetMaxMana(Obj) --> return Max Mana
GetDmgShield(Obj) --> return "AD" Shield Amount (ex: Riven E)
GetMagicShield(Obj) --> return "AP" Shield Amount (ex: Morgana E)
IsCampusUp(mob) --> return true/false if the mob is up
GetCDR(Obj) --> return CD Reduction
GetArmorPenFlat(Obj) --> return the flat armor penetration
GetMagicPenFlat(Obj) --> return the flat magic penetration
GetArmorPenPercent(Obj) --> return the perentage of armor penetration
GetMagicPenPercent(Obj) --> return the percentage of magic penetration
GetBaseDamage(Obj) --> return Base AD amount
GetBonusDmg(Obj) --> return Bonus AD amount
GetBonusAP(Obj) --> return AP amount
GetLifeSteal(Obj) --> return LifeSteal percentage
GetSpellVamp(Obj) --> return SpellVamp percentage
GetAttackSpeed(Obj) --> return attack speed percentage
GetBaseAttackSpeed(Obj) --> return BaseAttackSpeed amoun (not exact)
GetWindUp(Obj) --> return WindUp amount (not exact)
GetCritChance(Obj) --> return Crit Chance percentage
GetArmor(Obj) --> return armor amount
GetBaseArmor(Obj) --> return base armor amount
GetMagicResist(Obj) --> return MagicResist amount
GetHPRegen(Obj) --> return health regeneration ratio
GetMPRegen(Obj) --> return mana regeneration ratio
GotBuff(Obj, buffname) --> return buff count of the buffname (0 if not existing)
GetBuffCount(Obj, index) --> indexes are from 0 to 63, return Buff Count of specified index
GetBuffName --> indexes are from 0 to 63, return Buff Name of specified index
GetItemSlot(Obj, itemID) --> return the slot (0 if not existing)
GetCastLevel(Obj, Spell) --> return Spell Level
GetCastRange(Obj, Spell) --> return Spell Range
GetCastMana(Obj, Spell, Level) --> return Spell Mana Cost on Specified level
GetCastCooldown(Obj, Spell Level) --> return Spell CD on Specified level (CDR not taken into account)
GetCastName(Obj, Spell) --> return a string holding the Spell CastName
IsImmune(target, unit) --> return true/false if target is immune to unit
GetLatency() --> return Current Ping/Latency in game (ms)
GetFPS() --> return Current FPS in game
GetTickCount --> return current passed ticks in the system
CastTargetSpell(target, spell) --> Cast Target Spell on target
CastSpell(spell) --> Cast selfcast spells (Kata R, Nunu R..)
CastSkillShot(spell, pos)/CastSkillShot(spell, pos.x, pos.y, pos.z) --> Cast SkillShot on pos
CastSkillShot2(spell, pos)/CastSkillShot2(spell, pos.x, pos.y, pos.z) --> Release SkillShot on pos 2 (ex : Xerath Q, Varus Q)
CastSkillShot3(spell, startpos, endpos) --> Cast Special Skillshots (Viktor E, Rumble R) from startpos to endpos
LevelSpell(spell) --> level up spell
MoveToXYZ(x,y,z) --> move your hero
HoldPosition() --> stop your hero
AttackUnit(Obj) --> Attack unit
BuyItem(ID) --> buy item
DrawCircle(x,y,z,radius,width,quality,color) --> Draw Circle
WorldToScreen(visfix,x,y,z) --> return x,y,flag
WorldToMinimap(pos) --> return x,y
DrawText(text,size,x,y,color) --> Draw Text
DrawTextSmall(text,x,y,color) --> Draw Small Text
FillRect(x,y,width,height,color) --> Fill Rect Pixels
DrawDmgOverHpBar(Obj,currenthp,adandtruedmg,apdmg,color) --> draws specific damage over unit
GetMousePos() --> return x,y,z of mouse pos
GetCurrentTarget() --> return your current target based on GoS logic. (Not Recommended)
GetPredictionForPlayer(StartPos,target,movespeed,speed,delay,range,width,collision(true/false),AddHitBox(true/false)) --> return PredPos.x, PredPos.y, PredPos.z, HitChance(1/0)
ARGB(Opacity,Red,Green,Blue) --> max value is 255, return color
GetMapID() --> return map ID, Check Constants
GetCursorPos() --> return x,y our cursor pos
GetResolution() --> return x,y of our resolution
DrawLine(x1,y1,x2,y2,width,color) --> Draw Line
DrawCircleMinimap(pos,radius,width,quality,color) --> DrawCircle on minimap
GetItemID(Obj, slot) --> return item ID
GetItemAmmo(Obj, slot) --> return item Ammo
GetItemStack(Obj, slot) --> return item Stack
GetGameTimer() --> return a float for current game time
GetBuffData() --> return a struct, Check Constants
GetBuffType(Obj, index) --> return buff type of the buff index
GetBuffStacks(Obj, index) --> return buff stacks of the buff index
GetBuffStartTime(Obj, index) --> return a float for buff start time of the buff index
GetBuffExpireTime(Obj, index) --> return a float for buff end time of the buff index
GetBuffTypeList(Obj, index) --> return a structure with buff types (0-31), Check Constants
GetBuffTypeToString(int) --> return buff type name from an integer
IsChatOpened() --> return true/false if chat is opened
IsGameOnTop() --> return true/false if game windows is on top
CastEmote(EmoteID) --> Cast Emote for specified ID, Check Constants
GetDamagePrediction(Obj, delta) --> return predicted damage for Obj for the time of delta
CreateSpriteFromFile("yourspritefile.png", scaling) --> return spriteID if found or 0, scaling is Optional
ReleaseSprite(spriteIndex) --> Release the sprite, return true/false on success/failure
DrawSprite(SpriteIndex,x,y,SpriteX,SpriteY,width,height,color) --> Draw the Sprite
GetObjectSpellName(Obj) --> if the object is a spell (missile), it will return the spellname
GetObjectSpellOwner(Obj) --> if the object is a spell (missile), it will return the object caster
GetObjectSpellStartPos(Obj) --> if the object is a spell (missile), it returns x,y,z of the cast StartPos
GetObjectSpellEndPos(Obj) --> if the object is a spell (missile), it returns x,y,z of the cast EndPos
HeroSkinChanger(Obj,skinID) --> Change Object Skin
GetGameTarget() --> return the current target generated by the game engine
IsGoSHumanizerActive --> return true/false if humanizer is activated in GoS loader
ModelChanger(Obj,skinID,modelname) --> change Object Model/Skin
GetObjectModelName(Obj) --> return a string holding the ModelName
GetLevelPoints(Obj) --> return current unused points
BlockInput(true/false) --> Block/Unblock every possible input (mouse/keyboard)
BlockOrder() --> Block Order (Mainly Used in OnIssueOrder)
BlockCast() --> Block SpellCast (Mainly Used in OnSpellCast)
GetUser() --> return a string with current name in GoS loader
CreateDir(COMMON_PATH.."YourTestHere\\") --> Creates a Directory, returns true/false on success/failure of creating a folder in the subdirs of GoS.
RemoveDir(COMMON_PATH.."YourTestHere\\") --> Remove a Directory, returns true/false on success/failure of removing a folder in the subdirs of GoS.
DirExists(COMMON_PATH.."YourTestHere\\") --> returns true/false if a folder exists or not in the subdirs of GoS.
DeleteFile("filename") --> Delete File, return true/false on success/failure
PlaySound("filename") --> Play Sound, return true/false on success/failure
StopSound("filename") --> Stop Sound
IsSubscriber(X,X) --> for Devs only
GetGroup() --> return a string holding the current user group
BlockF7OrbWalk(true/false) --> block/unblock the orbwalk and spellcast of F7 menu in Combo tab.
BlockF7Dodge(true/false) --> block/unblock the auto-dodge in the F7 Survival tab.
GetTextRect(text,size,x,y) --> return x,y,w,h rect of the text area.
Interact(Obj) --> allows you to interact with objects such as Crystal Scar towers, Thresh Lantern, Bard portals etc...
SetCursorPos(x,y) --> Set Cursor Pos to x,y pos- Events Examples:​
OnBugSplat:
OnBugSplat(function(Error)
PrintChat(Error)
end)OnWndMsg:
OnWndMsg(function(msg, wParam)
PrintChat(string.format("msg = %d | wParam = %d", msg, wParam))
end)OnObjectLoad:OnObjectLoad(function(Object)
PrintChat(string.format("<font color='#00ff00'>ObjectLoaded = %s</font>",GetObjectBaseName(Object)));
end)OnCreateObj:OnCreateObj(function(Object)
PrintChat(string.format("<font color='#00ff00'>CreatedObject= %s</font>",GetObjectBaseName(Object)));
end)OnDeleteObj:OnDeleteObj(function(Object)
PrintChat(string.format("<font color='#ff0000'>DeletedObject = %s</font>",GetObjectBaseName(Object)));
end)OnProcessRecall:OnProcessRecall(function(unit,recall)
if recall.isStart then
PrintChat(string.format("Currently %s <font color='#ffffff'>STARTED</font> %s for total time %d", GetObjectName(unit), recall.name, recall.totalTime))
elseif recall.isFinish then
PrintChat(string.format("Currently %s <font color='#00aaff'>FINISHED</font> Recall to the base for passed time %d", GetObjectName(unit), recall.passedTime))
else
PrintChat(string.format("Currently %s <font color='#ffaa00'>FAILED</font> to Recall to the base for passed time %d", GetObjectName(unit), recall.passedTime))
end
end)OnProcessSpell/OnProcessSpellComplete/OnProcessSpellAttack/OnProcessSpellCast:OnProcessSpell(function(unit,spell)
PrintChat(string.format("'%s' casts '%s'; Windup: %.3f Animation: %.3f", GetObjectName(unit), spell.name, spell.windUpTime, spell.animationTime))
end)OnProcessWaypoint:OnProcessWaypoint(function(unit,waypoint)
if unit == GetMyHero() then
if waypoint.index == 1 then
place = waypoint.position;
end
if waypoint.index == 2 then
place2 = waypoint.position;
end
end
end)OnAnimation:OnAnimation(function(unit, animation)
if unit == myHero then
PrintChat(animation)
end
end)OnUpdateBuff:OnUpdateBuff(function(unit,buff)
PrintChat(string.format("<font color='#00ff00'>Champion [%s] Updated:</font> BuffName: [%s] BuffType: [%d] BuffCount: [%d] BuffStacks: [%f] StartTime: [%f] ExpireTime: [%f]",GetObjectName(unit),buff.Name,buff.Type,buff.Count,buff.Stacks,buff.StartTime,buff.ExpireTime));
end)OnRemoveBuff:OnRemoveBuff(function(unit,buff)
PrintChat(string.format("<font color='#00ff00'>Champion [%s] Removed:</font> BuffName: [%s] BuffType: [%d] BuffCount: [%d] BuffStacks: [%f] StartTime: [%f] ExpireTime: [%f]",GetObjectName(unit),buff.Name,buff.Type,buff.Count,buff.Stacks,buff.StartTime,buff.ExpireTime));
end)OnGainVision:OnGainVision(function(unit)
PrintChat(string.format("<font color='#00ff00'>GainedVision = %s</font>",GetObjectName(unit)));
end)OnLoseVision:OnLoseVision(function(unit)
PrintChat(string.format("<font color='#ff0000'>LostVision = %s</font>",GetObjectName(unit)));
end)OnIssueOrder:
OnIssueOrder(function(Order)
if Order.flag == 2 then
BlockOrder()
end
end)OnSpellCast:
OnSpellCast(function(spell)
if spell.spellID == _Q then
BlockCast()
end
end)OnDamage:
OnDamage(function(unit,target,damage)
PrintChat(string.format("<font color='#ff0000'>OnDamage:</font> Sender: [%s] Receiver: [%s] Damage: [%f]",GetObjectName(unit),GetObjectName(target),damage));
end)OnAggro:
OnAggro(function(unit,flag)
if flag then
PrintChat(string.format("<font color='#ff0000'>OnAggro gained from = %s</font>",GetObjectName(unit)))
else
PrintChat(string.format("<font color='#00ff00'>OnAggro lost from = %s</font>",GetObjectName(unit)))
end
end)OnProcessPacket:
OnProcessPacket(function(p)
p.pos = 2
local nID = p:Decode4()
local target = GetObjByNetID(nID)
if target and GetObjectName(target) ~= "" then
PrintChat(p.header)
end
end)- Constants and Structs:​
Spells :
_Q (0)
_W (1)
_E (2)
_R (3)
SUMMONER_1 (4)
SUMMONER_2 (5)
RECALL
ITEM_1 (6)
ITEM_2 (7)
ITEM_3 (8)
ITEM_4 (9)
ITEM_5 (10)
ITEM_6 (11)
ITEM_7 (12)GetObjectType(Obj) :
Obj_AI_SpawnPoint
Obj_AI_Camp
Obj_AI_Barracks
Obj_AI_Hero
Obj_AI_Minion
Obj_AI_Turret
Obj_AI_LineMissle
Obj_AI_ShopCanUseSpell(unit, spell) :
READY
NOTAVAILABLE
NOTLEARNED
READYNONCAST
UNKNOWN
ONCOOLDOWN
NOMANAGetSpellData(Obj, spell) :
.level
.cdEndTime
.ammo
.rechargeEndTime
.toggleState
.spellCd
.ammoCdGetSpellData(Obj, spell).toggleState :
0=untoggleable
1=untoggled
2=toggledOnUpdateBuff/OnRemoveBuff/GetBuffData.Type/GetBuffType(Obj, buffindex) :
Internal = 0
Aura = 1
CombatEnchancer = 2
CombatDehancer = 3
SpellShield = 4
Stun = 5
Invisibility = 6
Silence = 7
Taunt = 8
Polymorph = 9
Slow = 10
Snare = 11
Damage = 12
Heal = 13
Haste = 14
SpellImmunity = 15
PhysicalImmunity = 16
Invulnerability = 17
Sleep = 18
NearSight = 19
Frenzy = 20
Fear = 21
Charm = 22
Poison = 23
Suppression = 24
Blind = 25
Counter = 26
Shred = 27
Flee = 28
Knockup = 29
Knockback = 30
Disarm = 31Event : OnProcessSpell/OnProcessSpellComplete/OnProcessSpellCast/OnProcessSpellAttack (unit,spell) :
spell.name spell.windUpTime spell.animationTime spell.castSpeed spell.startPos spell.endPos spell.target
Login to Account Create an Account
GoS Official API
#1
Posted 20 March 2016 - 02:17
#2
Posted 20 March 2016 - 02:27
Wow really nice good job buddy
#3
Posted 20 March 2016 - 02:37
Wow really nice good job buddy
hope that this will help new coming devs
#4
Posted 20 March 2016 - 02:45
#5
Posted 20 March 2016 - 03:54
thanks very much understand api.
do you have in order E > Q? i can't find it.
a way i figure out this code myself E cast first then Q correct if i'm wrong.
line of number 8 somewhat "or not" what the opposite of not? a blank?
function CastE() if q.Combo.E:Value() then for _, target in pairs(GetEnemyHeroes()) do if IsReady(_E) and ValidTarget(target, GetCastRange(myHero,_E)) then CastTargetSpell(target, _E)end if q.Combo.Q:Value() then if ValidTarget(target, 875) or not IsReady(_E) then local hitchance, pos = QQ.pred:Predict(target) if hitchance > 2 then CastSkillShot(_Q, pos)end end end end end end
#6
Posted 20 March 2016 - 07:19
gj my teacher
#7
Posted 20 March 2016 - 12:40
thanks very much understand api.
do you have in order E > Q? i can't find it.
a way i figure out this code myself E cast first then Q correct if i'm wrong.
line of number 8 somewhat "or not" what the opposite of not? a blank?
function CastE() if q.Combo.E:Value() then for _, target in pairs(GetEnemyHeroes()) do if IsReady(_E) and ValidTarget(target, GetCastRange(myHero,_E)) then CastTargetSpell(target, _E)end if q.Combo.Q:Value() then if ValidTarget(target, 875) or not IsReady(_E) then local hitchance, pos = QQ.pred:Predict(target) if hitchance > 2 then CastSkillShot(_Q, pos)end end end end end end
and not not or not lol
#8
Posted 22 March 2016 - 05:54
Ty. Could you help me get path from point A to point B?
#9
Posted 22 March 2016 - 10:57
Ty. Could you help me get path from point A to point B?
GetDistance(A,B)
#10
Posted 22 March 2016 - 11:14
You should really consider to add properties.
#11
Posted 23 March 2016 - 08:53
GetDistance(A,B)
I meant all paths if hero moves from point A to B
#12
Posted 01 September 2016 - 05:38
dunno some packets are not passed through processpacket callback such as s_move
#13
Posted 25 October 2016 - 01:04
Nice a very compleet API.
I have one question where can i see for example callback OnProcessWaypoint(unit, waypoint) i wanna know how it works
ye i know how to use it and what is does but i wanna see the source is this possible or not on this forum?
i wanna see alot of those sources where can i find them?
Regards,
RedBull
#14
Posted 25 October 2016 - 01:21
Nice a very compleet API.
I have one question where can i see for example callback OnProcessWaypoint(unit, waypoint) i wanna know how it works
ye i know how to use it and what is does but i wanna see the source is this possible or not on this forum?
i wanna see alot of those sources where can i find them?
Regards,
RedBull
You know how to use so why you don't test around with it?
Btw prediction scripts would have
#15
Posted 25 October 2016 - 03:38
Nice a very compleet API.
I have one question where can i see for example callback OnProcessWaypoint(unit, waypoint) i wanna know how it works
ye i know how to use it and what is does but i wanna see the source is this possible or not on this forum?
i wanna see alot of those sources where can i find them?
Regards,
RedBull
http://gamingonstero...ha-version-018/
or as Ryzuki said, take a look at OpenPredict in your common folder
#16
Posted 14 January 2017 - 01:32
Is this the same API as the external version?
#17
Posted 14 January 2017 - 07:19
Is this the same API as the external version?
no, the external API is on the announcment thread
#18
Posted 17 January 2017 - 03:05
Do we have isWall or isGrass(Brush) callbacks ?
#19
Posted 17 January 2017 - 03:56
Do we have isWall or isGrass(Brush) callbacks ?
Not yet we use MapPosition atm
#20
Posted 17 January 2017 - 04:03
Do we have isWall or isGrass(Brush) callbacks ?
Why isWall callback? trigger when someone move into a wall? .-.
3 user(s) are reading this topic
0 members, 3 guests, 0 anonymous users