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
➜ Multiple attacks based on dex...
Multiple attacks based on dex...
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| Mike Scherling
USA (20 posts) Bio
|
Date
| Wed 14 Jul 2004 10:52 AM (UTC) Amended on Wed 14 Jul 2004 08:26 PM (UTC) by Mike Scherling
|
Message
| /*
* NPC predetermined number of attacks -Thoric
*/
if (ch->IsNpc () && ch->numattacks > 0)
{
for (chance = 0; chance <= ch->numattacks; chance++)
{
retcode = one_hit (ch, victim, dt);
if (retcode != rNONE || ch->GetFightWho () != victim)
return retcode;
}
return retcode;
}
// GrimReApEr Custom Attack Script 50 dex per multi atack!!
//BEGIN
if (ch->GetDexterity () >= 50)
{
retcode = one_hit (ch, victim, dt);
if (retcode != rNONE || ch->GetFightWho () != victim)
return retcode;
}
if (ch->GetDexterity () >= 100)
{
retcode = one_hit (ch, victim, dt);
if (retcode != rNONE || ch->GetFightWho () != victim)
return retcode;
}
and on and on, here is a snippet for what a normal atack looks like.... This cutout is posted -below- my dex based multiple attacks in the actual Fight.c file
chance = ch->IsNpc () ? ch->GetLevel ()
: (int) ((ch->GetPcData ()->learned[gsn_second_attack]+dual_bonus)/1.5);
if (number_percent () < chance)
{
learn_from_success (ch, gsn_second_attack);
retcode = one_hit (ch, victim, dt);
if (retcode != rNONE || ch->GetFightWho () != victim)
return retcode;
}
else
learn_from_failure (ch, gsn_second_attack);
Use at will, but if your gonna use it, please keep my comments and give some credit to me.. thnxs
|
The source is all around us...
in the food you eat...
in the air you breath...
in your tooth... yes, your tooth...
any questions?
| Top |
|
Posted by
| Mike Scherling
USA (20 posts) Bio
|
Date
| Reply #1 on Wed 14 Jul 2004 11:19 AM (UTC) Amended on Wed 14 Jul 2004 11:29 AM (UTC) by Mike Scherling
|
Message
| Alright, I am really tired.. I admit that part
I put an else on, take all those suckers off, now I need to put a stop on each attack so it wont keep continuing...
at the moment when I set my dex to 20 I get this...
You scratch the chadoyn. -[358]-
You scratch the chadoyn. -[404]-
You scratch the chadoyn. -[264]-
You scratch the chadoyn. -[448]-
You scratch the chadoyn. -[244]-
You scratch the chadoyn. -[325]-
You scratch the chadoyn. -[491]-
You scratch the chadoyn. -[362]-
You graze the chadoyn. -[522]-
You scratch the chadoyn. -[289]-
You scratch the chadoyn. -[455]-
You scratch the chadoyn. -[361]-
You scratch the chadoyn. -[224]-
You scratch the chadoyn. -[256]-
You scratch the chadoyn. -[433]-
You scratch the chadoyn. -[348]-
You scratch the chadoyn. -[380]-
You scratch the chadoyn. -[302]-
You scratch the chadoyn. -[268]-
You scratch the chadoyn. -[298]-
You scratch the chadoyn. -[380]-
You dodge the chadoyn's attack.
You dodge the chadoyn's attack.
You dodge the chadoyn's attack.
You dodge the chadoyn's attack.
You dodge the chadoyn's attack.
You dodge the chadoyn's attack.
But when I set my dex to 999 I get this...
You graze the chadoyn. -[225]-
You graze the chadoyn. -[376]-
You dodge the chadoyn's attack.
You dodge the chadoyn's attack.
You dodge the chadoyn's attack.
You dodge the chadoyn's attack.
You dodge the chadoyn's attack.
You dodge the chadoyn's attack.
You dodge the chadoyn's attack.
You dodge the chadoyn's attack.
You dodge the chadoyn's attack.
You dodge the chadoyn's attack.
You dodge the chadoyn's attack.
You dodge the chadoyn's attack.
You dodge the chadoyn's attack.
You dodge the chadoyn's attack.
You dodge the chadoyn's attack.
You dodge the chadoyn's attack.
You dodge the chadoyn's attack.
You dodge the chadoyn's attack.
You dodge the chadoyn's attack.
You dodge the chadoyn's attack.
You dodge the chadoyn's attack.
You dodge the chadoyn's attack.
Sooo I need to give these an ol switcheroo, I think it might be my greater than / less than signs *sigh*
Soooo, ill keep ya posted on whats going on.. darn thing -sigh- |
The source is all around us...
in the food you eat...
in the air you breath...
in your tooth... yes, your tooth...
any questions?
| Top |
|
Posted by
| Mike Scherling
USA (20 posts) Bio
|
Date
| Reply #2 on Wed 14 Jul 2004 11:36 AM (UTC) |
Message
| I fixed it... sorry If I keep rambling, but yeah, im gonna get to sleep, and ill be in tip top coding shape when i wake up -sigh-
started with 20 dex
( HP: 9400/9400 )( FP: 8900/8900 ) >
You brush the chadoyn. -[333]-
You dodge the chadoyn's attack.
( HP: 9400/9400 )( FP: 8900/8900 ) >mset self dex 50
Build: God: mset self dex 50
( HP: 9400/9400 )( FP: 8900/8900 ) >
You brush the chadoyn. -[225]-
You brush the chadoyn. -[362]-
You dodge the chadoyn's attack.
( HP: 9400/9400 )( FP: 8900/8900 ) >
You brush the chadoyn. -[448]-
You brush the chadoyn. -[257]-
You dodge the chadoyn's attack.
( HP: 9400/9400 )( FP: 8900/8900 ) >mset self dex 100
Build: God: mset self dex 100
( HP: 9400/9400 )( FP: 8900/8900 ) >
You brush the chadoyn. -[276]-
You brush the chadoyn. -[224]-
You brush the chadoyn. -[487]-
You dodge the chadoyn's attack.
( HP: 9400/9400 )( FP: 8900/8900 ) >
You brush the chadoyn. -[345]-
You brush the chadoyn. -[217]-
You brush the chadoyn. -[365]-
You dodge the chadoyn's attack.
( HP: 9400/9400 )( FP: 8900/8900 ) >mset self dex 999
Build: God: mset self dex 999
( HP: 9400/9400 )( FP: 8900/8900 ) >
You brush the chadoyn. -[239]-
You brush the chadoyn. -[262]-
You miss the chadoyn. -[0]-
You brush the chadoyn. -[502]-
You brush the chadoyn. -[388]-
You brush the chadoyn. -[289]-
You brush the chadoyn. -[242]-
You brush the chadoyn. -[451]-
You brush the chadoyn. -[243]-
You brush the chadoyn. -[365]-
You brush the chadoyn. -[339]-
You brush the chadoyn. -[416]-
You brush the chadoyn. -[479]-
You miss the chadoyn. -[0]-
You brush the chadoyn. -[288]-
You brush the chadoyn. -[234]-
You brush the chadoyn. -[340]-
You brush the chadoyn. -[440]-
You miss the chadoyn. -[0]-
You brush the chadoyn. -[218]-
You brush the chadoyn. -[413]-
You dodge the chadoyn's attack.
( HP: 9400/9400 )( FP: 8900/8900 ) >
WEEEEE! =)
P.S. this script also works for a monsters dex, so players arent going to be the only powerhouses =) |
The source is all around us...
in the food you eat...
in the air you breath...
in your tooth... yes, your tooth...
any questions?
| 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.
11,527 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top