Hitmanpt Posted June 30, 2012 at 05:24 PM Report Share #466599 Posted June 30, 2012 at 05:24 PM (edited) Boas pessoal estou a tentar ler a config de um jogo nomeadamente o Call of Duty 4 que para quem nao sabe é assim // generated by Call of Duty, do not modify unbindall bind TAB "+scores" bind ESCAPE "togglemenu" bind SPACE "+gostand" bind 4 "+smoke" bind 5 "+actionslot 3" bind 6 "+actionslot 4" bind 7 "+actionslot 2" bind ` "toggleconsole" bind A "+moveleft" bind B "mp_QuickMessage" bind C "gocrouch" bind D "+moveright" bind E "+leanright" bind F "+activate" bind G "+frag" bind N "+actionslot 1" bind Q "+leanleft" bind R "+reload" bind S "+back" bind T "chatmodepublic" bind V "+melee" bind W "+forward" bind Y "chatmodeteam" bind Z "+talk" bind ~ "toggleconsole" bind PAUSE "toggle cl_paused" bind CTRL "goprone" bind SHIFT "+breath_sprint" bind F1 "vote yes" bind F2 "vote no" bind F4 "+scores" bind F12 "screenshotJPEG" bind MOUSE1 "+attack" bind MOUSE2 "+speed_throw" bind MOUSE3 "+frag" bind MOUSE4 "weapnext" bind MOUSE5 "+melee" seta ai_corpseCount "10" seta cg_blood "1" seta cg_brass "1" seta cg_chatHeight "8" seta cg_chatTime "12000" seta cg_connectionIconSize "0" seta cg_crosshairAlpha "1" seta cg_crosshairAlphaMin "0.5" seta cg_crosshairDynamic "0" seta cg_crosshairEnemyColor "1" seta cg_cursorHints "4" seta cg_debugInfoCornerOffset "0 0" seta cg_descriptiveText "0" seta cg_drawBreathHint "1" seta cg_drawCrosshair "1" seta cg_drawCrosshairNames "1" seta cg_drawFPS "Off" seta cg_drawFPSLabels "1" seta cg_drawLagometer "0" seta cg_drawMantleHint "1" seta cg_drawSnapshot "0" seta cg_drawTurretCrosshair "1" seta cg_fov "65" seta cg_gameBoldMessageWidth "390" seta cg_gameMessageWidth "455" seta cg_headIconMinScreenRadius "0.015" seta cg_hintFadeTime "100" seta cg_hudChatIntermissionPosition "5 110" seta cg_hudChatPosition "5 204" seta cg_hudDamageIconHeight "64" seta cg_hudDamageIconInScope "0" seta cg_hudDamageIconOffset "128" seta cg_hudDamageIconTime "2000" seta cg_hudDamageIconWidth "128" seta cg_hudGrenadeIconEnabledFlash "0" seta cg_hudGrenadeIconHeight "25" seta cg_hudGrenadeIconInScope "0" seta cg_hudGrenadeIconMaxHeight "104" seta cg_hudGrenadeIconOffset "50" seta cg_hudGrenadeIconWidth "25" seta cg_hudGrenadePointerHeight "12" seta cg_hudGrenadePointerPivot "12 27" seta cg_hudGrenadePointerWidth "25" seta cg_hudMapBorderWidth "2" seta cg_hudMapFriendlyHeight "15" seta cg_hudMapFriendlyWidth "15" seta cg_hudMapPlayerHeight "20" seta cg_hudMapPlayerWidth "20" seta cg_hudMapRadarLineThickness "0.15" seta cg_hudProneY "-160" seta cg_hudSayPosition "5 180" seta cg_hudStanceHintPrints "0" seta cg_hudVotePosition "5 220" seta cg_invalidCmdHintBlinkInterval "600" seta cg_invalidCmdHintDuration "1800" seta cg_laserLight "1" seta cg_mapLocationSelectionCursorSpeed "0.6" seta cg_marks_ents_player_only "0" seta cg_predictItems "1" seta cg_ScoresPing_BgColor "0.25098 0.25098 0.25098 0.501961" seta cg_ScoresPing_HighColor "0.8 0 0 1" seta cg_ScoresPing_Interval "100" seta cg_ScoresPing_LowColor "0 0.74902 0 1" seta cg_ScoresPing_MaxBars "4" seta cg_ScoresPing_MedColor "0.8 0.8 0 1" seta cg_scriptIconSize "0" seta cg_sprintMeterDisabledColor "0.8 0.1 0.1 0.2" seta cg_sprintMeterEmptyColor "0.7 0.5 0.2 0.8" seta cg_sprintMeterFullColor "0.8 0.8 0.8 0.8" seta cg_subtitleMinTime "3" seta cg_subtitles "1" seta cg_subtitleWidthStandard "520" seta cg_subtitleWidthWidescreen "520" seta cg_teamChatsOnly "0" seta cg_viewZSmoothingMax "16" seta cg_viewZSmoothingMin "1" seta cg_viewZSmoothingTime "0.1" seta cg_voiceIconSize "1" seta cg_weaponCycleDelay "0" seta cg_youInKillCamSize "6" seta cl_allowDownload "1" seta cl_anonymous "0" seta cl_freelook "1" seta cl_maxpackets "100" seta cl_maxPing "800" seta cl_maxppf "5" seta cl_mouseAccel "0" seta cl_packetdup "1" seta cl_pitchspeed "140" seta cl_punkbuster "1" seta cl_voice "1" seta cl_wwwDownload "1" seta cl_yawspeed "140" seta com_introPlayed "1" seta com_maxfps "85" seta com_recommendedSet "1" seta compassClampIcons "1" seta compassCoords "740 3590 400" seta compassECoordCutoff "37" seta compassFriendlyHeight "18.75" seta compassFriendlyWidth "18.75" seta compassMaxRange "2500" seta compassMinRadius "0.0001" seta compassMinRange "0.0001" seta compassObjectiveArrowHeight "20" seta compassObjectiveArrowOffset "2" seta compassObjectiveArrowRotateDist "5" seta compassObjectiveArrowWidth "20" seta compassObjectiveDrawLines "1" seta compassObjectiveHeight "20" seta compassObjectiveIconHeight "16" seta compassObjectiveIconWidth "16" seta compassObjectiveMaxRange "2048" seta compassObjectiveMinAlpha "1" seta compassObjectiveNumRings "10" seta compassObjectiveRingSize "80" seta compassObjectiveRingTime "10000" seta compassObjectiveTextHeight "18" seta compassObjectiveTextScale "0.3" seta compassObjectiveWidth "20" seta compassPlayerHeight "18.75" seta compassPlayerWidth "18.75" seta compassRadarLineThickness "0.4" seta compassRadarPingFadeTime "4" seta compassRadarUpdateTime "4" seta compassRotation "1" seta compassSize "1" seta compassSoundPingFadeTime "2" seta compassTickertapeStretch "0.5" seta con_errormessagetime "8" seta con_gameMsgWindow0FadeInTime "0.25" seta con_gameMsgWindow0FadeOutTime "0.5" seta con_gameMsgWindow0Filter "gamenotify obituary" seta con_gameMsgWindow0LineCount "4" seta con_gameMsgWindow0MsgTime "5" seta con_gameMsgWindow0ScrollTime "0.25" seta con_gameMsgWindow0SplitscreenScale "1.5" seta con_gameMsgWindow1FadeInTime "0.25" seta con_gameMsgWindow1FadeOutTime "0.01" seta con_gameMsgWindow1Filter "boldgame" seta con_gameMsgWindow1LineCount "5" seta con_gameMsgWindow1MsgTime "8" seta con_gameMsgWindow1ScrollTime "0.25" seta con_gameMsgWindow1SplitscreenScale "1.5" seta con_gameMsgWindow2FadeInTime "0.75" seta con_gameMsgWindow2FadeOutTime "0.5" seta con_gameMsgWindow2Filter "subtitle" seta con_gameMsgWindow2LineCount "7" seta con_gameMsgWindow2MsgTime "5" seta con_gameMsgWindow2ScrollTime "0.25" seta con_gameMsgWindow2SplitscreenScale "1.5" seta con_gameMsgWindow3FadeInTime "0.25" seta con_gameMsgWindow3FadeOutTime "0.5" seta con_gameMsgWindow3Filter "" seta con_gameMsgWindow3LineCount "5" seta con_gameMsgWindow3MsgTime "5" seta con_gameMsgWindow3ScrollTime "0.25" seta con_gameMsgWindow3SplitscreenScale "1.5" seta con_inputBoxColor "0.25 0.25 0.2 1" seta con_inputHintBoxColor "0.4 0.4 0.35 1" seta con_matchPrefixOnly "1" seta con_minicon "0" seta con_miniconlines "5" seta con_minicontime "4" seta con_outputBarColor "1 1 0.95 0.6" seta con_outputSliderColor "0.15 0.15 0.1 0.6" seta con_outputWindowColor "0.35 0.35 0.3 0.75" seta con_typewriterColorGlowCheckpoint "0.6 0.5 0.6 1" seta con_typewriterColorGlowCompleted "0 0.3 0.8 1" seta con_typewriterColorGlowFailed "0.8 0 0 1" seta con_typewriterColorGlowUpdated "0 0.6 0.18 1" seta con_typewriterDecayDuration "700" seta con_typewriterDecayStartTime "6000" seta con_typewriterPrintSpeed "50" seta customclass1 "Custom Slot 1" seta customclass2 "Custom Slot 2" seta customclass3 "Custom Slot 3" seta customclass4 "Custom Slot 4" seta customclass5 "Custom Slot 5" seta drew_notes "5" seta dynEnt_active "0" seta fx_marks "1" seta fx_marks_ents "1" seta fx_marks_smodels "1" seta g_allowvote "0" seta g_banIPs "" seta g_clonePlayerMaxVelocity "80" seta g_deadChat "1" seta g_dropForwardSpeed "10" seta g_dropHorzSpeedRand "100" seta g_dropUpSpeedBase "10" seta g_dropUpSpeedRand "5" seta g_log "games_mp.log" seta g_logSync "0" seta g_oldVoting "1" seta g_playerCollisionEjectSpeed "25" seta g_redCrosshairs "1" seta g_useGear "1" seta g_useholdspawndelay "500" seta g_voiceChatTalkingDuration "500" seta g_voteAbstainWeight "0.5" seta hud_deathQuoteFadeTime "1000" seta hud_enable "1" seta hud_fade_ammodisplay "0" seta hud_fade_compass "0" seta hud_fade_healthbar "2" seta hud_fade_offhand "0" seta hud_fade_sprint "1.7" seta hud_fade_stance "1.7" seta hud_fadeout_speed "0.1" seta hud_flash_period_offhand "0.5" seta hud_flash_time_offhand "2" seta hud_health_pulserate_critical "0.5" seta hud_health_pulserate_injured "1" seta hud_health_startpulse_critical "0.33" seta hud_health_startpulse_injured "1" seta in_mouse "1" seta loc_forceEnglish "0" seta loc_language "0" seta m_filter "0" seta m_forward "0.25" seta m_pitch "0.022" seta m_side "0.25" seta m_yaw "0.022" seta monkeytoy "0" seta name "IBT' Hitman.pt" seta net_noipx "0" seta net_noudp "0" seta net_socksEnabled "0" seta net_socksPassword "" seta net_socksPort "1080" seta net_socksServer "" seta net_socksUsername "" seta r_aaAlpha "dither (fast)" seta r_aaSamples "4" seta r_altModelLightingUpdate "0" seta r_aspectRatio "auto" seta r_autopriority "0" seta r_customMode "" seta r_debugLineWidth "1" seta r_depthPrepass "0" seta r_displayRefresh "60 Hz" seta r_distortion "0" seta r_dlightLimit "0" seta r_dof_enable "1" seta r_drawDecals "1" seta r_drawSun "1" seta r_drawWater "1" seta r_fastSkin "0" seta r_fullscreen "1" seta r_gamma "0.8" seta r_glow_allowed "1" seta r_ignorehwgamma "0" seta r_inGameVideo "1" seta r_lodBiasRigid "0" seta r_lodBiasSkinned "0" seta r_lodScaleRigid "1" seta r_lodScaleSkinned "1" seta r_mode "1680x1050" seta r_monitor "0" seta r_multiGpu "0" seta r_picmip "0" seta r_picmip_bump "0" seta r_picmip_manual "0" seta r_picmip_spec "0" seta r_picmip_water "0" seta r_polygonOffsetBias "-1" seta r_polygonOffsetScale "-1" seta r_portalBevels "0.7" seta r_preloadShaders "0" seta r_rendererPreference "Default" seta r_specular "1" seta r_texFilterAnisoMax "4" seta r_texFilterAnisoMin "1" seta r_texFilterMipMode "Unchanged" seta r_vsync "0" seta r_zFeather "0" seta ragdoll_enable "0" seta ragdoll_max_simulating "16" seta rate "25000" seta sensitivity "5" seta server1 "" seta server10 "" seta server11 "" seta server12 "" seta server13 "" seta server14 "" seta server15 "" seta server16 "" seta server2 "" seta server3 "" seta server4 "" seta server5 "" seta server6 "" seta server7 "" seta server8 "" seta server9 "" seta sm_enable "0" seta sm_maxLights "4" seta snaps "30" seta snd_cinematicVolumeScale "0.85" seta snd_enableEq "1" seta snd_errorOnMissing "0" seta snd_khz "44" seta snd_levelFadeTime "250" seta snd_outputConfiguration "5.1 speakers" seta snd_slaveFadeTime "500" seta snd_touchStreamFilesOnLoad "0" seta snd_volume "0.8" seta sv_allowDownload "1" seta sv_floodprotect "4" seta sv_hostname "CoD4Host" seta sv_maxclients "24" seta sv_maxPing "0" seta sv_maxRate "25000" seta sv_minPing "0" seta sv_punkbuster "1" seta sv_reconnectlimit "3" seta sv_voice "0" seta sv_wwwBaseURL "" seta sv_wwwDlDisconnected "0" seta sv_wwwDownload "0" seta sys_configSum "4379996" seta sys_configureGHz "18.5307" seta sys_gpu "ATI Radeon HD 5700 Series" seta sys_sysMB "1024" seta ui_bigFont "0.4" seta ui_browserFriendlyfire "-1" seta ui_browserHardcore "1" seta ui_browserKillcam "-1" seta ui_browserMod "0" seta ui_browserOldSchool "0" seta ui_browserShowDedicated "0" seta ui_browserShowEmpty "0" seta ui_browserShowFull "0" seta ui_browserShowPassword "0" seta ui_browserShowPunkBuster "1" seta ui_browserShowPure "1" seta ui_currentMap "0" seta ui_currentNetMap "0" seta ui_dedicated "0" seta ui_drawCrosshair "1" seta ui_extraBigFont "0.55" seta ui_gametype "0" seta ui_joinGametype "5" seta ui_maxclients "32" seta ui_netGametype "4" seta ui_netGametypeName "war" seta ui_netSource "1" seta ui_serverStatusTimeOut "7000" seta ui_smallFont "0.25" seta vehDriverViewHeightMax "50" seta vehDriverViewHeightMin "-15" seta vid_xpos "3" seta vid_ypos "22" seta voice_deadChat "0" seta voice_global "0" seta voice_localEcho "0" seta winvoice_mic_mute "1" seta winvoice_mic_reclevel "65535" seta winvoice_mic_scaler "1" seta winvoice_save_voice "0" con_hidechannel *; con_showchannel dontfilter error gamenotify boldgame subtitle obituary logfile_only console_only gfx sound files devgui profile ui client server system playerweap ai anim physics fx leaderboards parserscript script E pode ter mais ou menos comandos por isso o tamanho da config não é exato, eu gostava de saber como posso ler os dados num certo campo e editar esses mesmos dados Alguma ideia? Edited June 30, 2012 at 08:23 PM by softklin Adicionado GeSHi Link to comment Share on other sites More sharing options...
HappyHippyHippo Posted June 30, 2012 at 06:16 PM Report Share #466602 Posted June 30, 2012 at 06:16 PM - abres ficheiro - les o ficheiro linha a linha - guardas em memória a combinação (head, resto_da_linha) - alteras como entenderes a entrada pelo head - pode até criar ou apagar registos que se encontram em memória no final - crias cópia do original - abres o ficheiro original para escrita apagando tudo o que lá está - escreves linha a linha vindo da informação que tens em memória - fechar o ficheiro IRC : sim, é algo que ainda existe >> #p@p Portugol Plus Link to comment Share on other sites More sharing options...
s4muc4 Posted June 30, 2012 at 06:46 PM Report Share #466603 Posted June 30, 2012 at 06:46 PM - abres ficheiro - les o ficheiro linha a linha - guardas em memória a combinação (head, resto_da_linha) - alteras como entenderes a entrada pelo head - pode até criar ou apagar registos que se encontram em memória no final - crias cópia do original - abres o ficheiro original para escrita apagando tudo o que lá está - escreves linha a linha vindo da informação que tens em memória - fechar o ficheiro lol, faz me lembrar a altura em que aprendi a manipular ficheiros txt com c++ Link to comment Share on other sites More sharing options...
HappyHippyHippo Posted June 30, 2012 at 07:22 PM Report Share #466607 Posted June 30, 2012 at 07:22 PM lol, faz me lembrar a altura em que aprendi a manipular ficheiros txt com c++ é exactamente isso que ele tem que fazer .. IRC : sim, é algo que ainda existe >> #p@p Portugol Plus Link to comment Share on other sites More sharing options...
Hitmanpt Posted June 30, 2012 at 09:42 PM Author Report Share #466616 Posted June 30, 2012 at 09:42 PM Ok obrigado... já consegui meter isto a funcionar 😉 Link to comment Share on other sites More sharing options...
s4muc4 Posted July 1, 2012 at 06:36 PM Report Share #466706 Posted July 1, 2012 at 06:36 PM olha assim ja posso aproveitar a ideia e fazer um para mim por causa do css hehe Link to comment Share on other sites More sharing options...
Hitmanpt Posted July 1, 2012 at 06:58 PM Author Report Share #466710 Posted July 1, 2012 at 06:58 PM Eu posso não ter utilizado o melhor método.... Mas funciona se quiseres o codigo apita 😉 Link to comment Share on other sites More sharing options...
s4muc4 Posted July 2, 2012 at 11:05 AM Report Share #466775 Posted July 2, 2012 at 11:05 AM tass Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now