ThreadBoard ArchivesSite FeaturesActiveworlds SupportHistoric Archives |
need a little help please (Sdk)
need a little help please // SdkjeidenNov 10, 2000, 2:32am
This is a multi-part message in MIME format.
------=_NextPart_000_0035_01C04AA3.2753C560 Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable hi all, Okay I finally got a bot to login and it can act like a chat bot to a = limited degree and I got it to respond to a few commands. Now I have no clue on how to go about doing the next step. Which is = using the bot to run and keep track of an rpg. So I need it to open a txt file (create the file if it is not there) = read the file and see if it has data for a character and if not to = create a new one. I'm using VB. Thanks in advance Jeiden ------=_NextPart_000_0035_01C04AA3.2753C560 Content-Type: text/html; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META http-equiv=3DContent-Type content=3D"text/html; = charset=3Dwindows-1252"> <META content=3D"MSHTML 5.50.4207.2601" name=3DGENERATOR> <STYLE></STYLE> </HEAD> <BODY bgColor=3D#ffffff> <DIV><FONT face=3D"Comic Sans MS">hi all,</FONT></DIV> <DIV><FONT face=3D"Comic Sans MS"></FONT> </DIV> <DIV><FONT face=3D"Comic Sans MS">Okay I finally got a bot to login and = it can act=20 like a chat bot to a limited degree and I got it to respond to a few=20 commands.</FONT></DIV> <DIV><FONT face=3D"Comic Sans MS"></FONT> </DIV> <DIV><FONT face=3D"Comic Sans MS">Now I have no clue on how to go about = doing the=20 next step. Which is using the bot to run and keep track of an = rpg.</FONT></DIV> <DIV><FONT face=3D"Comic Sans MS"></FONT> </DIV> <DIV><FONT face=3D"Comic Sans MS">So I need it to open a txt file = (create the file=20 if it is not there) read the file and see if it has data for a character = and if=20 not to create a new one.</FONT></DIV> <DIV><FONT face=3D"Comic Sans MS"></FONT> </DIV> <DIV><FONT face=3D"Comic Sans MS">I'm using VB.</FONT></DIV> <DIV><FONT face=3D"Comic Sans MS"></FONT> </DIV> <DIV><FONT face=3D"Comic Sans MS">Thanks in advance</FONT></DIV> <DIV><FONT face=3D"Comic Sans MS"></FONT> </DIV> <DIV><FONT face=3D"Comic Sans MS">Jeiden</FONT></DIV></BODY></HTML> ------=_NextPart_000_0035_01C04AA3.2753C560-- twisted horizonNov 10, 2000, 9:38am
This is a multi-part message in MIME format.
------=_NextPart_000_002A_01C04ADD.73807480 Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable First thing I can say is, You're a beginner to bot programming, and I'd imagine programming at = all. You want to make an RPG bot. YOU ARE CRAZY. Aside from that, if you = still want to know how to do file access, e-mail me. -Twisted Horizon [View Quote] ------=_NextPart_000_002A_01C04ADD.73807480 Content-Type: text/html; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable <!DOCTYPE HTML PUBLIC "-//W3C//DTD W3 HTML//EN"> <HTML> <HEAD> <META content=3Dtext/html;charset=3Diso-8859-1 = http-equiv=3DContent-Type><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 = Transitional//EN"> <META content=3D'"MSHTML 4.72.3110.7"' name=3DGENERATOR> <STYLE></STYLE> </HEAD> <BODY bgColor=3D#ffffff> <DIV><FONT color=3D#000000 size=3D2>First thing I can say = is,</FONT></DIV> <DIV><FONT color=3D#000000 size=3D2></FONT><FONT size=3D2>You're a = beginner to bot=20 programming, and I'd imagine programming at all. You want to make an RPG = bot.=20 YOU ARE CRAZY. Aside from that, if you still want to know how to do file = access,=20 e-mail me.</FONT></DIV> <DIV><FONT size=3D2>-Twisted Horizon</FONT></DIV> <BLOCKQUOTE=20 style=3D"BORDER-LEFT: #000000 solid 2px; MARGIN-LEFT: 5px; PADDING-LEFT: = 5px"> [View Quote] ------=_NextPart_000_002A_01C04ADD.73807480-- tony56Nov 10, 2000, 8:32pm
This is a multi-part message in MIME format.
------=_NextPart_000_0025_01C04B30.4988F640 Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable I recommend these Visual Basic web sites: www.planetsourcecode.com (click 'Visual basic' on the right) www.vbweb.co.uk (has file stuff somewhere) --=20 - Tony56 (aka Chandler56) "Freedom: That's What The Government Wants You To Believe!" ____________________________________________________________ [View Quote] ------=_NextPart_000_0025_01C04B30.4988F640 Content-Type: text/html; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META content=3D"text/html; charset=3Dwindows-1252" = http-equiv=3DContent-Type> <META content=3D"MSHTML 5.00.2614.3500" name=3DGENERATOR> <STYLE></STYLE> </HEAD> <BODY bgColor=3D#ffffff> <DIV><FONT face=3D"MS Sans Serif" size=3D1>I recommend these Visual = Basic web=20 sites:</FONT></DIV> <DIV> </DIV> <DIV><FONT face=3D"MS Sans Serif" size=3D1><A=20 href=3D"http://www.planetsourcecode.com">www.planetsourcecode.com</A> = (click=20 'Visual basic' on the right)</FONT></DIV> <DIV><FONT face=3D"MS Sans Serif" size=3D1><A=20 href=3D"http://www.vbweb.co.uk">www.vbweb.co.uk</A> (has file stuff=20 somewhere)</FONT></DIV> <DIV><BR>-- <BR>- Tony56 (aka Chandler56)<BR>"Freedom: That's What The=20 Government Wants You To=20 Believe!"<BR>____________________________________________________________= </DIV> <BLOCKQUOTE=20 style=3D"BORDER-LEFT: #000000 2px solid; MARGIN-LEFT: 5px; MARGIN-RIGHT: = 0px; PADDING-LEFT: 5px; PADDING-RIGHT: 0px"> <DIV>jeiden <<A=20 = href=3D"mailto:Tgrenier1 at email.msn.com">Tgrenier1 at email.msn.com</A>> = wrote in=20 message <A=20 = href=3D"news:3a0b7a6f$1 at server1.Activeworlds.com">news:3a0b7a6f$1 at server1= ..Activeworlds.com</A>...</DIV> <DIV><FONT face=3D"Comic Sans MS">hi all,</FONT></DIV> <DIV><FONT face=3D"Comic Sans MS"></FONT> </DIV> <DIV><FONT face=3D"Comic Sans MS">Okay I finally got a bot to login = and it can=20 act like a chat bot to a limited degree and I got it to respond to a = few=20 commands.</FONT></DIV> <DIV><FONT face=3D"Comic Sans MS"></FONT> </DIV> <DIV><FONT face=3D"Comic Sans MS">Now I have no clue on how to go = about doing=20 the next step. Which is using the bot to run and keep track of an=20 rpg.</FONT></DIV> <DIV><FONT face=3D"Comic Sans MS"></FONT> </DIV> <DIV><FONT face=3D"Comic Sans MS">So I need it to open a txt file = (create the=20 file if it is not there) read the file and see if it has data for a = character=20 and if not to create a new one.</FONT></DIV> <DIV><FONT face=3D"Comic Sans MS"></FONT> </DIV> <DIV><FONT face=3D"Comic Sans MS">I'm using VB.</FONT></DIV> <DIV><FONT face=3D"Comic Sans MS"></FONT> </DIV> <DIV><FONT face=3D"Comic Sans MS">Thanks in advance</FONT></DIV> <DIV><FONT face=3D"Comic Sans MS"></FONT> </DIV> <DIV><FONT face=3D"Comic Sans = MS">Jeiden</FONT></DIV></BLOCKQUOTE></BODY></HTML> ------=_NextPart_000_0025_01C04B30.4988F640-- jeidenNov 11, 2000, 4:07pm
This is a multi-part message in MIME format.
------=_NextPart_000_0015_01C04BDE.4471B760 Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable Thanks found the INI manipulation code I need now all I have to do is = figure out how to get it to keep track of accounts. [View Quote] www.planetsourcecode.com (click 'Visual basic' on the right) www.vbweb.co.uk (has file stuff somewhere) --=20 - Tony56 (aka Chandler56) "Freedom: That's What The Government Wants You To Believe!" ____________________________________________________________ [View Quote] Okay I finally got a bot to login and it can act like a chat bot to = a limited degree and I got it to respond to a few commands. Now I have no clue on how to go about doing the next step. Which is = using the bot to run and keep track of an rpg. So I need it to open a txt file (create the file if it is not there) = read the file and see if it has data for a character and if not to = create a new one. I'm using VB. Thanks in advance Jeiden ------=_NextPart_000_0015_01C04BDE.4471B760 Content-Type: text/html; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META http-equiv=3DContent-Type content=3D"text/html; = charset=3Dwindows-1252"> <META content=3D"MSHTML 5.50.4207.2601" name=3DGENERATOR> <STYLE></STYLE> </HEAD> <BODY bgColor=3D#ffffff> <DIV><FONT face=3D"Comic Sans MS">Thanks found the INI manipulation = code I=20 need now all I have to do is figure out how to get it to keep track of=20 accounts.</FONT></DIV> <BLOCKQUOTE dir=3Dltr=20 style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; = BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px"> <DIV>"tony56" <<A=20 href=3D"mailto:chandler56 at mail.com">chandler56 at mail.com</A>> wrote = in message=20 <A=20 = href=3D"news:3a0c7763 at server1.Activeworlds.com">news:3a0c7763 at server1.Act= iveworlds.com</A>...</DIV> <DIV><FONT face=3D"MS Sans Serif" size=3D1>I recommend these Visual = Basic web=20 sites:</FONT></DIV> <DIV> </DIV> <DIV><FONT face=3D"MS Sans Serif" size=3D1><A=20 href=3D"http://www.planetsourcecode.com">www.planetsourcecode.com</A> = (click=20 'Visual basic' on the right)</FONT></DIV> <DIV><FONT face=3D"MS Sans Serif" size=3D1><A=20 href=3D"http://www.vbweb.co.uk">www.vbweb.co.uk</A> (has file stuff=20 somewhere)</FONT></DIV> <DIV><BR>-- <BR>- Tony56 (aka Chandler56)<BR>"Freedom: That's What The = Government Wants You To=20 = Believe!"<BR>____________________________________________________________= </DIV> <BLOCKQUOTE=20 style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; = BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px"> <DIV>jeiden <<A=20 = href=3D"mailto:Tgrenier1 at email.msn.com">Tgrenier1 at email.msn.com</A>> = wrote=20 in message <A=20 = href=3D"news:3a0b7a6f$1 at server1.Activeworlds.com">news:3a0b7a6f$1 at server1= ..Activeworlds.com</A>...</DIV> <DIV><FONT face=3D"Comic Sans MS">hi all,</FONT></DIV> <DIV><FONT face=3D"Comic Sans MS"></FONT> </DIV> <DIV><FONT face=3D"Comic Sans MS">Okay I finally got a bot to login = and it can=20 act like a chat bot to a limited degree and I got it to respond to a = few=20 commands.</FONT></DIV> <DIV><FONT face=3D"Comic Sans MS"></FONT> </DIV> <DIV><FONT face=3D"Comic Sans MS">Now I have no clue on how to go = about doing=20 the next step. Which is using the bot to run and keep track of an=20 rpg.</FONT></DIV> <DIV><FONT face=3D"Comic Sans MS"></FONT> </DIV> <DIV><FONT face=3D"Comic Sans MS">So I need it to open a txt file = (create the=20 file if it is not there) read the file and see if it has data for a=20 character and if not to create a new one.</FONT></DIV> <DIV><FONT face=3D"Comic Sans MS"></FONT> </DIV> <DIV><FONT face=3D"Comic Sans MS">I'm using VB.</FONT></DIV> <DIV><FONT face=3D"Comic Sans MS"></FONT> </DIV> <DIV><FONT face=3D"Comic Sans MS">Thanks in advance</FONT></DIV> <DIV><FONT face=3D"Comic Sans MS"></FONT> </DIV> <DIV><FONT=20 face=3D"Comic Sans = MS">Jeiden</FONT></DIV></BLOCKQUOTE></BLOCKQUOTE></BODY></HTML> ------=_NextPart_000_0015_01C04BDE.4471B760-- jeidenNov 11, 2000, 4:38pm
This is a multi-part message in MIME format.
------=_NextPart_000_0033_01C04BE2.8C499AE0 Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable okay below is the code minus the code in the module I had to create for = this. Now after looking it over I realized I would not be able to = rewrite it so it will do what I want. Does any one know how to convert this so that it can be used with chat = events? And store the following data:=20 CharacterName str dex int con wis cha money magicpoints exprience And doesnt have to be in that order. I also want to keep the manual = editing feature that the orginal code has. Dim KeySection As String Dim KeyKey As String Dim KeyValue As String Private Sub loadini() Dim lngResult As Long Dim strFileName Dim strResult As String * 50 strFileName =3D App.Path & "\Myini.ini" 'Declare your ini file ! lngResult =3D GetPrivateProfileString(KeySection, _ KeyKey, strFileName, strResult, Len(strResult), _ strFileName) If lngResult =3D 0 Then 'An error has occurred Call MsgBox("An error has occurred while calling the API function", = vbExclamation) Else KeyValue =3D Trim(strResult) End If End Sub Private Sub saveini() Dim lngResult As Long Dim strFileName strFileName =3D App.Path & "\Myini.ini" 'Declare your ini file ! lngResult =3D WritePrivateProfileString(KeySection, _ KeyKey, KeyValue, strFileName) If lngResult =3D 0 Then 'An error has occurred Call MsgBox("An error has occurred while calling the API function", = vbExclamation) End If End Sub ' unfortunately you have to include ALL the above on any form ' on which you want to use this, but for my needs this is ' the most simple ini manipulation thing i found :) ' Load your ini parameters Private Sub cmd_Load_Click() 'load ContactEmail KeySection =3D "Email" KeyKey =3D "ContactEmail" loadini txt_ContactEmail.Text =3D KeyValue 'load ContactName KeySection =3D "Name" KeyKey =3D "ContactName" loadini txt_ContactName.Text =3D KeyValue End Sub ' Save your ini parameters Private Sub cmd_Save_Click() 'Save ContactEmail KeySection =3D "Email" KeyKey =3D "ContactEmail" KeyValue =3D txt_ContactEmail.Text saveini 'Save ContactName KeySection =3D "Name" KeyKey =3D "ContactName" KeyValue =3D txt_ContactName.Text saveini End Sub ------=_NextPart_000_0033_01C04BE2.8C499AE0 Content-Type: text/html; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META http-equiv=3DContent-Type content=3D"text/html; = charset=3Dwindows-1252"> <META content=3D"MSHTML 5.50.4207.2601" name=3DGENERATOR> <STYLE></STYLE> </HEAD> <BODY bgColor=3D#ffffff> <DIV><FONT face=3D"Comic Sans MS">okay below is the code minus the code = in the=20 module I had to create for this. Now after looking it over I realized I = would=20 not be able to rewrite it so it will do what I want.</FONT></DIV> <DIV><FONT face=3D"Comic Sans MS"></FONT> </DIV> <DIV><FONT face=3D"Comic Sans MS">Does any one know how to convert this = so that it=20 can be used with chat events? And store the following data: = </FONT></DIV> <DIV><FONT face=3D"Comic Sans MS"></FONT> </DIV> <DIV><FONT face=3D"Comic Sans MS">CharacterName str dex int con wis cha = money=20 magicpoints exprience</FONT></DIV> <DIV><FONT face=3D"Comic Sans MS"></FONT> </DIV> <DIV><FONT face=3D"Comic Sans MS">And doesnt have to be in that order. I = also want=20 to keep the manual editing feature that the orginal code = has.</FONT></DIV> <DIV><FONT face=3D"Comic Sans MS"></FONT> </DIV> <DIV><FONT face=3D"Comic Sans MS"></FONT> </DIV> <DIV><FONT face=3D"Comic Sans MS">Dim KeySection As String<BR>Dim KeyKey = As=20 String<BR>Dim KeyValue As String</FONT></DIV> <DIV> </DIV> <DIV><FONT face=3D"Comic Sans MS">Private Sub loadini()</FONT></DIV> <DIV> </DIV> <DIV><FONT face=3D"Comic Sans MS">Dim lngResult As Long<BR>Dim = strFileName<BR>Dim=20 strResult As String * 50<BR>strFileName =3D App.Path & "\Myini.ini" = 'Declare=20 your ini file !<BR>lngResult =3D GetPrivateProfileString(KeySection, = _<BR>KeyKey,=20 strFileName, strResult, Len(strResult), _<BR>strFileName)<BR>If = lngResult =3D 0=20 Then<BR>'An error has occurred<BR>Call MsgBox("An error has occurred = while=20 calling the API function", vbExclamation)<BR>Else<BR>KeyValue =3D=20 Trim(strResult)<BR>End If</FONT></DIV> <DIV> </DIV> <DIV><FONT face=3D"Comic Sans MS">End Sub</FONT></DIV> <DIV> </DIV> <DIV><FONT face=3D"Comic Sans MS">Private Sub saveini()</FONT></DIV> <DIV> </DIV> <DIV><FONT face=3D"Comic Sans MS">Dim lngResult As Long<BR>Dim=20 strFileName<BR>strFileName =3D App.Path & "\Myini.ini" 'Declare your = ini file=20 !<BR>lngResult =3D WritePrivateProfileString(KeySection, _<BR>KeyKey, = KeyValue,=20 strFileName)<BR>If lngResult =3D 0 Then<BR>'An error has = occurred<BR>Call=20 MsgBox("An error has occurred while calling the API function",=20 vbExclamation)<BR>End If</FONT></DIV> <DIV> </DIV> <DIV><FONT face=3D"Comic Sans MS">End Sub<BR>' unfortunately you have to = include=20 ALL the above on any form<BR>' on which you want to use this, but for my = needs=20 this is<BR>' the most simple ini manipulation thing i found = :)</FONT></DIV> <DIV> </DIV> <DIV><FONT face=3D"Comic Sans MS">' Load your ini parameters<BR>Private = Sub=20 cmd_Load_Click()</FONT></DIV> <DIV> </DIV> <DIV><FONT face=3D"Comic Sans MS">'load ContactEmail<BR>KeySection =3D=20 "Email"<BR>KeyKey =3D "ContactEmail"<BR>loadini<BR>txt_ContactEmail.Text = =3D=20 KeyValue</FONT></DIV> <DIV> </DIV> <DIV><FONT face=3D"Comic Sans MS">'load ContactName<BR>KeySection =3D=20 "Name"<BR>KeyKey =3D "ContactName"<BR>loadini<BR>txt_ContactName.Text = =3D=20 KeyValue</FONT></DIV> <DIV> </DIV> <DIV><FONT face=3D"Comic Sans MS">End Sub</FONT></DIV> <DIV> </DIV> <DIV><FONT face=3D"Comic Sans MS">' Save your ini parameters<BR>Private = Sub=20 cmd_Save_Click()</FONT></DIV> <DIV> </DIV> <DIV><FONT face=3D"Comic Sans MS">'Save ContactEmail<BR>KeySection =3D=20 "Email"<BR>KeyKey =3D "ContactEmail"<BR>KeyValue =3D=20 txt_ContactEmail.Text<BR>saveini</FONT></DIV> <DIV> </DIV> <DIV><FONT face=3D"Comic Sans MS">'Save ContactName<BR>KeySection = =3D=20 "Name"<BR>KeyKey =3D "ContactName"<BR>KeyValue =3D=20 txt_ContactName.Text<BR>saveini</FONT></DIV> <DIV> </DIV> <DIV><FONT face=3D"Comic Sans MS">End Sub<BR></FONT></DIV></BODY></HTML> ------=_NextPart_000_0033_01C04BE2.8C499AE0-- jeidenNov 17, 2000, 1:55am
This is a multi-part message in MIME format.
------=_NextPart_000_0035_01C0501E.1A22C0A0 Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable First thanks for the emailed responses. Now that that is out of the way I need a bit more help. The problem is that my bot cant seem to load my ini file. it has a terrible recall. basically when a person says stats the following command line is = executed If sdk.AwChatMessage =3D "stats" Then stats End If Which takes the program to Private Sub stats() loadinfo covert1 =3D "str:" & Str covert2 =3D "dex:" & Dex covert3 =3D "int:" & Inte covert4 =3D "con:" & Con covert5 =3D "wis:" & Wis covert6 =3D "cha:" & Cha covert7 =3D "hp:" & hpAct covert8 =3D "mp:" & mpAct covert9 =3D "ac:" & AC covert10 =3D "gp:" & GP covert11 =3D "exp:" & EXP spacevar =3D " " sdk.AwSession sdk.AwSay CName & spacevar & covert1 & spacevar & covert2 & _ spacevar & covert3 & spacevar & covert4 & spacevar & covert5 & spacevar = & _ covert6 & spacevar & covert7 & spacevar & covert8 & spacevar & covert9 _ & spacevar & covert10 & spacevar & covert11 End Sub and to Private Sub loadinfo() 'Load CharacterName KeySection =3D "Name" KeyKey =3D "CharacterName" KeyValue =3D CName loadini 'Load Level KeySection =3D "Level" KeyKey =3D "CharacterLevel" KeyValue =3D Level loadini 'Load Race KeySection =3D "Race" KeyKey =3D "CharacterRace" KeyValue =3D Race loadini 'Load Class KeySection =3D "Class" KeyKey =3D "CharacterClass" KeyValue =3D Class loadini 'Load Str KeySection =3D "Str" KeyKey =3D "CharacterStr" KeyValue =3D Str loadini 'Load Inte KeySection =3D "Int" KeyKey =3D "CharacterInt" KeyValue =3D Inte loadini 'Load Wis KeySection =3D "Wis" KeyKey =3D "CharacterWis" KeyValue =3D Wis loadini 'Load Dex KeySection =3D "Dex" KeyKey =3D "CharacterDex" KeyValue =3D Dex loadini 'Load Con KeySection =3D "Con" KeyKey =3D "CharacterCon" KeyValue =3D Con loadini 'Load Cha KeySection =3D "Cha" KeyKey =3D "CharacterCha" KeyValue =3D Cha loadini 'Load HpMax KeySection =3D "HpMax" KeyKey =3D "CharacterHpMax" KeyValue =3D hpMax loadini 'Load HpAct KeySection =3D "HpAct" KeyKey =3D "CharacterHpAct" KeyValue =3D hpAct loadini 'Load MpMax KeySection =3D "MpMax" KeyKey =3D "CharacterMpMax" KeyValue =3D mpMax loadini 'Load AC KeySection =3D "AC" KeyKey =3D "CharacterAC" KeyValue =3D AC loadini 'Load GP KeySection =3D "GP" KeyKey =3D "CharacterGP" KeyValue =3D GP loadini 'Load Exp KeySection =3D "EXP" KeyKey =3D "CharacterEXP" KeyValue =3D EXP loadini End Sub then to Private Sub loadini() strFileName =3D App.Path & "\rpg.ini" 'Declare your ini file ! lngResult =3D GetPrivateProfileString(KeySection, _ KeyKey, strFileName, strResult, Len(strResult), _ strFileName) If lngResult =3D 0 Then 'An error has occurred Call MsgBox("An error has occurred while calling the API function", = vbExclamation) Else KeyValue =3D Trim(strResult) End If End Sub And then back to the stats sub to say the result in the chatbox. For some reason when it gets to loadini it fails to load the ini file. How do I resolve this problem and have the bot remember that the INI is = there at start up? Thanks in advance, Jeiden ------=_NextPart_000_0035_01C0501E.1A22C0A0 Content-Type: text/html; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META http-equiv=3DContent-Type content=3D"text/html; = charset=3Dwindows-1252"> <META content=3D"MSHTML 5.50.4207.2601" name=3DGENERATOR> <STYLE></STYLE> </HEAD> <BODY bgColor=3D#ffffff> <DIV><FONT face=3D"Comic Sans MS">First thanks for the emailed=20 responses.</FONT></DIV> <DIV><FONT face=3D"Comic Sans MS"></FONT> </DIV> <DIV><FONT face=3D"Comic Sans MS"></FONT> </DIV> <DIV><FONT face=3D"Comic Sans MS">Now that that is out of the way I need = a bit=20 more help.</FONT></DIV> <DIV><FONT face=3D"Comic Sans MS"></FONT> </DIV> <DIV><FONT face=3D"Comic Sans MS">The problem is that my bot cant seem = to load my=20 ini file.</FONT></DIV> <DIV><FONT face=3D"Comic Sans MS">it has a terrible recall.</FONT></DIV> <DIV><FONT face=3D"Comic Sans MS"></FONT> </DIV> <DIV><FONT face=3D"Comic Sans MS">basically when a person says stats the = following=20 command line is executed</FONT></DIV><FONT face=3D"Comic Sans MS"> <DIV><BR> &nbs= p; =20 If sdk.AwChatMessage =3D "stats"=20 Then<BR>  = ; =20 stats<BR> &nbs= p; =20 End If</FONT></DIV> <DIV><FONT face=3D"Comic Sans MS"></FONT> </DIV> <DIV><FONT face=3D"Comic Sans MS">Which takes the program = to</FONT></DIV> <DIV><FONT face=3D"Comic Sans MS"></FONT> </DIV> <DIV><FONT face=3D"Comic Sans MS">Private Sub stats()<BR></FONT><FONT=20 face=3D"Comic Sans MS">loadinfo<BR>covert1 =3D "str:" & = Str<BR>covert2 =3D "dex:"=20 & Dex<BR>covert3 =3D "int:" & Inte<BR>covert4 =3D "con:" &=20 Con<BR>covert5 =3D "wis:" & Wis<BR>covert6 =3D "cha:" & = Cha<BR>covert7 =3D=20 "hp:" & hpAct<BR>covert8 =3D "mp:" & mpAct<BR>covert9 =3D "ac:" = &=20 AC<BR>covert10 =3D "gp:" & GP<BR>covert11 =3D "exp:" & = EXP<BR>spacevar =3D "=20 "</FONT></DIV> <DIV> </DIV> <DIV><FONT face=3D"Comic Sans MS">sdk.AwSession<BR>sdk.AwSay CName & = spacevar=20 & covert1 & spacevar & covert2 & _<BR>spacevar & = covert3=20 & spacevar & covert4 & spacevar & covert5 & spacevar = &=20 _<BR>covert6 & spacevar & covert7 & spacevar & covert8 = &=20 spacevar & covert9 _<BR>& spacevar & covert10 & spacevar = &=20 covert11</FONT></DIV> <DIV> </DIV> <DIV><FONT face=3D"Comic Sans MS">End Sub<BR></FONT></DIV> <DIV><FONT face=3D"Comic Sans MS">and to</FONT></DIV> <DIV><FONT face=3D"Comic Sans MS"></FONT> </DIV> <DIV><FONT face=3D"Comic Sans MS">Private Sub loadinfo()</FONT></DIV> <DIV> </DIV> <DIV><FONT face=3D"Comic Sans MS">'Load CharacterName<BR>KeySection =3D=20 "Name"<BR>KeyKey =3D "CharacterName"<BR>KeyValue =3D = CName<BR>loadini</FONT></DIV> <DIV> </DIV> <DIV><FONT face=3D"Comic Sans MS">'Load Level<BR>KeySection =3D = "Level"<BR>KeyKey =3D=20 "CharacterLevel"<BR>KeyValue =3D Level<BR>loadini</FONT></DIV> <DIV> </DIV> <DIV><FONT face=3D"Comic Sans MS">'Load Race<BR>KeySection =3D = "Race"<BR>KeyKey =3D=20 "CharacterRace"<BR>KeyValue =3D Race<BR>loadini</FONT></DIV> <DIV> </DIV> <DIV><FONT face=3D"Comic Sans MS">'Load Class<BR>KeySection =3D = "Class"<BR>KeyKey =3D=20 "CharacterClass"<BR>KeyValue =3D Class<BR>loadini</FONT></DIV> <DIV> </DIV> <DIV><FONT face=3D"Comic Sans MS">'Load Str<BR>KeySection =3D = "Str"<BR>KeyKey =3D=20 "CharacterStr"<BR>KeyValue =3D Str<BR>loadini</FONT></DIV> <DIV> </DIV> <DIV><FONT face=3D"Comic Sans MS">'Load Inte<BR>KeySection =3D = "Int"<BR>KeyKey =3D=20 "CharacterInt"<BR>KeyValue =3D Inte<BR>loadini</FONT></DIV> <DIV> </DIV> <DIV><FONT face=3D"Comic Sans MS">'Load Wis<BR>KeySection =3D = "Wis"<BR>KeyKey =3D=20 "CharacterWis"<BR>KeyValue =3D Wis<BR>loadini</FONT></DIV> <DIV> </DIV> <DIV><FONT face=3D"Comic Sans MS">'Load Dex<BR>KeySection =3D = "Dex"<BR>KeyKey =3D=20 "CharacterDex"<BR>KeyValue =3D Dex<BR>loadini</FONT></DIV> <DIV> </DIV> <DIV><FONT face=3D"Comic Sans MS">'Load Con<BR>KeySection =3D = "Con"<BR>KeyKey =3D=20 "CharacterCon"<BR>KeyValue =3D Con<BR>loadini</FONT></DIV> <DIV> </DIV> <DIV><FONT face=3D"Comic Sans MS">'Load Cha<BR>KeySection =3D = "Cha"<BR>KeyKey =3D=20 "CharacterCha"<BR>KeyValue =3D Cha<BR>loadini</FONT></DIV> <DIV> </DIV> <DIV><FONT face=3D"Comic Sans MS">'Load HpMax<BR>KeySection =3D = "HpMax"<BR>KeyKey =3D=20 "CharacterHpMax"<BR>KeyValue =3D hpMax<BR>loadini</FONT></DIV> <DIV> </DIV> <DIV><FONT face=3D"Comic Sans MS">'Load HpAct<BR>KeySection =3D = "HpAct"<BR>KeyKey =3D=20 "CharacterHpAct"<BR>KeyValue =3D hpAct<BR>loadini</FONT></DIV> <DIV> </DIV> <DIV><FONT face=3D"Comic Sans MS">'Load MpMax<BR>KeySection =3D = "MpMax"<BR>KeyKey =3D=20 "CharacterMpMax"<BR>KeyValue =3D mpMax<BR>loadini</FONT></DIV> <DIV> </DIV> <DIV><FONT face=3D"Comic Sans MS">'Load AC<BR>KeySection =3D = "AC"<BR>KeyKey =3D=20 "CharacterAC"<BR>KeyValue =3D AC<BR>loadini</FONT></DIV> <DIV> </DIV> <DIV><FONT face=3D"Comic Sans MS">'Load GP<BR>KeySection =3D = "GP"<BR>KeyKey =3D=20 "CharacterGP"<BR>KeyValue =3D GP<BR>loadini</FONT></DIV> <DIV> </DIV> <DIV><FONT face=3D"Comic Sans MS">'Load Exp<BR>KeySection =3D = "EXP"<BR>KeyKey =3D=20 "CharacterEXP"<BR>KeyValue =3D EXP<BR>loadini</FONT></DIV> <DIV> </DIV> <DIV><FONT face=3D"Comic Sans MS">End Sub</FONT></DIV> <DIV><FONT face=3D"Comic Sans MS"></FONT> </DIV> <DIV><FONT face=3D"Comic Sans MS">then to</FONT></DIV> <DIV><FONT face=3D"Comic Sans MS"></FONT> </DIV> <DIV><FONT face=3D"Comic Sans MS">Private Sub loadini()</FONT></DIV> <DIV><FONT face=3D"Comic Sans MS"></FONT> </DIV> <DIV><FONT face=3D"Comic Sans MS">strFileName =3D App.Path & = "\rpg.ini" 'Declare=20 your ini file !<BR>lngResult =3D GetPrivateProfileString(KeySection, = _<BR>KeyKey,=20 strFileName, strResult, Len(strResult), _<BR>strFileName)<BR>If = lngResult =3D 0=20 Then<BR>'An error has occurred<BR>Call MsgBox("An error has occurred = while=20 calling the API function", vbExclamation)<BR>Else<BR>KeyValue =3D=20 Trim(strResult)<BR>End If</FONT></DIV> <DIV><FONT face=3D"Comic Sans MS"></FONT> </DIV> <DIV><FONT face=3D"Comic Sans MS">End Sub</FONT></DIV> <DIV><FONT face=3D"Comic Sans MS"></FONT> </DIV> <DIV><FONT face=3D"Comic Sans MS">And then back to the stats sub to say = the result=20 in the chatbox.</FONT></DIV> <DIV><FONT face=3D"Comic Sans MS"></FONT> </DIV> <DIV><FONT face=3D"Comic Sans MS">For some reason when it gets to = loadini it fails=20 to load the ini file.</FONT></DIV> <DIV><FONT face=3D"Comic Sans MS"></FONT> </DIV> <DIV><FONT face=3D"Comic Sans MS">How do I resolve this problem and have = the bot=20 remember that the INI is there at start up?</FONT></DIV> <DIV><FONT face=3D"Comic Sans MS"></FONT> </DIV> <DIV><FONT face=3D"Comic Sans MS">Thanks in advance,</FONT></DIV> <DIV><FONT face=3D"Comic Sans MS"></FONT> </DIV> <DIV><FONT face=3D"Comic Sans MS">Jeiden</FONT></DIV></BODY></HTML> ------=_NextPart_000_0035_01C0501E.1A22C0A0-- |