@program $lib/rps 1 10000 d i ( Pokemon RPsystem ) $include $lib/rp $include $lib/rps2 $include $lib/alynna $include $lib/pokedex $include $muf/cron $def INFORM "PokeRP" pretty tellme $def AVATAR #851 $def MAXVOTES me @ staff? if 256 else 3 then $def ATMAX? target @ "/@rp/xp" getprop toint 10000 >= $def PARANOIA? prog "?" flag? $def VERBOSE? "_prefs/verbose" getprop if 1 else 0 then $def dlev4 dup 100 >= if toint 4 rj else tofloat 1 fchop 4 rj then $def CONDVEC 250 $def puppy { $def kitty }cat var param var target var stat var value var dicestore var dicestore4 $libdef character? : character? ( d -- i ) dup player? swap dup "X" flag? swap dup "Z" flag? swap -3 rotate and swap "@rp/npc?" getstat or or ; PUBLIC character? : iam ( d -- s ) "pokemon" getstatstr ; PUBLIC iam $libdef iam $libdef human? : human? ( d -- i ) dup "pokemorph" getstat toint 0 = swap iam toint not or ; PUBLIC human? $libdef mon? : mon? ( d -- i ) dup "pokemorph" getstat toint 1 = swap iam toint and ; PUBLIC mon? $libdef morph? : morph? ( d -- i ) dup "pokemorph" getstat toint 2 = swap iam toint and ; PUBLIC morph? $libdef meta? : meta? ( d -- i ) dup "pokemorph" getstat toint 3 = swap iam toint and ; PUBLIC meta? $libdef mtype $def NUMMORPHS 4 : mtype ( i -- s ) { "Human" "Pokemon" "Pokemorph" "Metahuman" } array_make swap array_getitem ; : ansi_strcut ( s i -- s1 s2 ) swap dup strlen ( i s i ) swap dup ( i i s s ) 0 unparse_ansi 1 unparse_ansi 2 unparse_ansi 3 unparse_ansi strlen ( i i s i ) 3 pick swap - rot pop ( i s i ) rot ( s i i ) + ( s i ) strcut ; : ansi_strlen ( s -- i ) 0 unparse_ansi 1 unparse_ansi 2 unparse_ansi 3 unparse_ansi strlen ; : xpspent ( d -- i ) var target var xpspentf var stat var value target ! 0.0 xpspentf ! target @ character? if target @ "@rp/a/" array_get_propvals foreach value ! stat ! value @ 625.00 > if target @ "a/" stat @ strcat 625.00 setstat then repeat target @ "@rp/e/" array_get_propvals foreach value ! stat ! value @ 64.00 > if target @ "e/" stat @ strcat 64.00 setstat then repeat target @ "@rp/m/" array_get_propvals foreach value ! stat ! value @ 99.00 > if target @ "m/" stat @ strcat 99.00 setstat then repeat target @ "@rp/p/" array_get_propvals foreach value ! stat ! value @ character? not if target @ "p/" stat @ strcat 0 setstat then repeat target @ "@rp/q/" array_get_propvals foreach value ! stat ! value @ character? not if target @ "q/" stat @ strcat 0 setstat then repeat target @ "@rp/s/" array_get_propvals foreach value ! stat ! value @ 256.00 > if target @ "s/" stat @ strcat 256.00 setstat then repeat target @ "@rp/t/" array_get_propvals foreach value ! stat ! value @ 100.00 > if target @ "t/" stat @ strcat 100.00 setstat then repeat target @ "@rp/t/" array_get_propvals foreach value ! stat ! value @ -100.0 < if target @ "t/" stat @ strcat -100.0 setstat then repeat then target @ "@rp/a/" array_get_propvals foreach value ! stat ! value @ xpspentf @ + xpspentf ! repeat target @ "@rp/e/" array_get_propvals foreach value ! stat ! value @ xpspentf @ + xpspentf ! repeat target @ "@rp/i/" array_get_propvals foreach value ! stat ! value @ xpspentf @ + xpspentf ! repeat target @ "xpspent" xpspentf @ setstat xpspentf @ ; PUBLIC xpspent $libdef xpspent : nd6 ( i/f -- i ) var temp var neg dup 0 < if 1 neg ! else 0 neg ! then dup float? if int then abs temp ! temp @ not if 0 exit then 0 begin temp @ while random 6 % 1 + + temp @ 1 - temp ! repeat neg @ if 0 swap - then ; PUBLIC nd6 $libdef nd6 : nd4 ( i/f -- i ) var temp var neg dup 0 < if 1 neg ! else 0 neg ! then dup float? if int then abs temp ! temp @ not if 0 exit then 0 begin temp @ while random 4 % 1 + + temp @ 1 - temp ! repeat neg @ if 0 swap - then ; PUBLIC nd4 $libdef nd4 : successlevel ( i/f -- s ) toint dup 5 <= if pop "Unskilled" exit then dup 10 <= if pop "Barely touched" exit then dup 15 <= if pop "Glancing" exit then dup 25 <= if pop "Beginner" exit then dup 35 <= if pop "Novice" exit then dup 45 <= if pop "Average" exit then dup 60 <= if pop "Notable" exit then dup 80 <= if pop "Above-average" exit then dup 100 <= if pop "Skilled" exit then dup 150 <= if pop "Gifted" exit then dup 200 <= if pop "Reknown" exit then dup 300 <= if pop "Heroic" exit then dup 450 <= if pop "Master" exit then dup 700 <= if pop "Legendary" exit then dup 1000 <= if pop "Unbelievable" exit then dup 1500 <= if pop "Ultimate" exit then 2000 > if pop "Godlike (Please contact staff)" exit then ; PUBLIC successlevel $libdef successlevel $libdef fmt76 : fmt76 ( s -- s ) "|" swap strcat " " dup strcat dup strcat dup strcat strcat 77 ansi_strcut pop "|" strcat ; PUBLIC fmt76 $libdef fmt76 : level ( i/f -- f ) var technic tofloat technic ! technic @ 0 >= if technic @ sqrt else 0 technic @ fabs sqrt - then ; PUBLIC level $libdef level : level2xp ( i/f -- f ) var technic tofloat technic ! (L 1) (technic @ 1.0 < if 1.0 exit then) technic @ 0 >= if technic @ dup * else 0 technic @ fabs dup * - then ; PUBLIC level2xp $libdef level2xp : maxhp ( d -- i ) var target target ! target @ "xp" getstatint level target @ "s/Max-HP" getstatint level + toint 8 * target @ "t/Max-HP" getstatint + target @ exit? target @ "@rp/npc?" getprop not and if pop 250 then target @ room? target @ "@rp/npc?" getprop not and if pop 999 then target @ program? target @ "@rp/npc?" getprop not and if pop 999 then target @ thing? target @ character? not and if pop 500 then ; PUBLIC maxhp : isfainted? ( d -- i ) var target target ! target @ "hp" getstatint 0 <= if target @ "hp" 0 setstat target @ exit? target @ "@rp/npc?" getprop not and if target @ "hp" target @ maxhp setstat { target @ " has fainted!!!" }cat "PokeBattle" pretty tellhere then target @ room? target @ "@rp/npc?" getprop not and if target @ "hp" target @ maxhp setstat { target @ " has fainted!!!" }cat "PokeBattle" pretty tellhere then target @ program? target @ "@rp/npc?" getprop not and if target @ "hp" target @ maxhp setstat { target @ " has fainted!!!" }cat "PokeBattle" pretty tellhere then target @ thing? target @ character? not and if target @ "hp" target @ maxhp setstat { target @ " has fainted!!!" }cat "PokeBattle" pretty tellhere then target @ "status" 9 setstat 1 exit then 0 ; PUBLIC isfainted? : adjusthp ( d i -- ) var target var amount amount ! target ! target @ "hp" over over getstat amount @ + 0 target @ maxhp limit setstat target @ isfainted? pop ; PUBLIC adjusthp : attackok? ( d s -- i ) var target var tlev var ttype var item item ! target ! target @ "xp" getstatint level tlev ! target @ "pokemorph" getstatint ttype ! ttype @ case 0 = when item @ "/attacks/mExcept/Human" getdex "{" swap "}" strcat strcat smatch if 1 exit then end 1 = when item @ "/attacks/mExcept/Pokemon" getdex "{" swap "}" strcat strcat smatch if 1 exit then end 2 = when item @ "/attacks/mExcept/Pokemorph" getdex "{" swap "}" strcat strcat smatch if 1 exit then end 3 = when item @ "/attacks/mExcept/Metahuman" getdex "{" swap "}" strcat strcat smatch if 1 exit then end endcase { "/pokemon/" target @ iam "/attacks/" item @ }cat getdex if tlev @ { "/pokemon/" target @ iam "/attacks/" item @ }cat getdex toint >= if 1 else 0 then else 0 then ; PUBLIC attackok? : tmhmok? ( d s -- i ) var target var item var ttype item ! target ! { "/pokemon/" target @ iam "/tmhm" }cat getdex if item @ { "{" "/pokemon/" target @ iam "/tmhm" item @ }cat getdex "|" ":" subst "}" smatch if 1 else 0 then else 0 then ; PUBLIC tmhmok? : itemok? ( s -- i ) var target var item var ttype item ! { "/pokemon/" item @ "/desc" }cat getdex if 1 else 0 then ; PUBLIC itemok? : cost ( d s -- f ) getstatfloat level toint dup 100 = if 0 else 2.0 swap 1.0 + pow then ; PUBLIC cost : init param @ "RESET" strcmp not if AVATAR { "@set *" me @ "=@rp:" }cat force AVATAR { "wc " me @ " reset their sheet using " command @ " " param @ "!" }cat force "Thy sheet hath been cleared." INFORM me @ "xp" 100 setstat me @ "hp" 33 setstat me @ "yen" 100 setstat me @ "votes" 25 setstat "At chargen: 25 votes, 100xp, 100 yen, 30hp to start, you may start buying specials with +buy." INFORM else { "To reset your sheet, use " command @ " RESET" }cat INFORM then ; : init-partial param @ "RESET" strcmp not if AVATAR { "@set *" me @ "=@rp/a:" }cat force AVATAR { "@set *" me @ "=@rp/e:" }cat force AVATAR { "@set *" me @ "=@rp/m:" }cat force me @ "valid?" 0 setstat else { "To wipe yer skills, use " command @ " RESET" }cat INFORM then ; : rpset me @ "W" flag? if param @ "=" explode pop dup match dup ok? not if pop resolve dup character? not if pop "Invalid target" "RPset" pretty tellme exit then else swap pop then target ! stat ! value ! command @ "+rp" stringcmp not if target @ stat @ value @ toint dup value ! setstat then command @ "+rpi" stringcmp not if target @ stat @ value @ toint dup value ! setstat then command @ "+rps" stringcmp not if target @ stat @ value @ tostr dup value ! setstat then command @ "+rpf" stringcmp not if target @ stat @ value @ tofloat dup value ! setstat then command @ "+rpd" stringcmp not if target @ stat @ value @ todbref dup value ! setstat then command @ "+rpo" stringcmp not if target @ stat @ value @ todbref dup value ! setstat then { "[rpset] " me @ " set RP stat [" stat @ "] on " target @ " to: " value @ }cat dup tellme prog swap prog "/logs" getpropval 1 + dup prog swap "/logs" swap setprop intostr "/logs/" swap strcat swap setprop else "Must be a W to use." "RPset" pretty tellme AVATAR { "wc " me @ " tried to +rpset without a W bit!" }cat force then ; : qtystr dup -1 = if pop "PERM" exit then tostr ; : sheet var pokemon var target2 debug_off param @ "" stringcmp not if me @ target ! else param @ pmatch target ! then target @ #-1 dbcmp if param @ match target ! target @ #-1 dbcmp if { "Target " param @ " not found." }cat "Pokedex" pretty tellme exit then then target @ #-2 dbcmp if { "Target " param @ " matched more than once, be more specific." }cat "Pokedex" pretty tellme exit then target @ "pokemon" getstat pokemon ! { "Pokedex scan of " target @ name }cat header tellme target @ xpspent pop pokemon @ if { " Pokemon:[^GREEN^" { "pokemon/" pokemon @ "/name" }cat getdex 14 lj "^NORMAL^] " " Type:[^CYAN^" { "pokemon/" pokemon @ "/type" }cat getdex 14 lj "^NORMAL^] " " Morphology:[^CYAN^" target @ "pokemorph" getstat mtype 9 lj "^NORMAL^] " }cat fmt76 tellme then { " HP:[^GREEN^" target @ "hp" getstatint tostr 3 rj "/" target @ maxhp tostr 3 rj "^NORMAL^] " "XP:[^CYAN^" target @ "xp" getstatfloat 2 fchop 8 rj "^NORMAL^] " "XP Free:[^CYAN^" target @ "xp" getstatfloat target @ "xpspent" getstatfloat - 2 fchop 8 rj "^NORMAL^] " "Y:[$^YELLOW^" target @ "yen" getstatfloat 2 fchop 12 rj "^NORMAL^] " "Valid:[^GRAY^" target @ "validated?" getstatint if "Yes" else "No " then "^NORMAL^]" }cat fmt76 tellme { " Votes:[^GREEN^" target @ "votes" getstatint tostr 2 rj "/25^NORMAL^] " "VoteQ:[^CYAN^" target @ "voteq" getstatint tostr 2 rj "^NORMAL^] " "Lv:[^CYAN^" target @ "xp" getstatint level 2 fchop 7 rj "^NORMAL^] " "Gym:[" target @ "gymleader" getstat dup if "^YELLOW^" swap else pop target @ "gym" getstat dup if "^GRAY^" swap else pop "None" then then 9 lj "^NORMAL^] " "Stat:[^YELLOW^" { "status/" target @ "status" getstatint }cat getdex tostr 9 rj "^NORMAL^]" }cat fmt76 tellme pokemon @ if { " " "^RED^Cool ^CYAN^[^WHITE^" target @ "c/Cool" getstat tostr 1 lj "^CYAN^] " "^BLUE^Beauty ^CYAN^[^WHITE^" target @ "c/Beauty" getstat tostr 1 lj "^CYAN^] " "^PURPLE^Cute ^CYAN^[^WHITE^" target @ "c/Cute" getstat tostr 1 lj "^CYAN^] " "^GREEN^Smart ^CYAN^[^WHITE^" target @ "c/Smart" getstat tostr 1 lj "^CYAN^] " "^YELLOW^Tough ^CYAN^[^WHITE^" target @ "c/Tough" getstat tostr 1 lj "^CYAN^]^NORMAL^" }cat fmt76 tellme then ( Stats ) target @ "@rp/s/" nextprop "" stringcmp target @ "@rp/t/" nextprop "" stringcmp or if "Stat modifiers" header tellme "|^UNDERLINE^Stat |T| SP |Lev.^NORMAL^| |^UNDERLINE^Stat |T| SP |Lev.^NORMAL^|" tellme { target @ "@rp/s/" array_get_propvals foreach value ! stat ! { "|" stat @ dup "/" rinstr strcut swap pop 24 lj (ability) "| " "|" value @ toint tostr 4 rj (XP in that pool) "|" value @ toint level toint intostr 4 rj "|" (current level) }cat over string? not if " " strcat else strcat tellme then repeat target @ "@rp/t/" array_get_propvals foreach value ! stat ! { "|" stat @ dup "/" rinstr strcut swap pop 24 lj (ability) "|*" "|" value @ toint tostr 4 rj (XP in that pool) "|" value @ toint level toint intostr 4 rj "|" (current level) }cat over string? not if " " strcat else strcat tellme then repeat dup string? if " |" strcat tellme then pop then ( abilities ) target @ "@rp/a/" nextprop "" stringcmp if "Attacks / Knowledges" header tellme "|^UNDERLINE^Ability |PP| XP |Next|Lev.^NORMAL^| |^UNDERLINE^Ability |PP| XP |Next|Lev.^NORMAL^|" tellme #-2 target @ "@rp/a/" array_get_propvals foreach value ! stat ! { "|" stat @ capitalize dup "/" rinstr strcut swap pop 18 lj (ability) "|" target @ { "a/" stat @ "/pp" }cat getstatint tostr 2 rj (XP in that pool) "|" value @ toint tostr 4 rj (XP in that pool) "|" value @ level int 1 + level2xp value @ - toint intostr 4 rj (XP to next level) "|" value @ toint level dlev4 "|" (current level) }cat over string? not if " " strcat else strcat tellme then repeat dup string? if " |" strcat tellme then pop then ( Equipment ) target @ "@rp/e/" nextprop "" stringcmp if "Equipment" header tellme "|^UNDERLINE^Equipment | XP |Lev.^NORMAL^| |^UNDERLINE^Equipment | XP |Lev.|^NORMAL^" tellme #-2 target @ "@rp/e/" array_get_propvals foreach value ! stat ! { "|" stat @ capitalize dup "/" rinstr strcut swap pop 26 lj (ability) "|" value @ toint tostr 4 rj (XP in that pool) "|" value @ toint level dlev4 "|" (current level) }cat over string? not if " " strcat else strcat tellme then repeat dup string? if " |" strcat tellme then pop then ( Training ) target @ "@rp/i/" nextprop "" stringcmp if "Training" header tellme "|^UNDERLINE^Pokemon | XP |Lev.^NORMAL^| |^UNDERLINE^Pokemon | XP |Lev.^NORMAL^|" tellme #-2 target @ "@rp/i/" array_get_propvals foreach value ! stat ! { "|" stat @ capitalize dup "/" rinstr strcut swap pop 26 lj (ability) "|" value @ toint tostr 4 rj (XP in that pool) "|" value @ toint level dlev4 "|" (current level) }cat over string? not if " " strcat else strcat tellme then repeat dup string? if " |" strcat tellme then pop then ( Pokemon ) target @ "@rp/p/" nextprop "" stringcmp if "Pokemon" header tellme "|^UNDERLINE^Name |Species |Lev.^NORMAL^| |^UNDERLINE^Name |Species |Lev.^NORMAL^|" tellme #-2 target @ "@rp/p/" array_get_propvals foreach value ! stat ! { "|" stat @ dup "/" rinstr strcut swap pop 18 lj (Pokemon name) "|" { "/pokemon/" value @ iam "/name" }cat getdex 12 lj (Pokemon species) "|" value @ "xp" getstatint level dlev4 "|" (Pokemon level) }cat over string? not if " " strcat else strcat tellme then repeat dup string? if " |" strcat tellme then pop then ( Trainers ) target @ "@rp/q/" nextprop "" stringcmp if "Trainers" header tellme "|^UNDERLINE^Name |Inv.|Species |Lv^NORMAL^| |^UNDERLINE^Name |Inv.|Species |Lv^NORMAL^|" tellme #-2 target @ "@rp/q/" array_get_propvals foreach value ! stat ! { "|" stat @ dup "/" rinstr strcut swap pop 17 lj (Pokemon name) "|" value @ { "i/" target @ name }cat getstat toint intostr 4 rj (Pokemon investment) "|" { "/pokemon/" value @ iam "/name" }cat getdex 10 lj (Pokemon species) "|" value @ "xp" getstatint level int intostr 2 rj "|" (Pokemon level) }cat over string? not if " " strcat else strcat tellme then repeat dup string? if " |" strcat tellme then pop then ( Badges ) target @ "@rp/b/" nextprop "" stringcmp if "Badges" header tellme "|^UNDERLINE^Badge |Type ^NORMAL^| |^UNDERLINE^Name |Type ^NORMAL^|" tellme #-2 target @ "@rp/b/" array_get_propvals foreach value ! stat ! { "|" stat @ capitalize dup "/" rinstr strcut swap pop 22 lj (Badge name) "|" value @ capitalize 13 lj "|" (Badge type) }cat over string? not if " " strcat else strcat tellme then repeat dup string? if " |" strcat tellme then pop then ( Materials ) target @ "@rp/m/" nextprop "" stringcmp if "Items" header tellme "|^UNDERLINE^Materials |Qty.^NORMAL^| |^UNDERLINE^Materials |Qty.^NORMAL^|" tellme #-2 target @ "@rp/m/" array_get_propvals foreach value ! stat ! { "|" stat @ capitalize dup "/" rinstr strcut swap pop 31 lj (ability) "|" value @ qtystr 4 rj "|" (XP in that pool) }cat over string? not if " " strcat else strcat tellme then repeat dup string? if " |" strcat tellme then pop then ( Key items ) target @ "@rp/k/" nextprop "" stringcmp if "Key items" header tellme "|^UNDERLINE^Key item |Type ^NORMAL^| |^UNDERLINE^Key item |Type ^NORMAL^|" tellme #-2 target @ "@rp/k/" array_get_propvals foreach value ! stat ! { "|" stat @ capitalize dup "/" rinstr strcut swap pop 23 lj (ability) "|" value @ capitalize 12 lj "|" (XP in that pool) }cat over string? not if " " strcat else strcat tellme then repeat dup string? if " |" strcat tellme then pop then { "Pokedex" }cat footer tellme ; : xpshow var pokemon param @ "" stringcmp not if me @ target ! else param @ pmatch target ! then target @ #-1 dbcmp if param @ match target ! target @ #-1 dbcmp if { "Target " param @ " not found." }cat "Pokedex" pretty tellme exit then then target @ #-2 dbcmp if { "Target " param @ " matched more than once, be more specific." }cat "Minidex" pretty tellme exit then target @ xpspent pop target @ "pokemon" getstat pokemon ! { "Pokedex summary for " me @ }cat header tellme pokemon @ if { " Pokemon:[^GREEN^" { "pokemon/" pokemon @ "/name" }cat getdex 14 lj "^NORMAL^] " " Type:[^CYAN^" { "pokemon/" pokemon @ "/type" }cat getdex 14 lj "^NORMAL^] " " Morphology:[^CYAN^" target @ "pokemorph" getstat mtype 9 lj "^NORMAL^] " }cat fmt76 tellme then { " HP:[^GREEN^" target @ "hp" getstatint tostr 3 rj "/" target @ maxhp tostr 3 rj "^NORMAL^] " "XP:[^CYAN^" target @ "xp" getstatfloat 2 fchop 8 rj "^NORMAL^] " "XP Free:[^CYAN^" target @ "xp" getstatfloat target @ "xpspent" getstatfloat - 2 fchop 8 rj "^NORMAL^] " "Y:[$^YELLOW^" target @ "yen" getstatfloat 2 fchop 12 rj "^NORMAL^] " "Valid:[^GRAY^" target @ "validated?" getstatint if "Yes" else "No " then "^NORMAL^]" }cat fmt76 tellme { " Votes:[^GREEN^" target @ "votes" getstatint tostr 2 rj "/25^NORMAL^] " "VoteQ:[^CYAN^" target @ "voteq" getstatint tostr 2 rj "^NORMAL^] " "Lv:[^CYAN^" target @ "xp" getstatint level 2 fchop 7 rj "^NORMAL^] " "Gym:[" target @ "gymleader" getstat dup if "^YELLOW^" swap else pop target @ "gym" getstat dup if "^GRAY^" swap else pop "None" then then 9 lj "^NORMAL^] " "Stat:[^YELLOW^" { "status/" target @ "status" getstatint }cat getdex tostr 9 rj "^NORMAL^]" }cat fmt76 tellme { " Sheet last validated by [^GREEN^" target @ "validatedby" getstat "^NORMAL^] on [^CYAN^" target @ "validatedat" getstatint "%X %x" swap timefmt "^NORMAL^] " }cat fmt76 tellme "Pokedex" footer tellme ; : buy var spent var total var unspent var xp command @ "+buy" stringcmp not if me @ "validated?" getstatint if "You can only +buy skills like this while unvalidated. Please use +train." "Buy" pretty tellme exit else param @ "=" explode 2 = not if "+buy =" "Buy" pretty tellme exit else stat ! tofloat value ! me @ stat @ attackok? not me @ { "a/" stat @ }cat getstatint not and if "This attack is not yet available to you." "Buy" pretty tellme exit then me @ "xp" getstatfloat total ! me @ "xpspent" getstatfloat spent ! total @ spent @ - unspent ! me @ "a/" stat @ strcat getstatfloat xp ! ( value @ unspent @ > if { "You dont have enough XP to put in that pool. Value:[" value @ "] Unspent:[" unspent @ "] Needed:[" value @ unspent @ - "]" }cat "Buy" pretty tellme exit then value @ 0 xp @ - < if { "You dont have enough XP in that pool to take out. Value:[" value @ "] In pool:[" xp @ "] Over by:[" 0 xp @ - value @ - "]" }cat "Buy" pretty tellme exit then ) me @ "a/" stat @ strcat xp @ value @ + setstat me @ xpspent pop me @ "xpspent" getstatfloat spent ! me @ "a/" stat @ strcat getstatfloat xp ! total @ spent @ - unspent ! { stat @ " was adjusted by " value @ 2 fchop "xp. Current:[" xp @ 2 fchop "] Level:[" xp @ level 2 fchop "] XP left:[" unspent @ 2 fchop "]" }cat "Buy" pretty tellme then then then command @ "+buyequip" stringcmp not if param @ "=" explode 2 = not if "+buyequip =" "Buy" pretty tellme exit else stat ! toint value ! me @ { "e/" stat @ }cat getstatint not if "You must equip an item before you can improve upon it." "BuyEquip" pretty tellme exit then me @ "xp" getstatfloat total ! me @ "xpspent" getstatfloat spent ! total @ spent @ - unspent ! me @ "e/" stat @ strcat getstatfloat xp ! value @ unspent @ > if { "You dont have enough XP to put into that equipment. Value:[" value @ 2 fchop "] Unspent:[" unspent @ 2 fchop "] Needed:[" value @ unspent @ - 2 fchop "]" }cat "BuyEquip" pretty tellme exit then value @ 0 xp @ - < if { "You dont have enough XP in that equipment to take out. Value:[" value @ 2 fchop "] In pool:[" xp @ 2 fchop "] Over by:[" 0 xp @ - value @ - 2 fchop "]" }cat "BuyEquip" pretty tellme exit then me @ "e/" stat @ strcat xp @ value @ + setstat me @ xpspent pop me @ "xpspent" getstatfloat spent ! me @ "e/" stat @ strcat getstatfloat xp ! total @ spent @ - unspent ! { stat @ " was adjusted by " value @ 2 fchop "xp. Current:[" xp @ 2 fchop "] Level:[" xp @ level 2 fchop "] XP left:[" unspent @ 2 fchop "]" }cat "BuyEquip" pretty tellme then then ; : train var spent var total var unspent var xp me @ "validated?" getstatint not if "You can only +learn skills while validated. Please use +buy." "Learn" pretty tellme exit else param @ "=" explode 2 = not if "+learn =" "Learn" pretty tellme exit else stat ! tofloat value ! me @ stat @ attackok? not me @ { "a/" stat @ }cat getstatint not and if "This attack is not yet available to you." "Buy" pretty tellme exit then me @ "xp" getstatfloat total ! me @ "xpspent" getstatfloat spent ! total @ spent @ - unspent ! me @ "a/" stat @ strcat getstatfloat xp ! value @ unspent @ > if { "You dont have enough XP to put in that pool. Value:[" value @ 2 fchop "] Unspent:[" unspent @ 2 fchop "] Needed:[" value @ unspent @ - 2 fchop "]" }cat "Learn" pretty tellme exit then value @ 0 < if { "You cannot take XP out of a pool while validated. Value:[" value @ 2 fchop "]" }cat "Learn" pretty tellme exit then me @ "a/" stat @ strcat xp @ value @ + setstat me @ xpspent pop me @ "xpspent" getstatfloat spent ! me @ "a/" stat @ strcat getstatfloat xp ! total @ spent @ - unspent ! { stat @ " was increased by " value @ 2 fchop "xp. Current:[" xp @ 2 fchop "] Level:[" xp @ level 2 fchop "] XP left:[" unspent @ 2 fchop "]" }cat "Learned" pretty tellme then then ; : poketrain var tmp me @ mon? if "Pokemon cannot train anyone else." "PokeTrain" pretty tellme exit then param @ "=" explode 2 = not if "+pokemon/train =" "Poketrain" pretty tellme exit else target ! tofloat value ! target @ resolve target ! target @ int 0 < if { "Unknown or ambiguous target." }cat "Poketrain" pretty tellme exit then value @ 0 < if "You cannot take XP from your pokemon." "Poketrain" pretty tellme exit then me @ { "p/" target @ name }cat getstat not if "You must 0wn the pokemon you want to train." "PokeTrain" pretty tellme exit then me @ "xp" getstatfloat me @ "xpspent" getstatfloat value @ + > if me @ "xpspent" getstatfloat value @ - me @ "xpspent" rot setstat me @ "i/" target @ name strcat getstatfloat value @ + me @ "i/" target @ name strcat rot setstat target @ "xp" getstatfloat value @ + target @ swap "xp" swap setstat { me @ " trains " target @ " for " value @ 2 fchop " XP." }cat "Poketrain" pretty tellhere { me @ " trains " target @ " for " value @ 2 fchop " XP." }cat "Poketrain" pretty target @ swap ansi_notify else { "You dont have enough XP! Value:[" value @ "]." }cat "$" pretty tellme then then ; : spend var tmp command @ "+pay" stringcmp not if param @ "=" explode 2 = not if "+pay =" "$" pretty tellme exit else target ! tofloat value ! target @ resolve target ! target @ int 0 < if { "Unknown or ambiguous target." }cat "$" pretty tellme exit then value @ 0 < if "You cannot give someone negative yen." "$" pretty tellme exit then me @ target @ alt? if { "You cannot give money to your alt [" target @ "]! You lost the $" value @ 2 fchop " in the attempt and staff has been notified." }cat "Pay" pretty tellme paranoia? if AVATAR { "wc #CHEATER/PAYALT: " me @ unparseobj " -> " target @ unparseobj ": (" value @ 6 fchop ") - The yen was confiscated." }cat force then exit then me @ owner target @ dbcmp me @ target @ dbcmp not and if { "You cant take your puppet's money, cheater. [" target @ "]! You lost the $" value @ 2 fchop " in the attempt and staff has been notified." }cat "Pay" pretty target @ swap ansi_notify me @ "yen" over over getstat value @ - setstat paranoia? if AVATAR { "wc #CHEATER/GETPUPPETMONEY: " me @ unparseobj " -> " target @ unparseobj ": (" value @ 6 fchop ") - The yen was confiscated." }cat force then exit then target @ #-2 dbcmp if { "Target " param @ " matched more than once, be more specific." }cat "$" pretty tellme exit then me @ "yen" getstatfloat value @ >= if me @ "yen" getstatfloat value @ - me @ swap "yen" swap setstat target @ "yen" getstatfloat value @ + target @ swap "yen" swap setstat { me @ " gives $" value @ 2 fchop " to " target @ "." }cat "$" pretty tellhere { me @ " gives $" value @ 2 fchop " to " target @ "." }cat "$" pretty target @ swap ansi_notify else { "You dont have enough yen! Value:[" value @ "]." }cat "$" pretty tellme then then then command @ "+give" stringcmp not if param @ "=" explode 2 = if pop pop param @ "=1" strcat param ! then param @ "=" explode 3 = not if "+give =[=]" "Give" pretty tellme exit else target ! stat ! toint value ! target @ resolve target ! target @ int 0 < if { "Unknown or ambiguous target." }cat "Give" pretty tellme exit then value @ 0 < if "You cannot give someone a negative amount of an item." "Give" pretty tellme exit then me @ target @ alt? if { "You cannot give items your alt " target @ ", cheater. You lost the " stat @ " in the attempt and staff has been notified." }cat "Pay" pretty tellme me @ "m/" stat @ strcat over over getstat value @ - setstat paranoia? if AVATAR { "wc #CHEATER/GIVEALT: " me @ unparseobj " -> " target @ unparseobj ": (" stat @ "/" value @ ") - The items were confiscated." }cat force then exit then me @ owner target @ dbcmp me @ target @ dbcmp not and if { "You cant take your puppet's items, cheater. [" target @ "]! You lost the $" value @ 2 fchop " in the attempt and staff has been notified." }cat "Pay" pretty target @ swap ansi_notify me @ "m/" stat @ strcat over over getstat value @ - setstat paranoia? if AVATAR { "wc #CHEATER/GETPUPPETITEMS: " me @ unparseobj " -> " target @ unparseobj ": (" stat @ "/" value @ ") - The items were confiscated." }cat force then exit then me @ "m/" stat @ strcat getstatint value @ >= if me @ "m/" stat @ strcat getstatint value @ - me @ swap "m/" stat @ strcat swap setstat target @ "m/" stat @ strcat getstatint value @ + target @ swap "m/" stat @ strcat swap setstat { me @ " gives " value @ " " stat @ "(s) to " target @ "." }cat "Give" pretty tellhere else { "You dont have enough " stat @ " to give! Value:[" value @ "]." }cat "Give" pretty tellme then then then command @ "+use" stringcmp not if param @ not if "+use [=]" "Use" pretty tellme exit then param @ "=" explode tmp ! tmp @ 1 = if stat ! me @ target ! then tmp @ 2 = if stat ! target ! target @ resolve target ! target @ int 0 < if { "Unknown or ambiguous target." }cat "Use" pretty tellme exit then then me @ target @ alt? if { "You cannot use items on your alt " target @ ", cheater. The item " stat @ " had no effect,and staff has been notified." }cat "Pay" pretty tellme me @ "m/" stat @ strcat over over getstat 1 - setstat paranoia? if AVATAR { "wc #CHEATER/USEALT: " me @ unparseobj " -> " target @ unparseobj ": (" stat @ ") - The item had no effect." }cat force then exit then me @ owner target @ dbcmp me @ target @ dbcmp not and if { "Your puppets cant use items on you, cheater. [" target @ "]! The item " stat @ " had no effect and staff has been notified." }cat "Pay" pretty target @ swap ansi_notify me @ "m/" stat @ strcat over over getstat 1 - setstat paranoia? if AVATAR { "wc #CHEATER/USEPUPPETITEMS: " me @ unparseobj " -> " target @ unparseobj ": (" stat @ ") - The item had no effect." }cat force then exit then me @ "m/" stat @ strcat getstatint dup 1 >= swap -1 = or if me @ "m/" stat @ strcat getstatint dup -1 = not if target @ stat @ itemhandler - me @ swap "m/" stat @ strcat swap setstat then { target @ me @ dbcmp if me @ " uses an item: [^CYAN^" stat @ "^NORMAL^]." }cat "Use" pretty tellhere else me @ " uses an item: [^CYAN^" stat @ "^NORMAL^] on [" target @ "]." }cat "Use" pretty tellhere then else { "You dont have any ^CYAN^" stat @ "^NORMAL^ to use!" }cat "Use" pretty tellme then then command @ "+spendhp" stringcmp not if param @ "=" explode 1 = not if "+spendhp " "HP" pretty tellme exit else toint value ! value @ 0 < if me @ "hp" getstatint value @ - me @ swap "hp" swap setstat { me @ " has healed themselves. Value:[" value @ "] HP:[" me @ "hp" getstatint "]" }cat "Heal" pretty tellhere AVATAR { "wc " me @ " has healed themselves. Value:[" value @ "] HP:[" me @ "hp" getstatint "]" }cat force then me @ "hp" getstatint value @ >= if me @ "hp" getstatint value @ - me @ swap "hp" swap setstat { me @ " adjustes their Health Points by [" value @ "]." }cat "SpendHP" pretty tellhere else me @ "hp" getstatint value @ - me @ swap "hp" swap setstat { me @ " has adjusted their HP below zero, and is in KO status. Value:[" value @ "] HP:[" me @ "hp" getstatint "]" }cat "SpendHP" pretty tellhere AVATAR { "wc " me @ " has adjusted their HP below zero, and is in KO status. Value:[" value @ "] HP:[" me @ "hp" getstatint "]" }cat force then then then ; : validate param @ "" stringcmp not if "me" target ! else param @ target ! then target @ resolve target ! target @ int 0 < if { "Unknown or ambiguous target." }cat "Validate" pretty tellme exit then target @ player? me @ staff? not and if "Only staff may validate players." "Validate" pretty tellme exit then target @ thing? if me @ staff? not if me @ target @ controls not if "You can only validate your own puppets." "Validate" pretty tellme exit then then then command @ "+validate" stringcmp not if target @ "validated?" 1 setstat target @ "validatedby" me @ setstat target @ "validatedat" systime setstat target @ { me @ " has validated your sheet. RP on!" }cat "RPStaff" pretty ansi_notify AVATAR { "wc " me @ " has validated " target @ "'s sheet." }cat force { "You have validated " target @ "'s sheet." }cat INFORM then command @ "+invalidate" stringcmp not if target @ "validated?" 0 setstat AVATAR { "wc " me @ " has invalidated " target @ "'s sheet." }cat force { "You have unvalidated " target @ "'s sheet." }cat INFORM then ; : voteadj ( d f -- f ) var target var votes var adj votes ! target ! me @ player? if 1.0 target @ "voteq" getstat tofloat 1 10 limit / adj ! else 0.75 then votes @ adj @ * ; : vote var temp var newvalue me @ "G" flag? if { "Guests cant vote." }cat "Vote" pretty tellme then command @ "+vote" stringcmp not if param @ "=" explode temp ! temp @ 0 <= temp @ 3 > or if "+vote =<0..3>" "vote" pretty tellme exit else temp @ 1 = if match target ! 1.0 value ! ( Moeru changed pmatch to match... ) else match target ! tofloat value ! ( and probably broke it ) then target @ #-1 dbcmp if param @ match target ! target @ #-1 dbcmp if { "Target " param @ " not found." }cat "Pokedex" pretty tellme exit then then target @ #-2 dbcmp if { "Target " param @ " matched more than once, be more specific." }cat "Vote" pretty tellme exit then me @ target @ alt? if { "You cannot vote for your alt [" target @ "]! You lost " value @ 6 fchop "xp for trying, and staff has been notified." }cat "Vote" pretty tellme me @ "xp" over over getstat value @ - setstat paranoia? if AVATAR { "wc #CHEATER/VOTEALT: " me @ unparseobj " -> " target @ unparseobj ": (" value @ 6 fchop ") - XP was deducted." }cat force then exit then me @ owner target @ dbcmp me @ target @ dbcmp not and if { "Your puppet [" me @ "] cant vote for you [" target @ "], cheater. You (not your puppet) lost " value @ 6 fchop "xp for trying, and staff has been notified." }cat "Vote" pretty target @ swap ansi_notify target @ "xp" over over getstat value @ - setstat paranoia? if AVATAR { "wc #CHEATER/PUPPETVOTEOWNER: " me @ unparseobj " -> " target @ unparseobj ": (" value @ 6 fchop ") - XP was deducted." }cat force then exit then me @ "@rp/votedfor" target @ reflist_find if { "You can only vote for someone once every WorldHeart tick. Sorry." "Vote" pretty tellme ( paranoia? if AVATAR { "wc #CHEATER/VOTEBLITZ: " me @ unparseobj " -> " target @ unparseobj ": (" value @ ")" }cat force then ) exit then atmax? if "That person is already at max XP!" "Vote" pretty tellme exit then (Added for 10000XP cap) target @ me @ dbcmp if { "You cannot vote for yourself, foo!" }cat "Vote" pretty tellme exit then target @ owner me @ dbcmp if { "You cannot vote for your puppet, foo!" }cat "Vote" pretty tellme exit then ( puppet exception added by Moeru ) value @ 0 <= if me @ "W" flag? not if 1.0 value ! then then value @ MAXVOTES > if MAXVOTES value ! then me @ staff? me @ "votes" getstatfloat value @ >= or if me @ staff? not if me @ "votes" getstatfloat value @ - me @ "votes" rot setstat then value @ 3.0 > value @ 0.0 < or if paranoia? if AVATAR { "wc #WIZ/SpecialVote: " me @ unparseobj " -> " target @ unparseobj ": (" value @ ")" }cat force then then target @ value @ voteadj newvalue ! target @ owner "xp" getstatfloat newvalue @ + target @ owner "xp" rot setstat me @ player? if target @ "voteq" over over getstat ++ 1 10 limit setstat then target @ "lastvote" systime setstat { "You vote for " target @ owner " with " value @ 1 = if value @ 2 fchop " vote" else value @ 2 fchop " votes" then "." }cat "Vote" pretty tellme target @ owner { "You gained " newvalue @ 2 fchop "xp from " value @ 2 fchop " vote(s) by " me @ "." }cat "Vote" pretty ansi_notify me @ "@rp/votedfor" target @ reflist_add target @ owner levelhandler pop else { "You dont have enough votes! Target:[" target @ "] Value:[" value @ "]." }cat "Vote" pretty tellme then then then command @ "+voteall" stringcmp not if me @ location contents_array foreach target ! pop target @ character? if target @ awake? if target @ "validated?" getstatint if atmax? if else (Added to put 10000 XP cap) target @ owner idletime 900 <= if ( "owner" added by Moeru to make it work with puppets ) target @ owner me @ dbcmp not if me @ target @ alt? not if me @ "@rp/votedfor" target @ reflist_find not if ( <---- Moeru added "owner" here ) 1 value ! target @ value @ voteadj newvalue ! me @ "votes" getstatfloat value @ >= if me @ "votes" getstatfloat value @ - me @ "votes" rot setstat target @ owner "xp" getstatfloat newvalue @ + target @ owner "xp" rot setstat me @ player? if target @ "voteq" over over getstat ++ 1 10 limit setstat then target @ "lastvote" systime setstat { "You vote for " target @ owner " with " value @ 1 = if value @ 2 fchop " vote" else value @ 2 fchop " votes" then "." }cat "Vote" pretty tellme target @ owner { "You gained " newvalue @ 2 fchop "xp from " value @ 2 fchop " vote(s) by " me @ "." }cat "Vote" pretty ansi_notify me @ "@rp/votedfor" target @ reflist_add target @ owner levelhandler pop else { "You dont have enough votes! Target:[" target @ "] Value:[" value @ "]." }cat "Vote" pretty tellme then then then then then then then then then (added an extra then for the atmax? if else line) repeat then ; : pokemon { "pokemon/" param @ "/name" }cat getdex not if { "pokemon/byname/" param @ }cat getdex param ! then param @ not if "Couldn't find that pokemon, by name or number." "Pokedex" pretty tellme exit then me @ "pokemon" param @ setstat { "You are now " param @ " (" { "/pokemon/" param @ "/name" }cat getdex ")" }cat "Pokemon" pretty tellme ; : pokemorph me @ "pokemorph" over over getstat toint ++ NUMMORPHS % setstat { "Pokemon morphology: " me @ "pokemorph" getstat mtype }cat "Pokemorph" pretty tellme me @ "pokemorph" getstat toint 1 2 .. if me @ "POKEMON" set else me @ "!POKEMON" set then ; : install prog "_defs/fmt76" "\"$lib/rps\" match \"fmt76\" call" setprop prog "_defs/cost" "\"$lib/rps\" match \"cost\" call" setprop prog "_defs/level" "\"$lib/rps\" match \"level\" call" setprop prog "_defs/level2xp" "\"$lib/rps\" match \"level2xp\" call" setprop prog "_defs/maxhp" "\"$lib/rps\" match \"maxhp\" call" setprop prog "_defs/nd6" "\"$lib/rps\" match \"nd6\" call" setprop prog "_defs/nd4" "\"$lib/rps\" match \"nd4\" call" setprop prog "_defs/successlevel" "\"$lib/rps\" match \"successlevel\" call" setprop prog "_defs/idletime" "\"$lib/rps\" match \"idletime\" call" setprop prog "_defs/iam" "\"$lib/rps\" match \"iam\" call" setprop prog "_defs/attackok?" "\"$lib/rps\" match \"attackok?\" call" setprop prog "_defs/tmhmok?" "\"$lib/rps\" match \"tmhmok?\" call" setprop prog "_defs/itemok?" "\"$lib/rps\" match \"itemok?\" call" setprop prog "_defs/adjusthp" "\"$lib/rps\" match \"adjusthp\" call" setprop prog "_defs/isfainted?" "\"$lib/rps\" match \"isfainted?\" call" setprop "PokeRPSystem v1.1" header tellhere "The Windows 3.1 of RP systems." "DESCRIPTION" pretty tellhere "$lib/rp $lib/alynna BOY LINK_OK AUTOSTART" "REQUIRES" pretty tellhere "fmt76 cost level level2xp maxhp nd6 nd4 successlevel idletime" "INCLUDES" pretty tellhere "iam attackok? tmhmok? itemok? isfainted? adjusthp" "INCLUDES" pretty tellhere "+init;+chargen +sheet;sheet +buy;buyequip +train;+learn +roll;+check" "INSTALLS" pretty tellhere "+pay;+spendhp;+give;+use +validate;+invalidate +rp;+rpi;+rps;+rpf;+rpd" "INSTALLS" pretty tellhere "+vote;+voteall +xp;+votes;+points +sl +pokemon" "INSTALLS" pretty tellhere "+store;+store/buy;+store/sell;+store/trash" "INSTALLS" pretty tellhere "fmt76 cost level level2xp" "TESTABLE" pretty tellhere "Alynna's MUFInstaller" footer tellhere ; : sysheart var target var gained var factor background online_array foreach target ! pop pi target @ location numplayers * 10.0 / factor ! target @ "validated?" getstatint if ( Got to be validated ) target @ "lifecycle" getstatint 1 + target @ "lifecycle" rot setstat target @ owner idletime 900 < if ( Only score points if not idle ) ( "owner" added by Moeru to make it work with puppets ) target @ "~status" getpropstr "{OOC|IDLE|IDL}" smatch not if ( And not OOC ) ( Always degenerate while IC, whether people are around or not ) target @ location name "*OOC*" smatch not if ( And not in OOC location ) ( Maybe lose a bit of condition stats ) random 10000 % CONDVEC < if paranoia? if AVATAR { "!wc #DEBUG: " target @ unparseobj " lost 1 COOL" }cat force then target @ "c/Cool" over over getstat -- 0 9 limit setstat then random 10000 % CONDVEC < if paranoia? if AVATAR { "!wc #DEBUG: " target @ unparseobj " lost 1 BEAUTY" }cat force then target @ "c/Beauty" over over getstat -- 0 9 limit setstat then random 10000 % CONDVEC < if paranoia? if AVATAR { "!wc #DEBUG: " target @ unparseobj " lost 1 CUTE" }cat force then target @ "c/Cute" over over getstat -- 0 9 limit setstat then random 10000 % CONDVEC < if paranoia? if AVATAR { "!wc #DEBUG: " target @ unparseobj " lost 1 SMART" }cat force then target @ "c/Smart" over over getstat -- 0 9 limit setstat then random 10000 % CONDVEC < if paranoia? if AVATAR { "!wc #DEBUG: " target @ unparseobj " lost 1 TOUGH" }cat force then target @ "c/Tough" over over getstat -- 0 9 limit setstat then target @ location numplayers 3 >= if ( and more than me here ) ( IC and active section ) ( Earn Refresh points and gain more XP ) atmax? if 100 tofloat gained ! else target @ "xp" getstatfloat target @ location numplayers 2 >= if factor @ else 0.0 then + target @ "xp" rot setstat target @ "xp" getstatint level tofloat 1.00 * gained ! target @ verbose? if target @ { "Roleplaying XP: " factor @ 6 fchop }cat "WorldHeart" pretty ansi_notify then then ( get Yen ) systime target @ "@/logintime" getprop toint - 60.0 / dup 250.00 > if pop 250.00 then gained ! target @ "yen" over over getstat gained @ + setstat ( paranoia? if AVATAR { "wc #DEBUG: " target @ unparseobj ": " gained @ " -> " target @ "yen" getstat }cat force then ) target @ verbose? if target @ { "Yen earned: " gained @ 2 fchop }cat "WorldHeart" pretty ansi_notify then ( Regain HP ) target @ "hp" getstatint target @ maxhp < if target @ stathandler pop target @ "Regeneration" getstatint level 1 + toint gained ! target @ "hp" getstatint gained @ + dup target @ maxhp > if pop target @ maxhp then target @ "hp" rot setstat target @ verbose? if target @ { "You gained " gained @ "hp, from natural regeneration." }cat "WorldHeart" pretty ansi_notify then then then then then then ( All validated section ) ( Clear voted list ) target @ "@rp/votedfor" 0 setprop ( Remove a voteq ) target @ "voteq" over over getstat -- 1 10 limit setstat target @ verbose? if target @ { "VotedFor cleared, VoteQ reduced by 1 .. (" target @ "voteq" getstat dup ";" swap 1.0 swap / 2 fchop ")" }cat "WorldHeart" pretty ansi_notify then ( Regenerate votes ) target @ "votes" getstatint 2 + dup 25 > if pop 25 then target @ "votes" rot setstat then ( Common section ) ( Tell them if they gained a level. ) target @ levelhandler pop repeat ; : compare me @ location ; : main param ! param @ mufcron? if sysheart exit then ( Sysheart: Initialize the system heart ) command @ "{+sysheart}" smatch if sysheart exit then ( Install: First time use setup ) command @ "+BASICRPSystem/install" smatch if install exit then ( Init: Clear an invalidated sheet, and set it up for chargen ) command @ "{+init|+chargen}" smatch if init exit then ( Wipe: Wipe all your information, but keep your XP ) command @ "{+wipe}" smatch if init-partial exit then ( Pokemon: Specify your pokemon type ) command @ "{+pokemon}" smatch if pokemon exit then ( Pokemorph: Toggles your pokemorph setting ) command @ "{+pokemorph}" smatch if pokemorph exit then ( Sheet: Display my sheet, or someone elses sheet ) command @ "{+sheet|sheet|+dex|+pokedex}" smatch if sheet exit then ( Buy: Adjust skills while chargenning or invalidated ) command @ "{+buy|+buyequip}" smatch if buy exit then ( Train: Adjust skills while validated ) command @ "{+train|+learn}" smatch if train exit then ( PokeTrain: Give XP to someone ) command @ "{+pokemon/train}" smatch if poketrain exit then ( Compare: Compare the last two rolls to the pokemon database ) command @ "{+compare|+cmp}" smatch if compare exit then ( Spend: Give yen or spend HP ) command @ "{+pay|+spendhp|+give|+use}" smatch if spend exit then ( Validate: (Staff only) Mark a sheet valid or invalid ) command @ "{+validate|+invalidate}" smatch if validate exit then ( RPSet: (Staff only) Set an RPStat manually ) command @ "{+rp|+rpi|+rps|+rpf|+rpd|+rpo}" smatch if rpset exit then ( Vote: Give a player 1-3 xp ) command @ "{+vote|+voteall}" smatch if vote exit then ( XPShow: Show sheet summary ) command @ "{+xp|+votes|+points}" smatch if xpshow exit then ( Store: Buy/Sell items in a store ) command @ "{+store|+store/buy|+store/sell|+store/trash}" smatch if pokestore exit then ( Pokemon/X: Own or disown pokemon ) command @ "{+pokemon/owner|+pokemon/disown|+pokemon/leave|+pokemon/trade}" smatch if pokeown exit then ( Pokemon: Heal pokemon at the pokemon center ) command @ "{+pokemon/heal}" smatch if pokeheal exit then ( Pokemon: Heal pokemon at the pokemon center ) command @ "{+pokemon/train}" smatch if poketrain exit then ( Roll: Roll one of the abilities you have ) command @ "{+roll|+check}" smatch if pokebattle exit then ( testing section ) command @ "+rps/cost" smatch if { me @ param @ cost }cat "COST" pretty tellme exit then command @ "+rps/fmt76" smatch if { param @ .debug-on fmt76 .debug-off }cat tellme exit then command @ "+rps/level" smatch if { param @ tofloat level }cat tellme exit then command @ "+rps/level2xp" smatch if { param @ tofloat level2xp }cat tellme exit then command @ "+rps/idletime" smatch if { param @ pmatch owner idletime }cat tellme exit then ( "owner" added by Moeru to make it work with puppets ) command @ "+sl" smatch if { param @ toint successlevel }cat "Success Level" pretty tellme exit then ; . c q