[Home] [Downloads] [Search] [Help/forum]

Gammon Forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  Jscript
. . -> [Subject]  need help converting an existing script for one mud to a script for another
Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?

need help converting an existing script for one mud to a script for another

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page


Posted by Morlock   (12 posts)  [Biography] bio
Date Fri 11 Jan 2008 11:44 PM (UTC)
Message
hi all


so what im trying to do here is convert an item identify script that is already made for medievia by thaeldan to an item identify script for exile

now as im sure you all have heard on these boards before and are probably tired of hearing is that i pretty much have no clue at all how to do any scripts

so i will be giving as much information as possible to make this as easy as possible for anyone who wouldnt mind helping me out

i'm not sure how many lines the forum supports so what ill do is first paste in here a copy of thaeldans script on this first post
then ill copy what i currently have for my script with the few changes i was able to make myself on the next post
then on the third and last post ill show examples of what the identify spell looks like for each of the muds and the output it gives i will also have an example of an output from a different mudclient to show what i would like the output to look like

sigh looks like the script is too big even for one post so i apoligize in advance that this is going to take multiple replies on this post to get it all in
[Go to top] top

Posted by Morlock   (12 posts)  [Biography] bio
Date Reply #1 on Fri 11 Jan 2008 11:46 PM (UTC)
Message

so first off heres thaeldans script for medievia:

function SetupID(aliasname, aliasline, wildcardsVB) {
world.Note("Installing [Item ID]");
world.AddTrigger("id_affects", "^ ([+|-].+) to (.+)", "", 1059, -1, 0, "", "ProcessID");
world.AddTrigger("id_acapply", "^AC-apply of ([0-9\\-]+)", "", 1059, -1, 0, "", "ProcessID");
world.AddTrigger("id_attributes", "^Attributes: (.+)", "", 1059, -1, 0, "", "ProcessID");
world.AddTrigger("id_class", "^Class Restrictions: (.+)", "", 1059, -1, 0, "", "ProcessID");
world.AddTrigger("id_dice", "^Damage Dice of (.+)d(.+)", "", 1059, -1, 0, "", "ProcessID");
world.AddTrigger("id_days", "^Days Left: (.+)", "", 1059, -1, 0, "", "ProcessID");
world.AddTrigger("id_equip", "^Equipable Location\\(s\\): TAKE (.+)", "", 1059, -1, 0, "", "ProcessID");
world.AddTrigger("id_egg", "It is surrounded by a (.+) aura.", "", 1059, -1, 0, "", "ProcessID");
world.AddTrigger("id_spell1", "^Level (.+) spell of (.+). Holds (.+) charges and has (.+) charges left.", "", 1059, -1, 0, "", "ProcessID");
world.AddTrigger("id_spell2", "^Level (.+) spells of (.+)", "", 1059, -1, 0, "", "ProcessID");
world.AddTrigger("id_level", "Level Restriction: (.+)", "", 1059, -1, 0, "", "ProcessID");
world.AddTrigger("id_name", "^Object: (.+) \\[", "", 1059, -1, 0, "", "ProcessID");
world.AddTrigger("id_condition1", "The life of this object is clearly coming to an end soon.", "", 1059, -1, 0, "", "ProcessID");
world.AddTrigger("id_condition2", "The object appears to be in excellent condition.", "", 1059, -1, 0, "", "ProcessID");
world.AddTrigger("id_condition3", "The object appears to be in fair condition.", "", 1059, -1, 0, "", "ProcessID");
world.AddTrigger("id_condition4", "The object appears to be in good condition.", "", 1059, -1, 0, "", "ProcessID");
world.AddTrigger("id_condition5", "The object appears to be in perfect pristine condition.", "", 1059, -1, 0, "", "ProcessID");
world.AddTrigger("id_condition6", "The object clearly shows major signs of wear and tear.", "", 1059, -1, 0, "", "ProcessID");
world.AddTrigger("id_condition7", "The object is in fair condition but has some scratches.", "", 1059, -1, 0, "", "ProcessID");
world.AddTrigger("id_condition8", "The object is visibly crumbling and decaying....", "", 1059, -1, 0, "", "ProcessID");
world.AddTrigger("id_condition9", "The object is visibly worn down with major wear.", "", 1059, -1, 0, "", "ProcessID");
world.AddTrigger("id_condition-1", "The object looks as if it will fall apart any day now.", "", 1059, -1, 0, "", "ProcessID");
world.AddTrigger("id_condition11", "This object has been blessed by the Gods and seems indestructable.", "", 1059, -1, 0, "", "ProcessID");
world.AddTrigger("id_multislot", "^MultiSlot Item: (.+)", "", 1059, -1, 0, "", "ProcessID");
world.AddTrigger("id_regen", "Regenerates level ([0-9]+) spell of (.+). Has ([0-9]+) maximum charges.", "", 1059, -1, 0, "", "ProcessID");
world.AddTrigger("id_effects", "^Item Type: (.+) Effects: (.+)", "", 1059, -1, 0, "", "ProcessID");
world.AddTrigger("id_initialize", "^Your divination is complete...", "", 1059, -1, 0, "", "InitID");
world.AddAlias("id_doid", "^(\\w+)id\\s*(.*)", "", 1153, "DisplayID");
world.Note("Done!");
}

