Author |
Message |
Quan Chi2 Member of "Sexy Teenagers that Code" Group

Age:34 Gender: Joined: Mar 25 2005 Posts: 860 Location: NYC Offline
|
Posted: Mon Sep 05, 2005 7:35 pm Post subject: Item usage action.. |
 |
|
|
|
I've seen this before, where when someone tries to use a thor, and they get a ship engine shutdown and an item.. I want to do this for an effect I plan to execute...
Heres the bottom line.. I want to make a plugin that does this.. for merv, that is..
How would I do that..(I know it may be newbish, but questions got me to make nice things later on)?
Thanks in advanced... |
|
Back to top |
|
 |
xsp0rtsfanx Seasoned Helper

Age:36 Gender: Joined: Dec 27 2004 Posts: 168 Location: California Offline
|
Posted: Mon Sep 05, 2005 9:36 pm Post subject: |
 |
|
|
|
ok i cant code to save my life but my guess is something like where bot checks for a keydown on f6 it pms the person *prize #14 (for engine shutdown) and then random a prize from 1 to 28.. although thats just a guess thats what i think it should look like. |
|
Back to top |
|
 |
Cyan~Fire I'll count you!

Age:37 Gender: Joined: Jul 14 2003 Posts: 4608 Location: A Dream Offline
|
Posted: Mon Sep 05, 2005 10:39 pm Post subject: |
 |
|
|
|
It won't be a keydown, it'll be an EVENT_PlayerWeapon. _________________ This help is informational only. No representation is made or warranty given as to its content. User assumes all risk of use. Cyan~Fire assumes no responsibility for any loss or delay resulting from such use.
Wise men STILL seek Him. |
|
Back to top |
|
 |
xsp0rtsfanx Seasoned Helper

Age:36 Gender: Joined: Dec 27 2004 Posts: 168 Location: California Offline
|
Posted: Mon Sep 05, 2005 11:11 pm Post subject: |
 |
|
|
|
i dont know that much c++ but i learned blitz basic so i did the command keydown . i didnt know that was the command so i should look into that  |
|
Back to top |
|
 |
Muskrat Server Help Squatter

Age:38 Joined: Aug 24 2004 Posts: 829 Location: Swamp Offline
|
Posted: Mon Sep 05, 2005 11:15 pm Post subject: |
 |
|
|
|
Or maybe (if you're using mervbot) look at the bot's source. |
|
Back to top |
|
 |
Quan Chi2 Member of "Sexy Teenagers that Code" Group

Age:34 Gender: Joined: Mar 25 2005 Posts: 860 Location: NYC Offline
|
Posted: Tue Sep 06, 2005 1:06 am Post subject: |
 |
|
|
|
EVENT_PlayerWeapon
In spawns.cpp eh...
k |
|
Back to top |
|
 |
Quan Chi2 Member of "Sexy Teenagers that Code" Group

Age:34 Gender: Joined: Mar 25 2005 Posts: 860 Location: NYC Offline
|
Posted: Tue Sep 06, 2005 3:28 am Post subject: |
 |
|
|
|
What would I put after this...?
case EVENT_PlayerWeapon:
{
Player *p = (Player*)event.p[0];
weaponInfo wi;
wi.n = *(Uint16*)&event.p[1];
}
break;
Mind you, I want to make it on DECOY usage... which is F5(default key)..
What would I put, and where would I put the sendPrivate message...
Thanks |
|
Back to top |
|
 |
Muskrat Server Help Squatter

Age:38 Joined: Aug 24 2004 Posts: 829 Location: Swamp Offline
|
|
Back to top |
|
 |
Quan Chi2 Member of "Sexy Teenagers that Code" Group

Age:34 Gender: Joined: Mar 25 2005 Posts: 860 Location: NYC Offline
|
Posted: Wed Sep 07, 2005 12:10 pm Post subject: |
 |
|
|
|
awesome
thank you very much, sir |
|
Back to top |
|
 |
|