Scripting Events without .dlls?

Discussion of Inner Space

Moderators: Lavish Software Team, Moderators

Post Reply
PiCkLeD
GamingTools Subscriber
Posts: 17
Joined: Mon Jul 19, 2004 4:21 pm

Scripting Events without .dlls?

Post by PiCkLeD » Mon Feb 07, 2005 7:54 am

Can you use this to create scripts to perform mouse tasks and read pixel color information to perform on events?

Or will it only work purely on the structures created in a .dll plugin, eg. can I script some EQ2 stuff without using a isxeq2 plugin, not worried about reading into memory information ?

Or should I just shut up? :)

Lax
Owner
Posts: 6634
Joined: Fri Jun 18, 2004 6:08 pm

Post by Lax » Mon Feb 07, 2005 9:11 am

If you want, sure you can use pixel colors.. that's kind of gimpy though ;) Another player steps in front of you, etc. IS doesn't currently have it built in, but pixel information is part of the Windows API and is nothing really very special.

PiCkLeD
GamingTools Subscriber
Posts: 17
Joined: Mon Jul 19, 2004 4:21 pm

Post by PiCkLeD » Mon Feb 07, 2005 3:48 pm

So really I need c++ knowledge to get any benefit currently from this?

I have some but only the fundamentals.

I would presume the current abandoned ISXEQ2 would be no use either due to patches etc?

Lax
Owner
Posts: 6634
Joined: Fri Jun 18, 2004 6:08 pm

Post by Lax » Mon Feb 07, 2005 3:52 pm

Currently this is the case as far as pixels go, yes. I put some stuff on my list of stuff to do though.

Cronic's ISXEQ2 would be no use at the moment because of patches, indeed

PiCkLeD
GamingTools Subscriber
Posts: 17
Joined: Mon Jul 19, 2004 4:21 pm

Post by PiCkLeD » Mon Feb 07, 2005 5:14 pm

Ok thanks for speedy replies!

Meantime i've started to learn c++ ...

I'm willing to allow you to use this source in one of your up and coming projects for the future :) (for a small fee of course!)

Code: Select all

#include <iostream>

class Car &#123;
	
	public&#58;
		
		char Ignition;
		char WheelsTurning;
		char Stopped;
		
		//Constructor - Deconstructor
		Car&#40;&#41;;
		~Car&#40;&#41;;

		void startCar&#40;void&#41;;
		void setMotion&#40;void&#41;;
		void stopCar&#40;void&#41;;

&#125;;

Car&#58;&#58;Car&#40;&#41; &#123;
	Ignition = 0;
	WheelsTurning = 0;
	Stopped = 1;
&#125;

Car&#58;&#58;~Car&#40;&#41; &#123;

&#125;

void Car&#58;&#58;startCar&#40;void&#41; &#123;

	if&#40;Ignition == 0&#41; &#123;
		Ignition = 1;
		std&#58;&#58;cout << "Started car engine..." << std&#58;&#58;endl;
	&#125; else &#123;
		std&#58;&#58;cout << "Could not start engine as Car is already running!..." << std&#58;&#58;endl;
	&#125;
&#125;
void Car&#58;&#58;setMotion&#40;void&#41; &#123;

	if&#40;Ignition == 1&#41; &#123;;
		WheelsTurning = 1;
		Stopped = 0;
		std&#58;&#58;cout<< "Wheels are moving!..." << std&#58;&#58;endl;
	&#125; else &#123;
		std&#58;&#58;cout << "Ignition not started! Cannot turn wheels." << std&#58;&#58;endl;	
	&#125;
&#125;

void Car&#58;&#58;stopCar&#40;void&#41; &#123;
	if&#40;&#40;WheelsTurning == 1&#41; && &#40;Ignition == 1&#41;&#41; &#123;
		WheelsTurning = 0;
		Ignition = 0;
		Stopped = 1;

		std&#58;&#58;cout << "Stopped Car!" << std&#58;&#58;endl;
	&#125; else &#123;
		std&#58;&#58;cout << "Could not stop car as Car it is in motion!" << std&#58;&#58;endl;
	&#125;
&#125;


void main&#40;void&#41; &#123;

	Car Ferrari;

	std&#58;&#58;cout << "<<Running Car Version 1.0>>" << std&#58;&#58;endl << std&#58;&#58;endl;

	Ferrari.startCar&#40;&#41;;
	Ferrari.setMotion&#40;&#41;;
	Ferrari.stopCar&#40;&#41;;

	Ferrari.setMotion&#40;&#41;;
	Ferrari.stopCar&#40;&#41;;
	
	
	Ferrari.startCar&#40;&#41;;
	Ferrari.setMotion&#40;&#41;;
	Ferrari.startCar&#40;&#41;;

&#125;

Lax
Owner
Posts: 6634
Joined: Fri Jun 18, 2004 6:08 pm

Post by Lax » Mon Feb 07, 2005 5:37 pm

ahhh my eyes! ;)

You can get rid of typing "std::" all the time by doing "using namespace std;" under the #include <iostream>. I will mention that Inner Space (and Fury) use only specific features from C++, and the rest is left to regular old C. For example, to display text in the IS console, it will be highly beneficial to know how to use printf. C++ books teach use of cout, which to me is really ugly and the use of the << operator is both ambiguous and unusual. That is to say, << usually means bitwise shift left, but for std streams it means to add to the stream... and for ambiguity (note that the following syntax may technically be incorrect): std::cout << "Hi" << 1 << "Bye"; Now suppose you want to use bitwise shift.. std::cout << "Hi" << 1<<31 << "Bye" .. woops! std::cout << "Hi" << (1<<31) << "Bye" . Anyway, short story short, I dont use std streams and dont wish them on my worst enemies :)

My personal opinion is you should learn C without C++, and then C++ is fairly natural to learn and you can borrow some concepts from it without getting too C++ish. C for Dummies by Dan Gookin should be good if you like books, and he's funny I suppose.

Just my opinion and personal preferences, certainly no more valid than anyone elses. I tend to lean further toward C while borrowing some key things from C++ (parameters using &, classes in general, a few other things) and leaving the rest of it alone. Use what you feel comfortable using, but you should familiarize yourself with printf (which probably isnt explained in C++ lessons) and usage of null-terminated character arrays as strings for working with Inner Space.

PiCkLeD
GamingTools Subscriber
Posts: 17
Joined: Mon Jul 19, 2004 4:21 pm

Post by PiCkLeD » Mon Feb 07, 2005 6:03 pm

Top Info!

Really appreciate it, I'm eager to learn.

I have a huge book on both C and C++ , i'll take your advice and study from C upwards before I get to deep into C++ way of things, was never sure what was the best starting point.

Thanks again.

Post Reply