function InitID(trigname, trigline, wildcardsVB) {
world.SetVariable("id_Affects", "");
world.SetVariable("id_AC", "");
world.SetVariable("id_Attr", "");
world.SetVariable("id_Dice", "");
world.SetVariable("id_Days", "");
world.SetVariable("id_Equip", "");
world.SetVariable("id_Egg", "");
world.SetVariable("id_Spell", "");
world.SetVariable("id_Level", "");
world.SetVariable("id_Name", "");
world.SetVariable("id_Condition", "");
world.SetVariable("id_MultiSlot", "");
world.SetVariable("id_Regen", "");
world.SetVariable("id_Effects", "");
}
[Go to top] top

Posted by Morlock   (12 posts)  [Biography] bio
Date Reply #2 on Fri 11 Jan 2008 11:47 PM (UTC)
Message
function ProcessID(trigname, trigline, wildcardsVB) {
wildcards = new VBArray(wildcardsVB).toArray();

if (trigname.substr(0, 3) == "id_") {
switch(trigname.substr(3)) {
default:world.note("No match.");
case "affects":world.SetVariable("id_Affects", world.GetVariable("id_Affects") + " " + trim(wildcards[1]).toLowerCase() + "(" + trim(wildcards[0]) + ")");break;
case "acapply":world.SetVariable("id_AC", "AC-ap(" + trim(wildcards[0]) + ")");break;
case "attributes":world.SetVariable("id_Attr", trim(wildcards[0]));break;
case "class":world.SetVariable("id_Attr", trim(wildcards[0]));break;
case "dice":world.SetVariable("id_Dice", trim(wildcards[0]) + "d" + trim(wildcards[1]));break;
case "days":world.SetVariable("id_Days", "Days(" + trim(wildcards[0]) + ")");break;
case "equip":world.SetVariable("id_Equip", "Loc(" + trim(wildcards[0]).toLowerCase() + ")");break;
case "egg":switch (trim(wildcards[0])) {case "bright, green":world.SetVariable("id_Egg", "1-5");break;case "faint, green":world.SetVariable("id_Egg", "6-10");break;case "flickering green":world.SetVariable("id_Egg", "11");break;case "black":world.SetVariable("id_Egg", "*12*");break;};break;
case "spell1":world.SetVariable("id_Spell", "Spell(" + trim(wildcards[3]) + "x Lev " + trim(wildcards[0]) + " " + trim(wildcards[1]) + ")");break;
case "spell2":world.SetVariable("id_Spell", "Spell(Lev " + trim(wildcards[0]) + " " + trim(wildcards[1]) + ")");break;
case "level":world.SetVariable("id_Level", trim(wildcards[0]));break;
case "name":world.SetVariable("id_Name", trim(wildcards[0]));break;
case "condition1":world.SetVariable("id_Condition", "ending");break;
case "condition2":world.SetVariable("id_Condition", "excellent");break;
case "condition3":world.SetVariable("id_Condition", "fair");break;
case "condition4":world.SetVariable("id_Condition", "good");break;
case "condition5":world.SetVariable("id_Condition", "pristine");break;
case "condition6":world.SetVariable("id_Condition", "major wear");break;
case "condition7":world.SetVariable("id_Condition", "scratches");break;
case "condition8":world.SetVariable("id_Condition", "detted");break;
case "condition9":world.SetVariable("id_Condition", "worn down");break;
case "condition10":world.SetVariable("id_Condition", "any day");break;
case "condition11":world.SetVariable("id_Condition", "indestructable");break;
case "multislot":world.SetVariable("id_MultiSlot", "MultiSlot(" + trim(wildcards[0]).toLowerCase() + ")");break;
case "regen":world.SetVariable("id_Regen", "Regen(" + trim(wildcards[2]) + "x Lev " + trim(wildcards[0]) + " " + trim(wildcards[1]) + ")");break;
case "effects":world.SetVariable("id_Effects", trim(wildcards[1]));break;
}
}
}

function DisplayID(aliasname, aliasline, wildcardsVB) {
wildcards = new VBArray(wildcardsVB).toArray();

BuildBriefID();
prefix = trim(wildcards[0]).toLowerCase();
suffix = trim(wildcards[1]);
var pub = new Array("say", "shout", "gossip", "clan", "king", "f", "s", "cl", "imm", "town", "to", "emote", "emot", "em");
var priv = new Array("t", "tell", "tel", "whisper", "w", "whis", "talk", "tal", "ta");
var local = new Array("show", "echo");
var note = new Array("write", "note");
var helpid = "IDScript for Medievia\n";helpid+=
"-------------------------------------------------\n";helpid+=
"DESCRIPTION:\n";helpid+=
" Provides quick access to last item identified, aswell as methods for showing stats locally or sending to various channels on the MUD.\n";helpid+=
"\n";helpid+=
"SYNTAX:\n";helpid+=
" <channel>id [recipient]\n";helpid+=
"\n";helpid+=
"EXAMPLES:\n";helpid+=
" echoid - Will display last id locally.\n";helpid+=
" sayid - Will 'say' last id to MUD.\n";helpid+=
" clanid - Will 'clansay' last id to MUD.\n";helpid+=
" clid - Same as above, many abbreviations for each channel. (See list below)\n";helpid+=
" tellid vryce - Will 'tell Vryce' last id.\n";helpid+=
"\n";helpid+=
"ABBREVIATIONS:\n";helpid+=
" NOTE: Abbreviations are user-modifiable, but should only be tampered with by experienced JavaScript programmers.\n";helpid+=
"\n";helpid+=
pub.join(", ") + priv.join(", ") + local.join(", ")

match = false;
for (i = 0; i <= pub.length;i++) {
if (prefix == pub[i]) {
world.send(prefix + " " + world.GetVariable("BriefID"));
match = true;
break;
}
[Go to top] top

Posted by Morlock   (12 posts)  [Biography] bio
Date Reply #3 on Fri 11 Jan 2008 11:47 PM (UTC)
Message
}

for (i = 0; i <= priv.length;i++) {
if (prefix == priv[i]) {
if (suffix != "") {
world.send(prefix + " " + suffix + " " + world.GetVariable("BriefID"));
match = true;
}
break;
}
}

for (i = 0; i <= local.length;i++) {
if (prefix == local[i]) {
world.note(world.GetVariable("BriefID"));
match = true;
break;
}
}

for (i = 0; i <= note.length;i++) {
if (prefix == note[i]) {
world.AppendToNotepad("Equipment Database", world.GetVariable("BriefID") + "\r\n");
match = true;
break;
}
}

if ((prefix.indexOf("help") > -1) || (prefix == "")) {
world.note(helpid);
match = true;
}
if (!match) {
world.send(wildcards[9]);
}
}

function BuildBriefID() {
TempID = world.GetVariable("id_Name") + ":";
TempID += (world.GetVariable("id_Level") > 0) ? " Lev(" + world.GetVariable("id_Level") + ")" : ""
TempID += " " + world.GetVariable("id_Equip");
TempID += (world.GetVariable("id_MultiSlot")) ? " " + world.GetVariable("id_MultiSlot") : ""
TempID += (world.GetVariable("id_AC")) ? " " + world.GetVariable("id_AC") : ""
TempID += (world.GetVariable("id_Spell")) ? " " + world.GetVariable("id_Spell") : ""
TempID += (world.GetVariable("id_Regen")) ? " " + world.GetVariable("id_Regen") : ""
TempID += (world.GetVariable("id_Affects")) ? " " + trim(world.GetVariable("id_Affects")) : ""
TempID += (world.GetVariable("id_Attr")) ? " " + world.GetVariable("id_Attr") : ""
TempID += (world.GetVariable("id_Dice")) ? " " + world.GetVariable("id_Dice") : ""
FindItemAlign();
TempID += (world.GetVariable("id_Align")) ? " " + world.GetVariable("id_Align") : ""
TempID += " Cond(" + world.GetVariable("id_Condition");
TempID += (world.GetVariable("id_Egg")) ? " - " + world.GetVariable("id_Egg") + ")" : ")";
TempID += " " + world.GetVariable("id_Days");

TempID = TempID.replace(/hitroll/ig,'hr')
TempID = TempID.replace(/damroll/ig,'dr')
TempID = TempID.replace(/hit_points/ig,'hps')
TempID = TempID.replace(/stamina/ig,'sta')
TempID = TempID.replace(/BACKSTABBER/g,'BSER')
TempID = TempID.replace(/DAGGER/g,'DAG')
TempID = TempID.replace(/saving_spell/ig,'ss')
TempID = TempID.replace(/saving_poison/ig,'spoi')
TempID = TempID.replace(/saving_breath/ig,'sbr')
TempID = TempID.replace(/saving_rod/ig,'srod')
TempID = TempID.replace(/long/ig,'LNG')
TempID = TempID.replace(/finger/ig,'fing');
TempID = TempID.replace(/anti_mage/ig,'AM');
TempID = TempID.replace(/anti_cleric/ig,'AC');
TempID = TempID.replace(/anti_thief/ig,'AT');
TempID = TempID.replace(/anti_warrior/ig,'AW');
TempID = TempID.replace(/\(\+/ig, '(');
world.SetVariable("BriefID", trim(TempID));
}

function FindItemAlign() {
var TempAlign = "";
var TempEff = world.GetVariable("id_Effects");
if (TempEff) {
for (i = 0; i < TempEff.length;i++) {
if ((TempEff.substr(i, 1) == "-") && (TempEff.substr(i-2, 2) != "NO")) {
TempAlign += "A" + TempEff.substr(i+1, 1) + " ";
}
}
}
world.SetVariable("id_Align", trim(TempAlign));
}

function trim(str) {
return (str.replace(/^\s+/,'')).replace(/\s+$/,'');
}
[Go to top] top

Posted by Morlock   (12 posts)  [Biography] bio
Date Reply #4 on Fri 11 Jan 2008 11:48 PM (UTC)
Message
now here is the script with my changes:

function SetupID(aliasname, aliasline, wildcardsVB) {
world.Note("Installing [Item ID]");
world.AddTrigger("id_affects", "^ ([+|-].+) to (.+)", "", 1059, -1, 0, "", "ProcessID");
world.AddTrigger("id_attributes", "^Attributes: (.+)", "", 1059, -1, 0, "", "ProcessID");
world.AddTrigger("id_dice", "^Damage Dice is: (.+)d(.+)", "", 1059, -1, 0, "", "ProcessID");
world.AddTrigger("id_class", "^Class Restrictions: (.+)", "", 1059, -1, 0, "", "ProcessID");
world.AddTrigger("id_equip", "Worn: (.+)", "", 1059, -1, 0, "", "ProcessID");
world.AddTrigger("id_level", "Level: (.+)", "", 1059, -1, 0, "", "ProcessID");
world.AddTrigger("id_name", "^Object: (.+) \\[", "", 1059, -1, 0, "", "ProcessID");
world.AddTrigger("id_effects", "^Item is: (.+)", "", 1059, -1, 0, "", "ProcessID");
world.AddTrigger("id_initialize", "^You feel informed:", "", 1059, -1, 0, "", "InitID");
world.AddAlias("id_doid", "^(\\w+)id\\s*(.*)", "", 1153, "DisplayID");
world.Note("Done!");
}

function InitID(trigname, trigline, wildcardsVB) {
world.SetVariable("id_Affects", "");
world.SetVariable("id_Attr", "");
world.SetVariable("id_Dice", "");
world.SetVariable("id_Equip", "");
world.SetVariable("id_Spell", "");
world.SetVariable("id_Level", "");
world.SetVariable("id_Name", "");
world.SetVariable("id_Effects", "");
}

function ProcessID(trigname, trigline, wildcardsVB) {
wildcards = new VBArray(wildcardsVB).toArray();

if (trigname.substr(0, 3) == "id_") {
switch(trigname.substr(3)) {
default:world.note("No match.");
case "affects":world.SetVariable("id_Affects", world.GetVariable("id_Affects") + " " + trim(wildcards[1]).toLowerCase()

+ "(" + trim(wildcards[0]) + ")");break;
case "attributes":world.SetVariable("id_Attr", trim(wildcards[0]));break;
case "class":world.SetVariable("id_Attr", trim(wildcards[0]));break;
case "dice":world.SetVariable("id_Dice", trim(wildcards[0]) + "d" + trim(wildcards[1]));break;
case "equip":world.SetVariable("id_Equip", "worn:(" + trim(wildcards[0]).toLowerCase() + ")");break;
case "level":world.SetVariable("id_Level", trim(wildcards[0]));break;
case "name":world.SetVariable("id_Name", trim(wildcards[0]));break;
case "effects":world.SetVariable("id_Effects", trim(wildcards[1]));break;
}
}
[Go to top] top

Posted by Morlock   (12 posts)  [Biography] bio
Date Reply #5 on Fri 11 Jan 2008 11:48 PM (UTC)
Message
}

function DisplayID(aliasname, aliasline, wildcardsVB) {
wildcards = new VBArray(wildcardsVB).toArray();

BuildBriefID();
prefix = trim(wildcards[0]).toLowerCase();
suffix = trim(wildcards[1]);
var pub = new Array("say", "shout", "gossip", "clan", "king", "f", "s", "cl", "imm", "town", "to", "emote", "emot", "em");
var priv = new Array("t", "tell", "tel", "whisper", "w", "whis", "talk", "tal", "ta");
var local = new Array("show", "echo");
var note = new Array("write", "note");
var helpid = "IDScript for Medievia\n";helpid+=
"-------------------------------------------------\n";helpid+=
"DESCRIPTION:\n";helpid+=
" Provides quick access to last item identified, aswell as methods for showing stats locally or sending to

various channels on the MUD.\n";helpid+=
"\n";helpid+=
"SYNTAX:\n";helpid+=
" <channel>id [recipient]\n";helpid+=
"\n";helpid+=
"EXAMPLES:\n";helpid+=
" echoid - Will display last id locally.\n";helpid+=
" sayid - Will 'say' last id to MUD.\n";helpid+=
" clanid - Will 'clansay' last id to MUD.\n";helpid+=
" clid - Same as above, many abbreviations for each channel. (See list below)\n";helpid+=
" tellid vryce - Will 'tell Vryce' last id.\n";helpid+=
"\n";helpid+=
"ABBREVIATIONS:\n";helpid+=
" NOTE: Abbreviations are user-modifiable, but should only be tampered with by experienced JavaScript

programmers.\n";helpid+=
"\n";helpid+=
pub.join(", ") + priv.join(", ") + local.join(", ")

match = false;
for (i = 0; i <= pub.length;i++) {
if (prefix == pub[i]) {
world.send(prefix + " " + world.GetVariable("BriefID"));
match = true;
break;
}
}

for (i = 0; i <= priv.length;i++) {
if (prefix == priv[i]) {
if (suffix != "") {
world.send(prefix + " " + suffix + " " + world.GetVariable("BriefID"));
match = true;
}
break;
}
}

for (i = 0; i <= local.length;i++) {
if (prefix == local[i]) {
world.note(world.GetVariable("BriefID"));
match = true;
break;
}
}

for (i = 0; i <= note.length;i++) {
if (prefix == note[i]) {
world.AppendToNotepad("Equipment Database", world.GetVariable("BriefID") + "\r\n");
match = true;
break;
}
}

if ((prefix.indexOf("help") > -1) || (prefix == "")) {
world.note(helpid);
match = true;
}
if (!match) {
world.send(wildcards[9]);
}
}
[Go to top] top

Posted by Morlock   (12 posts)  [Biography] bio
Date Reply #6 on Fri 11 Jan 2008 11:49 PM (UTC)
Message
function BuildBriefID() {
TempID = world.GetVariable("id_Name") + ":";
TempID += (world.GetVariable("id_Level") > 0) ? " Lev(" + world.GetVariable("id_Level") + ")" : ""
TempID += " " + world.GetVariable("id_Equip");
TempID += (world.GetVariable("id_Affects")) ? " " + trim(world.GetVariable("id_Affects")) : ""
TempID += (world.GetVariable("id_Attr")) ? " " + world.GetVariable("id_Attr") : ""
TempID += (world.GetVariable("id_Dice")) ? " " + world.GetVariable("id_Dice") : ""
TempID += (world.GetVariable("id_Effects")) ? " " + world.GetVariable("id_Effects") : ""
FindItemAlign();

TempID = TempID.replace(/hitroll/ig,'hr')
TempID = TempID.replace(/damroll/ig,'dr')
TempID = TempID.replace(/hit_points/ig,'hps')
TempID = TempID.replace(/stamina/ig,'sta')
TempID = TempID.replace(/BACKSTABBER/g,'BSER')
TempID = TempID.replace(/DAGGER/g,'DAG')
TempID = TempID.replace(/saving_spell/ig,'ss')
TempID = TempID.replace(/saving_poison/ig,'spoi')
TempID = TempID.replace(/saving_breath/ig,'sbr')
TempID = TempID.replace(/saving_rod/ig,'srod')
TempID = TempID.replace(/long/ig,'LNG')
TempID = TempID.replace(/finger/ig,'fing');
TempID = TempID.replace(/anti-mage/ig,'!MAGE');
TempID = TempID.replace(/anti-cleric/ig,'!CLERIC');
TempID = TempID.replace(/anti-thief/ig,'!THIEF');
TempID = TempID.replace(/anti-warrior/ig,'!WARRIOR');
TempID = TempID.replace(/anti-illusionist/ig,'!ILL');
TempID = TempID.replace(/anti-monk/ig,'!MONK');
TempID = TempID.replace(/anti-nightblade/ig,'!NBL');
TempID = TempID.replace(/anti-ranger/ig,'!RANGER');
TempID = TempID.replace(/\(\+/ig, '(');
world.SetVariable("BriefID", trim(TempID));
}

function FindItemAlign() {
var TempAlign = "";
var TempEff = world.GetVariable("id_Effects");
if (TempEff) {
for (i = 0; i < TempEff.length;i++) {
if ((TempEff.substr(i, 1) == "-") && (TempEff.substr(i-2, 2) != "NO")) {
TempAlign += "A" + TempEff.substr(i+1, 1) + " ";
}
}
}
world.SetVariable("id_Align", trim(TempAlign));
}

function trim(str) {
return (str.replace(/^\s+/,'')).replace(/\s+$/,'');
}

[Go to top] top

Posted by Morlock   (12 posts)  [Biography] bio
Date Reply #7 on Fri 11 Jan 2008 11:50 PM (UTC)
Message
this is an identify from medievia:

Your divination is complete...
Object: an athame [athame dagger]
Item Type: WEAPON Effects: GLOW LOCK BONDS
Equipable Location(s): TAKE WIELD
Weight: 1 Value: 0 Level Restriction: 1 Max Level: 25
Bound To: Yendaleth
The object appears to be in perfect pristine condition.
Days Left: 185
Attributes: ANTI_CLERIC ANTI_THIEF ANTI_WARRIOR DAGGER (BACKSTABBER)
Damage Dice of 1d6
Affects:
+2 to HITROLL
+2 to INT

this is the output on echoid:
an athame: Loc(wield) hr(2) int(2) AC AT AW DAG (BSER) 1d6 Cond(pristine) Days(185)

this is the same kind of item on Exile:

You feel informed:
Object: Spine Seeker Worn: Wield Item type: Weapon
Item is: An Artifact
Weight: 7 Value: 21,750 Level: 38 Size: Universal
Damage Dice is: 10D6, for an average damage of 35.0
Durability: 99% Condition: 94%
Can affect you as :
Affects: Mana by 22
Affects: Hitroll by 15
Affects: Damroll by 14
Affects: Armor Class by -3

this is my current output on echoid:

: worn:(wield item type: weapon) 10D6, for an averagedamage of 35.0


this is the identify and output of using mm2k identify script for exile:

You feel informed:
Object: a rich red robe Worn: About
Item is: Anti-Good
Class Restrictions: Mage Only, Illusionist Only
Weight: 2 Value: 600 Level: 38 Size: Large
Durability: 100% Condition: 100%
Can affect you as :
Affects: Mana by 27
Affects: Armor Class by -3 (-6)
Affects: Save vs Spell by -3


You say, 'a rich red robe: Lev(38) Worn(About) Mana(27) Armor Class(-3 (-6)) Save vs Spell(-3) Sp
ecs(Anti-Good) Class Restrictions(Mage Only, Illusionist Only) Dur 100% Con 100%'



so now to what i need help with:

1.first off between the medievia and exile scripts and identifies why doesnt the name show on the exile output? both muds use Object:(name of item) so this has really been baffling me since they look alike

2.i think one of the major differences between the two is how they put affects on the items

medievia does:
Affects:
+2 to HITROLL
+2 to INT

while exile does:
Can affect you as :
Affects: Mana by 22
Affects: Hitroll by 15
Affects: Damroll by 14
Affects: Armor Class by -3

so my question on this is will it be possible to for on the exile one to take the affects triggering off Can affect you as: then it will grab everything after affects: (like the Mana by 22) and then make it output like mana(27) hitroll(15)Damroll(14) Armor class (-3)
if it is possible could someone try to make that part of the script for me?

and if thats not possible to do it all in one i would imagine it could trigger off the Affects: part and do each affect individually
and if thats the way it has to be done would it need separate ones for each affect? if thats whats needed to do could someone make me the code for one of them and then i think i could just copy it change some parts of it for each affect especially since it would probably take me days to dig up every affect the game has on all the items

3.now i've tried messing around with the level restriction part since its different on each mud med uses Level restriction: so i tried changing the code to be Level: for the exile one but its not working but if you notice on the output using the med script it doesnt show the level either so im wondering if the whole script is missing something

4.as you can see on the items from exile they have durabilty and condition percentages i would need something for them also in the output

i think the questions i put down will give me a good start if someone can help me out with them i really am trying to convert this over myself but i just dont get everything with scripting

and im not counting on it since it will probably take a long time but if anyone is feeling adventurous and has some time on their hands to just make a new script or a plugin which would be even better here is a few other examples of items identified on exile:

You feel informed:
Object: the Nightblade's Belt-Pack Worn: Waist Item type: Bandolier
Class Restrictions: Nightblade Only
Weight: 3 Value: 1,100 Level: 41 Size: Universal
Maximum weight stored: 250
Durability: 95% Condition: 91%
Can affect you as :
Affects: Hit Points by 22
Affects: Mana by 12
Affects: Hitroll by 5
Affects: Damroll by 5
Affects: Armor Class by -3

You utter the words, 'identify', and are drained of 7 mana.
You feel informed:
Object: the eye of a queen Item type: Light
Item is: Not Donatable, Anti-Good, Not Sellable
Class Restrictions: Thief Only, Warrior Only, Nightblade Only, Ranger Only
Weight: 2 Value: 1,100 Level: 41 Size: Small
Hours of light: Infinite
Durability: 97% Condition: 100%
Can affect you as :
Affects: Save vs Spell by -3
Affects: Hitroll by 13

You feel informed:
Object: the Opal of the Dead Item type: Treasure
Weight: 0 Value: 45,000 Level: 61 Size: Universal

You feel informed:
Object: a scroll of encumbrance Item type: Scroll
Weight: 10 Value: 2,800 Level: 39 Size: Tiny
This Scroll casts: blindness curse feeblemind

You feel informed:
Object: a staff of healing Worn: Hold Item type: Staff
Weight: 1 Value: 2,800 Level: 39 Size: Universal
This staff casts: heal
It has 4 maximum charges and 4 remaining.
Durability: 100% Condition: 100%

thanks much for your time and any help would be appreciated
[Go to top] top

Posted by Eyes   USA  (4 posts)  [Biography] bio
Date Reply #8 on Fri 25 Sep 2009 02:07 AM (UTC)
Message
I agree..... this would be fantastic, if only i were smart enough:) Anyone willing to except the challenge?
[Go to top] top

Posted by Nick Gammon   Australia  (21,322 posts)  [Biography] bio   Forum Administrator
Date Reply #9 on Sat 26 Sep 2009 01:21 AM (UTC)
Message
Template:codetag To make your code more readable please use [code] tags as described here.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] 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.


8,132 views.

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at FutureQuest]