little something

Scripts and support for your favorite MUD client.
amolol
Sojourner
Posts: 688
Joined: Mon Sep 30, 2002 5:01 am

little something

Postby amolol » Sun Jan 18, 2009 5:02 am

#CLASS Requests
#VAR ReqByName {}
#VAR ReqByItem {}
#VAR ReqByPlace {}
#VAR TempReq1 {} {}
#VAR TempReq2 {} {}
#ALIAS showReqN {#LOOPDB @ReqByName {#SHOW {%key: %replace(%val,"---", " from ")}}}
#ALIAS showReqI {#LOOPDB @ReqByItem {#SHOW {%key}; #SHOW requested by: %val}}}
#ALIAS showReqP {#LOOPDB @ReqByPlace {#SHOW %key --- %val}
#ALIAS remReq {
#IF (%word(%db(@ReqByName,%1),1,"---")=%-2) {
TempReq1=%word(%db(@ReqByName,%1),2,"---")
TempReq2=%remove(%concat(%-2,", "),%db(@ReqByPlace,@TempRec1))
#IF (%begins(@TempReq2,",")) {TempReq2=%right(@TempReq2,2)}
#SHOW {Removing %1:%-2 from @TempReq2}
#IF (@TempReq2) {#ADDKEY RecByPlace {@TempReq1} {@TempReq2}} {#DELKEY RecByPlace {@TempReq1}}
TempReq2=%remove(%concat(%-2,"---",@TempReq1),%db(@ReqByName,%1))
#IF (%begins(@TempReq2,",")) {TempReq2=%right(@TempReq2,2)}
#IF (@TempReq2) {#ADDKEY ReqByName {%1} {@TempReq2}} {#DELKEY ReqByName {%1}}
TempReq2=%remove(%1,%db(@ReqByItem,%-2))
#IF (%begins(@TempReq2," ")) {TempReq2=%right(@TempReq2,1)}
#IF (@TempReq2) {#ADDKEY ReqByItem {%-2} {@TempReq2}} {#DELKEY ReqByItem {%-2}}
}
}
#TRIGGER {^(%w) tells you (*) from (*)} {
TempReq2=%concat(%db(@ReqByName,%1),", ",%2,"---",%3)
#IF (%begins(@TempReq2,",")) {TempReq2=%right(@TempReq2,2)}
#ADDKEY ReqByName {%1} {@TempReq2}
TempReq2=%concat(%db(@ReqByPlace,%3),", ",%2)
#IF (%begins(@TempReq2,",")) {TempReq2=%right(@TempReq2,2)}
#ADDKEY ReqByPlace {%3} {@TempReq2}
TempReq2=%concat(%db(@ReqByItem,%2)," ",%1)
#IF (%begins(@TempReq2," ")) {TempReq2=%right(@TempReq2,1)}
#ADDKEY ReqByItem {%2} {@TempReq2}
}
#CLASS 0

ok this is for my guild they are allowed to place item requests and if there is nothing from a zone we need they can check a list of things that other guildies need.... based on name or whats in the glist... thius is what i have but it doesnt work and i dont know why... need help!!!
i dont know what your problem is, but i bet its hard to pronounce

myspace.com/tgchef

Return to “MUD Client Help”

Who is online

Users browsing this forum: No registered users and 1 guest