Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
zalithain
Newbie


Joined: 08 Sep 2019
Posts: 3

PostPosted: Sun Sep 08, 2019 11:26 pm   

Trying to make a script that is beyond me.
 
So in the mud I frequent, there is a improves system based on hours.:

You are currently improving cut throat (89%). (21 online minutes to improvement)

Syntax: improve <skillname> / improve none


When it improve you get this:

You have become better at cut throat!


I also have a list of skills and spells:

skills
c


Level 1: axe 71% dagger 91%
flail 73% mace 73%
sword 100% whip 71%
backstab 75% dodge 75%
trip 73% haggle 73%
hide 75% peek 73%
swim 75% scrolls 1%
staves 43% wands 75%
recall 75% dig 75%
age 1% rend 75%
Level 4: sneak 75%
Level 5: steal 73%
Level 6: lore 75%
Level 7: pick lock 73%
Level 8: second attack 99%
Level 10: spit 75% lifebane 75%
Level 11: hand to hand 75%
Level 12: disarm 73%
Level 13: parry 86%
Level 14: kick 73%
Level 15: meditation 73%

[ (C)ontinue, (R)efresh, (B)ack, (H)elp, (E)nd, (T)op, (Q)uit, or RETURN ]:
Level 16: fast healing 75%
Level 17: third attack 100% sheath cut 73%
Level 18: flare 75%
Level 19: stalk 73%
Level 20: acute vision 75%
Level 21: enhanced damage 100%
Level 23: blind fighting 73%
Level 24: fourth attack 73%
Level 26: weapon slip 73% misdirection 73%
Level 28: escape 49%
Level 32: dual wield 85%
Level 35: cut throat 89%
Level 40: nightmeld 73%



spells
c


Level 2: magic missile 15 mana, 1% ventriloquate 5 mana, 1%
Level 5: detect magic 5 mana, 73%
Level 6: chill touch 15 mana, 1% detect invis 5 mana, 73%
Level 9: detect poison 5 mana, 1% invisibility 5 mana, 73%
Level 10: armor 5 mana, 73% burning hands 15 mana, 1%
infravision 5 mana, 1%
Level 11: locate object 20 mana, 73%
Level 12: detect evil 5 mana, 73% detect good 5 mana, 73%
detect hidden 5 mana, 73% refresh 12 mana, 1%
Level 14: shocking grasp 15 mana, 1%
Level 15: poison 10 mana, 1%
Level 16: farsight 10 mana, 73% weaken 20 mana, 1%
word of recall 5 mana, 73%
Level 17: blindness 5 mana, 1% protection evil 5 mana, 73%
protection neutral 5 mana, 73% protection good 5 mana, 73%
Level 18: identify 12 mana, 75%
Level 19: fireproof 10 mana, 73%
Level 20: fly 10 mana, 75% know alignment 9 mana, 1%
Level 22: color spray 15 mana, 1% giant strength 20 mana, 73%
Level 25: pass door 20 mana, 73% teleport 35 mana, 1%
Level 26: curse 20 mana, 1% energy drain 35 mana, 1%

[ (C)ontinue, (R)efresh, (B)ack, (H)elp, (E)nd, (T)op, (Q)uit, or RETURN ]:
haste 30 mana, 73%
Level 29: summon 50 mana, 73%
Level 30: dispel magic 15 mana, 1% fireball 15 mana, 1%
blizzra 15 mana, 1%
Level 31: mass invis 20 mana, 1%
Level 32: gate 80 mana, 73%
Level 34: cancellation 20 mana, 73%
Level 35: acid blast 20 mana, 73% shield 12 mana, 73%
Level 36: plague 20 mana, 1%
Level 39: chain lightning 25 mana, 73% slow 50 mana, 73%
Level 40: stone skin 12 mana, 73%
Level 42: sanctuary 75 mana, 73%
Level 45: portal 100 mana, 73%
Level 50: nexus 150 mana, 73%



I'm trying to get a script that will automatically change to improve something that is not at 100%, when my current improving skill/spell hits 100%.
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4692
Location: Pensacola, FL, USA

PostPosted: Mon Sep 09, 2019 3:28 am   
 
How is it supposed to determine what comes next?
Code only knows as much as you tell it.

#TR {You have become better at (*)!} {improve @nextSkill}

Is the general format here, but we need to define @nextSkill.
This can be based off of what you just learned, or it can loop through a set list.
_________________
Discord: Shalimarwildcat
Reply with quote
zalithain
Newbie


Joined: 08 Sep 2019
Posts: 3

PostPosted: Mon Sep 09, 2019 2:05 pm   
 
I would like it to loop a set list, and delete the items off the list, as they hit 100%.
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4692
Location: Pensacola, FL, USA

PostPosted: Tue Sep 10, 2019 2:32 pm   
 
To make your list you would do something like:

nextSkill=this skill|that skill|the other skill

and then the trigger becomes:

Code:
#TR {You have become better at (*)!} {
  #DELITEM nextSkill %1
  #IF (@nextSkill) {improve %item(@nextSkill, 1)}
}


You would still need to repopulate @nextSkill periodically
_________________
Discord: Shalimarwildcat
Reply with quote
zalithain
Newbie


Joined: 08 Sep 2019
Posts: 3

PostPosted: Tue Sep 10, 2019 7:31 pm   
 
Thanks Shalimar
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net