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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
filthyreg
Beginner


Joined: 14 Oct 2003
Posts: 14
Location: Canada

PostPosted: Thu Jun 03, 2004 5:12 pm   

Item ID script for Medievia
 
I'm looking for an item ID script for Medievia. Does anyone have a working one for the most current version of zMud? I've been working on bringing Carabas' ID script up to date but have had limited success. I'm going to post what I have so far, if anyone can help me out it would be greatly appreciated.

Thanks,

#CLASS {ItemID}
#CLASS 0

#CLASS {ItemID|System}
#CLASS 0

#CLASS {ItemID|System|Aliases}
#ALIAS Reset-ID-Vars {#VARIABLE ObjectName {} {_nodef} {ItemID|System|Variables};#VARIABLE ObjectLoc {} {_nodef}

{ItemID|System|Variables};#VARIABLE ObjectType {} {_nodef} {ItemID|System|Variables};#VARIABLE ObjectLvlRes {0} {_nodef}

{ItemID|System|Variables};#VARIABLE ObjectDice {} {_nodef} {ItemID|System|Variables};#VARIABLE ObjectAffects {} {_nodef}

{ItemID|System|Variables};#VARIABLE ObjectAlignment {} {_nodef} {ItemID|System|Variables};#VARIABLE ObjectWeight {} {_nodef}

{ItemID|System|Variables};#VARIABLE ObjectClass {} {_nodef} {ItemID|System|Variables};#VARIABLE ObjectACapp {0} {_nodef}

{ItemID|System|Variables};#VARIABLE ObjectCond {} {_nodef} {ItemID|System|Variables};#VARIABLE ObjectDays {} {_nodef}

{ItemID|System|Variables};#VARIABLE ObjectEgged {} {_nodef} {ItemID|System|Variables};#VARIABLE ObjectEffects {} {_nodef}

{ItemID|System|Variables};#VARIABLE ObjectMultiSlot {} {_nodef} {ItemID|System|Variables};#VARIABLE ObjectTemp {} {_nodef}

{ItemID|System|Variables}}
#ALIAS BriefID {BriefID = %null;BriefID = {@ansi(White)@ObjectName@ansi(dGrey):};#if (@ObjectLvlRes > 0) {BriefID = {@BriefID

@ansi(bGreen)Lev@ansi(bRed)~(@ansi(bYellow)@ObjectLvlRes@ansi(bRed)~)}};#if (@ObjectType = KEY) {BriefID = {@BriefID

@ansi(bYellow)KEY}};#if (@ObjectType = LIGHT) {ObjectLoc = light};#if (!%null(@ObjectLoc)) {BriefID = {@BriefID

@ansi(bGreen)Loc@ansi(bRed)~(@ansi(bYellow)%lower(%trim(@ObjectLoc))@ansi(bRed)~)}};#if (!%null(@ObjectMultiSlot)) {BriefID =

{@BriefID @ansi(bGreen)MultiSlots@ansi(bRed)~(%lower(%trim(@ObjectMultiSlot))@ansi(bRed)~)}};#if (@ObjectACapp > 0) {BriefID

= {@BriefID @ansi(bGreen)Acapp@ansi(bRed)~(@ObjectACapp@ansi(bRed)~)}};#if (!%null(@ObjectDice)) {BriefID = {@BriefID

@ObjectDice}};#if (!%null(@ObjectAffects)) {BriefID = {@BriefID %replace(@ObjectAffects,|," ")}};#if

(!%null(@ObjectAlignment)) {BriefID = {@BriefID %replace(@ObjectAlignment,|," ")}};#if (!%null(@ObjectClass)) {BriefID =

{@BriefID %replace(@ObjectClass,|," ")}};#if (!%null(@ObjectEffects)) {BriefID = {@BriefID %replace(@ObjectEffects,|,"

")}};BriefID = {@BriefID @ansi(bGreen)Cond@ansi(bRed)~(@ObjectCond};#if (!%null(@ObjectEgged)) {BriefID={@BriefID -

@ObjectEgged}};BriefID={@BriefID@ansi(bRed)~)};BriefID={@BriefID @ansi(bGreen)Days@ansi(bRed)~(@ObjectDays@ansi(bRed)~)}}
#CLASS 0

#CLASS {ItemID|System|Variables}
#VAR ObjectName {an old, gray tattered cloak}
#VAR ItemIDButton {1}
#VAR ObjectLoc {ABOUT}
#VAR ObjectType {WORN}
#VAR ObjectLvlRes {21}
#VAR ObjectDice {}
#VAR ObjectAffects {AGE[+25]|MANA[+32]}
#VAR ObjectAlignment {!G}
#VAR ObjectClass {}
#VAR ObjectACapp {0}
#VAR ObjectCond {pristine}
#VAR ObjectDays {185}
#VAR ObjectEgged {}
#VAR ObjectEffects {}
#VAR ObjectMultiSlot {}
#VAR ObjectTemp {ANTI-GOOD}
#VAR BriefID {the costume: Loc[about] Cond[pristine]

Days[185]}
#VAR ObjectWeight {4}
#VAR ObjectValue {15000}
#CLASS 0

#CLASS {ItemID|System|Triggers}
#TRIGGER {^Your divination is complete...} {#T+ {ID-Body Triggers};Reset-ID-Vars;#TEMP {$} {#T- {ID-Body Triggers}}}
#CLASS 0

#CLASS {ItemID|System|Triggers|ID-Body Triggers}
#TRIGGER {^Object: (%*) ~[*~]} {ObjectName = %1}
#TRIGGER {^Available Weight: (%d) stones} {ObjectWeight = %1}
#TRIGGER {^Item Type: (*)%sEffects: (*)} {ObjectType = %trim(%1);ObjectTemp = %trim(%2);ObjectTemp = %replace(@ObjectTemp,"

",|);#IF (%ismember(ANTI-GOOD,@ObjectTemp)) {#ADDITEM ObjectAlignment {@ansi(bYellow)!@ansi(bGreen)G}};#IF

(%ismember(ANTI-NEUTRAL,@ObjectTemp)) {#ADDITEM ObjectAlignment {@ansi(bYellow)!@ansi(bGreen)N}};#IF

(%ismember(ANTI-EVIL,@ObjectTemp)) {#ADDITEM ObjectAlignment {@ansi(bYellow)!@ansi(bGreen)E}};#IF (%ismember(ATTACK,

@ObjectTemp)) {#ADDITEM ObjectEffects @ansi(bRed)~(@ansi(bYellow)ATTACK@ansi(bRed)~)};#IF (%ismember(INVISIBLE, @ObjectTemp))

{#ADDITEM ObjectEffects @ansi(bRed)~(@ansi(bYellow)INVIS@ansi(bRed)~)}}
#TRIGGER {^Equipable Location~(s~): (*)} {ObjectLoc = %trim(%remove(TAKE,%1))}
#TRIGGER {^Weight: (%d)%sValue: (%d)%sLevel Restriction: (%d)} {ObjectWeight = %trim(%1);ObjectValue = %trim(%2);ObjectLvlRes

= %trim(%3)}
#TRIGGER {^The life of this object is clearly coming to an end soon.} {ObjectCond = {@ansi(bRed)ending}}
#TRIGGER {^The object appears to be in excellent condition.} {ObjectCond = {@ansi(bGreen)excellent}}
#TRIGGER {^The object appears to be in fair condition.} {ObjectCond = {@ansi(bGreen)fair}}
#TRIGGER {^The object appears to be in good condition.} {ObjectCond = {@ansi(bGreen)good}}
#TRIGGER {^The object appears to be in perfect pristine condition.} {ObjectCond = {@ansi(bGreen)pristine}}
#TRIGGER {^The object clearly shows major signs of wear and tear.} {ObjectCond = {@ansi(bYellow)worn}}
#TRIGGER {^The object is in fair condition but has some scratches.} {ObjectCond = {@ansi(bYellow)scratches}}
#TRIGGER {^The object is visibly crumbling and decaying....} {ObjectCond = {@ansi(dRed)crumbling}}
#TRIGGER {^The object is visibly worn down with major wear.} {ObjectCond = {@ansi(bRed)worn down}}
#TRIGGER {^The object looks as if it will fall apart any day now.} {ObjectCond = {@ansi(bRed)any day}}
#TRIGGER {^This object has been blessed by the Gods and seems indestructable.} {ObjectCond = {@ansi(bCyan)indestructable}}
#TRIGGER {^Weight: %d Value: %d Level Restriction: (%d)} {ObjectLvlRes = %1}
#TRIGGER {Days Left: (*)} {ObjectDays = {@ansi(bGreen)%1};#IF (%1 < 120) {ObjectDays = {@ansi(bYellow)%1}};#IF (%1 < 80)

{ObjectDays = {@ansi(bRed)%1}};#IF (%1 < 25) {ObjectDays = {@ansi(dRed)%1}};#IF (%1 = "Infinity") {ObjectDays =

{@ansi(bCyan)%1}}}
#TRIGGER {^Attributes: (*)} {ObjectTemp = %null;ObjectTemp = %trim(%1);ObjectTemp = %replace(@ObjectTemp," ",|);#IF

