Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are
spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the
password reset link.
Due to spam on this forum, all posts now need moderator approval.
Entire forum
➜ SMAUG
➜ SMAUG coding
➜ Turning off Auto-Attack
It is now over 60 days since the last post. This thread is closed.
Refresh page
| Posted by
| Johny
USA (16 posts) Bio
|
| Date
| Tue 22 Feb 2005 11:51 PM (UTC) |
| Message
| Would you believe it? It's the dumbass coder again.
This time I came right out with it, how do I turn off auto attack and make people type attack to do it? |
Johny the Homicidal Maniac
...More like...
Johny the Idiodical Maniac
Heh
Owner of Some Future Mud That Isn't Open to Public | | Top |
|
| Posted by
| Zeno
USA (2,871 posts) Bio
|
| Date
| Reply #1 on Wed 23 Feb 2005 02:24 AM (UTC) |
| Message
| Now now, there's no reason to call yourself that. We all started off somewhere.
This is a big change, are you sure you can handle it? Personally, I can't go into the exact ways to do it... But you'll have to find calls to multi_hit, remove those, then create an attack function that calls multi_hit, and so on. |
Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org | | Top |
|
| Posted by
| David Haley
USA (3,881 posts) Bio
|
| Date
| Reply #2 on Wed 23 Feb 2005 02:27 AM (UTC) |
| Message
| | Make sure you distinguish between mobs and players, because you will most likely want the mobs to fight back else they'd be somewhat puny mobs. :P |
David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone
http://david.the-haleys.org | | Top |
|
| Posted by
| Johny
USA (16 posts) Bio
|
| Date
| Reply #3 on Wed 23 Feb 2005 04:02 AM (UTC) |
| Message
| Ok I found one of those things Zeno had spoken about:
if ( IS_AWAKE(ch) && ch->in_room == victim->in_room )
retcode = multi_hit( ch, victim, TYPE_UNDEFINED );
And I think I'd change the type undefined to TYPE_ATTACK or something of that sort |
Johny the Homicidal Maniac
...More like...
Johny the Idiodical Maniac
Heh
Owner of Some Future Mud That Isn't Open to Public | | Top |
|
| Posted by
| Johny
USA (16 posts) Bio
|
| Date
| Reply #4 on Wed 23 Feb 2005 04:12 AM (UTC) |
| Message
| Or maybe I'd make it
if ( IS_AWAKE(ch) && ch->in_room == victim->in_room )
retcode = attack( ch, victim, TYPE_UNDEFINED );
Then insert
#COMMAND
Name attack~
Code do_multi_hit
Position 7
Level 0
Log 0
End
into the command menu, but I also need a focus option... How would I do that? |
Johny the Homicidal Maniac
...More like...
Johny the Idiodical Maniac
Heh
Owner of Some Future Mud That Isn't Open to Public | | Top |
|
| Posted by
| Txzeenath
USA (54 posts) Bio
|
| Date
| Reply #5 on Fri 29 Apr 2005 01:02 PM (UTC) |
| Message
| | May also want to make a new entry into the "pulse" section of update.c, that way mobs will also "type" attack, perhaps have it attacks faster with higher dex/level or something.. up to you. |
Darkness comes along thy path, searching, wanting, calling wrath,
shadows awaken, release the light, one and only.. here to fight,
challenge the darkness, the shadows they call, hunting the living,
more and all. Roaring thunder, full of hate, a single bound, seals
your fate.
-Txzeenath
telnet://divineright.org:8088
Alumuble Arda -
*Player owned shops, clans, and housing
*Multiclass & Stat training
*Random mob name generation implemented and Overland mapping.
*Realistic equipment statistics
*Interactive enviroment(weather/sectors)
*Weapon sheaths(scabbards), Throwing weapons
*Automatic crash recovery, saving, and reporting without disconnecting
*Fully customizeable color, Automapper, "Smart" mobiles, Hiscore tables, and more!
Currently running AGE v1.9.6(Originated and modified from Smaug 1.4a) | | Top |
|
| Posted by
| BrigandKing
(23 posts) Bio
|
| Date
| Reply #6 on Tue 06 May 2008 02:19 AM (UTC) |
| Message
| Old thread but the only one I could find that came close to what I want to do. Would like to be able to run into a room, smack someone upside the head then run like the dickens leading them to an ambush.
So just sounding out the steps I need to take. Helps me think when I see it and other people comment, I view it from a different angle.
Removing the auto-attack
remove flee or change to allow regular movement
what do you think?
| | Top |
|
| Posted by
| David Haley
USA (3,881 posts) Bio
|
| Date
| Reply #7 on Tue 06 May 2008 07:05 PM (UTC) |
| Message
| | You would need to allow people to leave combat without incurring the flee cost, I suppose. Perhaps you could add a special attack that works like a normal attack but does not actually engage combat. Of course, the person being attacked probably would want to fight back if given the chance. Perhaps the special attack could be an attempt to hit-and-run-that-way, where the attack always occurs and the running only works if a speed check succeeds or something like that. If the speed check fails, combat is engaged as normal. |
David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone
http://david.the-haleys.org | | Top |
|
| Posted by
| BrigandKing
(23 posts) Bio
|
| Date
| Reply #8 on Thu 08 May 2008 10:24 PM (UTC) |
| Message
| See that's the thing, I want don't auto combat, nor do I want to have to type a command to move. Would just like to do, kill so and so and then go east to dodge his attack.
Now, for a semi-specific question. Earlier in this thread it mentioned changing the calls to multi-hit. Now will disabling the multi-hit also remove the ability to hit more than once per "attack".
Was thinking of removing just the flee cost for PvP to keep it from being used against mobs.
| | Top |
|
| Posted by
| David Haley
USA (3,881 posts) Bio
|
| Date
| Reply #9 on Thu 08 May 2008 10:30 PM (UTC) |
| Message
| If you don't want auto-attack, then you just need to remove that part from the code: don't have the other person start fighting. In fact, you probably don't want the fight structures at all if you want people to have to enter their attacks manually. Of course, you'll have to figure out what to do with NPCs since you probably do want the fight structures for them...
I don't know what you mean by not wanting a command to move, though, because you say that you want to let people enter commands to e.g. go east.
And yes, disabling multi-hit will remove the multiple attacks per attempt. |
David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone
http://david.the-haleys.org | | Top |
|
| Posted by
| BrigandKing
(23 posts) Bio
|
| Date
| Reply #10 on Thu 08 May 2008 11:26 PM (UTC) |
| Message
| What i mean that while in combat you type try to move east it tells you "No way! You are still fighting!" But I should have known there would be no easy fix to combat ;) I'll just have a go at writing it myself. Was hoping I could just get away with removing some if checks and call it good
| | Top |
|
| Posted by
| David Haley
USA (3,881 posts) Bio
|
| Date
| Reply #11 on Fri 09 May 2008 05:45 AM (UTC) |
| Message
| | No, (un)fortunately the combat system is rather embedded in the code, so it's not a simple question of removing a check here or there. If you just removed the check that prevented the move, you might end up with people fighting each other across rooms because the fight structures are still around. |
David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone
http://david.the-haleys.org | | Top |
|
The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).
To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.
34,255 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top