Raised This Month: $ Target: $400
 0% 

Trying to code a bot


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
CABERMAN
Junior Member
Join Date: Oct 2013
Old 10-31-2013 , 01:19   Trying to code a bot
Reply With Quote #1

Guys im new in dis, and i really wanted to learn how to code, ;-;
if someone can help me to make a bot with hax that would be great, but i tried making something and im not even sure if this is right D: btw.. i just copy pasted this hooks and edited it .-.

Code:
<userlang name="bot" ext="sma inc p pawn core sp">
<settings>
<global caselgnored="yes" commentline="yes"/>
[COLOR="rgb(65, 105, 225)"]<TreatAsSymbol comment="yes" commentLine="yes"/>[/COLOR]
[COLOR="rgb(65, 105, 225)"]<Prefix words1="yes" words2="no" words3="yes" words4="no"/>[/COLOR]
</settings>
[COLOR="rgb(221, 160, 221)"]<KetwordLists>[/COLOR]

<Ketwords name="Delimiters">"1""1</keywords>

<Ketwords name="Folders+">{</keywords>

<Ketwords name="Forlder=">}</keywords>

<Ketwords name="Operators">- ~ % & ( ) , . : ; ? @ [ ] ^ | ! + < - > </Keywords>

<Ketwords name="Comment">1/* 2*/ 3//</Keywords>

<Ketwords name="Words2">

for if else do while switch case default return break continue new decl public stock const enum forward static funcenum functag native sizeof true false

</keywords>

<Keywords name="Words2">#</Keywords>

<Keywords name="Words3">
Action bool Ploat Plugin String any AdminFlag OverrideType OverrideRle ImmunityType Groupld Adminld
AdmAccessMode AdminCachePart CookieAccess CookieMenu CookieMenuAction NetFlow ConVarBounds QueryCookie ReplySource ConVarQueryResult ConVarQueryFinished Function Action Identity PluginStatus PluginInfo DBResult DBBindType DBPriority PropType PropFieldType MoveType RenderMode RenderFx EventHookMode EventHook FileType FileTimeMode PathType ParamType ExecType DialogType Handle KvDataTypes NominateResult MapChange MenuStyle MenuAction MenuSource RegexError SDKCallType SDKLibrary SDKFuncConfSource SDKType SDKPassMethod RayType TraceEntityFilter ListenOverride SortOrder SortType SortFunc2D APLRes FeatureType FeatureStatus SMCResult SMCError TFClassType TFTeam TFCond TFResourceType Timer TopMenuAction TopMenuObjectType TopMenuPosition TopMenuObject UserMsg
</Keywords>
<Keywords name="words4">
m_cvar tf_bot_pyro_always_reflect 1000000 
tf_bot_add pyro expert

SDKHook_Reload 999
             
SDKHook_TraceAttack 999

[COLOR="rgb(255, 140, 0)"]public OnEntityCreated(entity, const String:classname[])[/COLOR]
{
   [COLOR="rgb(255, 140, 0)"] SDKHook(entity, SDKHook_Spawn, OnEntitySpawned);
}[/COLOR]

[COLOR="rgb(154, 205, 50)"]public OnEntitySpawned(tf_bot_add pyro expert)[/COLOR]
{
    // tf_bot_pyro_always_reflect  
}

[COLOR="rgb(255, 140, 0)"]public OnClientPutInServer(client)[/COLOR]
{
    [COLOR="rgb(221, 160, 221)"]SDKHook(client, SDKHook_WeaponSwitch, OnWeaponSwitch);[/COLOR]
}

[COLOR="rgb(154, 205, 50)"]public Action:OnWeaponSwitch(client, weapon)[/COLOR]
{
  [COLOR="rgb(255, 140, 0)"] [COLOR="rgb(255, 140, 0)"] decl String:sWeapon[32];[/COLOR]
    GetEdictClassname(weapon, sWeapon, sizeof(sWeapon));[/COLOR]
    
   [COLOR="rgb(255, 140, 0)"][COLOR="rgb(255, 140, 0)"] if(StrEqual(sWeapon, "tf_weapon_axe", "tf_weapon_shotgun"))[/COLOR][/COLOR]
        return Plugin_Handled;
    
    return Plugin_Continue;
}

[COLOR="rgb(221, 160, 221)"]SDKHook_Use

[/COLOR]

Last edited by CABERMAN; 10-31-2013 at 01:25.
CABERMAN is offline
LordOfNothing
BANNED
Join Date: Jul 2013
Old 10-31-2013 , 03:20   Re: Trying to code a bot
Reply With Quote #2

Quote:
i just copy pasted this hooks and edited it .-.
epic

http://wiki.alliedmods.net/Intro_to_AMX_Mod_X_Scripting - Starting scripting from here
www.amxmodx.org/doc - List of function
http://forums.alliedmods.net/forumdisplay.php?f=83 - A section with tutorials
http://forums.alliedmods.net/showthread.php?t=172936 - A list of tutorials !

Last edited by LordOfNothing; 10-31-2013 at 03:22.
LordOfNothing is offline
CABERMAN
Junior Member
Join Date: Oct 2013
Old 10-31-2013 , 05:09   Re: Trying to code a bot
Reply With Quote #3

actually This is for tfdb aka "TeamFortress Dodgeball" the one asherkin made some years ago, .-.


still its a pain in the ass to find someone who can script so i just decided to learn how to code/script/mod

.-. just hope i get finished with this, if i CAN
CABERMAN is offline
MasterOfTheXP
Veteran Member
Join Date: Aug 2011
Location: Cloudbank
Old 10-31-2013 , 11:28   Re: Trying to code a bot
Reply With Quote #4

That code is so confusing and colourful...

You might want to paste it without its formatting next time. Also, using [PHP] tags will colour some of the code for you

But uh, anyway, I'd probably do it all manually with OnPlayerRunCmd, checking if any rockets are close enough, and buttons & IN_ATTACK2 if they are (but only if GetRandomInt(0,20) > 0 -- I don't like AI nailing tasks all the time)
__________________
Plugins / My Steam / TF2 Sandbox (plugin beta testing!)

Last edited by MasterOfTheXP; 10-31-2013 at 11:31.
MasterOfTheXP is offline
CABERMAN
Junior Member
Join Date: Oct 2013
Old 10-31-2013 , 19:34   Re: Trying to code a bot
Reply With Quote #5

Quote:
Originally Posted by MasterOfTheXP View Post
That code is so confusing and colourful...

You might want to paste it without its formatting next time. Also, using [PHP] tags will colour some of the code for you

But uh, anyway, I'd probably do it all manually with OnPlayerRunCmd, checking if any rockets are close enough, and buttons & IN_ATTACK2 if they are (but only if GetRandomInt(0,20) > 0 -- I don't like AI nailing tasks all the time)

Oh gawds sir, how do i paste dat?
CABERMAN is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 02:24.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode