$include $lib/alynna $include $lib/rp $include #10713 $def }wc }cat "$avatar" match "!wc #" rot strcat force $def host "sc.scworlds.net" $def port 58472 $def }send }cat host port udpsend pop 0 sleep ( $def }send }cat "UDP Payload: " swap strcat tellhere 0 sleep ) $def }a }cat "X-Zone" pretty tellhere lvar arg : server var target var type var prop var value prog "pmap" remove_prop background 58472 udpopen { "X-Zone: Portal Open." }wc begin { "udp.*" }array event_waitfor pop var! data data @ "data" [] " " split swap tolower var! cmd " " split var! param var! tname cmd @ case "player" smatch when tname @ pmatch not if prog { "pmap/" tname @ }cat tname @ param @ newplayer setprop { tname @ " is coming through the portal as dbref #" prog { "pmap/" tname @ }cat getprop int }wc else { tname @ " skipped, they already exist here." }wc then end "prop" smatch when prog { "pmap/" tname @ }cat getprop dup target ! if param @ ":" split swap type ! ":" split value ! prop ! type @ case "d" smatch when value @ todbref value ! end "i" smatch when value @ toint value ! end "f" smatch when value @ tofloat value ! end "l" smatch when value @ parselock value ! end endcase target @ prop @ value @ setprop then end "flag" smatch when prog { "pmap/" tname @ }cat getprop dup target ! if target @ param @ set then end "account" smatch when prog { "pmap/" tname @ }cat getprop dup target ! if param @ ":" split swap type ! ":" split value ! prop ! type @ case "d" smatch when value @ todbref value ! end "i" smatch when value @ toint value ! end "f" smatch when value @ tofloat value ! end "l" smatch when value @ parselock value ! end endcase target @ prop @ getaccountstat not if target @ prop @ value @ setaccountstat else prop @ tolower "{mako|total refunded|registered characters}" smatch if target @ prop @ over over getaccountstat value @ + setaccountstat then then then end "end" smatch when { "Client signaled that " tname @ " has finished emerging through the portal." }wc prog { "pmap/" tname @ }cat getprop "Traveller" "Welcome to the Other Side." addbadge prog { "pmap/" tname @ }cat getprop "grid" 1 setstat prog { "pmap/" tname @ }cat 0 setprop end endcase repeat ; : propTree[ d:target s:prop -- dict:props ] 0 array_make_dict var! props var value var item var dir target @ prop @ array_get_propvals foreach value ! item ! value @ props @ { prop @ "/" item @ }cat "/" "//" subst ->[] props ! repeat target @ prop @ array_get_propdirs foreach dir ! pop target @ { prop @ "/" dir @ }cat "/" "//" subst propTree foreach value ! item ! value @ props @ item @ "/" "//" subst ->[] props ! repeat repeat props @ ; PUBLIC propTree $libdef propTree : client var targets var password var prop var value var type background arg @ not if { "+xzone/client [=password]|#all -- transfer a character to another server. Unlike FF11, this is free." }tell exit then arg @ "#all" smatch if #-1 "*" "P!W" find_array targets ! else arg @ "=" instr if arg @ "=" split password ! match targets ! else arg @ match targets ! then targets @ not if { "Target to transfer not found." }tell exit else targets @ 1 array_make targets ! then then targets @ foreach var! target pop target @ #1 dbcmp if continue then target @ #21 dbcmp if continue then { "Processing transfer request of " target @ " to " host ":" port " (SC:ToTE)" }tell { "Processing transfer request of " target @ " to " host ":" port " (SC:ToTE)" }wc password @ not if target @ "password" getaccountstat dup not if pop continue then "_" " " subst password ! then { "player " target @ " " password @ }send 0 password ! target @ "B" flag? { "flag " target @ " B" }send target @ "J" flag? { "flag " target @ " J" }send target @ "C" flag? { "flag " target @ " C" }send target @ "/" propTree foreach value ! prop ! value @ case string? when "s" type ! end dbref? when "d" type ! end lock? when "l" type ! end float? when "f" type ! end int? when "i" type ! end endcase { "prop " target @ " " type @ ":" prop @ ":" value @ }send repeat #235 { "/Player Accounts/" target @ "Player Account" getstat "/" }cat array_get_propvals foreach value ! prop ! value @ case string? when "s" type ! end dbref? when "d" type ! end lock? when "l" type ! end float? when "f" type ! end int? when "i" type ! end endcase { "account " target @ " " type @ ":" prop @ ":" value @ }send repeat { "end " target @ " end" }send repeat { "Transfer(s) complete." }wc { "Transfer complete." }tell ; : main arg ! command @ "+xzone/client" smatch if me @ mlevel 5 >= if client exit else { "^RED^Permission denied." }tell exit then then command @ "+xzone" smatch if arg @ not if { "Syntax: +xzone " }tell exit else { me @ "=" arg @ }cat arg ! client exit then then server ;