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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD Beta Forum
edb6377
Magician


Joined: 29 Nov 2005
Posts: 482

PostPosted: Wed Jun 14, 2006 3:10 am   

Conversion of Status Window Extender --> Unfinished
 
ADDTEXT ALIAS
Code:

#VAR Found 0
#FORALL @StatusElements {
    #IF (%repeatnum.ID = %1) {#VAR Found 1}}
#IF (@Found = 0 and %isnumber(%2) and %isnumber(%3) and %2 > 0 and %3 > 0) {
   #ADDI StatusElements %addkey(%addkey(%addkey(%addkey("","ID",%1),"Row",%2),"Column",%3),"Content",%-4)
#UNVAR TempOutput
#FORALL @StatusElements {#VAR TempOutput %expand(@TempOutput,1)+%char(27)+"["+%i.Row+";"+%i.Column+"f"+%i.Content}
#STW {%expand(@TempOutput,1)} {Extender} {Tracker}
} {
#SAY Unable to add status text ~(could be due to a duplicate ID or an invalid row and column specification)
}


REMTEXT ALIAS
Code:

#VAR Found ""
#LOOP 1,%numitems(@StatusElements) {
#IF (%db(%item(@StatusElements, %i),"ID") = %1) {#VAR Found %if(@Found = "",%i,%concat(%i,"|",@Found))}
}
#IF (@Found <> "") {
#FORALL @Found {
#DELNITEM StatusElements %i}
#SAY Status text ID %1 removed from display list
#UNVAR TempOutput
#FORALL @StatusElements {#VAR TempOutput %expand(@TempOutput,1)+%char(27)+"["+%i.Row+";"+%i.Column+"f"+%i.Content}
#STW {%expand(@TempOutput,1)} {Extender} {Tracker}
} {
#SAY Unable to find ID %1 in current status elements~.;listtexts
}


LISTTEXTS ALIAS
Code:

#SAY Currently defined positional status window texts are:;#FORALL @StatusElements {#SHOWDB %i}


MY INIT ALIAS - Have to update this to put {} around the @VAR but it works fine when i do
Code:

addtext name 1 4 %ansi( bold, green)Name: %ansi( white)@name
addtext level 2 4 %ansi( bold, green)Level: %ansi( white)@clevel/@tlevel %ansi( bold, green)Kills: %ansi( white)@tnl @apktnl
addtext race 3 4 %ansi( bold, green)Race: %ansi( white)@race %ansi( bold, green)Gender: %ansi( white)@gender
addtext hp 5 2 %ansi( white)HP:@barbighp {@prompt.hpc}
addtext sp 6 2 %ansi( white)SP:@barbigsp {@prompt.spc}
addtext st 7 2 %ansi( white)ST:@barbigst {@prompt.stc}
addtext exp 8 2 %ansi( white)XP:@barbigxp
addtext quest 10 4 %ansi( bold, green)QPoints: %ansi( white)@QP %ansi( bold, green)Complete: %ansi( white)@questsdone
addtext qtimer 11 4 %ansi( bold, green)Time --~> %ansi( white)%if( %tick=-1, "idle", %eval( %tick/60) :%if( %mod( %tick, 60)<10, "0", "")%mod( %tick, 60)) %ansi( bold, green)Available -~> %ansi( white)%eval( 7-%numitems( @qtimes))
addtext pracinfo 12 4 %ansi( bold, green)Practices: %ansi( white)@practices
addtext accuracy 13 4 %ansi( bold, green)Accuracy: %ansi( white)@accuracy~% %ansi( bold, green)SCC: %ansi( white)@scc~%
addtext today 15 10 %ansi( bold, cyan)Today's Stats
addtext xpgold 17 7 %ansi( bold, green)GP: %ansi( white)@gp_today %ansi( bold, green)XP: %ansi( white)@exp_today
addtext qppr 18 7 %ansi( bold, green)QP: %ansi( white)@qp_today %ansi( bold, green)PR: %ansi( white)@pr_today %ansi( bold, green) AP: %ansi( white)@ap_today
addtext freport 20 2 %ansi( bold, green)1. ~<send freport Form Report~>%ansi( white)FT XP Report~</send~> %ansi( bold, green)2. ~<send tracker Help~>%ansi( white)Tracker Help~</send~>
addtext areport 21 2 %ansi( bold, green)3. ~<send hc Accuracy Report~>%ansi( white)ACC Report~</send~> %ansi( bold, green) 4. ~<send chc ClanHit~>%ansi( white)CT ACC Report~</send~>
addtext archon 22 2 %ansi( bold, green)5. ~<send estimate_tokens Token Estimator~>%ansi( white)Token Estimator~</send~> %ansi( bold, green) 6. ~<send trunk Trunk~>%ansi( white)Trunk~</send~>
addtext sptitle 23 10 %ansi( bold, cyan)Spell Effects
addtext sensel 25 7 %ansi( bold, red)@senl
addtext bless 25 20 %ansi( bold, red)@bls
addtext shield 26 7 %ansi( bold, red)@shl
addtext armor 26 20 %ansi( bold, red)@arm
addtext levi 27 7 %ansi( bold, red)@lev
addtext enstr 27 20 %ansi( bold, red)@enh
addtext haste 28 7 %ansi( bold, red)@qui
addtext sshield 28 20 %ansi( bold, red)@man
addtext passdoor 29 7 %ansi( bold, red)@pdoor
addtext proevil 29 20 %ansi( bold, red)@proe
addtext ubreath 30 7 %ansi( bold, red)@bre
addtext progood 30 20 %ansi( bold, red)@pro
addtext shadow 31 7 %ansi( bold, red)@sha
addtext infra 31 20 %ansi( bold, red)@inf
addtext fshield 32 7 %ansi( bold, red)@fir
addtext deta 32 20 %ansi( bold, red)@dea
addtext detm 33 7 %ansi( bold, red)@dem
addtext invis 33 20 %ansi( bold, red)@invis
addtext impiv 34 7 %ansi( bold, red)@impiv
addtext deti 34 20 %ansi( bold, red)@dei
addtext sanc 35 7 %ansi( bold, red)@sanc
addtext stone 35 20 %ansi( bold, red)@stn
addtext badinfo 37 10 %ansi( bold, cyan)Bad Affects
addtext weak 39 7 %ansi( bold, red)@weak
addtext slow 39 20 %ansi( bold, red)@root
addtext silent 40 7 %ansi( bold, red)@phan
addtext webbed 40 20 %ansi( bold, red)@web
addtext curse 41 7 %ansi( bold, red)@crs
addtext plague 41 20 %ansi( bold, red)@plague
addtext blind 42 7 %ansi( bold, red)@bli
addtext poison 42 20 %ansi( bold, red)@poison
addtext gold 46 4 %ansi( bold, green)Bank: %ansi( white)@gp_total %ansi( bold, green)On Hand: %ansi( white)@gp_handy
addtext copyright 48 4 %ansi( bold, Yellow)Status Window 1.8 - Tamlin
addtext name 1 4 %ansi( bold, green)Name: %ansi( white)@name
addtext level 2 4 %ansi( bold, green)Level: %ansi( white)@clevel/@tlevel %ansi( bold, green)Kills: %ansi( white)@tnl @apktnl
addtext race 3 4 %ansi( bold, green)Race: %ansi( white)@race %ansi( bold, green)Gender: %ansi( white)@gender
addtext hp 5 2 %ansi( white)HP:@barbighp {@prompt.hpc}
addtext sp 6 2 %ansi( white)SP:@barbigsp {@prompt.spc}
addtext st 7 2 %ansi( white)ST:@barbigst {@prompt.stc}
addtext exp 8 2 %ansi( white)XP:@barbigxp
addtext quest 10 4 %ansi( bold, green)QPoints: %ansi( white)@QP %ansi( bold, green)Complete: %ansi( white)@questsdone
addtext qtimer 11 4 %ansi( bold, green)Time --~> %ansi( white)%if( %tick=-1, "idle", %eval( %tick/60) :%if( %mod( %tick, 60)<10, "0", "")%mod( %tick, 60)) %ansi( bold, green)Available -~> %ansi( white)%eval( 7-%numitems( @qtimes))
addtext pracinfo 12 4 %ansi( bold, green)Practices: %ansi( white)@practices
addtext accuracy 13 4 %ansi( bold, green)Accuracy: %ansi( white)@accuracy~% %ansi( bold, green)SCC: %ansi( white)@scc~%
addtext today 15 10 %ansi( bold, cyan)Today's Stats
addtext xpgold 17 7 %ansi( bold, green)GP: %ansi( white)@gp_today %ansi( bold, green)XP: %ansi( white)@exp_today
addtext qppr 18 7 %ansi( bold, green)QP: %ansi( white)@qp_today %ansi( bold, green)PR: %ansi( white)@pr_today %ansi( bold, green) AP: %ansi( white)@ap_today
addtext freport 20 2 %ansi( bold, green)1. ~<send freport Form Report~>%ansi( white)FT XP Report~</send~> %ansi( bold, green)2. ~<send tracker Help~>%ansi( white)Tracker Help~</send~>
addtext areport 21 2 %ansi( bold, green)3. ~<send hc Accuracy Report~>%ansi( white)ACC Report~</send~> %ansi( bold, green) 4. ~<send chc ClanHit~>%ansi( white)CT ACC Report~</send~>
addtext archon 22 2 %ansi( bold, green)5. ~<send estimate_tokens Token Estimator~>%ansi( white)Token Estimator~</send~> %ansi( bold, green) 6. ~<send trunk Trunk~>%ansi( white)Trunk~</send~>
addtext sptitle 23 10 %ansi( bold, cyan)Spell Effects
addtext sensel 25 7 %ansi( bold, red)@senl
addtext bless 25 20 %ansi( bold, red)@bls
addtext shield 26 7 %ansi( bold, red)@shl
addtext armor 26 20 %ansi( bold, red)@arm
addtext levi 27 7 %ansi( bold, red)@lev
addtext enstr 27 20 %ansi( bold, red)@enh
addtext haste 28 7 %ansi( bold, red)@qui
addtext sshield 28 20 %ansi( bold, red)@man
addtext passdoor 29 7 %ansi( bold, red)@pdoor
addtext proevil 29 20 %ansi( bold, red)@proe
addtext ubreath 30 7 %ansi( bold, red)@bre
addtext progood 30 20 %ansi( bold, red)@pro
addtext shadow 31 7 %ansi( bold, red)@sha
addtext infra 31 20 %ansi( bold, red)@inf
addtext fshield 32 7 %ansi( bold, red)@fir
addtext deta 32 20 %ansi( bold, red)@dea
addtext detm 33 7 %ansi( bold, red)@dem
addtext invis 33 20 %ansi( bold, red)@invis
addtext impiv 34 7 %ansi( bold, red)@impiv
addtext deti 34 20 %ansi( bold, red)@dei
addtext sanc 35 7 %ansi( bold, red)@sanc
addtext stone 35 20 %ansi( bold, red)@stn
addtext badinfo 37 10 %ansi( bold, cyan)Bad Affects
addtext weak 39 7 %ansi( bold, red)@weak
addtext slow 39 20 %ansi( bold, red)@root
addtext silent 40 7 %ansi( bold, red)@phan
addtext webbed 40 20 %ansi( bold, red)@web
addtext curse 41 7 %ansi( bold, red)@crs
addtext plague 41 20 %ansi( bold, red)@plague
addtext blind 42 7 %ansi( bold, red)@bli
addtext poison 42 20 %ansi( bold, red)@poison
addtext gold 46 4 %ansi( bold, green)Bank: %ansi( white)@gp_total %ansi( bold, green)On Hand: %ansi( white)@gp_handy
addtext copyright 48 4 %ansi( bold, Yellow)Status Window 1.8 - Tamlin
gold
score
aff
quest status
allreset


