ThreadBoard ArchivesSite FeaturesActiveworlds SupportHistoric Archives |
BS Bot is returning : Pascal Script? (Bots)
BS Bot is returning : Pascal Script? // BotsnightwalkerMar 27, 2001, 6:42pm
Would it be interesting to have a pascal script based bot?
ex this: ? BS Bot Script v. 1a Based on the Pascal programming language Copyright BS Programming 2001 inst.bs ---------------------------------------------------------------------------- ---- const BotA = 1; CitNum = 1; PrivPas = 'my pass'; var iNS,iWE,iAlt,iYaw: Integer; sBotName: String; {Start the bot} begin iNS := 1000; iWE := 1000; iAlt := 10; iYaw := 0; BS_SetLogin(CitNum,PrivPass); BS_SelectBot(BotA) then begin BS_SetBotName(sBotName); BS_SetBotWorld(BotA, 'beta'); BS_SetBotCord(iNS,iWE,iAlt,iYaw); BS_SetMyGesture(2); {Set events} BS_SetEventAW_EVENT_AVATAR_ADD(true); BS_SetEventAW_EVENT_AVATAR_DELETE(true); BS_SetEventAW_EVENT_CHAT(true); if not BS_StartBot(BotA) then begin BS_AddConsole('Failed to add bot: BotA'); end; end. avataradd.bs ---------------------------------------------------------------------------- ---- {Avatar add} begin BS_Whisper(BS_GetLastSession, 'Welcome to '+BS_Prop_WorldName', enjoy your stay'); BS_AddConsole(BS_GetLastName+' has entered the world.'); end. avatardelete.bs ---------------------------------------------------------------------------- ---- {Avatar delete} begin BS_Say(BS_GetLastName + ' will return...'); BS_AddConsole(BS_GetLastName+' has left the world.'); end. chat.bs ---------------------------------------------------------------------------- ---- {Chat} var sChat, s1, s2: string; iPos: integer; begin iPos := Pos(sChat, ' ')-1; s1 := LowerCase(Copy(0, iPos, Length(iPos))); s2 := LowerCase(Copy(sChat,Length(s1), Length(sChat+1))); if s1 = 'bot' then begin if s2 = 'help' then BS_Whisper(BS_GetLastSession, 'Commands i know are: help.'); end; end. |