|
Title: Clan tag XP Post by: Chuck on January 16, 2012, 05:44:21 PM It would be great if someone code this script that if person wearing server clan tag, xp rate will be like 1.2 higher!
Title: Re: Clan tag XP Post by: Vulpone on January 17, 2012, 12:46:22 AM It would be great if someone code this script that if person wearing server clan tag, xp rate will be like 1.2 higher! Would be sorta hard to code, as afaik it would have to be coded for every Server. I could do it for you if you give me the clan-tag... But being flexible is hard. Title: Re: Clan tag XP Post by: Glider⠠⠵ on January 17, 2012, 02:32:35 AM There's a extension to query steam groups. It would be quite easy to make a addon that gives a xp bonus to everyone in a specific steam group.
That's most likely the safest and most reliable way to code this. Title: Re: Clan tag XP Post by: Revan on January 17, 2012, 02:57:52 AM It's possible to return the clantag from a Player.. There's a snippet somewhere on the sm Forums - to be dynamic you should use convars or something similar
Title: Re: Clan tag XP Post by: nvn on January 17, 2012, 03:03:03 AM There's a extension to query steam groups. It would be quite easy to make a addon that gives a xp bonus to everyone in a specific steam group. That's most likely the safest and most reliable way to code this. sm 1.4 have GetClientClanTag stock, it would be easier to use it instead of fetching all groups client have. As i see, Chuck is asking about clantags, not groups. The difference is that we dont need to know in what group he is, we just compare if clantag he have matchs clantag we set with cvar (or just hardcoded) Title: Re: Clan tag XP Post by: iceman on January 17, 2012, 05:52:28 AM As glider said would it not be safer using steam tools so we don't have to worry about running clan name protection
Title: Re: Clan tag XP Post by: Glider⠠⠵ on January 17, 2012, 06:51:56 AM As glider said would it not be safer using steam tools so we don't have to worry about running clan name protection Exactly. What prevents me from changing my name to [ExtraXP] Glider? Some sort of protection that querys if I'm actually in the steam group for the [ExtraXP] clan? I see some unnecessary hoops here ;D Title: Re: Clan tag XP Post by: Revan on January 17, 2012, 08:30:18 AM U dont played CSS? There's no clantag faking - u can only choose a clantag if u are in the steamgroup.
clantags aren't the Same as playernames pic (http://www.warriorofheaven.de/pic/forum/css/pic1.jpg) Title: Re: Clan tag XP Post by: Chuck on January 17, 2012, 10:55:41 AM it should read steam group if there is a code for api! example player join my server and wearing my steam group clan tag so mine is .:|Tmu|:., only in scoreboard you can see clan tag .:|Tmu|:. but not in chat box like normally! If it really hard then I'll take it as clan tag name! But it would be great idea to have this addons for next war3 release! I see Schandmaul's server already have that in their server!
Title: Re: Clan tag XP Post by: Schmarotzer on January 17, 2012, 11:35:06 AM I'm not Schandmaul.I am Schmarotzer
Yup, I made this plugin Title: Re: Clan tag XP Post by: Revan on January 17, 2012, 11:41:34 AM - dont uses steamtools ext. but checks for clantag(not playername, uses cstrike extension instead[only works in css]) -
Note: untested, tell me if this isn't working correctly Code: #include <sourcemod> #include <cstrike> #include "W3SIncs/War3Source_Interface" new Handle:g_hClanVar = INVALID_HANDLE; new Handle:g_hGOMultipler = INVALID_HANDLE; new Handle:g_hXPMultipler = INVALID_HANDLE; public Plugin:myinfo= { name="W3S Addon ClanBonus", author="Revan", description="War3Source Addon Plugin", version="1.0", }; public OnPluginStart() { g_hClanVar = CreateConVar("war3_bonusclan_name",".:|Tmu|:.","Player who are wearing this clantag will gain bonus XP"); g_hGOMultipler = CreateConVar("war3_bonusclan_xprate","1.2","Bonus XP Multipler"); g_hXPMultipler = CreateConVar("war3_bonusclan_goldrate","1.0","Bonus Gold Multipler"); } public OnWar3Event(W3EVENT:event,client) { if(event==OnPreGiveXPGold && !IsFakeClient(client)) { decl String:buffer[32],String:buffer2[32]; CS_GetClientClanTag(client, buffer, sizeof(buffer)); GetConVarString(g_hClanVar,buffer2,sizeof(buffer2)) if(strlen(buffer)>0 && strlen(buffer2)>0) { if(strcmp(buffer, buffer2)==0) { W3SetVar(EventArg2,FloatMul(W3GetVar(EventArg2),GetConVarFloat(g_hXPMultipler))); W3SetVar(EventArg3,FloatMul(W3GetVar(EventArg3),GetConVarFloat(g_hGOMultipler))); } } } } cvarlist: war3_bonusclan ".:|Tmu|:." - actually the bonused clan war3_bonusclan_xprate "1.2" - xp multipler war3_bonusclan_goldrate "1.0" - gold multipler EDIT: I can look into steamtools extension if u want Title: Re: Clan tag XP Post by: alex0310 on January 17, 2012, 12:11:07 PM must I have sm1.4?
Title: Re: Clan tag XP Post by: Revan on January 17, 2012, 01:47:51 PM basicly yes. but you can try just updating the cstrike extension, it should work too
Title: Re: Clan tag XP Post by: Revan on January 17, 2012, 03:31:04 PM seems like something is wrong with the XP Multipler, I gonna check this tomorrow or u can do this by yourself( just don't forget posting it ;) )
just some notice Title: Re: Clan tag XP Post by: nvn on January 18, 2012, 01:46:42 AM must I have sm1.4? It will be kind of weird to recompile all ur plugins coz of this addon, use stocks by psychonic otherwise: http://forums.alliedmods.net/showthread.php?t=149322 Title: Re: Clan tag XP Post by: Chuck on January 18, 2012, 03:50:15 AM revan got everything working except the xp rate and gold rate having problem!
Title: Re: Clan tag XP Post by: Glider⠠⠵ on January 18, 2012, 06:33:05 AM U dont played CSS? There's no clantag faking - u can only choose a clantag if u are in the steamgroup. clantags aren't the Same as playernames pic (http://www.warriorofheaven.de/pic/forum/css/pic1.jpg) No I do not play CSS. I messed around with War3Source on it before, but only locally against bots. I never played it online and I don't intend to ever do it either. With this addon I was thinking of something that would work across games and not just in CSS... Title: Re: Clan tag XP Post by: Ownz on January 18, 2012, 12:51:48 PM OOOO put that on svn
Title: Re: Clan tag XP Post by: Chuck on January 23, 2012, 04:04:09 PM @Ownz, can you figure out what's wrong with clan tag script if you have time....... Revan done everything good but something wrong with xp rate system
Title: Re: Clan tag XP Post by: alex0310 on February 17, 2012, 09:27:44 AM I tested this addon.
i had some trouble with cstrike.inc therefore i used cssclantags.inc and cssclantags.txt also i fixed some inaccuracy... cvarlist: war3_bonusclan_name - actually the bonused clan war3_bonusclan_xprate - xp multipler war3_bonusclan_goldrate - gold multipler Thank Revan and Chuck (for your idea & code) Title: Re: Clan tag XP Post by: Revan on February 17, 2012, 09:56:18 AM Cool! If it works now we can put it on the svn
Title: Re: Clan tag XP Post by: alex0310 on February 17, 2012, 10:52:25 PM I continue with my test
I hope get responses to this version addon maybe have to add something ))) Title: Re: Clan tag XP Post by: Chuck on February 20, 2012, 06:12:13 AM Calculation for wearing clan tax is same as without wearing clan tag when it set 1.2xp!
Title: Re: Clan tag XP Post by: alex0310 on February 20, 2012, 08:19:51 AM Calculation for wearing clan tax is same as without wearing clan tag when it set 1.2xp! you should set cvar war3_bonusclan_name Your_ClanNameif you don't set this cvar then calculation evaluate as usual Title: Re: Clan tag XP Post by: Chuck on February 20, 2012, 04:40:38 PM Ya my group steam clan tag is set .:Tmu:.! still same
Title: Re: Clan tag XP Post by: alex0310 on February 21, 2012, 02:15:46 AM Ya my group steam clan tag is set .:Tmu:.! still same I think it error of judgment...add this line in your war3source.cfg war3_bonusclan_name .:Tmu:. Title: Re: Clan tag XP Post by: Chuck on February 22, 2012, 10:37:29 PM heh now it working! No clue why it should be allow to use quote when it letters
Title: Re: Clan tag XP Post by: alex0310 on March 04, 2012, 05:39:00 AM put on svn Addon_ClanBonusXP
cvarlist: war3_bonusclan_welcome //show welcome message // Default: "1.0" // Minimum: "0.0" // Maximum: "1.0" war3_bonusclan_name - actually the bonused clan //you should set your clan name war3_bonusclan_xprate - xp multipler // Minimum: "1.0" war3_bonusclan_goldrate - gold multipler // Minimum: "1.0" Title: Re: Clan tag XP Post by: iceman on March 10, 2012, 03:33:45 PM since this has been added to svn can we get this to load for css only
Title: Re: Clan tag XP Post by: alex0310 on March 12, 2012, 09:48:56 AM since this has been added to svn can we get this to load for css only added load check css onlyTitle: Re: Clan tag XP Post by: Revan on March 12, 2012, 02:34:16 PM You could add Support for other Games aswell(it would be a nice addittion)
Title: Re: Clan tag XP Post by: alex0310 on March 17, 2012, 01:02:58 PM library "server.so" of TF2 haven't func SetClanTag
i don't know possible it on TF2 or not have you any idea? how do it. for example library "server.so" of CSS (http://s019.radikal.ru/i640/1203/dc/7f81f795ee3at.jpg) (http://radikal.ru/F/s019.radikal.ru/i640/1203/dc/7f81f795ee3a.jpg.html) Title: Re: Clan tag XP Post by: Necavi on March 17, 2012, 01:41:10 PM I can only assume he meant to try to parse names to detect clantags? Possibly with the help of something like SteamTools to check clan tags? Not entirely certain how he was imagining it.
Title: Re: Clan tag XP Post by: Revan on March 17, 2012, 02:09:46 PM Yes, you could use str contain and then use steamtools to check if he is in the group
Title: Re: Clan tag XP Post by: iceman on April 05, 2012, 05:06:26 AM what about using admin groups? kick flag?
Title: Re: Clan tag XP Post by: alex0310 on April 05, 2012, 06:05:23 AM maybe..
but i haven't free time for it now i going use something like but it will or else.. for TF2 it will for member Steamgoups... players may don't wearing clantag.. membership be enough Title: Re: Clan tag XP Post by: Revan on July 13, 2012, 03:20:44 PM added support for non-css
requires steamtools in order to work properly. If steamtools is running, there will be a additional console variable: Code: war3_bonusclan_id - If GroupID is non-zero the plugin will use steamtools to identify clan players(Overrides 'war3_bonusclan_name') get from svn Title: Re: Clan tag XP Post by: iceman on July 13, 2012, 03:36:10 PM You are awesome! tyvm testing now
Title: Re: Clan tag XP Post by: iceman on July 13, 2012, 04:13:27 PM Can u remove the LoadCheck GameCS pls?
Title: Re: Clan tag XP Post by: Revan on July 14, 2012, 02:13:43 AM Alright, the loadcheck was searching for steamtools and/or CS:S if steamtools is not running/different game than CS:S it won't load. Seems like steamtools wheren't recognized that early in the loading progress.
I removed the LoadCheck for now. Title: Re: Clan tag XP Post by: iceman on July 14, 2012, 06:03:38 AM SteamTools and the plugin loads now. No luck with war3_bonusclan_id
[14] SteamTools (0.8.2): SteamWorks for SourceMod. 69 "W3S Addon ClanBonusXP" (1.1.0.0) by Revan. Edited by alex0310 Unknown command "war3_bonusclan_id" Title: Re: Clan tag XP Post by: Revan on July 14, 2012, 01:11:52 PM Hm okay, I've "improved" the steamtools detecting mechanism, see if it works now(attached version)
also use client console command "war3_clanxp" it will tell you if steamtools is detected EDIT: attached version removed, grab newest from svn Title: Re: Clan tag XP Post by: iceman on July 22, 2012, 11:44:24 AM Thanks Revan version from svn works great :)
Title: Re: Clan tag XP Post by: Chuck on July 27, 2012, 03:52:58 PM woah! didn't see this update.... plus I get errors when trying to compile....
//// War3Source_Addon_ClanBonusXP.sp // W3SIncs/steamtools.inc(221) : warning 200: symbol "HTTPStatusCode_SwitchingPr otoco" is truncated to 31 characters // W3SIncs/steamtools.inc(239) : warning 200: symbol "HTTPStatusCode_TemporaryRe direc" is truncated to 31 characters // W3SIncs/steamtools.inc(249) : warning 200: symbol "HTTPStatusCode_ProxyAuthRe quire" is truncated to 31 characters // W3SIncs/steamtools.inc(254) : warning 200: symbol "HTTPStatusCode_Preconditio nFail" is truncated to 31 characters // W3SIncs/steamtools.inc(255) : warning 200: symbol "HTTPStatusCode_RequestEnti tyToo" is truncated to 31 characters // W3SIncs/steamtools.inc(256) : warning 200: symbol "HTTPStatusCode_RequestURIT ooLon" is truncated to 31 characters // W3SIncs/steamtools.inc(257) : warning 200: symbol "HTTPStatusCode_Unsupported Media" is truncated to 31 characters // W3SIncs/steamtools.inc(258) : warning 200: symbol "HTTPStatusCode_RequestedRa ngeNo" is truncated to 31 characters // W3SIncs/steamtools.inc(259) : warning 200: symbol "HTTPStatusCode_Expectation Faile" is truncated to 31 characters // W3SIncs/steamtools.inc(262) : warning 200: symbol "HTTPStatusCode_InternalSer verEr" is truncated to 31 characters // W3SIncs/steamtools.inc(265) : warning 200: symbol "HTTPStatusCode_ServiceUnav ailab" is truncated to 31 characters // W3SIncs/steamtools.inc(267) : warning 200: symbol "HTTPStatusCode_HTTPVersion NotSu" is truncated to 31 characters // W3SIncs/steamtools.inc(277) : warning 200: symbol "Steam_SetHTTPRequestNetwor kActi" is truncated to 31 characters // W3SIncs/steamtools.inc(279) : warning 200: symbol "Steam_SetHTTPRequestGetOrP ostPa" is truncated to 31 characters // W3SIncs/steamtools.inc(284) : warning 200: symbol "Steam_GetHTTPResponseHeade rValu" is truncated to 31 characters // W3SIncs/steamtools.inc(289) : warning 200: symbol "Steam_GetHTTPDownloadProgr essPe" is truncated to 31 characters // War3Source_Addon_ClanBonusXP.sp(90) : error 017: undefined symbol "GAMECS" // War3Source_Addon_ClanBonusXP.sp(146) : error 017: undefined symbol "CvarEmpty " // War3Source_Addon_ClanBonusXP.sp(150) : error 017: undefined symbol "FloatToCu tString" // War3Source_Addon_ClanBonusXP.sp(150) : error 092: number of arguments does no t match definition // War3Source_Addon_ClanBonusXP.sp(151) : error 017: undefined symbol "FloatToCu tString" // War3Source_Addon_ClanBonusXP.sp(151) : error 092: number of arguments does no t match definition // // 6 Errors. Title: Re: Clan tag XP Post by: Revan on July 28, 2012, 05:25:26 AM You need recent war3source & compiler
Title: Re: Clan tag XP Post by: Chuck on August 23, 2012, 02:22:05 PM can you update with CSGO version :P
|