Default found variable
Code:

#VAR FOUND 0


STATUS ELEMENTS VARIABLE MUST BE STRING LIST TYPE (%vartype (STATUSELEMENTS,4) i think is the right command.
Code:

ID=name|Row=1|Column=4|(Content=[0;32;40;1mName: [0;57;40mbob|IDlevel)|Row=2|Column=4|(Content=[0;32;40;1mLevel: [0;57;40m/ [0;32;40;1mKills: [0;57;40m |IDrace)|Row=3|Column=4|(Content=[0;32;40;1mRace: [0;57;40mgnome [0;32;40;1mGender: [0;57;40mmale|IDhp)|Row=5|Column=2|(Content=[0;57;40mHP: .hpc|IDsp)|Row=6|Column=2|(Content=[0;57;40mSP: .spc|IDst)|Row=7|Column=2|(Content=[0;57;40mST: .stc|IDexp)|Row=8|Column=2|(Content=[0;57;40mXP:|IDquest)|Row=10|Column=4|(Content=[0;32;40;1mQPoints: [0;57;40m [0;32;40;1mComplete: [0;57;40m|IDqtimer)|Row=11|Column=4|(Content=[0;32;40;1mTime --> [0;57;40m0 :00 [0;32;40;1mAvailable -> [0;57;40m7|IDpracinfo)|Row=12|Column=4|(Content=[0;32;40;1mPractices: [0;57;40m|IDaccuracy)|Row=13|Column=4|(Content=[0;32;40;1mAccuracy: [0;57;40m% [0;32;40;1mSCC: [0;57;40m%|IDtoday)|Row=15|Column=10|(Content=[0;36;40;1mToday's Stats|IDxpgold)|Row=17|Column=7|(Content=[0;32;40;1mGP: [0;57;40m [0;32;40;1mXP: [0;57;40m|IDqppr)|Row=18|Column=7|(Content=[0;32;40;1mQP: [0;57;40m [0;32;40;1mPR: [0;57;40m [0;32;40;1m AP: [0;57;40m|IDfreport)|Row=20|Column=2|(Content=[0;32;40;1m1<send freport Form Report>[0;57;40mFT XP Report</send> [0;32;40;1m2<send tracker Help>[0;57;40mTracker Help</send>|IDareport)|Row=21|Column=2|(Content=[0;32;40;1m3<send hc Accuracy Report>[0;57;40mACC Report</send> [0;32;40;1m 4<send chc ClanHit>[0;57;40mCT ACC Report</send>|IDarchon)|Row=22|Column=2|(Content=[0;32;40;1m5<send estimate_tokens Token Estimator>[0;57;40mToken Estimator</send> [0;32;40;1m 6<send trunk Trunk>[0;57;40mTrunk</send>|IDsptitle)|Row=23|Column=10|(Content=[0;36;40;1mSpell Effects|IDsensel)|Row=25|Column=7|(Content=[0;31;40;1m|IDbless)|Row=25|Column=20|(Content=[0;31;40;1m|IDshield)|Row=26|Column=7|(Content=[0;31;40;1m|IDarmor)|Row=26|Column=20|(Content=[0;31;40;1m|IDlevi)|Row=27|Column=7|(Content=[0;31;40;1m|IDenstr)|Row=27|Column=20|(Content=[0;31;40;1m|IDhaste)|Row=28|Column=7|(Content=[0;31;40;1m|IDsshield)|Row=28|Column=20|(Content=[0;31;40;1m|IDpassdoor)|Row=29|Column=7|(Content=[0;31;40;1m|IDproevil)|Row=29|Column=20|(Content=[0;31;40;1m|IDubreath)|Row=30|Column=7|(Content=[0;31;40;1m|IDprogood)|Row=30|Column=20|(Content=[0;31;40;1m|IDshadow)|Row=31|Column=7|(Content=[0;31;40;1m|IDinfra)|Row=31|Column=20|(Content=[0;31;40;1m|IDfshield)|Row=32|Column=7|(Content=[0;31;40;1m|IDdeta)|Row=32|Column=20|(Content=[0;31;40;1m|IDdetm)|Row=33|Column=7|(Content=[0;31;40;1m|IDinvis)|Row=33|Column=20|(Content=[0;31;40;1m|IDimpiv)|Row=34|Column=7|(Content=[0;31;40;1m|IDdeti)|Row=34|Column=20|(Content=[0;31;40;1m|IDsanc)|Row=35|Column=7|(Content=[0;31;40;1m|IDstone)|Row=35|Column=20|(Content=[0;31;40;1m|IDbadinfo)|Row=37|Column=10|(Content=[0;36;40;1mBad Affects|IDweak)|Row=39|Column=7|(Content=[0;31;40;1m|IDslow)|Row=39|Column=20|(Content=[0;31;40;1m|IDsilent)|Row=40|Column=7|(Content=[0;31;40;1m|IDwebbed)|Row=40|Column=20|(Content=[0;31;40;1m|IDcurse)|Row=41|Column=7|(Content=[0;31;40;1m|IDplague)|Row=41|Column=20|(Content=[0;31;40;1m|IDblind)|Row=42|Column=7|(Content=[0;31;40;1m|IDpoison)|Row=42|Column=20|(Content=[0;31;40;1m|IDgold)|Row=46|Column=4|(Content=[0;32;40;1mBank: [0;57;40m [0;32;40;1mOn Hand: [0;57;40m|IDcopyright)|Row=48|Column=4|Content=[0;53;40;1mStatus Window 1.8 - Tamlin


TEMP OUTPUT VARIABLE IS WHATS USED FOR STATUS WINDOW NOT WORKING QUITE RIGHT BUT DISPLAYS JUST NOT HOW I NEED IT TOO AS IT WONT UPDATE

Code:

Name: bobLevel: / Kills:  Race: gnome Gender: maleHP: .hpcSP: .spcST: .stcXP:QPoints:  Complete: Time --> 0 :00 Available -> 7Practices: Accuracy: % SCC: %Today's StatsGP:  XP: QP:  PR:   AP: 1<send freport Form Report>FT XP Report</send> 2<send tracker Help>Tracker Help</send>3<send hc Accuracy Report>ACC Report</send>  4<send chc ClanHit>CT ACC Report</send>5<send estimate_tokens Token Estimator>Token Estimator</send>  6<send trunk Trunk>Trunk</send>Spell EffectsBad AffectsBank:  On Hand: Status Window 1.8 - Tamlin


STATUS WINDOW CODE(Named tracker) - Display in window only
This is where my current problem is it should have the same stuff in it as the TEMPOUTPUT Variable but doing #STW {%expand(@tempoutput)} isnt working quite right as its actually putting that in the window. It shows but wont update cause the variables arent in the status window. I have to find a way for the #STW command to use whats in the variable instead.

Code:

%expand(@TempOutput,1)


Last edited by edb6377 on Wed Jun 14, 2006 5:16 am; edited 2 times in total
Reply with quote
edb6377
Magician


Joined: 29 Nov 2005
Posts: 482

PostPosted: Wed Jun 14, 2006 3:14 am   
 
Current Problems - I have had to make a lot of work around and chances are ill have to go back and fix things as syntax is learned.

Quote:

1.) Cant Call a Recalculate ALIAS - Already worked around by sticking the alias inside add and remove text aliases
2.) "%-4" didnt work right so i had to change it to %4 or %-4 for it to display thats why you see escape codes instead of %ANSI surrounding it by " when doing addtext name 1 4 "%ansi(green) NAME:" for example didnt work for some reason the STW wouldnt process it but if i type it manually it does.. weird.
3.) STATUS WINDOW TEXT IS %EXPAND instead of what is in the variable. <-- my biggest problem as i think i have the rest licked with some cleanup coding.
4.) Status window wont refresh (It will if i force a recalculation of the script) However when a variable changes id have to recalculate because they variable names arent in the STW
5.) CORRECTION STATUS WINDOW DOES UPDATE IF THE CODE IS PLACED DIRECTLY INTO THE STW. putting @HP in the status window value and then changing the Variable does update properly


There are more but im a bit brain fried atm
Reply with quote
edb6377
Magician


Joined: 29 Nov 2005
Posts: 482

PostPosted: Wed Jun 14, 2006 5:11 am   
 
this script executes fine the only real problem i have is that its not doing the #STW correctly

#STW {%expand(@TempOutput,1)} {Extender} {Tracker}

doesnt put the value of the variable @tempoutput into the status window it puts %expand(@tempoutput,1) in there instead and thats the problem im having with refreshing

The rest of it is working ok. The temp output variable originally showed the %ansi(blah blah) and worked fine as well but also didnt enter the status window properly. Every subsequent error has been a result of attempting to work around that problem and figure out another way to get that value into the status window value.

the only other thing i would prefer is being able to call my recalculate alias without having to stick it into the additem rem item scripts as there are times users need to type that manually.
_________________
Confucious say "Bugs in Programs need Hammer"
Reply with quote
edb6377
Magician


Joined: 29 Nov 2005
Posts: 482

PostPosted: Thu Mar 15, 2007 12:29 pm   
 
I will be adding the updated version shortly Its working great now.
_________________
Confucious say "Bugs in Programs need Hammer"
Reply with quote
Tech
GURU


Joined: 18 Oct 2000
Posts: 2733
Location: Atlanta, USA

PostPosted: Thu Mar 15, 2007 4:31 pm   
 
I think this is code to that awesome status window you had but I think it would be useful if you spoke more generally about what this code is supposed to do and a sample of the end result.
_________________
Asati di tempari!
Reply with quote
edb6377
Magician


Joined: 29 Nov 2005
Posts: 482

PostPosted: Sat Mar 17, 2007 3:32 pm   
 
Yeah you are correct its for the status window incorporating a few of charbals tricks along with a few of my own. I will post examples of everything once i have it working exactly as it should.
_________________
Confucious say "Bugs in Programs need Hammer"
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD Beta Forum 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