(%ismember(ANTI_MAGE,@ObjectTemp)) {#ADDITEM ObjectClass {@ansi(bYellow)!@ansi(bGreen)M}};#IF

(%ismember(ANTI_CLERIC,@ObjectTemp)) {#ADDITEM ObjectClass {@ansi(bYellow)!@ansi(bGreen)M}};#IF

(%ismember(ANTI_THIEF,@ObjectTemp)) {#ADDITEM ObjectClass {@ansi(bYellow)!@ansi(bGreen)T}};#IF

(%ismember(ANTI_WARRIOR,@ObjectTemp)) {#ADDITEM ObjectClass {@ansi(bYellow)!@ansi(bGreen)W}};#IF

(%ismember(LONG,@ObjectTemp)) {#ADDITEM ObjectEffects @ansi(bRed)~(@ansi(bYellow)LONG@ansi(bRed)~)};#IF

(%ismember(BACKSTABBER,@ObjectTemp)) {#ADDITEM ObjectEffects @ansi(bRed)~(@ansi(bYellow)BSER@ansi(bRed)~)}}
#TRIGGER {^Damage Dice of (%d)d(%d)} {ObjectDice = {@ansi(bGreen)%1@ansi(bYellow)d@ansi(bGreen)%2}}
#TRIGGER {^ (*) to (*)} {#ADDITEM ObjectAffects

{@ansi(bGreen)%2@ansi(bRed)~(@ansi(bYellow)%1@ansi(bRed)~)};ObjectAffects=%replace(@ObjectAffects,HITROLL,HR);ObjectAffects=%

replace(@ObjectAffects,DAMROLL,DR);ObjectAffects=%replace(@ObjectAffects,SAVING_SPELL,SS);ObjectAffects=%replace(@ObjectAffec

ts,ARMOR,AC);ObjectAffects=%replace(@ObjectAffects,HIT_POINTS,HP)}
#TRIGGER {^MultiSlot Item: (*)} {ObjectMultiSlot = %trim(%1)}
#TRIGGER {Class Restrictions: (*)} {ObjectTemp = %null;ObjectTemp = %trim(%1);ObjectTemp = %replace(@ObjectTemp," ",|);#IF

(%ismember(ANTI_MAGE,@ObjectTemp)) {#ADDITEM ObjectClass {@ansi(bYellow)!@ansi(bGreen)M}};#IF

(%ismember(ANTI_CLERIC,@ObjectTemp)) {#ADDITEM ObjectClass {@ansi(bYellow)!@ansi(bGreen)C}};#IF

(%ismember(ANTI_THIEF,@ObjectTemp)) {#ADDITEM ObjectClass {@ansi(bYellow)!@ansi(bGreen)T}};#IF

(%ismember(ANTI_WARRIOR,@ObjectTemp)) {#ADDITEM ObjectClass {@ansi(bYellow)!@ansi(bGreen)W}}}
#TRIGGER {^It is surrounded by a (*) aura} {ObjectTemp={%1};#IF (@ObjectTemp =~ "bright, green") {ObjectEgged =

{@ansi(bGreen)green aura}};#IF (@ObjectTemp =~ "faint green") {ObjectEgged = {@ansi(dGreen)faint green aura}};#IF

(@ObjectTemp =~ "flickering green") {ObjectEgged =

{@ansi(bGreen)f@ansi(dGreen)l@ansi(bGreen)i@ansi(dGreen)c@ansi(bGreen)k@ansi(dGreen)e@ansi(bGreen)r@ansi(dGreen)i@ansi(bGreen

)n@ansi(dGreen)g@ansi(bGreen) g@ansi(bGreen)r@ansi(dGreen)e@ansi(bGreen)e@ansi(dGreen)n aura}};#IF (@ObjectTemp =~ "black")

{ObjectEgged = {@ansi(dGrey)black aura}}}
#TRIGGER {^Level (%d) spell of (*). Holds (%d) charges and has (%d) charges left.} {ObjectAffects =

{@ansi(bGreen)Spell@ansi(bRed)~(@ansi(bYellow)%4@ansi(bGreen)x @ansi(bYellow)Lev @ansi(bGreen)%1

@ansi(bYellow)%2@ansi(bRed)~)}}
#TRIGGER {^Level (%d) spells of (*)} {ObjectAffects= {@ansi(bGreen)Spell@ansi(bRed)~(@ansi(bYellow)Lev @ansi(bGreen)%1

@ansi(bYellow)%2@ansi(bRed)~)}}
#TRIGGER {AC-apply of (%d)} {ObjectACapp = %1}
#TRIGGER {Regenerates level (%d) (*). Has (%d) maximum charges.}

{ObjectAffects={@ansi(bGreen)Regen@ansi(bRed)~(@ansi(bYellow)%3@ansi(bGreen)x @ansi(bYellow)Lev @ansi(bGreen)%1

@ansi(bYellow)%2@ansi(bRed)~)}}
#CLASS 0

#CLASS {ItemID|Aliases}
#ALIAS chatid {BriefID;#chata @BriefID}
#ALIAS clanid {BriefID;cl %stripansi(@BriefID)}
#ALIAS townid {BriefID;town %stripansi(@BriefID)}
#ALIAS formid {BriefID;ft %stripansi(@BriefID)}
#ALIAS blid {BriefID;bl %stripansi(@BriefID)}
#ALIAS shoutid {BriefID;shout %stripansi(@BriefID)}
#ALIAS telid {BriefID;telepath %1 %stripansi(@BriefID)}
#ALIAS sayid {BriefID;say %stripansi(@BriefID)}
#ALIAS immid {BriefID;imm %stripansi(@BriefID)}
#ALIAS gosid {BriefID;gossip %stripansi(@BriefID)}
#CLASS 0
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD 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